Bay 12 Games Forum

Please login or register.

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

Author Topic: Modding material properties vs. how the properties are used by the game[0.34.11]  (Read 43695 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #15 on: October 25, 2013, 01:57:19 am »

I've punched limbs off in the DBZ mod before; at least, I've punched a hand or maybe an arm off.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #16 on: October 25, 2013, 02:12:12 am »

I've punched limbs off in the DBZ mod before; at least, I've punched a hand or maybe an arm off.

This can happen if you mod the skin, fat, and muscle materials to have less than 50000 strain at yield (so they tear instead of just bruising), or if you remove [CONNECTS] from the skin, fat, and muscle tissues.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #17 on: October 25, 2013, 02:16:54 am »

Ah, the former is indeed what happened, but I think I may have fixed that due to ridiculous "cracked muscle".

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #18 on: October 25, 2013, 02:35:40 am »

Ah, the former is indeed what happened, but I think I may have fixed that due to ridiculous "cracked muscle".

If the strain is 0-24999 then the words "shattering", "chipping", "fracturing" are used.
If the strain is 25000+ then the words "tearing" and "tearing apart" are used.

Chipping is less than 25% of the surface area of the body part.
Shattering and Tearing Apart imply complete destruction of the layer, whereas Fracturing and Tearing are incomplete damage.

scamtank

  • Bay Watcher
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #19 on: October 25, 2013, 11:56:25 am »

Another thing to add to wrestling is that tissues with other than [TISSUE_SHAPE:LAYER] such as hair strands and feathers are vulnerable to COMPRESSIVE force. Possibly others too, but I've never experimented with joints made from hair.
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #20 on: October 25, 2013, 10:38:14 pm »

Another thing to add to wrestling is that tissues with other than [TISSUE_SHAPE:LAYER] such as hair strands and feathers are vulnerable to COMPRESSIVE force. Possibly others too, but I've never experimented with joints made from hair.

Interesting. I didn't notice that before because the game doesn't tell you that you broke their hair or eyebrows if you pinch their head. Only the most recently damaged layers in the part are described. Having muscle torn as a result of a spear stab implies that the skin and fat were also torn.

Torsion:
It turns out that TORSION properties are used. Earlier I mentioned that TENSILE properties are used when a creature is shaked around by a body part after being bitten and "latched on". This is only true if the "teeth" were edged. If you remove [ATTACK_FLAG_EDGE] from Giant Desert Scorpion pincers, for example, they will deal TORSION damage instead of TENSILE damage when shaking a latched victim. This also makes the pincers into blunt weapons. I don't know of any vanilla creatures that do this, but someone must have a latching tentacle monster somewhere.

Falling Damage:
As mentioned earlier, falling damage is simulated by having a large cube of rock beat the creature to death with body slams.
peregarrett gave me the inspiration to try using [CE_MATERIAL_FORCE_MULTIPLIER:MAT_MULT:INORGANIC:NONE:100:1] to make creatures very vulnerable to falling damage, and [CE_MATERIAL_FORCE_MULTIPLIER:MAT_MULT:INORGANIC:NONE:1:100] to make creatures very resistant to falling damage. It works, but only in the arena where the ground is made from INORGANIC:NONE.

I investigated further using a test embark, and found that the game respects the material of the floor when considering falling damage. Falling on a sand tile used sand properties, falling on a natural basalt floor used basalt properties, and falling on a constructed steel floor used steel properties. Consequences:
- If you mod a soft, low-density floor material, falling on it will likely only bruise the skin or fat (because you nerfed the "death cube" weapon)
- Plating the bottom of a pit trap with platinum floors will increase falling damage
- Falling on a slade floor really hurts!
- Were-creatures take more damage from falling on a floor made of their special weakness material than they do from falling on other floors.

Repseki

  • Bay Watcher
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #21 on: October 26, 2013, 06:30:02 am »

Now I can't stop picturing dwarves falling various distances without taking damage, only to stand up and get beaten to death by a magical cube of the appropriate material...
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #22 on: October 26, 2013, 07:02:09 am »

Interesting. I didn't notice that before because the game doesn't tell you that you broke their hair or eyebrows if you pinch their head. Only the most recently damaged layers in the part are described. Having muscle torn as a result of a spear stab implies that the skin and fat were also torn.

What I do in the arena is possess the victim, press Z and then check the health screen. He'll display all wounds in detail as if he was recently diagnosed, layer by layer.

I mostly dialed in on the hair business by strangling hair-covered mammals. The throat is made from SKIN and therefore has hair stuck on top of it as per the special hair body detail plans. Every wring of the neck also spends some characters "tearing apart the hair!".

Props for the torsion thing, too.
« Last Edit: October 26, 2013, 07:08:43 am by scamtank »
Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #23 on: October 26, 2013, 12:22:25 pm »

This thread is relevant to my interests so I am posting to watch.

Any idea how upright spikes factor into falling damage?  My thoughts that it basically just generates a few attacks using the spike as a weapon seems likely since the game apparently levitates a chunk of the landing materiel and beats people with it.

I'm also kinda curious how it determines those factors for skill and strength when it's the game beating someone with something instead of having a critter or trap to draw stats from.
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #24 on: October 26, 2013, 01:59:57 pm »

This thread is relevant to my interests so I am posting to watch.

Any idea how upright spikes factor into falling damage?  My thoughts that it basically just generates a few attacks using the spike as a weapon seems likely since the game apparently levitates a chunk of the landing materiel and beats people with it.

I'm also kinda curious how it determines those factors for skill and strength when it's the game beating someone with something instead of having a critter or trap to draw stats from.

Falling onto upright spikes, and traps in general, might be interesting to look at.

There appears to be a check to see if the pointer to the attacking unit is valid before checking some of those situational factors. Therefore if the attacking unit doesn't exist, defaults of 1000 for the strength and skill factors are used. If you look at the equations, you see that it divides by a fixed 1000 after using a factor, so a default of 1000 is equivalent to "multiply by 1".

Before checking for skills or granting experience based on a skill usage, the game checks to make sure that the unit has a soul. Soulless animated corpses are skill-less and can't learn. Babies (which is a form of insanity in DF) are also unable to use or learn skills, even "natural" skills.

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #25 on: October 27, 2013, 07:59:35 am »

Babies (which is a form of insanity in DF)
Wait, what?
Logged
._.

scamtank

  • Bay Watcher
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #26 on: October 27, 2013, 10:29:25 am »

Mechanically speaking, yeah. It forces a certain pattern of abnormal behavior. Haven't you ever run into the classic error "Baby 1 cancels Clean Self: Too insane."?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #27 on: October 27, 2013, 04:05:26 pm »

And doesn't it make perfect sense? No point in adding new code to do something that old code already does.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #28 on: October 28, 2013, 01:58:52 am »

More falling-related stuff:
- The size of the cube of ground used to bash a falling creature is not fixed. DF appears to use a cube of 1/10th the volume (current size) of the falling creature. Therefore fat dwarves are more likely to break bones when falling than thin dwarves, because they are carrying extra volume which doesn't contribute to blunt protection.
- The falling velocity is used to find the momentum during the beating from the cube. The conversion rate between "new velocities" of falling creatures and the momentum is mysterious. There is potentially a bug here.
- Upright spikes process their attacks before the overall landing function is complete. If you fall on a weapon trap, the attacks are only processed after the landing function has completed. Damage is dealt both by the ground and the upright spikes.
- Upright spikes appear to use the falling velocity in a buggy way, ending up with momentums ~800x larger than expected. This is for when a creature falls on the stationary spikes, not when the spikes are extended into the creature via a mechanism. It's hard to notice this because the spikes/spears have a small contact area, and thus usually achieve full penetration anyways.

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Modding material properties vs. how the properties are used by the game
« Reply #29 on: October 28, 2013, 01:27:18 pm »

So if I fell onto a floor from a few tiles up onto a pile of upright featherwood sporks my fate would still be as grim as if I landed on a pile of adamantine spikes, because damage appears to be at 800 times what it probably should be?

Interesting.   Now to mod in sporks as a spear item...because that would make me giggle.
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!
Pages: 1 [2] 3 4 ... 10