Questions:
1. If I give a unit several interactions is it possible to tell them not to use them all right away? Can I give them any logic behind using them? (besides the USAGE_HINT) Or staggering their usage?
2. Is there a function for computing the weight of a unit? I know there is the dfhack.units functions for figuring out speed and age and such, wondering if there is one for weight.
3. If I use add a syndrome with add-syndrome command with modtools/item-trigger -onEquip is it smart enough to know to remove the syndrome when the item is unequiped or do I need to add an -onUnequip version?
4. Similarly, does -onEquip only work if the actual inventory changes? What happens if I use another script to change one of the items material or subtype? Will it still run -onEquip or -onUnequip?
5. Does -onStrike only run if the target is wounded? What about if the attack is blocked/parried/dodged?
6. With the decoupling of movement and attack speeds, does CE_SPEED_CHANGE still affect both or just movement?
7. I am planning on either making a seperate plugin or an addition to the item-trigger script by allowing for -onParry and -onBlock. Currently the only way I see to do that is by using the eventful onReport and parsing the report for the required information. Is there another way to do it? Possibly an onAction event? I suppose if I make it a seperate plugin I could make it something like action-trigger and allow for dodging and such too?
3. You need onUnequip.
4. It will not fire on material, it might fire on subtype. edit: I think it checks the item id so if you're careful and change it in all the right places you *might* be able to make it trigger by changing its id to the next unused one and updating everything accordingly but it would be easy to get that wrong and crash/corrupt the game so be careful.
edit2: It will definitely work if you change the id of the item, but you'd have to make sure you find every df structure that refers to that object and update it. Do a search through the xml for "id" or "item" and see the places where item ids are written down. You may run into issues if it's an artifact or named item.
5. Only if wounded. It will not fire if blocked or parried or dodged.
7. For now you'd have to do onReport, but it's easier than you think because blocks and parries and dodges are a specific element of the event_type enumeration. You might still have to parse for the attacker / defender and the weapon. I can add that to EventManager for the next version so it can reuse the code for figuring out who's who.
edit2: onAttack also won't work on counter-strikes (probably).
See also:
https://github.com/DFHack/df-structures/blob/master/df.announcements.xml#L2