preload button hover image:
HomeSearchRankingsStatisticsAboutContact
Current Time: Oct 22, 2019, 12:05:56 pm
 Dwarf Fortress File Depot » Utilities » populate.rb script
      
Registration is not required to download. However, it will allow you to vote, comment, and upload. Forgot your password?
File Listing: populate.rb script
Last Updated: Apr 03, 2017, 10:25:30 am
File version: 1.0
For DF version: 0.43.03
Downloads: 87 Size: 31 KB
Views: 1,051 Type: ZIP
Home:  GitHub Script Repository
Rating (0 votes): Unrated
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
Raw Data: JSON / Text
Checksum / Hash
SHA-256: cd2ed2d95757709f6fd8a16f4825ae5ef77a522315d0cd9d04dd8470917bf02e
IP: logged
Commands
More From This Author
Comments
IP: logged
 populate.rb script (v 1.0)  » posted by Thundercraft on Mar 14, 2019, 02:01:39 pm
Please consider mentioning somewhere in the description that the Forum Thread for this is: http://www.bay12forums.com/smf/index.php?topic=163602.0

Some of us browse DFFD for new mods and utilities, rather than finding a mod or utility on the forums and following the download link here. And if a mod on DFFD fails to mention a forum thread or list the URL, then we're going to assume that a forum thread does not exist. I'd consider the forum thread URL more important, even, than the URL to GitHub script repository.
IP: logged
 populate.rb script (v 1.0)  » posted by Thundercraft on Mar 14, 2019, 02:03:51 pm
Also, if you would, please update it! This script is exactly what I need.
HomeSearchRankingsStatisticsAboutContact

Website © 2019 FenriSoft. The core site script is PHCDownload (© 2005-2019).
Hosted by Linode.