File Listing: populate.rb script | ||||||||||||||||||||||||
Last Updated: Apr 03, 2017, 10:25:30 am
Author: rndmvar
![]() |
||||||||||||||||||||||||
Description
Populate.rb allows you to modify the populations of world regions, world locations, sites, and civilizations. To use hack/scripts/populate.rb extract it into Dwarf Fortress/hack/scripts, and hack/ruby/optparse.rb into Dwarf Fortress/hack/ruby. [DFHack]# populate Usage: populate -s CREATURE ( [-r #] [-l #] [-e] [-n] [-b #] [-i #] [-x #] [-f] ) ( [-t #] [-c #] [-o CREATURE] [-a] [-m #] [-p #] [-k] [-z] [-u #] ) [-d] [-v] Mandatory arguments: -s, --species CREATURE Raw creature name to [re]populate. Population Filters: -r, --regions # Maximum number of regions to limit creature to. - Regions are collections of orthogonally connected locations (x,y coordinates) on the world map that share their major Biome type. -l, --locations # Maximum number of locations to limit creature to. - Locations are x,y coordinates on the world map. -e, --existing Add populations only to regions where a regional population already exists. -n, --need-site [TYPE] Restrict habitable locations to those with sites. Valid TYPEs: PlayerFortress, DarkFortress, Cave, MountainHalls, ForestRetreat, Town, ImportantLocation, LairShrine, Fortress, Camp, Monument Population Modifiers: -b, --boost # Increment region populations by the specified amount. -i, --increment # Increment local populations by the specified amount. Site Filters: -t, --site-id # The ID of the site in memory. -c, --civilization-id # The ID of the target civilization in memory. -o, --civilization-race CREATURE The raw creature name of the founder of the civilization. Site Modifiers: -a, --add-creature The creature [-s] will be added to the filtered site(s) that do not already have any. -m, --set-amount # The creature [-s] will have their population(s) at the filtered site(s) set to # amount. -p, --add-amount # The creature [-s] will have their population(s) at the filtered site(s) increased by # amount. -k, --all-vermin All vermin creatures will be matched on operations for the target civilization's pet list/trading goods and site populations. -z, --remove-animal The creature [-s] will be removed from the target civilization's pet list/trading goods and site populations. -y, --trade-priority # The creature [-s] that was added [-a] will have all of their trade goods set to this priority. Special options: -x, --extinct # Remove the extinct flag from populations of this species, and set the population amount to the specified number. -f, --fortress Force adding a population to the current fortress location. - Will show a warning if the surroundings/biome don't match the creature's raws. -d, --display Display only. Do not do any additions. -v, --verbose Print extra information to the console. Examples: Add Kea birds to 3 regions and 10 locations: populate -s BIRD_KEA -r 3 -l 10 Now only add to 10 locations in up to 3 regions where Keas already live: populate -s BIRD_KEA -r 3 -l 10 -e Or drop some wild populations on the Elves by requiring sites with ForestRetreat: populate -s BIRD_KEA -r 3 -l 10 -n ForestRetreat Or maybe just increase already existing populations: populate -s BIRD_KEA -b 1000 -i 100 Or maybe you want (tame) ones in Elven trade caravans: populate -s BIRD_KEA -o ELF -a Or maybe you don't want (tame) ones in Elven trade caravans: populate -s BIRD_KEA -o ELF -z And you don't want (tame) vermin either: populate -s BIRD_KEA -o ELF -z -k Or you think the Elves need MORE (TAME) KEAS: populate -s BIRD_KEA -o ELF -p 1000 Maybe you just want to see what a command WILL do: populate -s BIRD_KEA -o ELF -p 1000 -d You really want lots of text printed to your screen: populate -s BIRD_KEA -o ELF -p 1000 -d -v |
||||||||||||||||||||||||
Checksum / Hash | ||||||||||||||||||||||||
SHA-256: cd2ed2d95757709f6fd8a16f4825ae5ef77a522315d0cd9d04dd8470917bf02e | ||||||||||||||||||||||||
IP: logged Commands |
||||||||||||||||||||||||
More From This Author |