• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

KingGen - A Random World Generator for 7 Days to Die

that seems fine, can I see the lines concerning your custom pois in the poilist file that you gave to KG?
00_LC_Bunker,37,22,29,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,
00_LC_Haus_Seeblick,28,19,28,0,2,snow/pine_forest,,
00_LC_Pyramide,30,17,30,0,2,desert/wasteland,,
00_L_CBase_1,69,21,65,0,2,burnt_forest/snow/pine_forest/desert,,

 
Last edited by a moderator:
They lack township and zoning. This is what tells KG where to use your prefabs. City,town.... Industrial, commercial, residential...

 
Last edited by a moderator:
They lack township and zoning. This is what tells KG where to use your prefabs. City,town.... Industrial, commercial, residential...
ok, thanks. Didn't realize I have to add them. I'll try it out!

EDIT:
I don't know if this is the correct way to do it. I just want to spawn them in the wilderness of different biomes, not in cities/towns/villages.

00_LC_Bunker,37,22,29,0,2,burnt_forest/snow/pine_forest/desert/wasteland,wilderness,residentialold
00_LC_Haus_Seeblick,28,19,28,0,2,snow/pine_forest,wilderness,residentialnew
00_LC_Pyramide,30,17,30,0,2,desert/wasteland,wilderness,residentialold
00_L_CBase_1,69,21,65,0,2,burnt_forest/snow/pine_forest/desert,wilderness,residentialold

I can't get them to show up in the map.
Can anyone pls help me, understand this?

 

 
Last edited by a moderator:
Yes, it will be updated. Who knows... I will figure it out when I get a20
well the only big update TFP made in A20 for RWG is more map sizes and a new system for POI spawning other than that they didn't change much. so hopefully whatever other features KingGen will have an A20 will really expand the RWG by then. KingGen has been fantastic for me so hopefully A20 will open more possibilities.

 
well the only big update TFP made in A20 for RWG is more map sizes and a new system for POI spawning other than that they didn't change much. so hopefully whatever other features KingGen will have an A20 will really expand the RWG by then. KingGen has been fantastic for me so hopefully A20 will open more possibilities.
New system for POI spawning could actually change things quite a bit, depending on changes made to building tags and other metadata. I do hope you are right though. They are also expanding RWG to road tiles and possibly adding in sewer system lines, so I think if nothing else, there will be a larger gap between rwg and other custom made maps.

They are also adding in a lot of new blocks and probably making name convention changes that will break a whole lot of existing prefabs, which is going to make a big mess out of everyone's existing prefab collections. Hopefully there will be a conversion tool similar to the one used when they made the jump from A16 to A17.

 
New system for POI spawning could actually change things quite a bit, depending on changes made to building tags and other metadata. I do hope you are right though. They are also expanding RWG to road tiles and possibly adding in sewer system lines, so I think if nothing else, there will be a larger gap between rwg and other custom made maps.

They are also adding in a lot of new blocks and probably making name convention changes that will break a whole lot of existing prefabs, which is going to make a big mess out of everyone's existing prefab collections. Hopefully there will be a conversion tool similar to the one used when they made the jump from A16 to A17.
all true but they're adding poi spawning systems they call "districts" so my biggest concern is how will KingGen adjust to these changes as well as things like the sewer system u mentioned.

 
all true but they're adding poi spawning systems they call "districts" so my biggest concern is how will KingGen adjust to these changes as well as things like the sewer system u mentioned.
Both the CP and I have been working with King on something similar. The timing is good and it makes sense we all came to this conclusion around the same time, groupings have been needed for a long time. I was doing something similar in Nitro, but it was very very time consuming

 
I improved the poi selection in cities. Now it is impossible for the same poi to be placed more than once in the same city. However, this comes at a cost. If KG cannot find a poi that satisfies the required zone, it will start looking for pois of other zones.... if KG still cannot find a suitable one, it will start looking for pois in other townships (towns, villages...). This needs to be done otherwise large lots would remain empty. I think this is an improvement, but I'll listen to the community feedback .

 
I improved the poi selection in cities. Now it is impossible for the same poi to be placed more than once in the same city. However, this comes at a cost. If KG cannot find a poi that satisfies the required zone, it will start looking for pois of other zones.... if KG still cannot find a suitable one, it will start looking for pois in other townships (towns, villages...). This needs to be done otherwise large lots would remain empty. I think this is an improvement, but I'll listen to the community feedback .
Well done! Very nice

 
First, the tool is awesome. Excellent work!

Second:

I improved the poi selection in cities. Now it is impossible for the same poi to be placed more than once in the same city.


Could this be made into an option? I don't so much mind dupes in a large city, but I do dislike them being two blocks away from each other. I'm thinking of three choices, but maybe it really only needs to be yes/no toggle:

Allow Duplicate POIs in Cities

1) Yes

2) Yes, but only if spacing allows (i.e. the algorithm requires dupes to be X city blocks apart or something)

3) No

Third, I am playing with heightmaps and water maps to try to recreate a real-world location which mixes plains and mountains. I have the following layers in GIMP:

1) A grayscale terrain map of the area (from Tangram Heightmapper) with auto-exposure

2) A grayscale map with manual exposure, so the plains areas are not pitch black

3) A grayscale overlay of waterways and lakes

Here is what I've tried:

A) Darken the waterways and layer them on top of the manual-exposure heightmap, set water level in KG appropriately. Result: plains waterways look decent, mountain rivers are each in their own individual Grand Canyons. I understand why this happened - every waterway has the same near-black gray value so every river/lake is exactly the same depth, requiring deep chasms to be cut into the mountains.

B) Select the contours of the waterways from the manual exposure heightmap, and save this (with original heightmap gray levels) as a new water map. Result: water resting on or near the surface of the terrain, but not in river channels. This I think is just because the heightmap is not detailed enough to really capture each river channel.

Here is my idea:

1) Select the contours of the waterways from the manual exposure heightmap, darken them a bit, then layer them back onto the heightmap. This should create channels and lakebeds a few meters below the surrounding terrain.

2) Also save the un-darkened waterway contours as a water map. This should put the water surface where the original terrain was, but water will fill down into the channels and lakebeds. I might also darken the water map just a tad, so the water surface is 1M below the lip of the channels.

Is that the right approach?

 
Are you trying to get the water to appear as if it's running down the hills?

A tip for softening the edges of your 'canyons' is to use the gaussian blur tool on the whole water layer which will slightly soften all of the edges for you. You'll need to start at a low setting as it's quite severe when you turn it up. Alternatively try a blur option and see if you get a smoother gradient. 

 
Are you trying to get the water to appear as if it's running down the hills?


More or less, yes. I have the outlines of the real rivers in the area, and of course many of them originate in the mountains and run down the valleys. I expect there will be a stair-step effect in the water, but I'll evaluate how bad that is after I get the basic idea working.

The problem with the canyons isn't so much the sharp edge at the top, it's that water is at, say, level 40 and the terrain in the mountains is at level 100. So this "mountain stream" sits in a canyon that is 60m deep. A single map-wide water level just won't work. The stair-stepping mentioned above might mean that water map-based mountain rivers flowing down into the valley might also not work, but I'm hoping I can at least get the concept working.

If not I'll just stick to the rivers flowing through the valley/plains and limit myself to mountain lakes with no outflow.

Edit to add: an example from the heightmap with my original idea (very dark waterways; all the same color). This "worked" in that when I set an appropriate water level in KG (not using a separate water map, just the heightmap below), I'd get water in all the waterways. And the ones in the plain (NW part of the image) were pretty decent since it's mostly flat there. Up in the mountains SE, the rivers were 20-50m deep chasms.

image.png

And this is a separate water map created using the exact RGB of the underlying heightmap. This was attempt 2 which resulted in water on the surface (but in all the right places). My current idea is to darken this somewhat and use it in the height map (like the above picture) to create channels and lakebeds several meters deeper than the original terrain. Then use it also as a water map (possibly very slightly darker, to nudge the water surface down 1 or 2m).

image.png

Edit to add 2: well the idea seems to have worked, though I can't go in game at the moment to see it up close. Just looking at the preview, though, it looks like the river winding into the mountains SE is remaining in its channel and a little bit below the lip. As long as the water isn't too stair-steppy this might work out really well.

image.png

 
Last edited by a moderator:
Generated 10 worlds with different settings. The generator is poor. much worse than nitrogen. sorry for the bad feedback


The generator is as good as the settings you give it to generate from. Perhaps instead of saying it's poor, offer some actual constructive feedback as to what you were hoping it would do.

I've put together a tutorial on drawing roads which involves editing splat files. I hope this helps somebody. 


Another good video. Will these canyon maps be realistic as far as not being filled with water? I was hoping there could be a color drawn on the map to indicate that water not be generated there. I don't know if that's even possible with random map generation in general.

 
Exception in Tkinter callback
Traceback (most recent call last):
  File "tkinter\__init__.py", line 1892, in __call__
  File "gui.py", line 1250, in generate_world
  File "settings.py", line 26, in dump_settings
PermissionError: [Errno 13] Permission denied: '.\\KingGenConfig.txt'
Exception in Tkinter callback
Traceback (most recent call last):
  File "tkinter\__init__.py", line 1892, in __call

This error?

 
Exception in Tkinter callback
Traceback (most recent call last):
  File "tkinter\__init__.py", line 1892, in __call__
  File "gui.py", line 1250, in generate_world
  File "settings.py", line 26, in dump_settings
PermissionError: [Errno 13] Permission denied: '.\\KingGenConfig.txt'
Exception in Tkinter callback
Traceback (most recent call last):
  File "tkinter\__init__.py", line 1892, in __call

This error?
PermissionError: [Errno 13] Permission denied: '.\\KingGenConfig.txt'

KingGen does not have permission to write in the folder where it is located. Run it as administrator, or move it to a different folder

More or less, yes. I have the outlines of the real rivers in the area, and of course many of them originate in the mountains and run down the valleys. I expect there will be a stair-step effect in the water, but I'll evaluate how bad that is after I get the basic idea working.

The problem with the canyons isn't so much the sharp edge at the top, it's that water is at, say, level 40 and the terrain in the mountains is at level 100. So this "mountain stream" sits in a canyon that is 60m deep. A single map-wide water level just won't work. The stair-stepping mentioned above might mean that water map-based mountain rivers flowing down into the valley might also not work, but I'm hoping I can at least get the concept working.

If not I'll just stick to the rivers flowing through the valley/plains and limit myself to mountain lakes with no outflow.

Edit to add: an example from the heightmap with my original idea (very dark waterways; all the same color). This "worked" in that when I set an appropriate water level in KG (not using a separate water map, just the heightmap below), I'd get water in all the waterways. And the ones in the plain (NW part of the image) were pretty decent since it's mostly flat there. Up in the mountains SE, the rivers were 20-50m deep chasms.

View attachment 20663

And this is a separate water map created using the exact RGB of the underlying heightmap. This was attempt 2 which resulted in water on the surface (but in all the right places). My current idea is to darken this somewhat and use it in the height map (like the above picture) to create channels and lakebeds several meters deeper than the original terrain. Then use it also as a water map (possibly very slightly darker, to nudge the water surface down 1 or 2m).

View attachment 20664

Edit to add 2: well the idea seems to have worked, though I can't go in game at the moment to see it up close. Just looking at the preview, though, it looks like the river winding into the mountains SE is remaining in its channel and a little bit below the lip. As long as the water isn't too stair-steppy this might work out really well.

View attachment 20665
Im not sure about this, I think it will end up looking like a staircase

 
Back
Top