Okay, suggestion for whatever workshops for all races:
Make a reaction, that removes hunting/ambusher skill....
Seriously, I'm tired of my dwarves sneaking around while carrying boulders to the construction site...
I am sorry mahrgell, I am afraid I can not do that.
local utils=require('utils')
local args={...}
local skills=df.unit.find(args[1]).status.current_soul.skills
local skill=df.job_skill[tostring(args[2])]
local level=tonumber(args[3]) or 0
local argfunctions={
__index=function(t,k)
qerror(k..' is not a valid setting! Valid settings are SET, ADD and SUBTRACT.')
end,
set=function(skills,skill,level)
utils.insert_or_update(skills, {new=true, id=skill, rating=level}, 'id')
end,
add=function(skills,skill,level)
local skillExists,oldSkill=utils.linear_index(skills,skill,'id')
if skillExists then
oldSkill.rating=level+oldSkill.rating
else
argfunctions.set(skills,skill,level)
end
end,
subtract=function(skills,skill,level)
local skillExists,oldSkill=utils.linear_index(skills,skill,'id')
if skillExists then
local newRating=oldSkill['rating'] or 0
oldSkill.rating=oldSkill.rating-level
if oldSkill.rating<0 or (oldSkill.rating==0 and oldSkill.experience<=0) then skills:erase(skillExists) end
end
end
}
setmetatable(argfunctions,argfunctions)
argfunctions[args[4]:lower()](skills,skill,level)
Autosyndrome reaction with these args after the name of the script:
\WORKER_ID SKILL level ADD/SUBTRACT/SET
SKILL being anything such as DETAILSTONE, level being a number that it will be set to (15 is legendary, 0 is dabbling). Add will add skill levels, subtract will subtract, set will place it at exactly the level you put in.
I never really thought of how useful this would be, so I never made it 'til you said "can't".