df-structures icon indicating copy to clipboard operation
df-structures copied to clipboard

Info for df.projectile.xml

Open Bumber64 opened this issue 4 years ago • 2 comments

"unk_v40_1" is the target unit's id. For a bolt fired at an archery target, this is set to -1. Falling items/units and siege weapons leave the value as garbage.

"proj_unitst" are units moving as projectiles. E.g., jumping or falling. "unit" is a pointer to the unit.

"proj_magicst" is used for fire imp fireballs. I don't know what the deal with the "unk" field is. At times it looks like 2 bytes of it is being set to a value to determine if it spawns flows (when part of it equals zero.) Other times it's changed to a pointer to garbage data, which is sometimes a pointer that leads to an announcement string "Fire imp1 breathes fire...", etc.

Bumber64 avatar Jun 09 '21 08:06 Bumber64

Can confirm unk_v40_1 as non-parabolic's target. Not sure why it's under parabolic projectile info?

Tachytaenius avatar Jun 14 '21 15:06 Tachytaenius

Looking at the write_file and read_file vmethods, the "pointer" at the end of proj_magicst isn't a pointer at all but two 16-bit integers. The first integer is "subtype" - a value of 0 means it's a fireball that leaves a smoke trail, and anything else is undefined. The second integer used to be "max_damage" but doesn't appear to be used anymore - the game initializes it to 10 (just as it did in 0.23.130.23a) but doesn't appear to reference it anymore on impact (it used to determine the maximum amount of BURN damage to inflict).

quietust avatar Jun 14 '21 17:06 quietust