DFHack / df-structures

Dwarf Fortress data structure descriptions
https://github.com/DFHack/dfhack
115 stars 81 forks source link

unit_personality alignment changes in 0.47.05 #420

Closed lethosor closed 3 years ago

lethosor commented 3 years ago

Originally posted by @cvuchener in https://github.com/DFHack/df-structures/issues/418#issuecomment-770221376

I think there is a new int32_t (or smaller) somewhere before unit_personality.needs.

unit_personality.combat_hardened did not move, so the new field is between them (from testing with linux32/linux64).

lethosor commented 3 years ago

@cvuchener I can't seem to reproduce this on 0.47.05 linux64 - all values of unit_personality for one dwarf (including undistracted_focus at the end) match what they are in 0.47.04

cvuchener commented 3 years ago

No issue with linux64, the new field is hidden in padding. It is only visible with 32 bits builds, the needs vector has an absurd size.

lethosor commented 3 years ago

Ah, makes sense. I haven't set up 32-bit 0.47.05 yet.

Confirmed that there are 4 bytes of padding initialized to 0 for the dwarf above that is uninitialized for the same dwarf in 0.47.04 (between combat_hardened and needs, like you said). I'll add that.