dfhack/scripts/startdwarf.rb

20 lines
464 B
Ruby

2015-02-14 20:53:06 -07:00
# patch start dwarf count
2015-10-23 22:10:15 -06:00
=begin
startdwarf
==========
Use at the embark screen to embark with the specified number of dwarves. Eg.
``startdwarf 500`` would lead to a severe food shortage and FPS issues, while
``startdwarf 10`` would just allow a few more warm bodies to dig in.
The number must be 7 or greater.
=end
2015-02-14 20:53:06 -07:00
nr = $script_args[0].to_i
raise 'too low' if nr < 7
addr = df.get_global_address('start_dwarf_count')
df.memory_patch(addr, [nr].pack('L'))