Can someone help with updating an older script?
This one here:
Encumbrance calculatorUsing it as it is results in the speed column being messed up, pushing lines of the table out of alignment. Some of the speeds are listed as 1.#INF, some as 10.
I took a look at the script, and found the line d.speed = round(100000/dfhack.units.computeMovementSpeed(v))
computeMovementSpeed leads me back to the Units.h module, containing DFHACK_EXPORT int computeMovementSpeed(df::unit *unit);
I can't do anything with that. So I saw there was a getStrength(v) function with the note "from getPhysicalAttrValue in Units.cpp, which is not exported for lua", and I tried to adapt it to get the unit's speed instead. It didn't work.