• 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

        Creating an app requires lots of testing, and I believe that KS built KingGen on his own, @BFT2020, and English is not his first language. He has done a terrific job - and he has provided a pretty darned good tool for us "people who like to make maps" that really hadn't existed before.  As his program is free - most of us don't object to being part-time testers!     If he is successful - then we all benefit - right!

        That being said - over the last twenty-to-forty years, the internet has opened up the world and provided an unprecedented number of users with all kinds of electronic communication vehicles - one of which is the ability to use the written word to chat - with anyone - anywhere - and at any time - either by using online chat, forums, blogs, texting, news columns, comments, and so on.  These have never been so available to so many people, and a great part of that communicating is done using the 'English' written language - which is full of 'slightly ambiguous' words, with many words taken from Latin, many from German, from French, many from the Norse countries - and many invented by users on the internet!   Lots of English words may look the same as Italian words, for e.g., but they just may have very slightly different meaning, or a nuance from that word as he understands it.   
        Many words have much dependency upon context also. as here.  Much of the programming world is carried out, creating programs and applications for speakers of the English language - not necessarily the "British" English:   the non-native British English speaking programmer, without benefit of that native education, is at quite a disadvantage, and will interpret his ideas using the language as he understands it.   It will not always be correct, and I think this is the reason for this issue here - hence my remark about it not being really a bug.       
          If one has an instinctive user interface - there is no need for an Instruction Manual. Tallman Brad is native British English, and I'm sure - picking up on this immediately, he jumped in to help KS with the creation of his great series of videos. He has been very successful, and has, in good part, been KingSlayer's valuable assistant!

Of course - I may be just full of hot air . . . . .    😎 

pj

 

 
New user of KingGen as always used Nitrogen in past. One thing I cannot see that could do with Nitrogen was set North and South borders so have snow in north and desert in south. Just how I like my maps. Is there option which I am missing or, if not,  will this possibly be included in future version of KingGen?

 
New user of KingGen as always used Nitrogen in past. One thing I cannot see that could do with Nitrogen was set North and South borders so have snow in north and desert in south. Just how I like my maps. Is there option which I am missing or, if not,  will this possibly be included in future version of KingGen?
Best thing for this currently is to create your own biomes.png, then generate the map, that way you get biomes where you want them.



 

 
Best thing for this currently is to create your own biomes.png, then generate the map, that way you get biomes where you want them.



 
Cpt crunch if u have a link to something i can use to set predetermined biomes before generating the map in kinggen i'd like to check it out which reminds me I'm sure u know where all the biomes in your Texas map should be for real life accuracy and to be straightforward i think the texas map would be better suited for A20

 
Cpt crunch if u have a link to something i can use to set predetermined biomes before generating the map in kinggen i'd like to check it out which reminds me I'm sure u know where all the biomes in your Texas map should be for real life accuracy and to be straightforward i think the texas map would be better suited for A20
2021-10-12_12h52_32.png

'Custom biomes map' inside KG is where you set the file, you just need to create it. Ive got a video on how to do it here
 


If this is too complicated, there is also a stand alone tool to achieve the same thing
 



Far as A20/Texas is concerned, at least right now, A20 is going to make an absolute mess of just about every tool involved with map making. I think King is on break due to work/school, but Ive had a chance to look under the hood (theoretically) and read a lot about A20, and while Im excited about the changes theyve made, its going to require some serious retooling, probably this is the most change to the map system ever. I'm Kings primary test dummy/bug finder, and while Ive got most of the changes figured out, Im going to need King for the coding, primarily water and new rwg generation, they are a LOT different.


 

 
A picture would be clearer, but I suspect you and the POIs are okay. Speaking solely from my own experiences with KingGen, it has trouble placing things in rough terrain. What I suspect is happening is that some elevation at the front of the POI is okay and was the location used by KingGen to determine which height to place the POI. Then the rest of the POI either cuts into the terrain or is put on a plateau. Similarly, the slope of roads seems to be based on the elevation of an adjacent intersection and not the corners of the POI, so you don't get a level road running beside the POI. When the slope is gentle it kind of works, but a steep hill leads to awkward placement.

That's my guess, anyways. As fast as KG has been developed I'd think problems like this are to be expected. I'm sure they'll make improvements.


Thank you for your reply and you are right. After playing for a while, only the big POIs are placed sometimes strange (but not everyone). The map is good playable and all that matters.

 
Was wondering if something is intentional or a bug.  When I generate 5 maps at once, for instance, it seems every time one of them has a significant difference.  Recently I generated 5 normal-ish maps with one city and no towns and one of them came out with no city or towns or anything other than wilderness POIs.  I thought it might be a fluke.  Then I generated 5 wasteland maps and with one city and no towns and it did the same thing... one of them had no city.  In between those I have generated at least one set that had cities in each of the 5 generated maps.  In each set I've noticed the missing city I have used a root seed and the wasteland example I used "Wasteland".  Here is the config file generated for this map (#4 in the sequence):

  _  ___              _____
 | |/ (_)            / ____|
 | ' / _ _ __   __ _| |  __  ___ _ __
 |  < | | '_ \ / _` | | |_ |/ _ \ '_ \
 | . \| | | | | (_| | |__| |  __/ | | |
 |_|\_\_|_| |_|\__, |\_____|\___|_| |_|
                __/ |
               |___/
v0.13.1 - A19.6
7 Days to Die Random World Generator
Find out more at https://community.7daystodie.com/topic/23988-kinggen-a-random-world-generator-for-7-days-to-die/

SETTINGS:
border_size=medium
border_type=water
burnt_size=small
check_output=false
cities_grid_size=large
cities_level=60
cities_number=one
cities_size=large
default_biome=wasteland
default_biome_tools=pine forest
desert_size=small
heightmap_smoothing=none
mountains_size=large
multiple_generations=5
name=Wasteland4
output_folder=
png_heightmap=no
poi_mode=false
pois_list=vanilla
pois_number=medium
seed=Wasteland4
single_biome=wasteland
size=8
skip_preview=false
snow_level=
snow_size=small
spacing=giant
spawn_points=medium
terrain_roughness=increased
towns_grid_size=large
towns_number=none
towns_size=medium
traders_location=cities
traders_number=none
villages_grid_size=large
villages_number=none
villages_size=medium
waste_size=large
water_level=43
water_size=small


 
I created another set of 5 wasteland maps with a similar config and it did the same thing... #4 had no city.  Config file for this one:

  _  ___              _____
 | |/ (_)            / ____|
 | ' / _ _ __   __ _| |  __  ___ _ __
 |  < | | '_ \ / _` | | |_ |/ _ \ '_ \
 | . \| | | | | (_| | |__| |  __/ | | |
 |_|\_\_|_| |_|\__, |\_____|\___|_| |_|
                __/ |
               |___/
v0.13.1 - A19.6
7 Days to Die Random World Generator
Find out more at https://community.7daystodie.com/topic/23988-kinggen-a-random-world-generator-for-7-days-to-die/

SETTINGS:
border_size=medium
border_type=water
burnt_size=large
check_output=false
cities_grid_size=medium
cities_level=60
cities_number=one
cities_size=large
default_biome=wasteland
default_biome_tools=pine forest
desert_size=large
heightmap_smoothing=none
mountains_size=medium
multiple_generations=5
name=Wasteland4
output_folder=
png_heightmap=no
poi_mode=false
pois_list=vanilla
pois_number=decreased
seed=Wasteland4
single_biome=wasteland
size=8
skip_preview=false
snow_level=
snow_size=large
spacing=giant
spawn_points=medium
terrain_roughness=increased
towns_grid_size=medium
towns_number=none
towns_size=small
traders_location=cities
traders_number=none
villages_grid_size=medium
villages_number=none
villages_size=small
waste_size=large
water_level=43
water_size=medium


 
Hey y'all!  I'm new to KingGen (and adding POIs in general), and had a question for ya.

I've added a bunch of prefabs, used the KingGen 'create custom' list, and generated worlds with them.  I have 5-6 custom POIs that are never added to any world I create (tried default settings, resizing biomes, etc.)  All of these custom POIs do populate if I run KingGen in "POI mode."  

I tested by trying a world with *only* those POIs in them (in various combinations), and I get an error:

Traceback (most recent call last):
  File "crash_log.py", line 19, in handle_crash_log
  File "gui_generation.py", line 27, in generate
  File "ntime.py", line 11, in ntime
  File "world.py", line 1301, in run
  File "world.py", line 265, in generate
  File "world.py", line 542, in init_cities
  File "world.py", line 642, in gen_cities
  File "hub_factory.py", line 25, in gen_random_city
  File "hub_factory.py", line 59, in gen_random_hub
  File "city.py", line 46, in __init__
  File "city.py", line 61, in generate
  File "city.py", line 274, in populate_grid
  File "city.py", line 246, in try_place
AttributeError: 'NoneType' object has no attribute 'rotate_to_face'

I also noticed that the entries for them all have something in common in the custom POI list created by KingGen:

Castle-Eltz,125,72,230,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,none,,
zztong_Tent_01,2,1,2,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,none,,
zztong_Tent_02,2,1,2,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,none,,

(and so on)

They all have 'none' as their 'prob' field (if I'm reading the format correctly.)   So, if I am understanding it right, KingGen's custom POI tool is flagging these as "don't put these in any maps."  Indeed, when I remove that 'none' so it matches other entries, I get the above error again.

So... how can I tell what is causing KingGen to reject these POIs (which I am able to place manually)?  I poked around the xml for each POI but didn't see anything they shared in common that was different from the working ones, at first glance!

Any help is appreciated, but obviously this isn't a game-breaking thing :) I love KingGen and have made incredibly fun, varied maps with it, just curious as to why these particular ones are failing.

EDIT: Flying around in a POI-mode map, I do get the sense that the failing ones are *mostly* very large POIs.

 
Last edited by a moderator:
Hey y'all!  I'm new to KingGen (and adding POIs in general), and had a question for ya.

I've added a bunch of prefabs, used the KingGen 'create custom' list, and generated worlds with them.  I have 5-6 custom POIs that are never added to any world I create (tried default settings, resizing biomes, etc.)  All of these custom POIs do populate if I run KingGen in "POI mode."  

I tested by trying a world with *only* those POIs in them (in various combinations), and I get an error:

Traceback (most recent call last):
  File "crash_log.py", line 19, in handle_crash_log
  File "gui_generation.py", line 27, in generate
  File "ntime.py", line 11, in ntime
  File "world.py", line 1301, in run
  File "world.py", line 265, in generate
  File "world.py", line 542, in init_cities
  File "world.py", line 642, in gen_cities
  File "hub_factory.py", line 25, in gen_random_city
  File "hub_factory.py", line 59, in gen_random_hub
  File "city.py", line 46, in __init__
  File "city.py", line 61, in generate
  File "city.py", line 274, in populate_grid
  File "city.py", line 246, in try_place
AttributeError: 'NoneType' object has no attribute 'rotate_to_face'

I also noticed that the entries for them all have something in common in the custom POI list created by KingGen:

Castle-Eltz,125,72,230,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,none,,
zztong_Tent_01,2,1,2,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,none,,
zztong_Tent_02,2,1,2,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,none,,

(and so on)

They all have 'none' as their 'prob' field (if I'm reading the format correctly.)   So, if I am understanding it right, KingGen's custom POI tool is flagging these as "don't put these in any maps."  Indeed, when I remove that 'none' so it matches other entries, I get the above error again.

So... how can I tell what is causing KingGen to reject these POIs (which I am able to place manually)?  I poked around the xml for each POI but didn't see anything they shared in common that was different from the working ones, at first glance!

Any help is appreciated, but obviously this isn't a game-breaking thing :) I love KingGen and have made incredibly fun, varied maps with it, just curious as to why these particular ones are failing.
"none" for the zones is used by the Vanilla RWG and basically means "no restrictions" but KingGen doesn't know that zone. You have to put there "any" if you want it to work with KG. Another thing is you have to put in there some township allowance or it won't work with KG either. The allowed values for township are : city, town, rural and wilderness and you have to put them between none/any and wasteland.

 
zztong_Tent_01,2,1,2,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,none,,
zztong_Tent_02,2,1,2,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,none,,


I wouldn't put the Tents into your KingGen config file. While they were built in the Prefab Editor like a POI, they're really intended to be placed as decorations in the biome.xml file. The same is true of my Hunter's Traps.

Those tents are tiny pup-tents. As a decoration you'll come across them in the wilderness and sometimes in settlements. If you make them a POI, they'll chew up space that could have gone to more meaningful content. The biome.xml file in my modlet will take care of placing them for you even with a KingGen map. I think this is because decorations aren't part of world generation.

 
Last edited by a moderator:
I wouldn't put the Tents into your KingGen config file. While they were built in the Prefab Editor like a POI, they're really intended to be placed as decorations in the biome.xml file. The same is true of my Hunter's Traps.

Those tents are tiny pup-tents. As a decoration you'll come across them in the wilderness and sometimes in settlements. If you make them a POI, they'll chew up space that could have gone to more meaningful content. The biome.xml file in my modlet will take care of placing them for you even with a KingGen map. I think this is because decorations aren't part of world generation.


Sweet!  Thanks for that detailed explanation.. I had no idea there was a difference!  I wonder how many decorations I have in my Prefabs... 😐

 
I like zztong's answer. I'm ok with the A16 campsites shown below, because they're a bit larger than a single tent, but there are quite a few interesting and unusual things around, still available from various 7D versions, plus odd items and ideas from other overhaul mods which I have used in my own pine forest here:  I especially like the nettles, ferns and burdock, as they really put some random "wild" into the wilderness. Adding them all is a little more complicated, but not difficult.
 

<append xpath="/worldgeneration/biomes/biome[@name='pine_forest']">
        <decorations>
            <decoration type="prefab" name="pond01_A16" prob="0.0002" rotatemax="3"/>
            <decoration type="prefab" name="dec_undergrshelter_A19" prob="0.0001" rotatemax="3"/>
            <decoration type="prefab" name="dec_driedPuddle_A19" prob="0.0008" rotatemax="3"/>            
            <decoration type="block" blockname="plantedMushroom3Harvest" prob="0.0045"/>
            <decoration type="block" blockname="plantedCorn3Harvest" prob="0.001"/>
            <decoration type="block" blockname="plantedPotato3Harvest" prob="0.004"/>
            <decoration type="block" blockname="plantedBlueberry3Harvest" prob=".0015"/>
            <decoration type="block" blockname="plantedGoldenrod3Harvest" prob="0.007"/>
            <decoration type="block" blockname="deadTree01Fall" prob="0.0004" rotatemax="3"/>
            <decoration type="prefab" name="dec_laddertree_A16" prob="0.0008"/>
            <decoration type="prefab" name="xcostum_deerstand_1(by_Axebeard)" prob="0.0008"/>
            <decoration type="prefab" name="xcostum_deerstand_2(by_Axebeard)" prob="0.0008"/>    
            <decoration type="block" blockname="lootBagsBackpackHelper" prob="0.0002" rotatemax="7"/>
            <decoration type="block" blockname="fern01" prob="0.18" rotatemax="7" />
            <decoration type="block" blockname="nettle" prob="0.18" rotatemax="7" />
            <decoration type="block" blockname="burdock01" prob="0.18" rotatemax="7" />            
            <decoration type="prefab" name="campsite_01_A16" prob="0.00005" rotatemax="3"/>
            <decoration type="prefab" name="campsite_02_A16" prob="0.0001" rotatemax="3"/>
            <decoration type="prefab" name="campsite_03_A16" prob="0.00005" rotatemax="3"/>
            <decoration type="prefab" name="campsite_04_A16" prob="0.00005" rotatemax="3"/>
            <decoration type="prefab" name="campsite_06_A16" prob="0.00005" rotatemax="3"/>
            <decoration type="prefab" name="campsite_06a_A16" prob="0.00005" rotatemax="3"/>
            <decoration type="block" blockname="treeBush01" prob="0.003" rotatemax="7"/>
            <decoration type="block" blockname="treeBush02" prob="0.003" rotatemax="7"/>
            <decoration type="block" blockname="treeBush03" prob="0.007" rotatemax="7"/>            
            <decoration type="block" blockname="Trunk01" prob="0.0005" rotatemax="3"/>
            <decoration type="block" blockname="Trunk02" prob="0.0005" rotatemax="3"/>
        </decorations>    
    </append>   

Great hobby!

 
Last edited by a moderator:
Sweet!  Thanks for that detailed explanation.. I had no idea there was a difference!  I wonder how many decorations I have in my Prefabs... 😐


I don't think there are many Decorations out there in mods. I could be wrong.

Size would be a good indicator. My traps are 3x3, my tents are 2x3, IIRC. There might be one tent that is larger. Most TFP Decorations are a single block.

You could experiment with zztong_Storm_Cellar_01 which I have marked as a POI, but it is potentially small enough that you might try it as a Decoration on level ground. I don't think it will work out well, plus it would be weird to just find a random Storm Cellar off in the wilderness. For A20, that Storm Cellar will become a Part for farm POIs... or at least that's my plan since I don't have A20 I cannot work ahead to have something ready to go with an experimental release.

 
Last edited by a moderator:
Original problem I figured out, new problem is, how do I use Min/Max? It keeps generating 24 of a building that is so damn big and fancy that it feels unrealistic. I tried adding 1,2 to the end but it gives me a error about float or something

 
Last edited by a moderator:
Original problem I figured out, new problem is, how do I use Min/Max? It keeps generating 24 of a building that is so damn big and fancy that it feels unrealistic. I tried adding 1,2 to the end but it gives me a error about float or something


I'm not part of the KingGen team, but I suspect they'd want to know some details, like the stack trace for the error and the configuration you're trying, such as a sample line where you added the min and max.

Your "error about float or something" sounds kind of like an unexpected type cast. If so, then there might be some value in your configuration file that it was hoping was in a different format. (Maybe text where a number should be?)

Based on your description, I'm curious. Did you take something like this...

abandoned_house_03,21,16,28,-1,2,burnt_forest/snow/pine_forest/desert/wasteland,wilderness/city/town/rural,residentialold,,

... and make it A or B...? (The difference is 1 comma)

A: (incorrect)

abandoned_house_03,21,16,28,-1,2,burnt_forest/snow/pine_forest/desert/wasteland,wilderness/city/town/rural,residentialold,,1,2

B: (correct)

abandoned_house_03,21,16,28,-1,2,burnt_forest/snow/pine_forest/desert/wasteland,wilderness/city/town/rural,residentialold,1,2

... as if you just added 1,2 to the end then you gave it too many parameters. There were already enough commas and you just had to fill in the blanks. If this was the problem, and you fix it, I've no idea how it threw an "error about float or something."

 
... as if you just added 1,2 to the end then you gave it too many parameters. There were already enough commas and you just had to fill in the blanks. If this was the problem, and you fix it, I've no idea how it threw an "error about float or something."


An "error about float or something" might happen if a . was used in place of a ,

 
Is anyone able to generate a single biome world (in my case now) biome world?

I tried 2 different single biome worlds, cities medium, city size medium, trader located in city.
When I get to the trader starter quest it says "No Trader", and no waypoint is on the compass/map.

Simply turning off single biome generated a world with the trader, but I hoping to do an all Snow map playthrough.

 
Is anyone able to generate a single biome world (in my case now) biome world?

I tried 2 different single biome worlds, cities medium, city size medium, trader located in city.
When I get to the trader starter quest it says "No Trader", and no waypoint is on the compass/map.

Simply turning off single biome generated a world with the trader, but I hoping to do an all Snow map playthrough.
The trader quest is only for traders in pine forest biomes.  If you got a single biome that is not pine forest, it won’t point you to the nearest trader.

 
Here you go, Blayr: (Sorry, BFT2020!)  ( 😉 )  The answer is in the king_gen_config.txt. It has a dozen or more Traders. You should be able to make one yourself. The biomes.png, preview and a (New Zealand) heightmap are included too. I's an 8k map made a minute or two ago.

https://1drv.ms/u/s!AueVg7eVAeXMlRifZDxHM2fF29E_?e=PPy2sz

A
TB

pj

PS - that HM is a bit steep in the mountain areas, I have others of the same HM but less "mountain y" and more "hill y", if you want that particular HM..

PPS.. In thinking a bit deeper.... (I don't usually do the Quests) - BFT might be right about the need for a pine forest... in which case I apologise... but you can still play a full-on snow biome without the quests. . .   😎

 
Last edited by a moderator:
Back
Top