This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--create unit at pointer or given location. Usage e.g. "spawnunit DWARF 0 Dwarfy" | |
--Made by warmist, but edited by Putnam for the dragon ball mod to be used in reactions | |
--note that it's extensible to any autosyndrome reaction to spawn anything due to this; to use in autosyndrome, you want \COMMAND spawnunit CREATURE caste_number name \LOCATION | |
args={...} | |
local rando=dfhack.random.new() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--create unit at pointer or given location. Usage e.g. "spawnunit DWARF 0 Dwarfy" | |
--Made by warmist, but edited by Putnam for the dragon ball mod to be used in reactions | |
--note that it's extensible to any autosyndrome reaction to spawn anything due to this; to use in autosyndrome, you want \COMMAND spawnunit CREATURE caste_number name \LOCATION | |
args={...} | |
function getCaste(race_id,caste_id) | |
local cr=df.creature_raw.find(race_id) | |
return cr.caste[caste_id] |