It is done. Yay I'm M45ta scriptkiddy5000 !!!!!111!!einself
*clears throat*
Sorry I got a little carried away with this.
I dug into lua and it is now done.
Sort of at least.
While I wanted to be able to run this script on the embark screen and save/load all 7 dwarfs I couldn't figure out how to access them.
Now you have to select the dwarves after embark and call the script on every one of them separately.
Right now the script copies. Attributes (mental and body) and traits. It does NOT copy values, gender, preferences, body-size ...
Also I don't really get how the cultural values work. As the vector only has very few entries compared to existing values. If someone has insight into this please enlighten me.
Usage is explained by running
copyDwarf info
in the DFhack console.
copyDwarf.lua
-- By SeelenJägerTee
-- Published under the MIT License (http://opensource.org/licenses/MIT)
-- THE CODE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-- THE SOFTWARE.
-- BY USING THE CODE YOU IMPLICITLY STATE, THAT YOU HAVE SEEN AND UNDERSTOOD
-- THE CODE AND HAVE CORRECTED ANY ERRORS IT MAY CONTAIN.
local sepTab = false -- change separator between "\t" and "\t = " -- sepTab = true currently broken, no clue why
local theUnit=dfhack.gui.getSelectedUnit()
local params = {...}
local i = "default"
i = params[2]
if theUnit == nil then
print("error no unit selected")
return;
end
--ENUMS
local STRENGTH = 0
local AGILITY = 1
local TOUGHNESS = 2
local ENDURANCE = 3
local RECUPERATION = 4
local DISEASE_RESISTANCE = 5
local ANALYTICAL_ABILITY = 0
local FOCUS = 1
local WILLPOWER = 2
local CREATIVITY = 3
local INTUITION = 4
local PATIENCE = 5
local MEMORY = 6
local LINGUISTIC_ABILITY = 7
local SPATIAL_SENSE = 8
local MUSICALITY = 9
local KINESTHETIC_SENSE = 10
local EMPATHY = 11
local SOCIAL_AWARENESS = 12
local LOVE_PROPENSITY = 0
local HATE_PROPENSITY = 1
local ENVY_PROPENSITY = 2
local CHEER_PROPENSITY = 3
local DEPRESSION_PROPENSITY = 4
local ANGER_PROPENSITY = 5
local ANXIETY_PROPENSITY = 6
local LUST_PROPENSITY = 7
local STRESS_VULNERABILITY = 8
local GREED = 9
local IMMODERATION = 10
local VIOLENT = 11
local PERSEVERENCE = 12
local WASTEFULNESS = 13
local DISCORD = 14
local FRIENDLINESS = 15
local POLITENESS = 16
local DISDAIN_ADVICE = 17
local BRAVERY = 18
local CONFIDENCE = 19
local VANITY = 20
local AMBITION = 21
local GRATITUDE = 22
local IMMODESTY = 23
local HUMOR = 24
local VENGEFUL = 25
local PRIDE = 26
local CRUELTY = 27
local SINGLEMINDED = 28
local HOPEFUL = 29
local CURIOUS = 30
local BASHFUL = 31
local PRIVACY = 32
local PERFECTIONIST = 33
local CLOSEMINDED = 34
local TOLERANT = 35
local EMOTIONALLY_OBSESSIVE = 36
local SWAYED_BY_EMOTIONS = 37
local ALTRUISM = 38
local DUTIFULNESS = 39
local THOUGHTLESSNESS = 40
local ORDERLINESS = 41
local TRUST = 42
local GREGARIOUSNESS = 43
local ASSERTIVENESS = 44
local ACTIVITY_LEVEL = 45
local EXCITEMENT_SEEKING = 46
local IMAGINATION = 47
local ABSTRACT_INCLINED = 48
local ART_INCLINED = 49
function SaveToFile()
local file = io.open("hack\\scripts\\SavedDwarves\\SavedDwarves_"..i..".txt", "w")
local table = { --["caste"..i] = theUnit.caste, -- I disabled sex and caste, as some descriptions are not updated properly.
--["sex"..i] = theUnit.sex, -- I have no clue what else doesn't get updated. Want to avoid pregnant males and such things.
["strength"..i] = theUnit.body.physical_attrs[STRENGTH].value,
["agility"..i] = theUnit.body.physical_attrs[AGILITY].value,
["toughness"..i] = theUnit.body.physical_attrs[TOUGHNESS].value,
["endurance"..i] = theUnit.body.physical_attrs[ENDURANCE].value,
["recuperation"..i] = theUnit.body.physical_attrs[RECUPERATION].value,
["disease_resistance"..i] = theUnit.body.physical_attrs[DISEASE_RESISTANCE].value,
["max_strength"..i] = theUnit.body.physical_attrs[STRENGTH].max_value,
["max_agility"..i] = theUnit.body.physical_attrs[AGILITY].max_value,
["max_toughness"..i] = theUnit.body.physical_attrs[TOUGHNESS].max_value,
["max_endurance"..i] = theUnit.body.physical_attrs[ENDURANCE].max_value,
["max_recuperation"..i] = theUnit.body.physical_attrs[RECUPERATION].max_value,
["max_disease_resist"..i] = theUnit.body.physical_attrs[DISEASE_RESISTANCE].max_value,
["analytical_ability"..i] = theUnit.status.current_soul.mental_attrs[ANALYTICAL_ABILITY].value,
["focus"..i] = theUnit.status.current_soul.mental_attrs[FOCUS].value,
["willpower"..i] = theUnit.status.current_soul.mental_attrs[WILLPOWER].value,
["creativity"..i] = theUnit.status.current_soul.mental_attrs[CREATIVITY].value,
["intuition"..i] = theUnit.status.current_soul.mental_attrs[INTUITION].value,
["patience"..i] = theUnit.status.current_soul.mental_attrs[PATIENCE].value,
["memory"..i] = theUnit.status.current_soul.mental_attrs[MEMORY].value,
["linguisitc_ability"..i] = theUnit.status.current_soul.mental_attrs[LINGUISTIC_ABILITY].value,
["spatial_sense"..i] = theUnit.status.current_soul.mental_attrs[SPATIAL_SENSE].value,
["musicality"..i] = theUnit.status.current_soul.mental_attrs[MUSICALITY].value,
["kinesthetic_sense" ..i] = theUnit.status.current_soul.mental_attrs[KINESTHETIC_SENSE].value,
["empathy"..i] = theUnit.status.current_soul.mental_attrs[EMPATHY].value,
["social_awareness"..i] = theUnit.status.current_soul.mental_attrs[SOCIAL_AWARENESS].value,
["max_analytical_ability"..i] = theUnit.status.current_soul.mental_attrs[ANALYTICAL_ABILITY].max_value,
["max_focus"..i] = theUnit.status.current_soul.mental_attrs[FOCUS].max_value,
["max_willpower"..i] = theUnit.status.current_soul.mental_attrs[WILLPOWER].max_value,
["max_creativity"..i] = theUnit.status.current_soul.mental_attrs[CREATIVITY].max_value,
["max_intuition"..i] = theUnit.status.current_soul.mental_attrs[INTUITION].max_value,
["max_patience"..i] = theUnit.status.current_soul.mental_attrs[PATIENCE].max_value,
["max_memory"..i] = theUnit.status.current_soul.mental_attrs[MEMORY].max_value,
["max_linguisitc_ability"..i] = theUnit.status.current_soul.mental_attrs[LINGUISTIC_ABILITY].max_value,
["max_spatial_sense"..i] = theUnit.status.current_soul.mental_attrs[SPATIAL_SENSE].max_value,
["max_musicality"..i] = theUnit.status.current_soul.mental_attrs[MUSICALITY].max_value,
["max_kinesthetic_sense" ..i] = theUnit.status.current_soul.mental_attrs[KINESTHETIC_SENSE].max_value,
["max_empathy"..i] = theUnit.status.current_soul.mental_attrs[EMPATHY].max_value,
["max_social_awareness"..i] = theUnit.status.current_soul.mental_attrs[SOCIAL_AWARENESS].max_value,
["LOVE_PROPENSITY"..i] = theUnit.status.current_soul.personality.traits[LOVE_PROPENSITY],
["HATE_PROPENSITY"..i] = theUnit.status.current_soul.personality.traits[HATE_PROPENSITY],
["ENVY_PROPENSITY"..i] = theUnit.status.current_soul.personality.traits[ENVY_PROPENSITY],
["CHEER_PROPENSITY"..i] = theUnit.status.current_soul.personality.traits[CHEER_PROPENSITY],
["DEPRESSION_PROPENSITY"..i] = theUnit.status.current_soul.personality.traits[DEPRESSION_PROPENSITY ],
["ANGER_PROPENSITY"..i] = theUnit.status.current_soul.personality.traits[ANGER_PROPENSITY],
["ANXIETY_PROPENSITY"..i] = theUnit.status.current_soul.personality.traits[ANXIETY_PROPENSITY],
["LUST_PROPENSITY"..i] = theUnit.status.current_soul.personality.traits[LUST_PROPENSITY],
["STRESS_VULNERABILITY"..i] = theUnit.status.current_soul.personality.traits[STRESS_VULNERABILITY],
["GREED"..i] = theUnit.status.current_soul.personality.traits[GREED],
["IMMODERATION"..i] = theUnit.status.current_soul.personality.traits[IMMODERATION],
["VIOLENT"..i] = theUnit.status.current_soul.personality.traits[VIOLENT],
["PERSEVERENCE"..i] = theUnit.status.current_soul.personality.traits[PERSEVERENCE],
["WASTEFULNESS"..i] = theUnit.status.current_soul.personality.traits[WASTEFULNESS],
["DISCORD"..i] = theUnit.status.current_soul.personality.traits[DISCORD],
["FRIENDLINESS"..i] = theUnit.status.current_soul.personality.traits[FRIENDLINESS],
["POLITENESS"..i] = theUnit.status.current_soul.personality.traits[POLITENESS],
["DISDAIN_ADVICE"..i] = theUnit.status.current_soul.personality.traits[DISDAIN_ADVICE],
["BRAVERY"..i] = theUnit.status.current_soul.personality.traits[BRAVERY],
["CONFIDENCE"..i] = theUnit.status.current_soul.personality.traits[CONFIDENCE],
["VANITY"..i] = theUnit.status.current_soul.personality.traits[VANITY],
["AMBITION"..i] = theUnit.status.current_soul.personality.traits[AMBITION],
["GRATITUDE"..i] = theUnit.status.current_soul.personality.traits[GRATITUDE],
["IMMODESTY"..i] = theUnit.status.current_soul.personality.traits[IMMODESTY],
["HUMOR"..i] = theUnit.status.current_soul.personality.traits[HUMOR],
["VENGEFUL"..i] = theUnit.status.current_soul.personality.traits[VENGEFUL],
["PRIDE"..i] = theUnit.status.current_soul.personality.traits[PRIDE],
["CRUELTY"..i] = theUnit.status.current_soul.personality.traits[CRUELTY],
["SINGLEMINDED"..i] = theUnit.status.current_soul.personality.traits[SINGLEMINDED],
["HOPEFUL"..i] = theUnit.status.current_soul.personality.traits[HOPEFUL],
["CURIOUS"..i] = theUnit.status.current_soul.personality.traits[CURIOUS],
["BASHFUL"..i] = theUnit.status.current_soul.personality.traits[BASHFUL],
["PRIVACY"..i] = theUnit.status.current_soul.personality.traits[PRIVACY],
["PERFECTIONIST"..i] = theUnit.status.current_soul.personality.traits[PERFECTIONIST],
["CLOSEMINDED"..i] = theUnit.status.current_soul.personality.traits[CLOSEMINDED],
["TOLERANT"..i] = theUnit.status.current_soul.personality.traits[TOLERANT],
["EMOTIONALLY_OBSESSIVE"..i] = theUnit.status.current_soul.personality.traits[EMOTIONALLY_OBSESSIVE],
["SWAYED_BY_EMOTIONS"..i] = theUnit.status.current_soul.personality.traits[SWAYED_BY_EMOTIONS],
["ALTRUISM"..i] = theUnit.status.current_soul.personality.traits[ALTRUISM],
["DUTIFULNESS"..i] = theUnit.status.current_soul.personality.traits[DUTIFULNESS],
["THOUGHTLESSNESS"..i] = theUnit.status.current_soul.personality.traits[THOUGHTLESSNESS],
["ORDERLINESS"..i] = theUnit.status.current_soul.personality.traits[ORDERLINESS],
["TRUST"..i] = theUnit.status.current_soul.personality.traits[TRUST],
["GREGARIOUSNESS"..i] = theUnit.status.current_soul.personality.traits[GREGARIOUSNESS],
["ASSERTIVENESS"..i] = theUnit.status.current_soul.personality.traits[ASSERTIVENESS],
["ACTIVITY_LEVEL"..i] = theUnit.status.current_soul.personality.traits[ACTIVITY_LEVEL],
["EXCITEMENT_SEEKING"..i] = theUnit.status.current_soul.personality.traits[EXCITEMENT_SEEKING],
["IMAGINATION"..i] = theUnit.status.current_soul.personality.traits[IMAGINATION],
["ABSTRACT_INCLINED"..i] = theUnit.status.current_soul.personality.traits[ABSTRACT_INCLINED],
["ART_INCLINED"..i] = theUnit.status.current_soul.personality.traits[ART_INCLINED]
}
for key,value in pairs(table) do print(key,value) end -- print out the table in console for control reasons
for key, value in pairs(table) do
if sepTab == true then
file:write(key.."\t"..value.."\n")
else
file:write(key.."\t= "..value.."\n")
end
end
file:close()
end
function ReadFromFile()
local readfile = assert(io.open("hack\\scripts\\SavedDwarves\\SavedDwarves_"..i..".txt", "r")) -- crash script with assertion if file not found
local buftable = {} -- buffer table, which gets filled with loaded data
while true do
local line = readfile:read("*line")
if line == nil then
break
end
if sepTab == true then
local key, value = line:match('([%w_]+)%s+(.*)')
else
local key, value = line:match('([%w_]+)%s*=%s*(.*)')
buftable[key] = value
readfile.close() -- file can be closed here as scipt crashed if not open
end
end
print("\n\n")
for key,value in pairs(buftable) do print(key,value) end -- print out the table in console for control reasons
-- theUnit.caste = buftable["caste"..i] -- as noted under the write function disabled
-- theUnit.sex = buftable["sex"..i] -- due to unknown behaviour
theUnit.body.physical_attrs[STRENGTH].value = buftable["strength"..i]
theUnit.body.physical_attrs[AGILITY].value = buftable["agility"..i]
theUnit.body.physical_attrs[TOUGHNESS].value = buftable["toughness"..i]
theUnit.body.physical_attrs[ENDURANCE].value = buftable["endurance"..i]
theUnit.body.physical_attrs[RECUPERATION].value = buftable["recuperation"..i]
theUnit.body.physical_attrs[DISEASE_RESISTANCE].value = buftable["disease_resistance"..i]
theUnit.body.physical_attrs[STRENGTH].max_value = buftable["max_strength"..i]
theUnit.body.physical_attrs[AGILITY].max_value = buftable["max_agility"..i]
theUnit.body.physical_attrs[TOUGHNESS].max_value = buftable["max_toughness"..i]
theUnit.body.physical_attrs[ENDURANCE].max_value = buftable["max_endurance"..i]
theUnit.body.physical_attrs[RECUPERATION].max_value = buftable["max_recuperation"..i]
theUnit.body.physical_attrs[DISEASE_RESISTANCE].max_value = buftable["max_disease_resist"..i]
theUnit.status.current_soul.mental_attrs[ANALYTICAL_ABILITY].value = buftable["analytical_ability"..i]
theUnit.status.current_soul.mental_attrs[FOCUS].value = buftable["focus"..i]
theUnit.status.current_soul.mental_attrs[WILLPOWER].value = buftable["willpower"..i]
theUnit.status.current_soul.mental_attrs[CREATIVITY].value = buftable["creativity"..i]
theUnit.status.current_soul.mental_attrs[INTUITION].value = buftable["intuition"..i]
theUnit.status.current_soul.mental_attrs[PATIENCE].value = buftable["patience"..i]
theUnit.status.current_soul.mental_attrs[MEMORY].value = buftable["memory"..i]
theUnit.status.current_soul.mental_attrs[LINGUISTIC_ABILITY].value = buftable["linguisitc_ability"..i]
theUnit.status.current_soul.mental_attrs[SPATIAL_SENSE].value = buftable["spatial_sense"..i]
theUnit.status.current_soul.mental_attrs[MUSICALITY].value = buftable["musicality"..i]
theUnit.status.current_soul.mental_attrs[KINESTHETIC_SENSE].value = buftable["kinesthetic_sense" ..i]
theUnit.status.current_soul.mental_attrs[EMPATHY].value = buftable["empathy"..i]
theUnit.status.current_soul.mental_attrs[SOCIAL_AWARENESS].value = buftable["social_awareness"..i]
theUnit.status.current_soul.mental_attrs[ANALYTICAL_ABILITY].max_value = buftable["max_analytical_ability"..i]
theUnit.status.current_soul.mental_attrs[FOCUS].max_value = buftable["max_focus"..i]
theUnit.status.current_soul.mental_attrs[WILLPOWER].max_value = buftable["max_willpower"..i]
theUnit.status.current_soul.mental_attrs[CREATIVITY].max_value = buftable["max_creativity"..i]
theUnit.status.current_soul.mental_attrs[INTUITION].max_value = buftable["max_intuition"..i]
theUnit.status.current_soul.mental_attrs[PATIENCE].max_value = buftable["max_patience"..i]
theUnit.status.current_soul.mental_attrs[MEMORY].max_value = buftable["max_memory"..i]
theUnit.status.current_soul.mental_attrs[LINGUISTIC_ABILITY].max_value = buftable["max_linguisitc_ability"..i]
theUnit.status.current_soul.mental_attrs[SPATIAL_SENSE].max_value = buftable["max_spatial_sense"..i]
theUnit.status.current_soul.mental_attrs[MUSICALITY].max_value = buftable["max_musicality"..i]
theUnit.status.current_soul.mental_attrs[KINESTHETIC_SENSE].max_value = buftable["max_kinesthetic_sense" ..i]
theUnit.status.current_soul.mental_attrs[EMPATHY].max_value = buftable["max_empathy"..i]
theUnit.status.current_soul.mental_attrs[SOCIAL_AWARENESS].max_value = buftable["max_social_awareness"..i]
theUnit.status.current_soul.personality.traits[LOVE_PROPENSITY] = buftable["LOVE_PROPENSITY"..i]
theUnit.status.current_soul.personality.traits[HATE_PROPENSITY] = buftable["HATE_PROPENSITY"..i]
theUnit.status.current_soul.personality.traits[ENVY_PROPENSITY] = buftable["ENVY_PROPENSITY"..i]
theUnit.status.current_soul.personality.traits[CHEER_PROPENSITY] = buftable["CHEER_PROPENSITY"..i]
theUnit.status.current_soul.personality.traits[DEPRESSION_PROPENSITY] = buftable["DEPRESSION_PROPENSITY"..i]
theUnit.status.current_soul.personality.traits[ANGER_PROPENSITY] = buftable["ANGER_PROPENSITY"..i]
theUnit.status.current_soul.personality.traits[ANXIETY_PROPENSITY] = buftable["ANXIETY_PROPENSITY"..i]
theUnit.status.current_soul.personality.traits[LUST_PROPENSITY] = buftable["LUST_PROPENSITY"..i]
theUnit.status.current_soul.personality.traits[STRESS_VULNERABILITY] = buftable["STRESS_VULNERABILITY"..i]
theUnit.status.current_soul.personality.traits[GREED] = buftable["GREED"..i]
theUnit.status.current_soul.personality.traits[IMMODERATION] = buftable["IMMODERATION"..i]
theUnit.status.current_soul.personality.traits[VIOLENT] = buftable["VIOLENT"..i]
theUnit.status.current_soul.personality.traits[PERSEVERENCE] = buftable["PERSEVERENCE"..i]
theUnit.status.current_soul.personality.traits[WASTEFULNESS] = buftable["WASTEFULNESS"..i]
theUnit.status.current_soul.personality.traits[DISCORD] = buftable["DISCORD"..i]
theUnit.status.current_soul.personality.traits[FRIENDLINESS] = buftable["FRIENDLINESS"..i]
theUnit.status.current_soul.personality.traits[POLITENESS] = buftable["POLITENESS"..i]
theUnit.status.current_soul.personality.traits[DISDAIN_ADVICE] = buftable["DISDAIN_ADVICE"..i]
theUnit.status.current_soul.personality.traits[BRAVERY] = buftable["BRAVERY"..i]
theUnit.status.current_soul.personality.traits[CONFIDENCE] = buftable["CONFIDENCE"..i]
theUnit.status.current_soul.personality.traits[VANITY] = buftable["VANITY"..i]
theUnit.status.current_soul.personality.traits[AMBITION] = buftable["AMBITION"..i]
theUnit.status.current_soul.personality.traits[GRATITUDE] = buftable["GRATITUDE"..i]
theUnit.status.current_soul.personality.traits[IMMODESTY] = buftable["IMMODESTY"..i]
theUnit.status.current_soul.personality.traits[HUMOR] = buftable["HUMOR"..i]
theUnit.status.current_soul.personality.traits[VENGEFUL] = buftable["VENGEFUL"..i]
theUnit.status.current_soul.personality.traits[PRIDE] = buftable["PRIDE"..i]
theUnit.status.current_soul.personality.traits[CRUELTY] = buftable["CRUELTY"..i]
theUnit.status.current_soul.personality.traits[SINGLEMINDED] = buftable["SINGLEMINDED"..i]
theUnit.status.current_soul.personality.traits[HOPEFUL] = buftable["HOPEFUL"..i]
theUnit.status.current_soul.personality.traits[CURIOUS] = buftable["CURIOUS"..i]
theUnit.status.current_soul.personality.traits[BASHFUL] = buftable["BASHFUL"..i]
theUnit.status.current_soul.personality.traits[PRIVACY] = buftable["PRIVACY"..i]
theUnit.status.current_soul.personality.traits[PERFECTIONIST] = buftable["PERFECTIONIST"..i]
theUnit.status.current_soul.personality.traits[CLOSEMINDED] = buftable["CLOSEMINDED"..i]
theUnit.status.current_soul.personality.traits[TOLERANT] = buftable["TOLERANT"..i]
theUnit.status.current_soul.personality.traits[EMOTIONALLY_OBSESSIVE] = buftable["EMOTIONALLY_OBSESSIVE"..i]
theUnit.status.current_soul.personality.traits[SWAYED_BY_EMOTIONS] = buftable["SWAYED_BY_EMOTIONS"..i]
theUnit.status.current_soul.personality.traits[ALTRUISM] = buftable["ALTRUISM"..i]
theUnit.status.current_soul.personality.traits[DUTIFULNESS] = buftable["DUTIFULNESS"..i]
theUnit.status.current_soul.personality.traits[THOUGHTLESSNESS] = buftable["THOUGHTLESSNESS"..i]
theUnit.status.current_soul.personality.traits[ORDERLINESS] = buftable["ORDERLINESS"..i]
theUnit.status.current_soul.personality.traits[TRUST] = buftable["TRUST"..i]
theUnit.status.current_soul.personality.traits[GREGARIOUSNESS] = buftable["GREGARIOUSNESS"..i]
theUnit.status.current_soul.personality.traits[ASSERTIVENESS] = buftable["ASSERTIVENESS"..i]
theUnit.status.current_soul.personality.traits[ACTIVITY_LEVEL] = buftable["ACTIVITY_LEVEL"..i]
theUnit.status.current_soul.personality.traits[EXCITEMENT_SEEKING] = buftable["EXCITEMENT_SEEKING"..i]
theUnit.status.current_soul.personality.traits[IMAGINATION] = buftable["IMAGINATION"..i]
theUnit.status.current_soul.personality.traits[ABSTRACT_INCLINED] = buftable["ABSTRACT_INCLINED"..i]
theUnit.status.current_soul.personality.traits[ART_INCLINED] = buftable["ART_INCLINED"..i]
end
if params[1] == "save" then
SaveToFile()
elseif params[1] == "load" then
ReadFromFile()
elseif params[1] == "info" then
print("This script can be used to save dwarves and to load them later on. As of writing this line it can save and restore the attributes and traits of a dwarf. The script takes 2 parameters. The first parameter can be save or load or info. The second parameter is an identifier for the savefile and can be omitted when the first parameter is info. Typing copyDwarf save foo will save the currently selected dwarf in SavedDwarves_foo.txt. copyDwarf load bar5 will impose the values saved in SavedDwarves_bar5.txt onto the currently selected dwarf.")
else
print("For info on the script call it with copyDwarf info.\nTo use script call it with copyDwarf param1 param2. param1 needs to be save load or info. param2 is identifier of save-file.\nMAKE SURE YOU UNDERSTAND THIS SCRIPT BEFORE USING.")
end