View Issue Details

IDProjectCategoryView StatusLast Update
0007547Dwarf FortressWorld Generation -- Generalpublic2017-12-17 09:30
ReporterHinaichigo Assigned Touser6 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status assignedResolutionreopened 
PlatformWindows 7OSWindows 7OS VersionWindows 7
Product Version0.40.04 
Summary0007547: TOTAL_CIV_POPULATION only affects historical figures, not abstracted populations
DescriptionI 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.
Steps To ReproduceGenerate 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]
Additional InformationDoesn'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.
TagsNo tags attached.

Relationships

related to 0007526 confirmeduser11 Dark towers contain thousands of goblins and trolls, causing lag 

Activities

cephalo

2014-07-21 15:37

reporter   ~0027159

Those pop numbers include generic creatures that are not historical figures I believe.

Hinaichigo

2014-07-21 16:25

reporter   ~0027160

I think the pop cap is intended to limit all civilized beings, not just historical figures.

cephalo

2014-07-21 18:47

reporter   ~0027170

Last edited: 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.

user6

2014-07-22 06:43

  ~0027188

Please reopen this if cephalo's comments don't explain things.

Hinaichigo

2014-07-22 12:05

reporter   ~0027220

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.

cephalo

2014-07-22 14:04

reporter   ~0027243

Last edited: 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.

thvaz

2014-07-22 14:28

reporter   ~0027244

The wiki isn't a 100% right manual, you know. I am with cephalo in that, it refers to maximum historical population.

Hinaichigo

2014-07-22 14:43

reporter   ~0027246

Last edited: 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"

cephalo

2014-07-22 15:20

reporter   ~0027250

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.

cephalo

2014-07-22 15:24

reporter   ~0027252

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

Hinaichigo

2014-07-22 16:01

reporter   ~0027253

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.

cephalo

2014-07-22 16:31

reporter   ~0027254

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.

Vexalor

2014-07-23 14:54

reporter   ~0027355

Last edited: 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.

Add Note

Note

Issue History

Date Modified Username Field Change
2014-07-21 15:26 Hinaichigo New Issue
2014-07-21 15:37 cephalo Note Added: 0027159
2014-07-21 16:25 Hinaichigo Note Added: 0027160
2014-07-21 18:47 cephalo Note Added: 0027170
2014-07-21 18:52 cephalo Note Edited: 0027170
2014-07-22 06:43 user6 Note Added: 0027188
2014-07-22 06:43 user6 Status new => resolved
2014-07-22 06:43 user6 Resolution open => no change required
2014-07-22 06:43 user6 Assigned To => user6
2014-07-22 12:05 Hinaichigo Note Added: 0027220
2014-07-22 12:05 Hinaichigo Status resolved => feedback
2014-07-22 12:05 Hinaichigo Resolution no change required => reopened
2014-07-22 14:04 cephalo Note Added: 0027243
2014-07-22 14:06 cephalo Note Edited: 0027243
2014-07-22 14:28 thvaz Note Added: 0027244
2014-07-22 14:43 Hinaichigo Note Added: 0027246
2014-07-22 14:43 Hinaichigo Status feedback => assigned
2014-07-22 14:45 Hinaichigo Note Edited: 0027246
2014-07-22 15:20 cephalo Note Added: 0027250
2014-07-22 15:24 cephalo Note Added: 0027252
2014-07-22 15:47 user6 Summary The population cap being exceeded in worldgen. => TOTAL_CIV_POPULATION only affects historical figures, not abstracted populations
2014-07-22 16:01 Hinaichigo Note Added: 0027253
2014-07-22 16:31 cephalo Note Added: 0027254
2014-07-23 14:54 Vexalor Note Added: 0027355
2014-07-23 14:58 Vexalor Note Edited: 0027355
2014-07-28 15:48 user11 Relationship added related to 0007526