Jump to content

KingGen - A Random World Generator for 7 Days to Die


KingSlayerGM

Recommended Posts

Hi,

nice work so far.

 

I would like a button next to "open Worlds folder" which open the generated Folder for easier copy and paste.

And an option to choose how many towns and villages appear on the map were pretty cool. I like 1 big town and many cities and villages, but allways i generate a map, there are only few of them.

Link to comment
Share on other sites

So I am getting an Error.

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

 

Link to comment
Share on other sites

Posted (edited)
15 minutes ago, AndreausWhitefyre said:

So I am getting an Error.

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

 

Oh, so it's not just me.. good.

I just downloaded the program for the first time, clicked con generate right as it was and thought I had still managed to mess something up. 
Edit: After that I also got an error that didn't allow me to close the program. had to task kill it. 

Edited by Jugom (see edit history)
Link to comment
Share on other sites

4 minutes ago, Jugom said:

Oh, so it's not just me.. good.

I just downloaded the program for the first time, clicked con generate right as it was and thought I had still managed to mess something up. 
Edit: After that I also got an error that didn't allow me to close the program. had to task kill it. 

Make sure you tell Windows Defender thats it's okay to run. Otherwise it blocks it from making the Kingen Config file.

 

Link to comment
Share on other sites

34 minutes ago, AndreausWhitefyre said:

So I am getting an Error.

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

 

Run it as administrator, or move KingGen in a folder where it has writing permission.

Link to comment
Share on other sites

25 minutes ago, KingSlayerGM said:

Run it as administrator, or move KingGen in a folder where it has writing permission.

That indeed solved the issue. Generating now :)

Link to comment
Share on other sites

10 hours ago, Scomar said:

Hi,

nice work so far.

 

I would like a button next to "open Worlds folder" which open the generated Folder for easier copy and paste.

And an option to choose how many towns and villages appear on the map were pretty cool. I like 1 big town and many cities and villages, but allways i generate a map, there are only few of them.

I will add that button.

 

As far as number of cities, I plan to add more options

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Generating heightmap.
Generating biomes.
Generating cities.
Generating water.
Generating roads.
AttributeError: 'NoneType' object has no attribute 'close'
Exception ignored in: 'scipy.spatial.qhull._Qhull.__dealloc__'
Traceback (most recent call last):
  File "native.py", line 103, in interp
AttributeError: 'NoneType' object has no attribute 'close'
Traceback (most recent call last):
  File "gui.py", line 1240, in generate
  File "ntime.py", line 11, in ntime
  File "world.py", line 1011, in run
  File "world.py", line 203, in generate
  File "world.py", line 312, in gen_roads
  File "world.py", line 340, in connect_cities
  File "world.py", line 397, in connect
  File "native.py", line 142, in make_road
  File "native.py", line 103, in interp
  File "interpnd.pyx", line 280, in scipy.interpolate.interpnd.LinearNDInterpolator.__init__
  File "qhull.pyx", line 1840, in scipy.spatial.qhull.Delaunay.__init__
  File "qhull.pyx", line 270, in scipy.spatial.qhull._Qhull.__init__
  File "messagestream.pyx", line 36, in scipy._lib.messagestream.MessageStream.__init__
OSError: Failed to open file b'C:\\Users\\\xe7\xa9\xba\xe7\xa9\xba\\AppData\\Local\\Temp\\scipy-b0p8ykrd'
 

 

What's the problem?How to solve it?

Link to comment
Share on other sites

41 minutes ago, kkkkkkkkkk said:

Generating heightmap.
Generating biomes.
Generating cities.
Generating water.
Generating roads.
AttributeError: 'NoneType' object has no attribute 'close'
Exception ignored in: 'scipy.spatial.qhull._Qhull.__dealloc__'
Traceback (most recent call last):
  File "native.py", line 103, in interp
AttributeError: 'NoneType' object has no attribute 'close'
Traceback (most recent call last):
  File "gui.py", line 1240, in generate
  File "ntime.py", line 11, in ntime
  File "world.py", line 1011, in run
  File "world.py", line 203, in generate
  File "world.py", line 312, in gen_roads
  File "world.py", line 340, in connect_cities
  File "world.py", line 397, in connect
  File "native.py", line 142, in make_road
  File "native.py", line 103, in interp
  File "interpnd.pyx", line 280, in scipy.interpolate.interpnd.LinearNDInterpolator.__init__
  File "qhull.pyx", line 1840, in scipy.spatial.qhull.Delaunay.__init__
  File "qhull.pyx", line 270, in scipy.spatial.qhull._Qhull.__init__
  File "messagestream.pyx", line 36, in scipy._lib.messagestream.MessageStream.__init__
OSError: Failed to open file b'C:\\Users\\\xe7\xa9\xba\xe7\xa9\xba\\AppData\\Local\\Temp\\scipy-b0p8ykrd'
 

What's the problem?How to solve it?

It is an error with the library Scipy. Could you try to run it as administrator and see if anything changes?

I suspect it doesn't like your username because it contains "weird characters".

Link to comment
Share on other sites

Hello.

So, I was testing it yesterday and first off, the tool is awesome. Seriously, great job.

I was disappointed when I came back to generate a map since a long time ago and saw NitroGen was untouched ever since,  but KingGen so far does everything and more.

 

Now, a feature request:

I have no idea how noise generated maps work and even if it's even possible but... 

Same as you allow us to paint our desired cities, biomes, etc. Can't you make something similar for the heighmap?

 

Say I paint roughly where I want flat*ish* terrain (little lakes included), where I want water, where I want mountains, where I want hills, (I guess the type of noise could be linked to the biomes), and then based on that, the tool generates a heightmap.

Or at least something as simple as "give me tall snowy mountains at this particular location and generate everything else as you wish".

 

It would save a lot of heightmap photoshopping time and I know many people would be happy  x)

 

Thanks.

  • Like 1
Link to comment
Share on other sites

10 minutes ago, Jugom said:

Hello.

So, I was testing it yesterday and first off, the tool is awesome. Seriously, great job.

I was disappointed when I came back to generate a map since a long time ago and saw NitroGen was untouched ever since,  but KingGen so far does everything and more.

 

Now, a feature request:

I have no idea how noise generated maps work and even if it's even possible but... 

Same as you allow us to paint our desired cities, biomes, etc. Can't you make something similar for the heighmap?

 

Say I paint roughly where I want flat*ish* terrain (little lakes included), where I want water, where I want mountains, where I want hills, (I guess the type of noise could be linked to the biomes), and then based on that, the tool generates a heightmap.

Or at least something as simple as "give me tall snowy mountains at this particular location and generate everything else as you wish".

 

It would save a lot of heightmap photoshopping time and I know many people would be happy  x)

 

Thanks.

you can already paint and supply your own heightmap to KG

Link to comment
Share on other sites

On 5/31/2021 at 7:25 AM, KingSlayerGM said:

you can already paint and supply your own heightmap to KG

yeah, I didn't mean to add a a custom made 16b greyscale heightmap, but to imput something simple as "see attached img" and based on that, have KingGen generate a random map.

 

image.png.27ef3ba625a27f321ac6af97412a2b7e.png

Link to comment
Share on other sites

Hey @KingSlayerGM, I saw with KingGen 0.8 you can map cities, but I was wondering what you mean by "Added zoning map import: you can mask zones on a png file and KG will use that to generate pois". How does that work? And, does zoning for cities zone for towns as well? I find that most of my 6K maps only spawn with two towns (plenty of villages, however), and I would like more. And finally, are there any tutorials for said zoning maps? There's one for cities, which I can see, but I can't seem to find any for zoning maps.

Link to comment
Share on other sites

3 hours ago, vergilsparda said:

Hey @KingSlayerGM, I saw with KingGen 0.8 you can map cities, but I was wondering what you mean by "Added zoning map import: you can mask zones on a png file and KG will use that to generate pois". How does that work? And, does zoning for cities zone for towns as well? I find that most of my 6K maps only spawn with two towns (plenty of villages, however), and I would like more. And finally, are there any tutorials for said zoning maps? There's one for cities, which I can see, but I can't seem to find any for zoning maps.

Zoning allows you to control the types of buildings. Like industrial, commercial, downtown.... There is some information about it on the first page. You can also skip this part and KG will do automatic zoning.

Link to comment
Share on other sites

Hello again.
Is there any config file I could Modify to change at what elevation water and snow spawns? 
and if not... I think it would be a good idea to have it somewhere integrated in the program. 
cheers

Link to comment
Share on other sites

Just now, Jugom said:

Hello again.
Is there any config file I could Modify to change at what elevation water and snow spawns? 
and if not... I think it would be a good idea to have it somewhere integrated in the program. 
cheers

You can change the snow elevation in the settings as well as in the config file. However you cannot change the water level at the moment. This has been requested a lot. I am considering it.

Link to comment
Share on other sites

4 minutes ago, KingSlayerGM said:

You can change the snow elevation in the settings as well as in the config file. However you cannot change the water level at the moment. This has been requested a lot. I am considering it.

Sorry but where in the settings and config file? I really can't see anything related to it. I'm running v0.8.0

Link to comment
Share on other sites

3 minutes ago, Jugom said:

Sorry but where in the settings and config file? I really can't see anything related to it. I'm running v0.8.0

in the landscape section, its the snow option. More snow means lower elevation, less snow means higher elevation. You cannot choose an exact number.

Link to comment
Share on other sites

Posted (edited)
6 minutes ago, KingSlayerGM said:

in the landscape section, its the snow option. More snow means lower elevation, less snow means higher elevation. You cannot choose an exact number.

oh, I thought that was about the size of the snow biome... and now that I type this I realize that that's linked to the snow elevation.
thanks again.

Edit: wait... will this also work in a custom heightmap???
Edit 2: nvm. I just tested it. it works.

Btw, not sure if you are aware that snow and desert do touch. at least for custom heightmaps. (Yes, I know that I can edit the biomes file. just letting you know just in case)
image.png.383e8f9e83c13bf59a40ff4a4d01cbb4.png
 

Edited by Jugom (see edit history)
Link to comment
Share on other sites

I was Generating some random maps in different configurations and encountered this in the Large Mountains setting. 
Not all of them are like this, but most.  checked in game and all of them are at elevation 230, so I guess something needs to be tweaked either to allow it to keep generating terrain higher or to limit it to that height but without creating those flat areas. 
maybe lowering the base terrain to allow higher peaks would help.

image.png.a0425a4d623017eb879af36eefb4049f.png

image.png.11b00b55cb96d6c9992e7a11a4469ffe.png

Link to comment
Share on other sites

Hi, I was just wondering if the kinggen software prefers 8 or 16bit maps for smoothing? I seem to be having issues getting the software to create smooth slopes. They mostly seem to be stepped. I wondered if it was perhaps better to use an 8bit height map so the kinggen software knows to apply more intense smoothing? 

Not sure if this is making sense? Happy to explain further if I can. 

  • Like 1
Link to comment
Share on other sites

Just now, Tallman Brad said:

Hi, I was just wondering if the kinggen software prefers 8 or 16bit maps for smoothing? I seem to be having issues getting the software to create smooth slopes. They mostly seem to be stepped. I wondered if it was perhaps better to use an 8bit height map so the kinggen software knows to apply more intense smoothing? 

Not sure if this is making sense? Happy to explain further if I can. 

If you supply KingGen with a 16 bit heightmap, no smoothing is done to it. It is your job to provide a smooth file. If you are experiencing stepped terrain, it is because you have supplied a stepped heightmap.

 


If you supply KingGen with an 8 bit heightmap, then KingGen will smooth it out to fill out the full 16 bits.

  • Thanks 1
Link to comment
Share on other sites

Ah that's great. Thank you. I suspected the smudge tool in gimp was creating steps but wondered if there was something in your software that would soften them. Thanks for the reply. 

I have another question if that's ok? 

Would you know the colour code for the lowest point that cities would spawn? I'd like to start my own height map ensuring cities can spawn all over, then add mountains and valleys manually.

Sorry for all the questions. 

  • Like 1
Link to comment
Share on other sites

2 minutes ago, Tallman Brad said:

Ah that's great. Thank you. I suspected the smudge tool in gimp was creating steps but wondered if there was something in your software that would soften them. Thanks for the reply. 

I have another question if that's ok? 

Would you know the colour code for the lowest point that cities would spawn? I'd like to start my own height map ensuring cities can spawn all over, then add mountains and valleys manually.

Sorry for all the questions. 

In KingGen cities generally spawn between level 50 and 70. Ideally you would create flat regions around level 60 if you are using 8 bits.

If you are using 16 bits, than it should be 60 x 256, which is equal to 15360.

Depending on the software that you are using for drawing you have to figure out if the number is from 0 to 255 or from 0 to 65536.

  • Like 1
Link to comment
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...