Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0007547Dwarf FortressWorld Generation -- Generalpublic2014-07-21 15:262017-12-17 09:30
Hinaichigo 
Footkerchief 
normalmajorhave not tried
assignedreopened 
Windows 7Windows 7Windows 7
0.40.04 
 
0007547: TOTAL_CIV_POPULATION only affects historical figures, not abstracted populations
I generated a medium-sized world for 2048 years with various custom parameters.

Among those were these:
[TOTAL_CIV_NUMBER:40]
[TOTAL_CIV_POPULATION:20480]

However, the world_sites_and_pops.txt file contains the following:

Civilized World Population

    6237 Dwarves
    26364 Humans
    36086 Elves
    147671 Goblins
    1914 Kobolds

    Total: 218272

This seems to be a bug.
Generate this world, and then check the world_sites_and_pops.txt file

[WORLD_GEN]
    [TITLE:CUSTOM]
    [SEED:BwyPCRgTGxE7jgeJfkfs]
    [HISTORY_SEED:gNi0KCMyIUCHaP8yC5jy]
    [NAME_SEED:Msr1jUG4OxDwRDGTZhwJ]
    [CREATURE_SEED:eocE2MQscciImCiCOao2]
    [DIM:129:129]
    [EMBARK_POINTS:1324]
    [END_YEAR:2048]
    [BEAST_END_YEAR:512:75]
    [REVEAL_ALL_HISTORY:1]
    [CULL_HISTORICAL_FIGURES:0]
    [ELEVATION:1:400:1600:1600]
    [RAINFALL:0:100:200:200]
    [TEMPERATURE:25:100:200:200]
    [DRAINAGE:0:100:200:200]
    [VOLCANISM:0:100:3200:3200]
    [SAVAGERY:0:100:3200:3200]
    [ELEVATION_FREQUENCY:4:4:0:1:0:1]
    [RAIN_FREQUENCY:1:1:1:1:1:1]
    [DRAINAGE_FREQUENCY:1:1:1:1:1:1]
    [TEMPERATURE_FREQUENCY:1:1:1:1:1:1]
    [SAVAGERY_FREQUENCY:4:1:1:1:1:32]
    [VOLCANISM_FREQUENCY:4:1:1:1:1:64]
    [MINERAL_SCARCITY:2500]
    [MEGABEAST_CAP:512]
    [SEMIMEGABEAST_CAP:512]
    [TITAN_NUMBER:512]
    [TITAN_ATTACK_TRIGGER:80:0:100000]
    [DEMON_NUMBER:128]
    [NIGHT_TROLL_NUMBER:128]
    [BOGEYMAN_NUMBER:128]
    [VAMPIRE_NUMBER:128]
    [WEREBEAST_NUMBER:128]
    [SECRET_NUMBER:128]
    [REGIONAL_INTERACTION_NUMBER:128]
    [DISTURBANCE_INTERACTION_NUMBER:128]
    [EVIL_CLOUD_NUMBER:128]
    [EVIL_RAIN_NUMBER:128]
    [GENERATE_DIVINE_MATERIALS:1]
    [GOOD_SQ_COUNTS:32:256:4]
    [EVIL_SQ_COUNTS:32:256:4]
    [PEAK_NUMBER_MIN:8]
    [PARTIAL_OCEAN_EDGE_MIN:0]
    [COMPLETE_OCEAN_EDGE_MIN:4]
    [VOLCANO_MIN:32]
    [REGION_COUNTS:SWAMP:66:0:0]
    [REGION_COUNTS:DESERT:66:0:0]
    [REGION_COUNTS:FOREST:264:0:0]
    [REGION_COUNTS:MOUNTAINS:528:0:0]
    [REGION_COUNTS:OCEAN:528:0:0]
    [REGION_COUNTS:GLACIER:16:0:0]
    [REGION_COUNTS:TUNDRA:33:0:0]
    [REGION_COUNTS:GRASSLAND:528:0:0]
    [REGION_COUNTS:HILLS:528:0:0]
    [EROSION_CYCLE_COUNT:250]
    [RIVER_MINS:25:25]
    [PERIODICALLY_ERODE_EXTREMES:1]
    [OROGRAPHIC_PRECIPITATION:1]
    [SUBREGION_MAX:2750]
    [CAVERN_LAYER_COUNT:3]
    [CAVERN_LAYER_OPENNESS_MIN:0]
    [CAVERN_LAYER_OPENNESS_MAX:100]
    [CAVERN_LAYER_PASSAGE_DENSITY_MIN:0]
    [CAVERN_LAYER_PASSAGE_DENSITY_MAX:100]
    [CAVERN_LAYER_WATER_MIN:0]
    [CAVERN_LAYER_WATER_MAX:100]
    [HAVE_BOTTOM_LAYER_1:1]
    [HAVE_BOTTOM_LAYER_2:1]
    [LEVELS_ABOVE_GROUND:15]
    [LEVELS_ABOVE_LAYER_1:5]
    [LEVELS_ABOVE_LAYER_2:1]
    [LEVELS_ABOVE_LAYER_3:1]
    [LEVELS_ABOVE_LAYER_4:1]
    [LEVELS_ABOVE_LAYER_5:2]
    [LEVELS_AT_BOTTOM:1]
    [CAVE_MIN_SIZE:8]
    [CAVE_MAX_SIZE:64]
    [MOUNTAIN_CAVE_MIN:64]
    [NON_MOUNTAIN_CAVE_MIN:128]
    [ALL_CAVES_VISIBLE:0]
    [SHOW_EMBARK_TUNNEL:2]
    [TOTAL_CIV_NUMBER:40]
    [TOTAL_CIV_POPULATION:20480]
    [SITE_CAP:1280]
    [PLAYABLE_CIVILIZATION_REQUIRED:1]
    [ELEVATION_RANGES:8000:1056:528]
    [RAIN_RANGES:528:1056:528]
    [DRAINAGE_RANGES:528:1056:528]
    [SAVAGERY_RANGES:528:1056:528]
    [VOLCANISM_RANGES:528:1056:528]
Doesn't seem as bad as in 40.03 where the human population got into the millions. Maybe the bug wasn't fully fixed or it's a different less severe one.
No tags attached.
related to 0007526confirmed Dwarfu Dark towers contain thousands of goblins and trolls, causing lag 
Issue History
2014-07-21 15:26HinaichigoNew Issue
2014-07-21 15:37cephaloNote Added: 0027159
2014-07-21 16:25HinaichigoNote Added: 0027160
2014-07-21 18:47cephaloNote Added: 0027170
2014-07-21 18:52cephaloNote Edited: 0027170bug_revision_view_page.php?bugnote_id=0027170#r10153
2014-07-22 06:43FootkerchiefNote Added: 0027188
2014-07-22 06:43FootkerchiefStatusnew => resolved
2014-07-22 06:43FootkerchiefResolutionopen => no change required
2014-07-22 06:43FootkerchiefAssigned To => Footkerchief
2014-07-22 09:16RobsoieIssue Monitored: Robsoie
2014-07-22 12:05HinaichigoNote Added: 0027220
2014-07-22 12:05HinaichigoStatusresolved => needs feedback
2014-07-22 12:05HinaichigoResolutionno change required => reopened
2014-07-22 14:04cephaloNote Added: 0027243
2014-07-22 14:06cephaloNote Edited: 0027243bug_revision_view_page.php?bugnote_id=0027243#r10211
2014-07-22 14:28thvazNote Added: 0027244
2014-07-22 14:43HinaichigoNote Added: 0027246
2014-07-22 14:43HinaichigoStatusneeds feedback => assigned
2014-07-22 14:45HinaichigoNote Edited: 0027246bug_revision_view_page.php?bugnote_id=0027246#r10213
2014-07-22 15:20cephaloNote Added: 0027250
2014-07-22 15:24cephaloNote Added: 0027252
2014-07-22 15:47FootkerchiefSummaryThe population cap being exceeded in worldgen. => TOTAL_CIV_POPULATION only affects historical figures, not abstracted populations
2014-07-22 15:58RobsoieIssue End Monitor: Robsoie
2014-07-22 16:01HinaichigoNote Added: 0027253
2014-07-22 16:31cephaloNote Added: 0027254
2014-07-23 14:54VexalorNote Added: 0027355
2014-07-23 14:58VexalorNote Edited: 0027355bug_revision_view_page.php?bugnote_id=0027355#r10267
2014-07-28 15:48DwarfuRelationship addedrelated to 0007526
2014-10-12 07:43NekoHatsuIssue Monitored: NekoHatsu
2017-12-17 09:28HinaichigoNote Added: 0037342
2017-12-17 09:28HinaichigoNote Deleted: 0037342
2017-12-17 09:30HinaichigoNote Added: 0037343
2017-12-17 09:46HinaichigoNote Deleted: 0037343

Notes
(0027159)
cephalo   
2014-07-21 15:37   
Those pop numbers include generic creatures that are not historical figures I believe.
(0027160)
Hinaichigo   
2014-07-21 16:25   
I think the pop cap is intended to limit all civilized beings, not just historical figures.
(0027170)
cephalo   
2014-07-21 18:47   
(edited on: 2014-07-21 18:52)
I don't think so. The reason for the pop cap is prevent the dataset from getting way too large from all the events and pieces of information attached to hist. figs. It only requires one integer stored to say that there are 100 extra dwarves at a site in addition to any histfigs.

If you look at the number of historical figures alive at any one time during worldgen, you'll see it stays a certain percentage of that number. This tag also only limits civilized histfigs, so often you'll see about twice as many as the TOTAL_CIV_POPULATION as it will include monsters and such.

(0027188)
Footkerchief   
2014-07-22 06:43   
Please reopen this if cephalo's comments don't explain things.
(0027220)
Hinaichigo   
2014-07-22 12:05   
I'm fairly certain that cephalo is incorrect that it only applies to historical figures. The wiki and the in game text don't say anything about about this only applying to historical figures.

According to the wiki:

This determines the maximum possible population of civilization member beings on the map.

Additionally:

Each race may have up to 100 civilizations each, and each civilization a maximum population of 10,000

There are some sites in this world with over 10,000 civilized inhabitants, mainly dark fortresses, to say nothing for the total for those civilizations.

So, I think that this is a bug.
(0027243)
cephalo   
2014-07-22 14:04   
(edited on: 2014-07-22 14:06)
Here's an experiment you can do. Set the TOTAL_CIV_POPULATION tag to 100 instead of 15000. What you'll find is that world gen will go very fast and there will be few historical figures, but the overall civ populations will not be very different for that size world.

There is also the MAX_POP_NUMBER tag in the entity_default.txt file that is set to 10000 for all civs. That means for every civ (not every race mind you) there is a pop cap of 10000. This is the tag that controls overall population and it seems to more or less work. I suppose that number can be exceeded if one civ conquers another etc.

EDIT: If we are all clear on this maybe we should update the wiki.

(0027244)
thvaz   
2014-07-22 14:28   
The wiki isn't a 100% right manual, you know. I am with cephalo in that, it refers to maximum historical population.
(0027246)
Hinaichigo   
2014-07-22 14:43   
(edited on: 2014-07-22 14:45)
That experiment only proves that the TOTAL_CIV_POPULATION tag is bugged. I still consider this a bug, as it runs counter to the obvious meaning of "total civilized population"

(0027250)
cephalo   
2014-07-22 15:20   
What it proves is that the tag has an obvious effect on the number of historical figures, but almost no effect on total population. That doesn't mean its broken.

The other tags in the entity raws regarding population strongly imply that populations are intended to greatly exceed 15000. Why specify 10000 per civ? Remember, a large map is set to have 40 civs.

As for the naming of the tag; this may be a fuzzy memory, somebody correct me if I'm wrong, but I believe this tag pre-dates the generic populations, and was added at a time when historical figures were the only creatures generated in civs. So at the time, the name meant what it said, but now is something of a misnomer.
(0027252)
cephalo   
2014-07-22 15:24   
@thvaz, to be more specific, I believe that the tag refers to maximum historical figures alive at a given time. As they die, they make room for more.
(0027253)
Hinaichigo   
2014-07-22 16:01   
Actually it proves neither as it provides evidence for both claims. So I think it would be good to keep this open until we can say for sure.
(0027254)
cephalo   
2014-07-22 16:31   
If you think about it, since fortress sieges have to come from existing populations now, you are going to need a lot of goblins. 200k might not be enough to challenge a few long running forts in a world without making goblins extinct.
(0027355)
Vexalor   
2014-07-23 14:54   
(edited on: 2014-07-23 14:58)
After looking through the raws, I believe cephalo is correct; the only bug here is simply that this particular world generation variable uses an obsolete and now misleading name. It definitely seems intended, given the default values and its effects, that this variable is meant to limit the world's population of historical figures rather than total civilized population. Presumably the limit on the number of sites is what is meant to limit the generic civilized population.

As a further example of a similar situation in the raws, world gen also uses SITE_CAP, which, despite its name, does not cap the number of sites but the number of civilized sites, which is what really matters for performance matters. This matter is effectively analogous to this.