This script will remove all skills, but also the ability to assign tasks to the dwarf in question.
Ok, did a bit more testing, this script now removes all skills, sets the profession to Peasant ("STANDARD") and allows you to assign new labors/skills to all the dwarves.
-- Remove all skills for all dwarves and turns them into Peasants
-- ---------------------------------------------------------------------------
function BreathOfArmok(v)
unit=v
if unit==nil then
print ("No unit available! Aborting with extreme prejudice.")
return
end
local skills=unit.status.current_soul.skills
for index,skill in ipairs(skills) do
skill:delete()
end
skills:resize(0)
unit.profession = df.profession["STANDARD"]
print ("The foul breath of Armok has engulfed "..unit.name.first_name)
end
-- ---------------------------------------------------------------------------
for _,v in ipairs(df.global.world.units.all) do
if v.race == df.global.ui.race_id then
BreathOfArmok(v)
end
end
Let me know if you run into any trouble.
Intrinsic: for your single dwarf version, you should just have to add
unit.profession = df.profession["STANDARD"]after the
skill:resize line
As always, not-tested-a-long-time, might blow up your computer, end the world, etc, etc.