Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Knockdown (propelled by the blow!) SCIENCE  (Read 8996 times)

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Knockdown (propelled by the blow!) SCIENCE
« on: April 17, 2012, 09:09:44 am »

I set out to find an explanation of the game mechanics behind "X is propelled away by the force of the blow!" and made some discoveries. Comments or additional information would be appreciated. I put this on the modding forum because the knockback mechanic is too weak to be practical for most fort/adventure players, but you guys might want to create knockback creatures and weapons.

1. Law of cartoon motion
Objects in flight stay at the same elevation and velocity until they run out of momentum, at which point they fall straight down. This may change with soon-to-come updates (parabolic minecart paths).

2. Conservation of momentum
Regardless of the source of the impulse, the distance a creature is propelled is related to its own weight. Most fleshy creatures have similar density, so we can use size instead of finding the weight. If a bronze colossus can kick a dwarf 2 tiles, it can kick a dog 4 tiles, a badger 8 tiles, or a albatross 15 tiles.

60000 x 2 = 30000 x 4 = 15000 x 8 = 8000 x 15 = 120000.

3. Terminology
Many players refer to units of distance or weight in the game as "Urists". Since momentum is mass x velocity, the units would be Urists^2/tick, which is a mouthful. From now on I am going to refer to these units as "Moruls", in honour of the Orc-golfing dwarf of forum legend. In the above example, the bronze colossus kick is 120000 moruls.

4. Minimum distance corollary
The bronze colossus in the above example can't propel anything larger than size 120000 with a kick, since the distance would become less than 1 and the game appears to round distance down. This is true regardless of the source of the impulse.

5. Crossbow modding
If you mod the [SHOOT_FORCE:1000] and [SHOOT_MAXVEL:1000] of a crossbow to 1000000 each, the impulse delivered to the target is around 350000 moruls (there is some random variation). This does scale linearly with changes to the force or maxvel, but is independant of the bolt weight. It appears that heavy bolts and light bolts have the same momentums when launched, but different velocities.

6. Maximum distance cap
All forms of knockback/propelling are capped at a maximum distance of 50 tiles, except for the Throwing wrestling move which appears unlimited.

7. Throwing (wrestling move)
Bronze colossuses can throw creatures at about 11000000 moruls, enough to throw a dwarf 183 tiles. Throwing appears to scale linearly with creature size, as a dwarf can throw a cat 6 tiles or a chicken 11 tiles (33000 = 11000000 * 20000000/60000). Throwing doesn't appear to change with the thrower's density or weight. Throwing doesn't scale with the size of your hands.

8. Chunky salsa rule
Following from step 7 experiments, the following effects were noted when a bronze colossus threw various creatures:
a) hippo-stunned but alive
b) saltwater crocodile-suffered falling damage "takes the full force of the impact"
c) cow-limb seperation instant death "slams into an obstacle and blows apart!"

Similar tests with a Troll throwing kea, chicken, cat, albatross, and badger suggest that if a creature is propelled a distance of 10 or less tiles, it is stunned but unharmed, whereas 11-20 tiles causes falling damage. If a creature was going to be tossed over 20 tiles distance, but a wall intervened, it will blow apart.

9. Punching/kicking
Punching and kicking appears to scale linearly with the weight of the body part used as a weapon. If a creature can propel someone 21 tiles with a normal right hand, a left hand 10x smaller will propel them 2 tiles. The relationship between creature size and kick scaling is kind of strange and more research would be required. Ogres have a 3000 morul kicking power, 1/10 of what would be expected from linear scaling. Smaller creatures are untestably weak.

10. Strength and agility
Strength appears to scale propelling power from various sources both linearly with the strength value, but also linearly with any resulting changes in speed due to muscle mass. Propelling power doesn't scale directly with agility, but does scale with the resulting speed change. The double strength and double agility of vampires lead to a 1.8x increace in speed and 3.5x increase in propelling power in some subjects.

11. Weapons
Weapons really suck right now at propelling creatures. A bronze colossus can put out 6000 moruls with a platinum maul, or 2000 moruls with a platinum mace. Weapon knockback is linearly proportional to weapon weight and attack velocity. The weight of the weapon user doesn't scale the weapon's knockback. I couldn't find a relationship between weapon minsize and 2handedsize and knockback.

Weapon knockback scales very strangely with the size of the user, and more research would be required. In general, creatures over size 1000000 can knock things around with modestly boosted weapons or stats, whereas smaller creatures require ludicrous boosts to get any results.

Despite this, any creature holding a giant sperm whale corpse (301015 urists!) can hit other creatures with it for a 90000 morul knockback. Why a dwarf can throw a whale at a cat to knock it 18 tiles away, yet can only throw the cat itself 6 tiles, and can't even kick or hammer-golf the cat a single tile is beyond me.

12. Target body part
It appears that knockback only happens when a creature is struck in the upper body, lower body, or head.

13. References

Bronze colossus lower body & Platinum maul: Surprisingly bad weapons
http://www.bay12forums.com/smf/index.php?topic=105016.0
18 march 2012

Footkerchief's explanation
http://www.bay12forums.com/smf/index.php?topic=100687.msg3036876#msg3036876
26 feb 2012
also bug report http://www.bay12games.com/dwarves/mantisbt/view.php?id=344

Person Shredding Ammo
http://www.bay12forums.com/smf/index.php?topic=98930.0
12 jan 2012

Two-handed hammers, or "Teaching Goblins to Fly"
http://www.bay12forums.com/smf/index.php?topic=77912.0
20 feb 2011

Presenting: The Most Interesting Dwarf in the World
http://www.bay12forums.com/smf/index.php?topic=34933.msg591273#msg591273
8 june 2009

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #1 on: April 17, 2012, 12:54:26 pm »

Now that right there is dwarven !!science!! at its finest.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

IT 000

  • Bay Watcher
  • Strange Mood
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #2 on: April 18, 2012, 06:46:59 pm »

At 3 o'clock Bomrek McNoble leaves a platinum hammer at 1000000 moruls, meanwhile at 4 o'clock a goblin leaves a steel hammer at 750000 moruls. What time will they meet?

Great work Urist Da Vinci
Logged

***CORROSION v2.14***
<<<More Than Just Zombies>>>
Back from the Dead!

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #3 on: April 18, 2012, 06:55:02 pm »

Urist lifted the 10 urist hammer to strike the 10000 degrees urist FB and strike it with 1,000,000 urists of force!

I like the moruls idea. It will be good to have something other then urists and dwarfbucks. Though technically one urist (weight) = 1 kg, so we really only need to use urists for temperature and length now that we have moruls.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

khearn

  • Bay Watcher
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #4 on: April 18, 2012, 07:07:32 pm »

Wonderful science. I'm just glad my office-mate wasn't around when i got to the sentence that starts "Despite this, any creature holding a giant sperm whale corpse.."

Only in Dwarf Fortress.
Logged
Have them killed. Nothing solves a problem quite as effectively as simply having it killed.

Captain Crazy

  • Bay Watcher
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #5 on: April 18, 2012, 07:29:40 pm »

Wondrous! I've been trying to figure out just how the heck knockback works, and now I have a much clearer idea!
Logged
Quote
I usually think of Armok as the pure essence of FUCK YOU!

Old Greg

  • Bay Watcher
  • It was evitable.
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #6 on: April 18, 2012, 07:38:18 pm »

Awesome stuff. The fact that the knockback of crossbow shots is independent of the bolts is interesting - I could see a few applications of that.

Maybe a "knockback gun," with SHOOT_FORCE and SHOOT_MAXVEL jacked up, that fires bolts of some material that would be relatively innocuous when it comes to bodily harm? Think Force Push, Fus Ro Dah, etc.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #7 on: April 18, 2012, 09:55:18 pm »

Awesome stuff. The fact that the knockback of crossbow shots is independent of the bolts is interesting - I could see a few applications of that.

Maybe a "knockback gun," with SHOOT_FORCE and SHOOT_MAXVEL jacked up, that fires bolts of some material that would be relatively innocuous when it comes to bodily harm? Think Force Push, Fus Ro Dah, etc.

I don't know if a material breath-ish item (slade glob?) could be heavy enough, if one wanted to experiment with interactions. Throwing the whale at the cat also causes knockback, so normal items work at some point.

I think the whale works because creatures have a minimum speed below which they cannot be penalized further for carrying a large weight. Therefore, you can keep increasing the weight you can swing/throw without decreasing the speed it moves at. It's like the inverse of the "railgun" crossbow.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #8 on: April 19, 2012, 09:17:26 am »

...Maybe a "knockback gun," with SHOOT_FORCE and SHOOT_MAXVEL jacked up, that fires bolts of some material that would be relatively innocuous when it comes to bodily harm? Think Force Push, Fus Ro Dah, etc.

I just tested various size creatures spitting a slade glob, similar to magma crabs but much heavier. The size, weight, and velocity of the spit glob don't seem to vary by creature size. The slade glob produces a 13000 morul knockback on average, hitting a kea 12-14 tiles backwards (kea are size 1000). The knockback still only happens when the target creature is struck in the head, upper body, or lower body. The slade globs weigh 400 urists. This wouldn't knockback a dwarf or human without more modding.


FYI in all of my testing so far in this thread, I have set the skills I thought were relevant to "Grand Master".

Talvieno

  • Bay Watcher
  • Hello, Death. How's life?
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #9 on: April 19, 2012, 02:40:01 pm »

Maybe a "knockback gun," with SHOOT_FORCE and SHOOT_MAXVEL jacked up, that fires bolts of some material that would be relatively innocuous when it comes to bodily harm? Think Force Push, Fus Ro Dah, etc.

That sounds like Splint's railgun - that's basically what it does.

Awesome science, Urist Da Vinci!! I've been wondering about knockback for a while now.
Logged
Quote from: Mr Frog
Talvieno ... seems to be able to smash out novella-length tales on demand

expwnent

  • Bay Watcher
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #10 on: April 19, 2012, 05:10:52 pm »

Thank you for your contribution to ‼science‼.
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #11 on: April 20, 2012, 10:15:25 pm »

"The Miner's head skids along the ground, bruising the muscle, jamming the skull through the brain and tearing the brain!" That happened after a minecart full of stone going ten times as fast as the dwarf collided with him and sent him flying. They'll skid on a part if they are moving fast horizontally when they hit the ground. This can end up leaving bloody skid marks intermittently as they repeatedly strike the ground. If the carts aren't going super fast and the dwarf has a space, they'll almost always dodge aside, and even if there is no space, if the cart is going slow enough, they'll just stop it. If they do get hit by a fast cart though, it'll transfer momentum according to the cart's mass and speed as well as the dwarf's, sending the dwarf along. The heaviest fast minecarts will blast through many dwarves before they are slowed significantly. The struck units move in parabolic arcs now (instead of the old fly straight then fall straight down).

Looks like there is science to be redone in the next version.

D_E

  • Bay Watcher
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #12 on: April 20, 2012, 10:50:19 pm »

I just tested various size creatures spitting a slade glob, similar to magma crabs but much heavier. The size, weight, and velocity of the spit glob don't seem to vary by creature size. The slade glob produces a 13000 morul knockback on average, hitting a kea 12-14 tiles backwards (kea are size 1000). The knockback still only happens when the target creature is struck in the head, upper body, or lower body. The slade globs weigh 400 urists. This wouldn't knockback a dwarf or human without more modding.

One thing I've been wondering about is how knockback interacts with CE_MATERIAL_FORCE_MULTIPLIER and similar.  From the name it seems that a high force multiplier should increase the knockback distance.

I'll do some !!SCIENCE!! on this at some point, but I thought I should mention it in case some one else gets a chance to test it sooner.
Logged
Mods I've done:
Zelda mod-mod, Beta in the Wild DF 47.04
Illithid Empire mod DF 31.25 (update canceled)
Spotter's Guide to Illithids (Genesis mod-mod) genesis 3.19a4 (update canceled)

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #13 on: April 22, 2012, 03:16:19 am »

I managed to figure out a relationship between creature size and knockback while using a weapon. It's similar to the relationship between creature size and meat butchering results. If you look at the table in this post: http://www.bay12forums.com/smf/index.php?topic=78108.msg2013047#msg2013047 you'll see that for creatures over size 1,000,000 they have a "meatsplosion" when they increase in size. It's like DF is checking for muscle mass when it calculates strength based on size.

The size of knockback (in moruls) dealt by a creature using a platinum mace is approximately (size)/(meat returns x 20). It's about 2500 for the largest creatures, so you basically need to be over size 1,000,000 to knock around a kea with a heavy weapon. IRL I could probably knock a kea at least 5 feet (~1 tile in game), so I'd say this could use some bug fixing.

I also tried duplicating shook's research here: http://www.bay12forums.com/smf/index.php?topic=77912.msg2017799#msg2017799
I found that, where he increased the weapon velocity and knockback suddenly stopped, that in fact the knockback was still present, but only for creatures over size 1,000,000. Creatures over size 1,000,000 were able to send things flying up to the 50 tile limit, but creatures under that size couldn't send anything flying at all.

One thing I've been wondering about is how knockback interacts with CE_MATERIAL_FORCE_MULTIPLIER and similar.  From the name it seems that a high force multiplier should increase the knockback distance.
...

It seems to affect damage, but not distance. Too bad. If it had worked, I would have suggested making creatures weak vs. a custom material named "anger" or "thu'um" so that you could "shout" globs at them. As it stands, I can't make the globs heavier than slade due to a cap on the density value.

rhesusmacabre

  • Bay Watcher
  • UNDEAD-CANNOT BE ATTACKED
    • View Profile
Re: Knockdown (propelled by the blow!) SCIENCE
« Reply #14 on: April 22, 2012, 04:36:15 am »

Yeah, it seems like this'll happen a lot more in future.

Does the mass of the target's inventory get taken into account? A unit wearing full copper armour or hauling an elephant carcass should logically be harder to send flying.

It appears that knockback only happens when a creature is struck in the upper body, lower body, or head.

Are reanimated limbs immune to knockback in that case?
Logged
Pages: [1] 2