Jump to content

KingGen - A Random World Generator for 7 Days to Die


Recommended Posts

KingGen Beta 0.1.1
Random World Generation for 7 Days to Die

This is the official webpage of KingGen, a tool to generate beautiful maps for 7 days to die.

KingGen is in Beta, you should expect crashes and misplaced pois. Feedback is welcome. If you have time, please fill out this google form with your feedback:

Feedback Google Form

 

Changelog:

  • Added custom heightmap support
  • Added custom POIs support
  • Improved world generation
  • Improved interface

 

Downloads:

Windows 64 bit

Linux 64 bit

 

Usage:

  • Download KingGen.
  • Run it.
  • Choose your preferences and click “Generate world”.
  • KingGen will create a folder containing the world. You have to copy it into 7 Days to Die’s worlds folder, usually: “%appdata%\Roaming\7 Days to Die\GeneratedWorlds”

 

Why KingGen?

  • KingGen is incredibly fast, even on old machines.
  • The generated worlds are beautiful, with huge mountains and large cities.
  • Biomes are randomly placed, no repetitiveness.
  • Deserts and snow never touch.
  • KingGen is purely noise based, no stamps are used. This means that no two lakes look the same, nor two mountains.
  • KingGen is also customizable to suit one's needs.
  • Custom heightmaps are supported.
  • Custom POIs are supported.

 

Screenshots:

Editor

boITDuF.png

 

4K

Qj2bEoc.png

 

8K

gbqFTMU.jpg

 

16K

PAOzcSS.jpg

 

An 8K heightmap

TwVqJg0.jpg

 

Performance:
KingGen is incredibly performant. It is several times faster than vanilla’s generation thanks to its parallelized algorithm that takes advantage of all your cpu's cores.

This table summarizes KingGen’s performance on a laptop. You can expect even better results on a gaming pc.

 

Size of world Execution time Ram usage
4K 25 sec 300 MB
8K 1 min 30 sec 1.2 GB
16K 7 min 30 sec 5 GB
Edited by KingSlayerGM (see edit history)
  • Like 5
Link to post
Share on other sites
Posted (edited)

User Guide

This guide is to help you getting started with KingGen. It is advisable to read thoroughly.
KingGen is a tool to generate worlds that are playable in 7 Days to Die. The generation is procedural, which means that an algorithm will create the world for you. Also every time you run such an algorithm, you get a different world. This is good because you can play the game over and over again in different worlds without getting bored.

 

Getting Started

First off, download KingGen. You can find the download links at the top of this page. KingGen is provided as an executable file for Windows 10 64 bit and Linux 64 bit. It is packaged inside a single file so that it is easier to distribute.

 

Once you have downloaded KingGen, you have to run it. On Windows simply double click it to start it. On Linux, depending on your distribution, you might just double click it, or you might have to run it from the terminal. To run it from the terminal open a terminal window at the location of KingGen, give it execution permission with:

chmod +x ./KingGen

and finally run it with: 

./KingGen

Once you have started it, give it a few seconds to uncompress itself and then the editor will appear.

 

Generating First World

To generate your first world using the default settings, simply click on the big button on the left side of the panel that says "Generate World". Now the tool will start and you will be able to see its output log on the left side. The default world is 8K in size and it is called KingGenWorld. Once the generation is completed a folder will appear with the same name of the world and a big preview image will appear on the right side of the panel. The preview image is a map of the newly generated world, in which you can see biomes, mountains, lakes, cities and the traders, which are small rectangles of blue color on the map. A preview image is also saved inside the world folder.

 

In order to play this world, you have to copy its folder to the 7 Days to Die world folder, which is usually located under  “%appdata%\Roaming\7 Days to Die\GeneratedWorlds”. If you don't have this folder  you have to create it manually or you can generate a world from within 7 Days to Die and the game will create the folder for you. Once you have copied the world into this folder, you are ready to fire 7 Days to Die and start a new game. You will find the newly generate world in the worlds list.

 

Settings

You you are not satisfied with the default generation, or you just like to mess around and experiment, KingGen offers a lot of options to customize the world as you like. Firt off, on the left side of the panel you can find the basic settings: world name, world size and world seed.

 

Name

The world name is the name of the folder and the name that you will see inside 7 Days to Die. Keep in mind that two worlds cannot have the same name. Also keep in mind that the world is not the saved game and these two can have different names.

 

Size

The world size is either 4K, 8K or 16K. Each of them is a square and their sizes, in blocks, are respectively 4096x4096, 8192x8192 and 16384x16384. Their area is respectively 16Km2, 64Km2 and 256Km2.

 

Seed

The world seed is a sequence of characters that determines the randomness of the generation. Two generations with different seeds, will generate different worlds. Two generation with the same seed will generate the same world. You can put anything you want as seed.

 

Advanced settings

The advanced settings tab allows you to control the generation more in depth. You can choose the size of cities, towns and villages, as well as biomes. You can also control the size of mountains and lakes and you can remove any of them entirely if you wish.

 

Custom Heightmaps

KingGen allows you to import custom heighmaps. You might like to create them yourself or you might have found a cool looking one online, well you are in luck because now you have a way to use them inside the game. If you do not know about heightmaps skip this option, it is not fundamental.

 

In order to be acceptable, the heightmap must sutisfy some requirements: it must be a 16 bit, png, grayscale image and its size must be exactly the same as the world you are trying to generate (4096x4096 or 8192x8192 or 16384x16384). If your image does not satisfy these requirements, you might want to use a third party software to convert/adjust it, such as Photoshop or Gimp.

Furthermore there are a few things to keep in mind when designing your own custom heightmap. The world goes from 0 to 255 blocks in height. 0 is the bedrock level and 255 is the build limit. The water level in KingGen is fixed at 43, so any land below that will be submerged. Anything above 100 will be covered in snow. Cities generate only between levels 43 and 70. It is preferable to have flat land around level 50.

With all of that in mind, good luck with your heighmap creation!

 

Custom POIs

KingGen allows you to generate a world with your own custom POIs, including the Compo Pack. If you are not familiar with modding and custom POIs you can skip this option, it is not fundamental.

KingGen has two internal lists: one of just vanilla POIs, taken from the latest version of the game, and one of vanilla and Compo Pack POIs, the latters taken from the latest version of the Compo Pack. For the generation you can choose any of these to lists and the tool will generate a world only using the POIs you have selected. Keep in mind that if you use it during the generation you must also install the Compo Pack separately.

For any other custom POIs that you might want yo use, you must provide KingGen with a list of comma separated values formatted as follows: each POI must be listed on a new line and be written as <name>,<x size>,<y size>,<z size>,<y offset>,<rotation to face north>,<zones>,<allowed townships>. Here is an example taken from the vanilla list:
 

abandoned_house_01,24,18,26,-1,2,residentialold,city/rural/wilderness/town
abandoned_house_02,24,17,25,-1,2,residentialold,city/rural/wilderness/town
abandoned_house_03,21,16,28,-1,2,residentialold,city/rural/wilderness/town

 

If you do not want to write one such list by hand, KingGen will generate one for you given a folder containing all the custom POIs. See the advanced setting of the tool for this option.

 

Command Line Interface

KingGen comes with a command line Interface. This is helpful if you want to automate the generation trough a script to generate lots of worlds. You can run the tool in a terminal like so:
 

./KingGen <world name> <seed> <size>

 

More options are available, use "-h" to get an help message that lists all of them.

Edited by KingSlayerGM (see edit history)
Link to post
Share on other sites
2 hours ago, KingSlayerGM said:

KingGen Beta
Random World Generation for 7 Days to Die
This is the official webpage for KingGen, a tool to generate beautiful maps for 7 days to die.

KingGen is in Beta, you should expect crashes and misplaced pois. Feedback is welcome.
Downloads:

Windows 64 bit

Linux 64 bit

Usage:

  • Download KingGen.
  • Run it.
  • Choose your preferences and click on “Generate”.
  • KingGen will create a folder containing the world. You have to copy it into 7 Days to Die’s worlds folder, usually: “%appdata%\Roaming\7 Days to Die\GeneratedWorlds”

Why KingGen?

  • KingGen is incredibly fast, even on old machines.
  • The generated worlds are beautiful, with huge mountains and large cities.
  • Biomes are randomly placed, no repetitiveness.
  • Deserts and snow never touch.
  • KingGen is purely noise based, no stamps are used. This means that no two lakes look the same, nor two mountains.
  • KingGen is also customizable to suit one's needs.

Screenshots:

UtrMM0Y.png

 

4K

XQAnSfE.png

 

8K

zBlIk3q.jpg

 

16K

5tZcnMD.jpg

Performance:
KingGen is incredibly performant. It is several times faster than vanilla’s generation thanks to its parallelized algorithm that takes advantage of all your cpus cores.

This table summarizes KingGen’s performance on a laptop. You can expect even better results on a gaming pc.

Size of world Execution time Ram usage
4K 25 sec 300 MB
8K 1 min 30 sec 1.2 GB
16K 7 min 30 sec 5 GB

 

 

Hi KingSlayerGM


Thank you very much for this new tool, although Nitrogen continues to work well, it needs to be updated, it generates somewhat strange worlds.
I will try it and start a new game.
By the way, will your tool have any compatibility with the CompoPack prefablist?
Regards

Link to post
Share on other sites
1 minute ago, Gouki said:

 

Hi KingSlayerGM


Thank you very much for this new tool, although Nitrogen continues to work well, it needs to be updated, it generates somewhat strange worlds.
I will try it and start a new game.
By the way, will your tool have any compatibility with the CompoPack prefablist?
Regards

I haven't looked into combo pack compatibility yet, but I think I will be able to include it.

Link to post
Share on other sites
6 minutes ago, KingSlayerGM said:

I haven't looked into combo pack compatibility yet, but I think I will be able to include it.

 

Ok, for now I'll play it like this.
But I could also add them to the RWG and with your tool it should work without problems, I will try it later and see how it works.
Regards

Link to post
Share on other sites
1 minute ago, Gouki said:

 

Ok, for now I'll play it like this.
But I could also add them to the RWG and with your tool it should work without problems, I will try it later and see how it works.
Regards

KingGen has an internal list of pois from which it generates the world. So adding the combo pack to the game, won't work. I think I can probably just include the combo pack pois into the internal list, but that will happen in a future release.

 

Link to post
Share on other sites
1 minute ago, KingSlayerGM said:

KingGen has an internal list of pois from which it generates the world. So adding the combo pack to the game, won't work. I think I can probably just include the combo pack pois into the internal list, but that will happen in a future release.

 

 

OK, thanks a lot.

Link to post
Share on other sites
23 minutes ago, KingSlayerGM said:

KingGen has an internal list of pois from which it generates the world. So adding the combo pack to the game, won't work. I think I can probably just include the combo pack pois into the internal list, but that will happen in a future release.

 

So great work :-). So a user wont have control over the pois the map generator does like nitrogen does or that is planned

Link to post
Share on other sites
18 hours ago, KingSlayerGM said:

It was built on Windows 10, I am not sure it will work on Windows 7.

Nope it doesn't...at least for me.

Link to post
Share on other sites

Looks like it makes great looking maps. For a vanilla game I bet it's much better than RWG. I'm a fan of the snow on big hills/mountains and how it separates biomes sensibly.

 

But definitely need a way to add custom POIs to it. Wink wink, nudge nudge. ;)

 

Great work, though! After using Nitro this last time and not really enjoying it as much as I did before, I'd love more options for world gen. I'll be keeping my eye on this. :)

  • Like 2
Link to post
Share on other sites
1 minute ago, bdubyah said:

Looks like it makes great looking maps. For a vanilla game I bet it's much better than RWG. I'm a fan of the snow on big hills/mountains and how it separates biomes sensibly.

 

But definitely need a way to add custom POIs to it. Wink wink, nudge nudge. ;)

 

Great work, though! After using Nitro this last time and not really enjoying it as much as I did before, I'd love more options for world gen. I'll be keeping my eye on this. :)

Thank you! Yes, snow spawns only above a certain elevation and mountains with KingGen can go as high as 200 blocks, which is a lot more than vanilla!

It seems like controlling the pois list is a highly requested feature so I will defenitily have a look into it :)

Link to post
Share on other sites

Cool. Another map generator. Always nice to see tools like this being made. Wish I had the big brain and patience to learn programming so I could do stuff like this.

And yes requests for the inclusion of CompoPack (aka: prefablist) are gonna be huge for a tool of this nature.

I, personally, hate playing 7 Days without the Compo pack (and all the other POI's that are, as of yet, not included, so I download and include them as they are released from the various sites I visit)

I've, only just, downloaded this and have not had a chance to fire it up and get into a map, but I can't wait to try it out.

  • Like 1
Link to post
Share on other sites
9 hours ago, KingSlayerGM said:

mountains with KingGen can go as high as 200 blocks, which is a lot more than vanilla

Isn't that gonna cause performance issues raising the size of the world to be rendered in?

Link to post
Share on other sites
Posted (edited)
14 hours ago, JCrook1028 said:

Isn't that gonna cause performance issues raising the size of the world to be rendered in?

From my experience I haven't noticed any change in performance.

Consider that the game does support a maximum height of 255 (starting from bedrock), so we are not breaking any rules here :). Furthermore distant terrain helps a lot by not rendering all the single blocks that make up a huge mountain at the horizon, but instead rendering the mountain as a whole.

 

Technically it is possible that performance is reduced by large mountains but you always have the option inside KingGen to reduce the mountains size. There is aslo an option to increase it if you dare to :)

Edited by KingSlayerGM (see edit history)
Link to post
Share on other sites
30 minutes ago, Cpt Krunch said:

Well done Sir! I will have a look at this once im done with current map. Is there a config file where i can alter the water and snow cap heights?

There isn't a config file, but you can tweak the amount of water and the amount of snow  in the advanced settings.

  • Like 1
Link to post
Share on other sites

Hi KingSlayerGM

 

I have tried to make a map with the vanilla + CompoPack list, but it always shows me this error:

 

Traceback (most recent call last):
  File "gui.py", line 677, in generate
  File "ntime.py", line 11, in ntime
  File "world.py", line 661, in run
  File "world.py", line 58, in __init__
  File "poi.py", line 38, in __init__
  File "poi.py", line 38, in <genexpr>
TypeError: __init__() takes 9 positional arguments but 17 were given

 

when generating a map with the vanilla list the map is made without problem.
Nor does it generate a list of POIs.
What do I have to do to generate a map with CompoPack?
Regards

  • Like 1
Link to post
Share on other sites
14 minutes ago, Gouki said:

Hi KingSlayerGM

 

I have tried to make a map with the vanilla + CompoPack list, but it always shows me this error:

 

Traceback (most recent call last):
  File "gui.py", line 677, in generate
  File "ntime.py", line 11, in ntime
  File "world.py", line 661, in run
  File "world.py", line 58, in __init__
  File "poi.py", line 38, in __init__
  File "poi.py", line 38, in <genexpr>
TypeError: __init__() takes 9 positional arguments but 17 were given

 

when generating a map with the vanilla list the map is made without problem.
Nor does it generate a list of POIs.
What do I have to do to generate a map with CompoPack?
Regards

Thank you for reporting the problem and showing the error message! I was able to find the bug easily. The fix will be in the next patch.

 

Do you also have issues with generating a list of POIs from a prefabs folder?
 

Link to post
Share on other sites
1 hour ago, KingSlayerGM said:

Thank you for reporting the problem and showing the error message! I was able to find the bug easily. The fix will be in the next patch.

 

Do you also have issues with generating a list of POIs from a prefabs folder?
 

 

Yes, it does not generate any list of POIs, I have all the prefabs in the Prefabs folder of the game (vanilla + CompoPack 47), when I select in Advanced Options the folder where all the prefabs are, I click on generate the list, but it does not generate anything.
Or am I doing it wrong?
It is good to know that the error is easy to correct, I will wait for the next version.
Regards

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...