Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

City size of 0 prevents many buildings/terrains from spawning #22827

Closed
Noctifer-de-Mortem opened this issue Jan 29, 2018 · 6 comments

Comments

6 participants
@Noctifer-de-Mortem
Copy link
Contributor

commented Jan 29, 2018

Game version: Experimental Build 7085

Operating system: Windows 10

Tiles or curses: Tiles

Mods active:
"dda",
"Arcana",
"Cata++",
"DinoMod",
"Medieval_Stuff",
"Mining_Mod",
"More_Survival_Tools",
"No_Fungi",
"Sabaton_memes",
"blazemod",
"Tanks",
"boats",
"crazy_cataclysm",
"no_npc_food",
"novitamins",
"realguns"
(Also tested with no mods)

Expected behavior

After #22011 , various different types of buildings and terrain spawn. The player would not be in forest only area.

Actual behavior

It seems that despite being able to, some natural features do not spawn. The area gets some limited spawns but somethings don't seem to spawn at all.

Steps to reproduce the behavior

Create a world with a city size of zero and then start a game in it, scenario is irrelevant. Open the map and notice the lack of interesting features such as cabins and LMOE shelters.

Personal Theory:

((Now, I am not very good at coding and as such was not able to find anything to back this up in the code so if I am wrong, feel free to correct me.))
It looks to me that city size zero is a sort of hack; just lower the city value to city but the map generation still treats it the same as with cities still being a thing. If we add required flags, it seems the spawn rate is fixed but that would affect world with city size of >1. So I was thinking maybe a flag that works like the required flag but only works in city size 0 as a solution?

@kevingranade

This comment has been minimized.

Copy link
Member

commented Jan 30, 2018

Please list the buildings you expect to appear.

@Noctifer-de-Mortem

This comment has been minimized.

Copy link
Contributor Author

commented Jan 31, 2018

ID "Lake"
ID "Bee Hive"
ID "Anthill"
ID "Spider Pit"
ID "Slime Pit"
ID "Fungal Bloom"
ID "Fungal Tower"
ID "Fungal Flowers"
ID "Triffid Grove"
ID "Cave"

ID "farm_abandoned"
ID "Shipwreck"
ID "LMOE Shelter"
ID "Cabin"
ID "Strange Cabin"
ID "Strangle Temple"
ID "Mansion_Wild"
ID "Toxic Waste Dump"
ID "bandit_cabin"
ID "bandit_camp"
ID "campsite"
ID "campsite_cabin_incomplete"
ID "campsite_field_biker"
ID "campsite_a"
ID "campsite_field_biker_destroyed"
ID "Swamp Shack"

@Reknot

This comment has been minimized.

Copy link

commented Feb 3, 2018

Actually you can force it for some reason, they seem to spawn hidden. I know "Swamp Shack" and "Cabin" comes up in the save files wihout altering anything, for the rest I made my own custom "overmap_specials.json", see below.
If I run with that, they get placed on the map screen as expected, but only at the Minimum "occurrences" value.

### (can't get the tabs to work proper, sorry for the formatting)

[
{
"type" : "overmap_special",
"id" : "Shipwreck",
"overmaps" : [
{ "point":[0,0,0], "overmap": "shipwreck_river_1"},
{ "point":[1,0,0], "overmap": "shipwreck_river_2"},
{ "point":[0,0,-1], "overmap": "shipwreck_river_3"},
{ "point":[1,0,-1], "overmap": "shipwreck_river_4"}
],
"locations" : [ "water" ],
"occurrences" : [0, 2],
"rotate" : false,
"spawns" : { "group" : "GROUP_RAZORCLAW", "population":[30,60], "radius":[2, 10] }
},{
"type" : "overmap_special",
"id" : "Bee Hive",
"overmaps" : [
{ "point":[0,0,0], "overmap": "hive"},
{ "point":[0,1,0], "overmap": "hive"},
{ "point":[0,2,0], "overmap": "hive"},
{ "point":[1,0,0], "overmap": "hive"},
{ "point":[1,1,0], "overmap": "hive"},
{ "point":[1,2,0], "overmap": "hive"},
{ "point":[2,0,0], "overmap": "hive"},
{ "point":[2,1,0], "overmap": "hive"},
{ "point":[2,2,0], "overmap": "hive"}
],
"locations" : [ "wilderness" ],
"occurrences" : [1, 6],
"rotate" : false,
"spawns" : { "group" : "GROUP_BEE", "population":[20,60], "radius":[2,4] }
},{
"type" : "overmap_special",
"id" : "Cabin",
"overmaps" : [
{ "point":[0,0,0], "overmap": "cabin"}
],
"locations" : [ "wilderness" ],
"occurrences" : [1, 10],
"rotate" : false,
"flags" : [ "CLASSIC" ]
},{
"type" : "overmap_special",
"id" : "Strange Cabin",
"overmaps" : [
{ "point":[0,0,0], "overmap": "cabin_strange"},
{ "point":[0,0,-1], "overmap": "cabin_strange_b"}
],
"locations" : [ "forest" ],
"occurrences" : [1, 1],
"rotate" : false,
"flags" : [ "CLASSIC" ]
},{
"type" : "overmap_special",
"id" : "Strangle Temple",
"overmaps" : [
{ "point":[0,0,0], "overmap": "temple_stairs"},
{ "point":[0,0,-1], "overmap": "temple_stairs"},
{ "point":[0,0,-2], "overmap": "temple_stairs"},
{ "point":[0,0,-3], "overmap": "temple_stairs"},
{ "point":[0,0,-4], "overmap": "temple_stairs"},
{ "point":[0,0,-5], "overmap": "temple_finale"}
],
"locations" : [ "forest", "swamp" ],
"occurrences" : [1, 3],
"rotate" : false
},{
"type" : "overmap_special",
"id" : "Standing stones",
"overmaps" : [
{ "point":[0,0,0], "overmap": "standing_stones"}
],
"locations" : [ "forest"],
"occurrences" : [1, 1],
"rotate" : false
},{
"type" : "overmap_special",
"id" : "Anthill",
"overmaps" : [
{ "point":[0,0,0], "overmap": "anthill"}
],
"locations" : [ "wilderness" ],
"occurrences" : [1, 6],
"rotate" : false,
"spawns" : { "group" : "GROUP_ANT", "population":[1000,2000], "radius":[10,30] }
},{
"type" : "overmap_special",
"id" : "Spider Pit",
"overmaps" : [
{ "point":[0,0,0], "overmap": "spider_pit"},
{ "point":[0,0,-1], "overmap": "spider_pit_under"}
],
"locations" : [ "forest" ],
"occurrences" : [1, 500],
"rotate" : false
},{
"type" : "overmap_special",
"id" : "Slime Pit",
"overmaps" : [
{ "point":[0,0,0], "overmap": "slimepit_down"}
],
"locations" : [ "land", "swamp" ],
"occurrences" : [1, 4],
"rotate" : false,
"spawns" : { "group" : "GROUP_GOO", "population":[100,200], "radius":[2,10] }
},{
"type" : "overmap_special",
"id" : "Fungal Bloom",
"overmaps" : [
{ "point":[0,0,0], "overmap": "fungal_bloom"}
],
"locations" : [ "wilderness" ],
"occurrences" : [1, 3],
"rotate" : false,
"spawns" : { "group" : "GROUP_FUNGI", "population":[600,1200], "radius":[30,50] }
},{
"type" : "overmap_special",
"id" : "Fungal Tower",
"overmaps" : [
{ "point":[0,0,0], "overmap": "fungal_tower"}
],
"locations" : [ "wilderness" ],
"occurrences" : [1, 2],
"rotate" : false,
"spawns" : { "group" : "GROUP_FUNGI_TOWER", "population":[125,175], "radius":[2,2] }
},{
"type" : "overmap_special",
"id" : "Fungal Flowers",
"overmaps" : [
{ "point":[0,0,0], "overmap": "fungal_flowers"}
],
"locations" : [ "wilderness", "swamp" ],
"occurrences" : [1, 2],
"rotate" : false,
"spawns" : { "group" : "GROUP_FUNGI_FLOWERS", "population":[50,100], "radius":[2,4] }
},{
"type" : "overmap_special",
"id" : "Triffid Grove",
"overmaps" : [
{ "point":[0,0,0], "overmap": "triffid_grove"},
{ "point":[0,0,-1], "overmap": "triffid_roots"},
{ "point":[0,0,-2], "overmap": "triffid_finale"}
],
"locations" : [ "forest" ],
"occurrences" : [1, 4],
"rotate" : false,
"spawns" : { "group" : "GROUP_TRIFFID", "population":[800,1300], "radius":[12,20] }
},{
"type" : "overmap_special",
"id" : "Cave",
"overmaps" : [
{ "point":[0,0,0], "overmap": "cave"}
],
"locations" : [ "wilderness", "swamp" ],
"occurrences" : [1, 30],
"rotate" : false
},{
"type" : "overmap_special",
"id" : "bandit_cabin",
"overmaps" : [
{ "point":[0,0,0], "overmap": "bandit_cabin"}
],
"locations" : [ "forest" ],
"occurrences" : [1, 1],
"rotate" : false,
"flags" : [ "CLASSIC" ]
},{
"type" : "overmap_special",
"id" : "bandit_camp",
"overmaps" : [
{ "point":[0,0,0], "overmap": "bandit_camp_1"},
{ "point":[1,0,0], "overmap": "bandit_camp_2"},
{ "point":[0,1,0], "overmap": "bandit_camp_3"},
{ "point":[1,1,0], "overmap": "bandit_camp_4"}
],
"locations" : [ "forest" ],
"occurrences" : [1, 1],
"rotate" : false,
"flags" : [ "CLASSIC" ]
},{
"type" : "overmap_special",
"id" : "Pond",
"overmaps" : [
{ "point":[0,0,0], "overmap": "pond_field"}
],
"locations" : [ "field" ],
"occurrences" : [0, 15],
"rotate" : false,
"flags" : [ "CLASSIC" ]
},{
"type" : "overmap_special",
"id" : "basin",
"overmaps" : [
{ "point":[0,0,0], "overmap": "pond_forest"}
],
"locations" : [ "forest" ],
"occurrences" : [0, 12],
"rotate" : false,
"flags" : [ "CLASSIC" ]
},{
"type" : "overmap_special",
"id" : "bog",
"overmaps" : [
{ "point":[0,0,0], "overmap": "pond_swamp"}
],
"locations" : [ "swamp" ],
"occurrences" : [0, 9],
"rotate" : false,
"flags" : [ "CLASSIC" ]
},{
"type": "overmap_special",
"id": "Swamp Shack",
"overmaps": [
{ "point":[0,0,0], "overmap": "hunter_shack"}
],
"locations": [ "swamp" ],
"occurrences": [1, 4],
"rotate" : false,
"flags": [ "CLASSIC" ]
},{
"type": "overmap_special",
"id": "Hunting Blind",
"overmaps": [
{ "point": [ 0, 0, 0 ], "overmap": "hunting_blind_north" }
],
"locations": [ "wilderness" ],
"occurrences": [ 1, 20 ]
}
]

@Leland Leland changed the title Map Generation Issue City size of 0 prevents many buildings/terrains from spawning Feb 19, 2018

@ZenZen2

This comment has been minimized.

Copy link

commented Apr 19, 2018

Confirming this bug.
Keep everything on default, also default mods, only change city size to 0.
started 3 times with the play now scenario, 2 out of 3 i end up in the woods with no specials on the whole overmap. 1 out of the 3 there were specials but the next overmap after teleporting had none.

@ZenZen2

This comment has been minimized.

Copy link

commented Apr 19, 2018

I think setting city size to 0 breaks city distance somehow, but thats just a theory.

@mlangsdorf

This comment has been minimized.

Copy link
Contributor

commented May 31, 2018

I tried this.
First overmap: large river running north to south across the overmap, no specials aside from bogs and basins.
Second overmap: smaller river running from north edge to northern side of the eastern edge, plenty of specials: bee hives, toxic waste dumps, etc.
Third overmap: larger river running from almost the north edge to the south edge, no specials, not even bogs or basins.
Fourth overmap: larger river running from almost the north edge to the south edge, no specials, not even bogs or basins.
Fifth overmap: multiple large rivers running from edge to edge, no specials, not even bogs or basins.
Sixth overmap: larger river running from almost the north edge to the south edge, no specials, not even bogs or basins.

Is something in the river generation code breaking the other specials somehow?

ralreegorganon added a commit to ralreegorganon/Cataclysm-DDA that referenced this issue Aug 15, 2018

Fix placement of overmap specials with city size 0
Update the selection of overmap specials for placement to exclude those
which require a city size > 0 when city size is 0.

Prior to this change, overmap specials would generally fail to be placed
in a world created with city size 0.

This is because when considering specials for placement, the game:
* did not exclude those that would be impossible to place (requiring city size > 0)
* had a limited number of tries for a given sector of the map to attempt placement
* would exhaust the tries attempting to place impossible specials

The result would be an overmap generally devoid of specials. This also
had the side effect of creating several additional overmaps as the game
searched for and created adjacent overmaps to hold mandatory specials
that could never actually be added.

Fixes CleverRaven#22827

Mapgen and overmapgen improvements automation moved this from To do to Done Aug 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.