login

Author Topic: Catapults  (Read 41298 times)

Grodsgenhaigen

  • Guest
Catapults
« on: November 12, 2007, 07:17:40 PM »
The following is copy-pasted from a Taleworlds thread I started yesterday. Since I get the feeling that more serious modding is done over here, I reckon this is the place for this.




I had a sudden inspiration today, and I acted on it. I made a catapult, which when struck would rotate its arm as though it were firing. This is nothing new, but the following is.

I made it spawn and instantly kill a river pirate where the ammunition should have been. With the ragdoll, the river pirate went tumbling through the air over the city of Tihr in a physically accurate manner. Now what I'm thinking is this: make a troop that looks exactly like a barrel or a large stone, and repeat the same process, and you have a real working catapult without any ineloquent moving scene props, and with perfect trajectory, ready to go in any scene.

I tried to make it launch a horse, but the agent killing commands don't work on horses, it seems.



Your thoughts?

Kasemacher

  • Guest
Re: Catapults
« Reply #1 on: November 12, 2007, 07:21:16 PM »
You should make a short Youtube video.  10-20 seconds would be plenty of time.

I am wondering about making a troop that is ammunition because wouldn't it spawn in any other battles?  Also, I do not think getting hit by a corpse kills anyone in M&B.  Very interesting though.

I am by no means an expert at modding, just posting my thoughts.

Grodsgenhaigen

  • Guest
Re: Catapults
« Reply #2 on: November 12, 2007, 07:25:49 PM »
You should make a short Youtube video.  10-20 seconds would be plenty of time.
May do it this weekend.

I am wondering about making a troop that is ammunition because wouldn't it spawn in any other battles?  Also, I do not think getting hit by a corpse kills anyone in M&B.  Very interesting though.
No. The ammunition troop is unconnected to the party, and is spawned by the scene prop and thus has no effect on the battle.

Also, I do not think getting hit by a corpse kills anyone in M&B.
No, but that is easy to mod in. Fire a trigger every tenth of a second that checks for a dead ammo troop, checks to see if it has moved since the last firing of the trigger, and if so, kills any troop within a certain range of the ammo troop. Sounds complicated, but could be done in about ten lines of code.

Offline Ron Losey

  • Master
  • *****
  • Posts: 4418
    • View Profile
Re: Catapults
« Reply #3 on: November 12, 2007, 08:00:57 PM »
But this has to be the best screenshot in the history of M&B.

grailknighthero

  • Guest
Re: Catapults
« Reply #4 on: November 12, 2007, 08:28:10 PM »
I am wondering about making a troop that is ammunition because wouldn't it spawn in any other battles?  Also, I do not think getting hit by a corpse kills anyone in M&B.  Very interesting though.
Neither does getting hit by scene props but highlander and KON_air have done it.

But this has to be the best screenshot in the history of M&B.

Ya I never thought Id see a trebuchet\catapult\magonel throwing a troop around the battlefield.

Kasemacher

  • Guest
Re: Catapults
« Reply #5 on: November 12, 2007, 08:39:50 PM »
Grods, you are spoling the M&B community by all the things you're developing.  You're doing ship combat, now catapults?   :D

Grodsgenhaigen

  • Guest
Re: Catapults
« Reply #6 on: November 12, 2007, 09:05:39 PM »
Grods, you are spoling the M&B community by all the things you're developing.  You're doing ship combat, now catapults?   :D
Hopefully in combination at some point.  :P

Offline KON_Air

  • Craftsman
  • **
  • Posts: 110
    • View Profile
Re: Catapults
« Reply #7 on: November 13, 2007, 12:08:36 AM »
No, you can simply choose that agent and make it hurt when it hits, you can even make a prop follow it (ie, invis agent, prop moving to its location all the time) :shock:

I never thought of that, it can pretty much be the easy answer to trajectory calculations.

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Catapults
« Reply #8 on: November 13, 2007, 03:10:12 AM »
No, you can simply choose that agent and make it hurt when it hits, you can even make a prop follow it (ie, invis agent, prop moving to its location all the time) :shock:

I never thought of that, it can pretty much be the easy answer to trajectory calculations.

And you can call custom animations etc. when it lands (i.e. stops moving), possibly spawning scene props when the operation becomes available in future versions of M&B. Greek fire, anyone?

Grodsgenhaigen

  • Guest
Re: Catapults
« Reply #9 on: November 13, 2007, 06:17:03 AM »
And you can call custom animations etc. when it lands (i.e. stops moving), possibly spawning scene props when the operation becomes available in future versions of M&B. Greek fire, anyone?
Don't even need to spawn. There is a scene prop replace operation, and it wouldn't be to difficult to replace an invisible scene prop.

No, you can simply choose that agent and make it hurt when it hits, you can even make a prop follow it (ie, invis agent, prop moving to its location all the time) :shock:

I never thought of that, it can pretty much be the easy answer to trajectory calculations.
Exactly what I was thinking.

Offline Fisheye

  • Blues Brother
  • Moderator
  • *****
  • Posts: 427
  • My scalp's so bright, I gotta wear shades.
    • View Profile
Re: Catapults
« Reply #10 on: November 13, 2007, 07:33:51 AM »
Using ragdoll physics to create parabolas is complete and utter genius. Brilliant! Keep going!
« Last Edit: November 13, 2007, 07:35:44 AM by Fisheye »

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Catapults
« Reply #11 on: November 13, 2007, 07:56:00 AM »
Don't even need to spawn. There is a scene prop replace operation, and it wouldn't be to difficult to replace an invisible scene prop.

The problem with that, though, is that you'd have to place all the ammunition props beforehand (ugly hack) and would therefore only have a finite amount of ammunition.

Offline Ron Losey

  • Master
  • *****
  • Posts: 4418
    • View Profile
Re: Catapults
« Reply #12 on: November 13, 2007, 08:12:29 AM »
Everything has a finite amount of ammunition - unless you plan to have guys out there with shovels collecting rocks, so you can throw the whole world at them one stone at a time.

Then again, if you're down to throwing random stones, you probably should rethink your whole strategy.

Generally it's considered preferable to throw something that will do some critical damage - either dead things to spread disease, or incendiary materials/explosives/chemical agents (in whatever combination).  In the case of large trebuchet, round stones were used against stone walls - but these stones were cut for size and weight so they would fly straight ... not just every rock in the field.

Generally speaking, everything has finite ammunition.

Offline Fisheye

  • Blues Brother
  • Moderator
  • *****
  • Posts: 427
  • My scalp's so bright, I gotta wear shades.
    • View Profile
Re: Catapults
« Reply #13 on: November 13, 2007, 08:17:45 AM »
You also need to make the catapult aimable, like if you whack it a bit on the right wheel it rotates to the right, and so on. And also something to control power.

Offline Hellequin

  • Journeyman
  • ***
  • Posts: 254
    • View Profile
Re: Catapults
« Reply #14 on: November 13, 2007, 10:46:09 AM »
Ron, Winter was talking about finiteness in the sense of it requiring one-to-one prop placement work per shot.  We can achieve finite ammo counts by script, and only need to change a single number, if we use the spawned implementation the original poster tried.

I echo the comment - that's a brilliant implementation, well done.  Perhaps we should suggest to Armagan that the next module system version might have the ability to kick in ragdoll effects for a scene prop, perhaps for a limited time or on a triggered basis only.  Even better, let it have an initial vector we supply. Tremendous potential.