I do have half a dozen saves, crashes are reproduced no matter what I do. But I just uploaded a new version of the mod, I will wait and see if the problem solved itself. If it persists, I will come back with a few saves and as much info as I can gather.
EDIT: Oh, and does anyone have an idea how to trigger this script with autosyndrome? If I trigger it, it cannot find the unit... Its supposed to add +1skill to a creature pastured on a workshop. The script should work fine, and the trigger with autosyndrome works as well, but the script does not recognize a valid target. Its probably just a few lines of code that must be changed.
-- This script will modify skills, or a single skill, of a unit
-- usage is: target a unit in DF, and execute this script in dfhack
-- via ' lua /path/to/script skillname '
-- the skill will be increased to 20 (Legendary +5)
-- arguments 'list', 'classes' and 'all' added
-- by vjek, version 3, 20130123, for DF(hack) 34.11 r2
-- Praise Armok!
function make_legendary(skillname,unit)
local skillnamenoun,skillnum
if unit==nil then
print ("No unit selected! Aborting with extreme prejudice.")
return
end
if (df.job_skill[skillname]) then
skillnamenoun = df.job_skill.attrs[df.job_skill[skillname]].caption_noun
else
print ("The skill name provided is not in the list.")
return
end
if skillnamenoun ~= nil then
utils = require 'utils'
skillnum = df.job_skill[skillname]
utils.insert_or_update(unit.status.current_soul.skills, { new = true, id = skillnum, rating = rating or 1 }, 'id')
print (unit.name.first_name.." is now a Level ".. rating .." ".. skillnamenoun)
else
print ("Empty skill name noun, bailing out!")
return
end
end
--main script operation starts here
----
local opt = {...}
local skillname
local unit = df.global.world.units.all[opt[1]] --I HAVE NO IDEA IF THIS WILL WORK
skillname = opt[2]
if not opt[1] or not opt[2] then
print("Your syntax is wrong. To be exact...")
if not opt[1] then
print("You forgot to declare a unit!")
end
if not opt[2] then
print("You forgot to say what skill you wanted!")
end
end
make_legendary(skillname,unit)