Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Is there a way to fix the megabeast loyalty bug with DFHack?  (Read 2218 times)

oliverosky95

  • Bay Watcher
    • View Profile
Is there a way to fix the megabeast loyalty bug with DFHack?
« on: November 20, 2021, 02:32:31 pm »

Thread title.

(I'm referring to the fact that currently your military dwarves will attack any tamed megabeasts on sight)
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Is there a way to fix the megabeast loyalty bug with DFHack?
« Reply #1 on: November 20, 2021, 02:49:08 pm »

Apparently on the update notes for 47.05 this (or some sort of variation of it) was listed as fixed by Toady, id definitely check your current version but wouldnt be suprised if it still happens. Perhaps a DFhack script to remove tokens and un-set their current marauding state from them after checking a event for taming (if you can narrow it down) might be a better long term solution if any sort of script is out of there already.

I see it sometimes in reverse, a few fringe DFhack scripts have that have a ability to summon creatures and backfire into a announced maurader monster even without specialist token additions, so perhaps its a problem that marauding for them goes dormant until confronted by the militiadwarves, but i guess it'd need some science.
Logged

oliverosky95

  • Bay Watcher
    • View Profile
Re: Is there a way to fix the megabeast loyalty bug with DFHack?
« Reply #2 on: November 21, 2021, 10:48:52 am »

Apparently on the update notes for 47.05 this (or some sort of variation of it) was listed as fixed by Toady, id definitely check your current version but wouldnt be suprised if it still happens. Perhaps a DFhack script to remove tokens and un-set their current marauding state from them after checking a event for taming (if you can narrow it down) might be a better long term solution if any sort of script is out of there already.

I see it sometimes in reverse, a few fringe DFhack scripts have that have a ability to summon creatures and backfire into a announced maurader monster even without specialist token additions, so perhaps its a problem that marauding for them goes dormant until confronted by the militiadwarves, but i guess it'd need some science.

The thing toady fixed with 47.05 is something unrelated to what I'm talking about (https://www.bay12games.com/dwarves/mantisbt/view.php?id=10731)

I tried messing around with with gm-editor to see if there's anything I could do to fix the issue. I checked the marauder/crazed status of the tamed megabeast and found it was set to False anyway (lol).
My gut feeling told me it was something related to the historical figure status of the megabeast and it indeed was the problem:

By setting the important_historical_figure flag in flags1/2 to False, and also setting the historical figure id to -1 (both of them), my militia dwarves finally stopped trying to murder the tame megabeast.

I guess the problem is that the militia dwarves somehow remember that megabeast with historical_figure_id X is an enemy of their civ and that's why they try to kill it. I don't really have any experience with actual dfhack scripting, so if anyone is interested in writing one, just know that it would be something like -> After taming the megabeast, erase its historical figure status.
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Is there a way to fix the megabeast loyalty bug with DFHack?
« Reply #3 on: November 21, 2021, 01:39:30 pm »

Just to clarify, what i said before was never confirmed at the time but i thought it was a appropriate place to start and it obviously lead to to some good science to pin down the issue and answer your original question.  :)

In a way, the script requirement is a sort of a reverse nemesis check, you could simply 'refresh' with a history deletion and re-integration to restore them as non-aggressive if it served your purposes using altered scripts like Boltguns "Intelligent Pets" that scans periodically for semi-intelligent monsters with no identities so they can do additional labors by supplanting a meaningful ID into them.

A much easier solution would be for Toady just to fix it, so i will be adding this thread on as evidence also to the issue report on Mantis when i can and looking forward to any utility script in the future.
Logged