I'm not really sure what you're saying. Are you saying that you think there's a bug that's caused by DF converting an int32_t to an int16_t somewhere? If so, linking to the report on Mantis would be helpful. We definitely cannot create a patch to change the layout of a structure in DF. (We could change our version of a layout in the XML files, but then our version would be wrong and probably cause crashes.)
Edit: actually, no, I don't know what you're saying at all.
I apologise if im not the um, perhaps most concise person. I'll wind myself down a bit, i do get a little bit tangled when i have a lot of information to relay at once, i get caught up brainstorming and researching for a hour or two readability goes out the window. I have a bug report going on here
http://www.bay12games.com/dwarves/mantisbt/view.php?id=10057 which is equally muddled from flexibly interpretive point of view going over overlapping problems of creatures not properly executing deaths before turning into buggy corpse items, and because of the problems within this thread discussion contribute to the combined issue (This thread issue < That bug report issue, but the two play off each other, to expand the bug report's effects and make it harder to patch and approach)
Some speculative problem areas where this is happening involves df.units animal training levels which would be consistent with animals (that possess non interface minds but active living unit status to use the mind screen, as the mind screen only stops when you are physically dead, but the mind screen remains open because death is not finality to the mind, as exploitatively entering dead skeleton's mind screen shows & DFTherapist) acquiring personalities within the wild state (as seen with depressed and needy animals with desires for interactions like worship, and sadness/lonelyness/anxiety over being restrained) and here in DF map where local features (etc, the population that lives there & the wildlife are all features) are also exposed to this vector.
Ok stripping it all back here's my basic arguement
Its my belief that the emotion system defined within int32_t (from the syntaxed used on creature_raw and also being a undefined place to put unassigned integers) more specifically is affecting local fortress populations by interacting with enums like (<enum-type type-name='animal_training_level' base-type='int32_t'>) to first enable creatures to feel emotions and give them a 'mind' screen leading to desires like prayer, which is exhibited behaviour by allowing those types of creatures to feel emotions, leading to distraction and adopting behaviours of intelligent animals in a integer overlap (so you have your cause, but alone it cannot create harm it needs a catalyst). And creatures unless they are hardcoded in as huntable animals (boars, etc) cannot ethically eat a creature with a sentient mind (semi sentients fall particularly into this category as trolls and BCO's are not responding as they should with [large predator] but also expressing normally unfufillable desires, a troll might have god but you would never know when it goes to pray in a friendly goblin fortress.)
Secondly the enums
<int32_t name='local_feature' init-value='-1' comment='index into world_data.region_map'/>
<int32_t name='global_feature' init-value='-1' ref-target='world_underground_region'/>
<int32_t name='unk2' init-value='-1'/>
Serve as a
catalyst to carry this emotional behavior to all the animals and units in a site locally, be they wild or civilized, this works for sentient life well but at the same time it affects all the wildlife. Emergent emotional/sentient behaviours like 'fistfight' unarmed come out when animals fight with claws and paws, and the actual ethics of the settling civ, affects the attitudes of all the wildlife (in my example i state that my ultra aggressive goblin civilization, because it has Kill neutral acceptable, animals on the cavern layer slaughter to death neutral sentients, while on a dwarven embark they only non-lethally brawl and part ways)
> There are more implications but that's the core root from my observation and personal research into it. I may be foolishly mistaking it out of a well meaning misunderstanding but im pretty sure the two are connected. int16_t is my alternative suggestion for a integer to put emotions into instead (or somehow seperate the cause and the catalyst from one another intelligibly with a new integer or method with the zach brother's input)
A plugin or patch request to abstract that code and experiment with its effects would see if it could remedy a number of bugs (The butchery bug in my bug report request as to creatures not actually dying is relevant but if this bug was removed i think it would fix problems surrounding ethics in eating 'thinking creatures' and make pets/certain creatures butcherable again as well as patch behavioural issues) and eventually pathe a route to a absolute fix or temporary relief (if it works)