Bay 12 Games Forum

Dwarf Fortress => DF Modding => Topic started by: deepspaceprobe9 on November 22, 2014, 10:57:57 am

Title: SHOOTFORCE of throwing?
Post by: deepspaceprobe9 on November 22, 2014, 10:57:57 am
What would the SHOOTFORCE and MAXLEVEL be on an item thrown by an average human be?
Title: Re: SHOOTFORCE of throwing?
Post by: Urist Da Vinci on November 22, 2014, 02:58:02 pm
IIRC I found that thrown items are given a velocity of 100 regardless of item mass, but this may have changed with the 0.40.xx versions, considering that heavy thrown items don't seem to fly as far anymore.
Title: Re: SHOOTFORCE of throwing?
Post by: deepspaceprobe9 on November 22, 2014, 03:05:23 pm
Good enough for now
Title: Re: SHOOTFORCE of throwing?
Post by: Sergarr on November 23, 2014, 12:25:08 pm
IIRC I found that thrown items are given a velocity of 100 regardless of item mass, but this may have changed with the 0.40.xx versions, considering that heavy thrown items don't seem to fly as far anymore.
Does that mean that the thrown items have the same momentum?
Title: Re: SHOOTFORCE of throwing?
Post by: Urist Da Vinci on November 23, 2014, 11:08:08 pm
Did some disassembly diving. How it works now:

1. Get item weight (i.e. a 6.28 kg iron axe)
2. Velocity = (50 * strength) / (1000 * weight), rounding down to nearest integer and capped at 100.
so i.e. a normal strength 1000 human can hurl the axe at velocity 7, whereas a strength 2000 human vampire can throw the axe at velocity 15. (If the normal human swung his axe in melee, he would be attacking at velocity 12, according to my combat calculator script)
Momentum is therefore effectively locked at 50*strength/1000 (i.e. a maximum throwing momentum of 250). Unlike wrestling throws, there is no size modifier, so giants and gnomes have the same ability to throw.
Creatures that spit solid globs spit them at velocity 100.

3. The distance at which the item falls to the ground (this is the pre-minecart old projectile system, remember!) is set to the velocity or 20, whichever is less. Therefore if the item falls to the ground in i.e. 3 tiles, it must have been thrown at velocity 3!


It appears that throwing your sword in DF is a bad idea now.
Title: Re: SHOOTFORCE of throwing?
Post by: Putnam on November 23, 2014, 11:13:48 pm
Is this number equal to the force in the raws, or is there some other correlation?
Title: Re: SHOOTFORCE of throwing?
Post by: Sergarr on November 24, 2014, 09:55:51 am
Did some disassembly diving. How it works now:

1. Get item weight (i.e. a 6.28 kg iron axe)
2. Velocity = (50 * strength) / (1000 * weight), rounding down to nearest integer and capped at 100.
so i.e. a normal strength 1000 human can hurl the axe at velocity 7, whereas a strength 2000 human vampire can throw the axe at velocity 15. (If the normal human swung his axe in melee, he would be attacking at velocity 12, according to my combat calculator script)
Momentum is therefore effectively locked at 50*strength/1000 (i.e. a maximum throwing momentum of 250). Unlike wrestling throws, there is no size modifier, so giants and gnomes have the same ability to throw.
Creatures that spit solid globs spit them at velocity 100.

3. The distance at which the item falls to the ground (this is the pre-minecart old projectile system, remember!) is set to the velocity or 20, whichever is less. Therefore if the item falls to the ground in i.e. 3 tiles, it must have been thrown at velocity 3!


It appears that throwing your sword in DF is a bad idea now.
Why is strength max-capped at 5?
Title: Re: SHOOTFORCE of throwing?
Post by: Putnam on November 24, 2014, 01:21:51 pm
It definitely isn't; if you have a strength of 2500000, you can throw things that are way heavier quickly than someone with only 5 strength.
Title: Re: SHOOTFORCE of throwing?
Post by: Sergarr on November 24, 2014, 02:01:40 pm
I mean why does his calcs has a max cap on throwing momentum and why is it so low
Title: Re: SHOOTFORCE of throwing?
Post by: Putnam on November 24, 2014, 02:04:43 pm
If I were to guess, it's because snowball fights inevitably caving in skulls was a bit ridiculous.
Title: Re: SHOOTFORCE of throwing?
Post by: Dirst on November 24, 2014, 03:23:42 pm
If I were to guess, it's because snowball fights inevitably caving in skulls was a bit ridiculous.
That's a problem with lots of games that try to cover a really wide scale.  I remember couple oddities from the HERO system of games, that basically come from their "pushing" mechanic for adrenalin rushes.  A normal human pushing his strength could crush a car with his bare feet and throw a football for 180 meters.  One of those sounds a little harder to accomplish than the other.
Title: Re: SHOOTFORCE of throwing?
Post by: pisskop on November 24, 2014, 03:26:29 pm
Yea, thats an absurd distance to trow a football.
Title: Re: SHOOTFORCE of throwing?
Post by: Urist Da Vinci on November 24, 2014, 09:15:06 pm
...
Why is strength max-capped at 5?
It definitely isn't; if you have a strength of 2500000, you can throw things that are way heavier quickly than someone with only 5 strength.
Isn't strength (or any other physical or mental attributes) on a scale from 0 to 5000? Or at least those are the caps for RAW file input, if you are entering higher numbers via DFHack?

Is this number equal to the force in the raws, or is there some other correlation?

Which number is equal to what force in what raw? I would like to help, but could you re-ask the question?

If I were to guess, it's because snowball fights inevitably caving in skulls was a bit ridiculous.

Powders and liquids now auto-splash into contaminants on the struck body part without applying any force or damage. This was probably done soon after Toady first implemented the spitting social reaction.
Title: Re: SHOOTFORCE of throwing?
Post by: Putnam on November 24, 2014, 11:40:33 pm
1. Attributes aren't hard-capped and their effects are noticeable even at much higher numbers. If you have a creature with more than 2500 in an attribute, that creature may train that attribute to more than 5000. The same happens if you increase the creature cap.
2. Ranged weapon force, I forgot the exact token.
Title: Re: SHOOTFORCE of throwing?
Post by: Sergarr on November 25, 2014, 08:52:50 am
...
Why is strength max-capped at 5?
It definitely isn't; if you have a strength of 2500000, you can throw things that are way heavier quickly than someone with only 5 strength.
Isn't strength (or any other physical or mental attributes) on a scale from 0 to 5000? Or at least those are the caps for RAW file input, if you are entering higher numbers via DFHack?
Syndromes have been capable of giving creatures nearly-unlimited stats since DF2012.

 :-\