• 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

 Yes, in the Wasteland only maps, there are traders even though the starter quest says No Trader but going to the nearest trader does not complete the quest.
So this is an issue of the game. KingGen just generates world files, but if the game is not happy with traders in the wasteland, then KingGen can't do anything about it.

 
The starter quest will send you to the nearest trader in the forest biome. That's why you get the no trader glitch when there is no forest biome trader.

I believe you can edit that quest so that it can send you to a wasteland trader if it is important to you.

 
To get around this problem, which I also had, I drew a small pine forest area where I placed a custom city (with settings for increased traders). I did this near my manually configured spawn point to ensure that I'd be sent to that trader and not another 2k into the map. Originally the trader near by was sat in a wasteland area. 7dtd preferred that I went to one in a forest, 2k away. The small pine area solved the problem. This was only an issue as I wanted to start at a specific point and travel through the map on a pre determined route as part of the game play. 

 
To get around this problem, which I also had, I drew a small pine forest area where I placed a custom city (with settings for increased traders). I did this near my manually configured spawn point to ensure that I'd be sent to that trader and not another 2k into the map. Originally the trader near by was sat in a wasteland area. 7dtd preferred that I went to one in a forest, 2k away. The small pine area solved the problem. This was only an issue as I wanted to start at a specific point and travel through the map on a pre determined route as part of the game play. 
This makes a lot of sense thank you.  I'm going paint a small forest area over a city / trader.  I see there are nice tutorials on the first post just for this too.  Also thank you for everyone's thoughts and replies.

 
i need to add this to vanilla prefablist 

FLESHUS_greenhouse_01,RESIDENTIALNEW;RESIDENTIALOLD;RESIDENTIAL,2,-14,59,33,59,farm;smalltown;unique
FLESHUS_greenhouse_01,RESIDENTIALNEW;RESIDENTIALOLD;RESIDENTIAL,2,-14,59,33,59,farm;smalltown;unique
FLESHUS_greenhouse_01,RESIDENTIALNEW;RESIDENTIALOLD;RESIDENTIAL,2,-14,59,33,59,farm;smalltown;unique
FLESHUS_greenhouse_01,RESIDENTIALNEW;RESIDENTIALOLD;RESIDENTIAL,2,-14,59,33,59,farm;smalltown;unique
FLESHUS_watchtower_01,RESIDENTIALOLD,2,-1,17,46,17,alone;mountain;unique
FLESHUS_watchtower_01,RESIDENTIALOLD,2,-1,17,46,17,alone;mountain;unique
FLESHUS_watchtower_01,RESIDENTIALOLD,2,-1,17,46,17,alone;mountain;unique
FLESHUS_watchtower_01,RESIDENTIALOLD,2,-1,17,46,17,alone;mountain;unique
FLESHUS_watchtower_02,NONE,2,-11,25,45,34,alone;oldwest;mountain;unique
FLESHUS_watchtower_02,NONE,2,-11,25,45,34,alone;oldwest;mountain;unique
FLESHUS_watchtower_02,NONE,2,-11,25,45,34,alone;oldwest;mountain;unique
FLESHUS_watchtower_02,NONE,2,-11,25,45,34,alone;oldwest;mountain;unique
FLESHUS_serial_killer_01,RESIDENTIALNEW;RESIDENTIALOLD;RESIDENTIAL,3,-10,58,25,59,houses;smalltown;unique
FLESHUS_serial_killer_01,RESIDENTIALNEW;RESIDENTIALOLD;RESIDENTIAL,3,-10,58,25,59,houses;smalltown;unique
FLESHUS_serial_killer_01,RESIDENTIALNEW;RESIDENTIALOLD;RESIDENTIAL,3,-10,58,25,59,houses;smalltown;unique
FLESHUS_serial_killer_01,RESIDENTIALNEW;RESIDENTIALOLD;RESIDENTIAL,3,-10,58,25,59,houses;smalltown;unique


how can i because i tried custom list came up with errors 

 
Hi there, sorry to have to post a bug report...

Version: KingGen v0.11.1 for 7 Days to Die A19.5
Platform: Linux 5.12.14 (Arch Linux x64)
Command(s) Tested (all run from the folder where the program downlaoded): ./KingGen <no args>, and ./KingGen gen KingGenTestMap 4096
Result(s) - ./KingGen <no args>:

Code:
X Error of failed request:  BadIDChoice (invalid resource ID chosen for this connection)
Major opcode of failed request:  1 (X_CreateWindow)
Resource id in failed request:  0x9800094
Serial number of failed request:  894
Current serial number in output stream:  896
- ./KingGen gen KingGenTestMap 4096:

Code:
KingGen v0.11.1 for 7 Days to Die A19.5
Generating heightmap.
Traceback (most recent call last):
File "king_gen.py", line 43, in <module>
File "king_gen.py", line 33, in main
File "ntime.py", line 11, in ntime
File "king_gen.py", line 24, in run
File "arguments.py", line 206, in parse_args
File "arguments.py", line 133, in gen_func
File "world.py", line 228, in generate
File "world.py", line 912, in init_heightmap
File "world.py", line 1006, in gen_heightmap
File "world.py", line 1121, in noise
File "pyfastnoisesimd/helpers.py", line 777, in genAsGrid
File "pyfastnoisesimd/helpers.py", line 33, in empty_aligned
numpy.core._exceptions.MemoryError: Unable to allocate 64.0 TiB for an array with shape (70368744177696,) and data type int8
[298398] Failed to execute script king_gen
All that generates is the output folder, and one file: KingGenConfig.txt...

Code:
  _  ___              _____
 | |/ (_)            / ____|
 | ' / _ _ __   __ _| |  __  ___ _ __
 |  < | | '_ \ / _` | | |_ |/ _ \ '_ \
 | . \| | | | | (_| | |__| |  __/ | | |
 |_|\_\_|_| |_|\__, |\_____|\___|_| |_|
                __/ |
               |___/
v0.11.1 - A19.5
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=medium
cities_grid_size=medium
cities_level=60
cities_number=medium
cities_size=medium
default_biome=pine forest
desert_size=medium
heightmap_smoothing=none
mountains_size=medium
name=KingGenTestMap
output_folder=
png_heightmap=no
pois_list=vanilla
pois_number=medium
seed=EgeLBqrsTZ
size=4096
skip_preview=false
snow_level=false
snow_size=medium
spacing=medium
spawn_points=medium
terrain_roughness=medium
towns_grid_size=medium
towns_number=medium
towns_size=medium
traders_location=cities
traders_number=medium
villages_grid_size=medium
villages_number=medium
villages_size=medium
waste_size=medium
water_level=43
water_size=medium
Without any other output, I'm at a loss as to what could be the issue. Any, and all help will be appreciated.

 
Hi there, sorry to have to post a bug report...

Version: KingGen v0.11.1 for 7 Days to Die A19.5
Platform: Linux 5.12.14 (Arch Linux x64)
Command(s) Tested (all run from the folder where the program downlaoded): ./KingGen <no args>, and ./KingGen gen KingGenTestMap 4096
Result(s) - ./KingGen <no args>:

Code:
X Error of failed request:  BadIDChoice (invalid resource ID chosen for this connection)
Major opcode of failed request:  1 (X_CreateWindow)
Resource id in failed request:  0x9800094
Serial number of failed request:  894
Current serial number in output stream:  896
- ./KingGen gen KingGenTestMap 4096:

Code:
KingGen v0.11.1 for 7 Days to Die A19.5
Generating heightmap.
Traceback (most recent call last):
File "king_gen.py", line 43, in <module>
File "king_gen.py", line 33, in main
File "ntime.py", line 11, in ntime
File "king_gen.py", line 24, in run
File "arguments.py", line 206, in parse_args
File "arguments.py", line 133, in gen_func
File "world.py", line 228, in generate
File "world.py", line 912, in init_heightmap
File "world.py", line 1006, in gen_heightmap
File "world.py", line 1121, in noise
File "pyfastnoisesimd/helpers.py", line 777, in genAsGrid
File "pyfastnoisesimd/helpers.py", line 33, in empty_aligned
numpy.core._exceptions.MemoryError: Unable to allocate 64.0 TiB for an array with shape (70368744177696,) and data type int8
[298398] Failed to execute script king_gen
All that generates is the output folder, and one file: KingGenConfig.txt...

Code:
  _  ___              _____
 | |/ (_)            / ____|
 | ' / _ _ __   __ _| |  __  ___ _ __
 |  < | | '_ \ / _` | | |_ |/ _ \ '_ \
 | . \| | | | | (_| | |__| |  __/ | | |
 |_|\_\_|_| |_|\__, |\_____|\___|_| |_|
                __/ |
               |___/
v0.11.1 - A19.5
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=medium
cities_grid_size=medium
cities_level=60
cities_number=medium
cities_size=medium
default_biome=pine forest
desert_size=medium
heightmap_smoothing=none
mountains_size=medium
name=KingGenTestMap
output_folder=
png_heightmap=no
pois_list=vanilla
pois_number=medium
seed=EgeLBqrsTZ
size=4096
skip_preview=false
snow_level=false
snow_size=medium
spacing=medium
spawn_points=medium
terrain_roughness=medium
towns_grid_size=medium
towns_number=medium
towns_size=medium
traders_location=cities
traders_number=medium
villages_grid_size=medium
villages_number=medium
villages_size=medium
waste_size=medium
water_level=43
water_size=medium
Without any other output, I'm at a loss as to what could be the issue. Any, and all help will be appreciated.
When you use the CLI the size should be an integer between 4 an 16. Try that

 
i need to add this to vanilla prefablist 

how can i because i tried custom list came up with errors 
Hi,

here are the steps to do it:

  • open KG
  • go to advanced settings tab
  • click on generate a new poi list
  • point KG to the vanilla prefabs folder of the game
  • select where to save the poi list file that will be created
  • open the newly generated file
  • paste your new lines
  • save the file
  • next time you run KG, select your custom list
  • make sure that before you play the generated world, you actually put your custom pois in the game prefabs folder
Cheers

 
When you use the CLI the size should be an integer between 4 an 16. Try that


Ok! Yes. That works as expected. Uhh, that also implies KingGen was trying to create a... 4096000 x 4096000 map. Wow... No wonder it wanted 64TiB of memory! Still, the GUI option is throwing the same error... I think I remember that's a known issue though...

 
I've updated the description in the poi tutorial video to include better instructions (than I had) on making a custom POI list. I'll edit it again this morning to include the instructions you've just added Kingslayer. 

 
Ok! Yes. That works as expected. Uhh, that also implies KingGen was trying to create a... 4096000 x 4096000 map. Wow... No wonder it wanted 64TiB of memory! Still, the GUI option is throwing the same error... I think I remember that's a known issue though...
Yes, that is a knows issue. I cannot reproduce it on my linux machine. So I don't know how to fix it just yet

 
When you use the CLI the size should be an integer between 4 an 16. Try that
Just to be sure, can it be any integer or only an even integer? i.e.: 4, 6, 8, 10, 12, 14 or 16 in the latter case but 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 or 16 in the former.

Ok! Yes. That works as expected. Uhh, that also implies KingGen was trying to create a... 4096000 x 4096000 map. Wow... No wonder it wanted 64TiB of memory! Still, the GUI option is throwing the same error... I think I remember that's a known issue though...
At least you would never have to regen the world due to players having wiped every PoI out. 😛

 
Last edited by a moderator:
Just to be sure, can it be any integer or only an even integer? i.e.: 4, 6, 8, 10, 12, 14 or 16 in the latter case but 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 or 16 in the former. 

😛
The generation works with odd sizes too. I'm not sure the game handles a odd sized world though. Do it at your own risk

 
Now that I have the KingGen CLI working (the GUI seems to be an issue with TKinter/TK... Maybe a QT5 front end? Anyway...), I have unsuccessfully looked for a rundown on the CLI's longopts, and their accepted values. Does anyone have a link to that? The -h option gives me a list of longopts, but without any accepted values.

Thanks in advance.

 
The generation works with odd sizes too. I'm not sure the game handles a odd sized world though. Do it at your own risk


Having enough trouble with a 14kx14k world atm, I have to exit and reload every couple of hours else the game gets weird. Objects I destroy stay visibly there (but are gone when I exit and reload) and so on.

 
I've just finished a tutorial video on finding and fixing real-world heightmaps for use with KingGen. Hopefully this helps people looking to raise hell in their own country or just explore other regions of the world. Thanks Kingslayer for letting me share this here. 
Hmm thanks for the video. Makes me want to see if I can get Texas added in.

 
Back
Top