166
Utilities and 3rd Party Applications / Re: DFHack 0.47.05-r1
« on: July 05, 2021, 11:28:53 pm »Hello,It's an issue with the script. Looks like you're the first one that's reported it since it broke a year or so ago, so thank you! (It may be a rare case - I don't seem to have a save where I can reproduce the issue easily.)
I was using the "show unit syndromes" in my game, and it was throwing an error on one of the citizens, who had a vampire curse active on them. It wouldn't show syndromes on any other citizens after it found the cursed one.
in the stderr.log, it has this:
Invoking: show-unit-syndromes
E: NoMethodError: undefined method `unk_6c' for #<DFHack::CreatureInteractionEffectBodyMatInteractionst:0x000000090e48c8>
hack/scripts/show-unit-syndromes.rb:840:in `get_effect'
hack/scripts/show-unit-syndromes.rb:886:in `block (2 levels) in <top (required)>'
E:/Dwarf stuff/df_47_05_win/hack/ruby/ruby-autogen-defs.rb:439:in `block in each'
E:/Dwarf stuff/df_47_05_win/hack/ruby/ruby-autogen-defs.rb:439:in `each'
E:/Dwarf stuff/df_47_05_win/hack/ruby/ruby-autogen-defs.rb:439:in `each'
hack/scripts/show-unit-syndromes.rb:886:in `collect'
hack/scripts/show-unit-syndromes.rb:886:in `block in <top (required)>'
hack/scripts/show-unit-syndromes.rb:947:in `[]'
Once I used add-syndrome to remove the syndrome (I used -eraseClass with both VAMPCURSE and DISTURBANCE_CURSE), then show-unit-syndromes ran properly with all citizens with syndromes shown.
Would this be because I am using modded creatures in my game ? Or because those kinds of curses cause a problem with the show-unit-syndromes command ?
Here's a fix that should work. If you can test it out, that'd be great. You can either make the changes manually to hack/scripts/show-unit-syndromes.rb, or replace that file with the new version (be sure to save the new one with a ".rb" extension and overwrite the existing one).
This fix will also be in the next DFHack release, which is hopefully soon.