Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0007377Dwarf FortressCreaturespublic2014-07-16 04:352014-07-16 07:55
Wimopy 
 
normalminorrandom
newopen 
 
 
0007377: Creatures with extreme sizes sometimes spawn with low mass and attacks pass through them -- overflow?
While making modded creatures, I noticed that sometimes, those with huge sizes (around giant sperm whale size, but earlier as well) spawn without any mass and most of the time, attacks only pass through them. Their low mass is shown that if a much smaller enemy charges at them, these supposedly enormous creatures will fly away at very large speeds.
This behaviour is also exhibited by giant sperm whales in an unmodded game.
It does not happen all the time. Even with two giant sperm whales spawned after each other, one may work as it should while the other will be a 'phantom' version.

I have not been able to confirm if this also happens in fortress mode or only in the arena.
In the arena (easiest to find)
1. Spawn a giant sperm whale.
2. Spawn anything else.
3. Control the non-giant creature and attack the giant sperm whale. It should produce the bug, but this does not happen all the time.
It has been around at least since 0.34.11 and even now in 0.40.03. I am using the SDL version.
No tags attached.
related to 0000787confirmed Footkerchief Small animals and reanimated body parts can't be hit -- "the attack passes right through" 
Issue History
2014-07-16 04:35WimopyNew Issue
2014-07-16 05:19TalvienoNote Added: 0026615
2014-07-16 07:09FootkerchiefRelationship addedrelated to 0000787
2014-07-16 07:10FootkerchiefSummaryCreatures with extreme sizes sometimes spawn with low mass and attacks pass through them => Creatures with extreme sizes sometimes spawn with low mass and attacks pass through them -- overflow?
2014-07-16 07:24UristDaVinciNote Added: 0026628
2014-07-16 07:25UristDaVinciNote Edited: 0026628bug_revision_view_page.php?bugnote_id=0026628#r9920
2014-07-16 07:55WimopyNote Added: 0026630
2014-07-16 08:41WimopyNote Edited: 0026630bug_revision_view_page.php?bugnote_id=0026630#r9924
2014-07-20 08:48WimopyNote Edited: 0026630bug_revision_view_page.php?bugnote_id=0026630#r10076

Notes
(0026615)
Talvieno   
2014-07-16 05:19   
Can confirm this for arena mode, specifically for the giant sperm whale.
(0026628)
UristDaVinci   
2014-07-16 07:24   
(edited on: 2014-07-16 07:25)
The actual maximum size due to a size cap at RAW-reading time is 100,000,000.

BUT

It is possible to wrap around your creature size to a negative number using CHANGE_BODY_SIZE_PERC to get a size larger than 2147483648. CHANGE_BODY_SIZE_PERC is not affected by the above mentioned size cap. In 0.34.11 at least this was automatically increased to the minimum size of 1. The Giant Sperm Whales use CHANGE_BODY_SIZE_PERC.

Having miniscule volumes and contact areas on body parts is known to cause attacks to "pass right through". This also happens if you create a weapon with a contact area of 0 in the ATTACK token.

As a side effect of the tiny volume, the mass is also tiny.

(0026630)
Wimopy   
2014-07-16 07:55   
(edited on: 2014-07-20 08:48)
I think you wrote the same on the forums, but I still believe it warrants a bug report, if not for else, then for a revision of CHANGE_BODY_SIZE_PERC or giant sperm whales.

Also, with modded creatures, this happened without using CHANGE_BODY_SIZE_PERC, so that can't be the only problem. (I can't remember what the size was that I used at the time. I'll look into it and update. It might have also been a different error, I'll do some tests then update)

EDIT/UPDATE: Setting BODY_SIZE over 200'000'000 causes the bug/overflow to happen. (This was tested by modifying sperm whale raws) 250'000'000 seemed to make it more common than 1'000'000'000.

UPDATE2: It seems that with BODY_APPEARANCE_MODIFIER tags set to a fixed value (I tested 100, 105 and 95) I couldn't get the bug/overflow to trigger. Though I don't know how that changes giant versions of animals.