Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0007547Dwarf FortressWorld Generation -- Generalpublic2014-07-21 15:262017-12-17 09:30
normalmajorhave not tried
Windows 7Windows 7Windows 7
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:

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

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

2014-07-21 15:37   
Those pop numbers include generic creatures that are not historical figures I believe.
2014-07-21 16:25   
I think the pop cap is intended to limit all civilized beings, not just historical figures.
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.

2014-07-22 06:43   
Please reopen this if cephalo's comments don't explain things.
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.


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.
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.

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.
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"

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.
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.
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.
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.
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.