Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: How do you really put a cap to a site population ?  (Read 4976 times)

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
How do you really put a cap to a site population ?
« on: March 01, 2015, 11:14:45 am »

Hello,

I like adventure mode, and a nice part of adventure mode is to explore, all those 0.40.x sites are just asking to be explored, especially the goblin sites, that additionally has quest-things to do with the rescue of prisonners and children .

But then the problem : goblins sites are barely playable, it's so insanely slow and laggy that it quickly kills the fun you can have during those times.

Checking the world/legend viewers , it seems rather obvious why most of those sites are barely playable : populations are skyrocketting in thousands of goblins and thousands of trolls so with the pathfinding spam / dialogues /"it's terrifying" stuff, no wonder it's unplayable there.

I often read "just use the cap setting" , hmm right, so i tested around it and found that it does not work the way i thought it would.

An example
I set up my world as a small island, and then edited the paramaters to have very low cap


I let the world generate for only 100 years


Then start to check in world viewer to see the populations before going in.


huh what's with those insanely high pop ?

I then wondered if the source of that problem was in the entity_default.txt , a pop setting overriding the worldgen parameter but noticed that

MAX_SITE_POP_NUMBER was at 120 for every of those sites.
Looking on the wiki :
Quote
MAX_SITE_POP_NUMBER    number    Max population per individual site. Generic site types will not hold any more than this number of entities. Must be at least 80 for towns to be generated. In general, lower pop numbers mean more sprawl, and higher numbers mean more needing to crawl when entering town stores, which are not affected by this cap. Defaults to 50.

Either i don't understand how it is truly working, or there are settings that are just plain ignored.
So please help, how can i get site population to keep a reasonnable (i mean playable in adventure mode as it does not impact fortress mode anyways) amount of population in them ?
Logged

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #1 on: March 01, 2015, 11:53:29 am »

For what is worth, i redid the same experimentations, with the pop cap and civ cap in worldgen being very low ( 10 and 40 as in previous test )
But in the entity_default.txt i changed the goblin setting MAX_SITE_POP_NUMBER that is by default on 120 into .. 1 , just 1 to check what would happen

And generated for only a hundred of years too. As a result i checked the goblin sites :



:/



Logged

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #2 on: March 01, 2015, 12:33:00 pm »

Capital cities aren't affected by population limits. For goblins this means that they'll keep living in their capital city of the dark fortress infinitely since they don't need to eat or die of old age and keep having children until it gets to thousands and thousands of goblins. If you look at the dark pits they always follow the population cap.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #3 on: March 01, 2015, 12:40:45 pm »

Ah thanks, so that was it, as nothing i changed in the settings and raws was fixing that annoyance.

Too bad there's no way to cap capital sites, they're the most interesting place to explore and the less playable of the whole game :/

I'll have to try with giving a low maxage to all those immortal or very long lived creatures, as it looks like the only possible solution to that overpopulations = unplayable problems.
Logged

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #4 on: March 01, 2015, 01:08:57 pm »

For whoever can find some use,

I gave a try, [MAXAGE:50:70] to everyone immortal or not (i mean dwarf/gob/elf/troll/kobold) even despite some were living longer (trolls can do for thousand of year) and generated a world for 100 years, so everyone would not live longer than 70 years .

During world generation i noticed the death count was going up faster, so apparently it seemed to work.

After checking all the capitals, looks like the dwarves were affected as they were having their sites with +/- a hundred of individual each. The elves seemed to be unaffected as the capitals seems to still be at +/- 400

And then i checked the goblin sites capitals

:/

So it does not seem maxage helps to get rid of those several thousands of goblins and trolls overpopulating their capitals, as if it had no effect at all on them ... very odd

I then decided to add the need to eat and drink to the goblins and trolls by removing their [NO_DRINK][NO_EAT] , but leaving their [BONECARN] so they could eat bones.
IT was then that i noticed to my surprise that Trools do not have the [NO_DRINK][NO_EAT]

Anyways, this way everyone had then a limitation of 70 years and would be forced to be dependant on eating and drinking for going on.

Then i generated.
During generation i didn't noticed anything going much differently than before.
And checking the population at goblin site capitals :



So while it's not great as a cap for adventure mode as it's still a huge lot, it's still better than the multi-thousands of before, assuming it's not just a lucky roll and that it really had an effect (unlike oddly maxage)
Odd to see so many Ogres there, i wonder where they are coming from. I'll have to check what's their maxage and etc... if they're going to spawn now.

I'll have to try more with maxage to see if it really impact the goblins/trolls or if the game is ignoring the setting for them.
Logged

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #5 on: March 01, 2015, 01:38:18 pm »

Ogres are only sometimes domesticated by goblins if they end up near a biome with ogres. That civilization just happened to get access to them. Anyway, this seems to be a good fix for the massive overpopulation of goblins, just remove their no eat and no drink tokens. As you said it's still probably impossible to effectively explore as an adventurer, but it'll make them less incredibly powerful in world generation at least.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #6 on: March 02, 2015, 09:52:39 am »

Hmm, i'm starting to believe it's just impossible with modding, it's hardcoded.

I have generated a few more dozen of worlds and saw that whatever are the settings i changed, the capitals of every races (not just goblins) can be hugely overpopulated (several thousands) sometime in only a 100 years old small world.

I even tried more added to what i did previously :
- [CRAZED] to every races so they would not ally each other (as i counted then on war to be the population control device there)
-removed all the [TOLERATES_SITE:...] token from an entity that allowed a member of the entity to go live in other race sites, that because i noticed crazed didn't worked during worldgen as goblins, dwarves and humans were stil happily co-existing in the same sites, despite the crazed token should have forced a bloody population number control
-removed all the domestic , pets , cave/good/evil animals from every entities, the goal was to remove all those thousands of animals (unfortunate the trolls had to go too) from capitals overpopulation and hopefully get the population to have more food problem .
unfortunately while there was no more animals overpopulating sites, the populations never took any impact in 100 years , as if animal food shortage has no influence in worldgen.
-lowered the maxage to 20,50 for every races

And after 100 years of worldgen, still no go, i saw enough forest retreat with 3000 elves, towns with 2500 humans, dark fortress with 2000+ goblins generated in the several dozen of worldgen i did.
As if i didn't changed any settings and used the default raws only :/

Even people dying young (as the maxage is very low in comparison to default) does not limit populations, i'm wondering if the very bad respawn bug reported here that happens at gameplay time is happening at worldgen time too.
Because i can't see why things get overpopulated in only 100 years in the exact same way as when (in default raws) those populations could all live more than 100 years (and some immortals like default elves or goblins)
« Last Edit: March 02, 2015, 09:54:44 am by Robsoie »
Logged

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #7 on: March 02, 2015, 07:54:16 pm »

Crazed doesn't cause them to kill everything, it causes them to kill everything that's not crazed as well. I also don't know if it workd during world generation either. What you want to do to get everybody at war with eachother is remove their [CAN_SPEAK] if they have it, or their [INTELLIGENT] and replace it with a [CAN_LEARN] if they have intelligent. This will unfortunately have the side effect of ruining adventurer mode which is where this stuff matters most since you won't be able to talk to anybody.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #8 on: March 02, 2015, 08:26:02 pm »

Yes, at some point i considered this too, but as my goal was to set a playable world for adventure mode with reasonable level of population by site (i mean so they don't make site unplayable) it would have killed the whole point if as limited as they are (with the inevitable thing) no more interactions with NPC were possible.

About crazed, from my experimentations, crazed NPC will attack other crazed NPC if they're not of the same specie :
If you're a human character , you'll see no difference in crazed human towns/village, but visit an crazed elven forest retreat and you'll be lucky if you can escape alive.
That was quite fun in my tests, but rather short lived for my human peasant :D

Anyways, i hope once he's done with the tavern update Toady will revisit a bit how Adventure mode is working/broken, so many great places to explore but rendered near unplayable due to those overpopulation and possibly related still present bugs.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #9 on: March 05, 2015, 09:33:12 am »

Fascinating, I remembered the odd experience of finding a totally empty tower recently with a human in charge so I checked the legends and then exported the parameters.

I'd say 9/10 times you get a few gobs lingering in some dark pits and either abandoned towers or ones ruled by other races (saw a couple of kobold towers!) and 1/10 you'll get the gobs starting with juuuust enough of a foothold that you might get three or four towers. One of the surviving gens had 8k gobs in one tower and 1k in the other, but it's also got a lot of megabeasts and stuff to chase, clustered mountains rather than impassable walls of them, and a good chance of necro towers and vampires scattered here and there.

Oh, no bogeymen though I don't think that would change things if you turned them on, I just got sick to death of them after a while so I tend to just leave them off because they're more of an annoyance after you get past the point where they are a real threat... but they're a persistant annoyance, even dingos don't spam you constantly.

Code: [Select]
[WORLD_GEN]
[TITLE:LOW GOBS]
[SEED:bm9Vhc22dkZ9YGANGfP7]
[HISTORY_SEED:zwtwC7YI0GmssfFo71ex]
[NAME_SEED:bzuvWNbaomVdWhNYcC5t]
[CREATURE_SEED:IdZPda3WRVHHlU25dNTJ]
[DIM:65:65]
[EMBARK_POINTS:5000]
[END_YEAR:200]
[BEAST_END_YEAR:175:15]
[REVEAL_ALL_HISTORY:1]
[CULL_HISTORICAL_FIGURES:0]
[ELEVATION:100:400:3200:3200]
[RAINFALL:10:85:101:101]
[TEMPERATURE:40:80:101:101]
[DRAINAGE:40:100:101:101]
[VOLCANISM:0:100:101:101]
[SAVAGERY:0:100:101:101]
[ELEVATION_FREQUENCY:1:1:1:1:1: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:1:1:1:1:1:1]
[VOLCANISM_FREQUENCY:1:1:1:1:1:1]
[POLE:NONE]
[MINERAL_SCARCITY:500]
[MEGABEAST_CAP:20]
[SEMIMEGABEAST_CAP:5]
[TITAN_NUMBER:5]
[TITAN_ATTACK_TRIGGER:200:0:100000]
[DEMON_NUMBER:5]
[NIGHT_TROLL_NUMBER:0]
[BOGEYMAN_NUMBER:0]
[VAMPIRE_NUMBER:11]
[WEREBEAST_NUMBER:0]
[SECRET_NUMBER:5]
[REGIONAL_INTERACTION_NUMBER:5]
[DISTURBANCE_INTERACTION_NUMBER:5]
[EVIL_CLOUD_NUMBER:5]
[EVIL_RAIN_NUMBER:5]
[GENERATE_DIVINE_MATERIALS:1]
[GOOD_SQ_COUNTS:6:63:127]
[EVIL_SQ_COUNTS:6:63:127]
[PEAK_NUMBER_MIN:3]
[PARTIAL_OCEAN_EDGE_MIN:0]
[COMPLETE_OCEAN_EDGE_MIN:0]
[VOLCANO_MIN:0]
[REGION_COUNTS:SWAMP:0:0:0]
[REGION_COUNTS:DESERT:0:0:0]
[REGION_COUNTS:FOREST:0:0:0]
[REGION_COUNTS:MOUNTAINS:528:0:0]
[REGION_COUNTS:OCEAN:0:0:0]
[REGION_COUNTS:GLACIER:0:0:0]
[REGION_COUNTS:TUNDRA:0:0:0]
[REGION_COUNTS:GRASSLAND:0:0:0]
[REGION_COUNTS:HILLS:528:0:0]
[EROSION_CYCLE_COUNT:250]
[RIVER_MINS:0:0]
[PERIODICALLY_ERODE_EXTREMES:1]
[OROGRAPHIC_PRECIPITATION:1]
[SUBREGION_MAX:2750]
[CAVERN_LAYER_COUNT:1]
[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:5]
[CAVE_MAX_SIZE:25]
[MOUNTAIN_CAVE_MIN:0]
[NON_MOUNTAIN_CAVE_MIN:3]
[ALL_CAVES_VISIBLE:0]
[SHOW_EMBARK_TUNNEL:2]
[TOTAL_CIV_NUMBER:15]
[TOTAL_CIV_POPULATION:15000]
[SITE_CAP:350]
[PLAYABLE_CIVILIZATION_REQUIRED:1]
[ELEVATION_RANGES:0:0:0]
[RAIN_RANGES:264:0:0]
[DRAINAGE_RANGES:0:0:264]
[SAVAGERY_RANGES:264:528:264]
[VOLCANISM_RANGES:264:528:264]

Maybe you can figure out what is going on there that keeps gobs from taking over, this works in totally vanilla df btw, just checked.
Logged

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #10 on: March 05, 2015, 12:23:06 pm »

Thanks, i'll have to give a try and make some comparison with default worldgen settings.
Logged

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #11 on: March 06, 2015, 01:43:25 am »

I've played around with your values but still obtain gob sites with thousand of population.
And sometime other races doing the same.

I decided to play the megabeast card, i mean increase a lot the amount of them/titans/semi and gave a world gen.
I noticed at first it went fast, then started to slow down a bit, and looking at the world, it seemed to be working because i was noticed site being appearing, being destroyed, reclaimed etc... , with not really much of an expension, meaning then population were kept in control if they weren't reaching whatever treshold value that force them to go out to expand.

And after a couple hundred of years i then checked the results, noticed there are only 3 civs of 40 elves each (they've been hit very hard it seems), one of them is even living in a cave instead of a forest retreat !
humans and dwarves civs are exctint.

Finally the gob civs, that i noticed didn't managed to expand on worldgen as they were obviously been hit hard too, and let's see they have 3 civs left and each civs have only 1 dark fortress ... filled with more than 10 thousands of goblins.

Ok i give up with the idea, even if they're hit hard by megabeast and so can't expand, gobs pop will still ridiculously explode inside of their capitals :/

edit (in spoiler as it would make a too long wall of text)
Spoiler (click to show/hide)

*sigh* i guess what i'm attempting is just not possible as long as we don't have access to a setting to allow us make a real cap to capitals population in order to keep the adventure mode playable in there.

Because while i focused on goblins there, the same is happening with elves , human (oddly i didn't noticed that with dwarves in my tons of test worlds, never a single capital of them reached 1000 ), that have their capitals that can explode in unplayable level of population.
« Last Edit: March 06, 2015, 05:39:58 am by Robsoie »
Logged

vjmdhzgr

  • Bay Watcher
  • Hehehe
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #12 on: March 06, 2015, 06:51:58 pm »

Do you mean this "(*) Removed requirement that a creature have a baby/child state to breed"? Because that just means that creatures without the [CHILD:WHATEVER] token can still have children, they'll just be born adults. If you meant that then I'd say this is a bug. I'd also look at legendsviewer or something and check the ages of any living goblins you can find and whether or not they get married.
Logged
Its a feature. Impregnating booze is a planned tech tree for dwarves and this is a sneak peek at it.
Unless you're past reproductive age. Then you're pretty much an extension of your kids' genitalia

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #13 on: March 07, 2015, 10:24:13 am »

I meant that despite not getting to 12 years old due to a maxage that made them not live more than 11 years (and having unmodified [CHILD:12] ) , goblins while being still children had children themselves and after 100 years of worldgen, you can still observe goblins overpopulations in dark fortresses.

An example of a goblin with such a setup in the legends :


check the age of the parents, every goblins in the legend in a world created with them not being able to live up to adulthood are like that, parent that are children still spawning children.
So yeah, probably a bug, i wonder if it can explain why population explode from time to time in capitals (not just for goblins though).
« Last Edit: March 07, 2015, 10:51:11 am by Robsoie »
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: How do you really put a cap to a site population ?
« Reply #14 on: March 08, 2015, 08:14:40 am »

I bet that is probably the cutest little fort to go a-murderin' through ever.

I was on a dfusion-swapped to dorflet and went up to a goblin kid that was apparently a resident of the same fort, asked how they were feeling "I look fancy today!"... well that's cute, 'you look like a mighty warrior indeed', "I'm six!"... d'awww. Told them about the roc I brainstabbed a few rooms over, they're like "you're a legendary hero!" which seems even more fitting coming from a kid as a kid.
Logged
Pages: [1] 2