DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.86k stars 469 forks source link

Trigger eventful onUnitAttack in adventure mode #2048

Open Atkana opened 2 years ago

Atkana commented 2 years ago

The event will trigger fine when in any Fortress Mode-style mode (fort mode / arena mode while not controlling a unit), but won't trigger in Adventure Mode-style modes (adventure mode / arena mode controlling a unit).

Tested with version 0.47.05-r4.

myk002 commented 2 years ago

Labeling as a bug for now. @cppcooper can you tell whether this event should be firing? Is it possible to detect in adventure mode?

cppcooper commented 2 years ago

No idea, I can tell you whatever I learn once I get to reading and understanding that event manager, but from what I could tell looking at the blame for the file @expwnent wrote the event systems so they probably know if it's working as expected or not

expwnent commented 2 years ago

As far as I know it never worked in Adventure Mode or when controlling a unit in Arena Mode. IIRC it works based on combat logs, so if you make it look for "you" instead of the name of a unit it might be possible to get it to work in Adventure Mode / Arena Mode when controlling a unit.