1. Install
DF Hack, if it isn't already.
2. Inside your DF install folder (the one with 'Dwarf Fortress.exe'), navigate to the folder \hack\scripts\fix
3. Inside the fix folder - Right-Click -> New -> Text Document
4. Name the new file growthbug.rb (Windows will probably throw an error here, warning against changing the file-name extension. Click OK.)
5. Open the file in Notepad, or your favorite text editor.
6. Copy-paste the following into the file:
# growthbug enable [#d|w|m] |disable|status|now|help
DAY = 1200
USAGE = <<ENDUSAGE
Usage:
fix/growthbug enable|start [#d|#w|#m]
start auto fix process with #d (number of days),
or #w (number of weeks), or #m (number of months),
or the default of one month if omitted.
fix/growthbug disable|stop|end stop auto fix process.
fix/growthbug now run fix process once.
fix/growthbug [help|?] show this help.
fix/growthbug status
show auto fix status (running? not running?).
status is also shown with help, and when
starting or stopping auto fix.
(all options are case insensitive.)
ENDUSAGE
class FixGrowth
def initialize() @running = false end
def status() @running ? 'FixGrowth: Running' : 'FixGrowth: Stopped' end
def process
count = 0
df.world.units.active.each do |unit|
r = unit.relations.birth_time % 10
if unit.relations.birth_time > 0 and r > 0 then
unit.relations.birth_time -= r
count += 1
end
end
puts "FixGrowth: Fixed #{count} units so that their size will grow/thicken." unless count == 0
end
def start( time=DAY*28 )
self.stop if @running
@onupdate = df.onupdate_register('fixgrowth', time) { process }
@running = true
end
def stop
df.onupdate_unregister(@onupdate)
@running = false
end
end
$FixGrowth = FixGrowth.new unless $FixGrowth
run = :help
time = DAY * 28
$script_args.each do |arg|
case arg.downcase
when 'now'
run = :now
when 'enable', 'start'
run = :enable
when 'disable', 'end', 'stop'
run = :disable
when 'status'
run = :status
when 'help', '?'
run = :help
else
if arg =~ /^([1-9]\d*)([dD|wW|mM])$/
time = $~[1].to_i
case $~[2]
when 'd', 'D'
time *= DAY
when 'w', 'W'
time *= DAY * 7
when 'm', 'M'
time *= DAY * 28
end
end
end
end
case run
when :now
$FixGrowth.process
when :enable
$FixGrowth.start(time)
puts $FixGrowth.status
when :disable
$FixGrowth.stop
puts $FixGrowth.status
when :help
puts $FixGrowth.status
puts USAGE
end
Kurik Amudnil's script, from the DF Hack thread.
7. Save the file, and exit the editor.
8. Navigate back to your Dwarf Fortress install folder.
9. Open the file "dfhack.init" (May be called "dfhack.init-example". If so, rename it to "dfhack.init".) in notepad/text editor of choice.
10. Add the following to a new line anywhere in the file:
fix/growthbug enable
11. Save, exit, and you're done. Start up Dwarf Fortress normally, and if everything is working properly you'll see the line "FixGrowth: Running" in the initial wall of text that the DF Hack window spits out.