Jump to content

KingGen - A Random World Generator for 7 Days to Die


KingSlayerGM

Recommended Posts

7 minutes ago, pottervogel said:

a had one map where about 4 twin towers spawned in a small area, since then not directly close - but some pois should not spawn more than one time because they are kind of unique.

Which POIs list did you use?
Were all 4 towers of the same kind?

Link to comment
Share on other sites

i used a custom list that kinggen generated by itself, yes they were the same poi - i played around with the settings, so this was just one world, after then this did not happen again

 

Link to comment
Share on other sites

Posted (edited)
3 minutes ago, pottervogel said:

i used a custom list that kinggen generated by itself, yes they were the same poi - i played around with the settings, so this was just one world, after then this did not happen again

 

I understand. Probably what happened was that your custom list did not have enough pois for a specific district, like "downtown", so KingGen was forced to pick the same POI over and over.

 

If you use the vanilla list, or the Compo Pack + vanilla list, this issue should not happen (I hope).

 

You can also merge 2 lists if you want. For example your own custom list, plus vanilla.

Edited by KingSlayerGM (see edit history)
  • Like 1
Link to comment
Share on other sites

Keep getting some out of bounds errors when trying to generate 16k maps, but the 8k maps are beautiful!!!!

Anything over 8k seems to give me some issues.  any ideas?

Just doing vanilla poi's.

 

Thanks in advance!

Link to comment
Share on other sites

1 minute ago, Koltran said:

Keep getting some out of bounds errors when trying to generate 16k maps, but the 8k maps are beautiful!!!!

Anything over 8k seems to give me some issues.  any ideas?

Just doing vanilla poi's.

 

Thanks in advance!

Hi, would you please share the log file and the config file so that I can figure out what is going on?

 

The log file is saved right next to KingGen. The config file is inside the generated world.

Link to comment
Share on other sites

Posted (edited)

king_gen_log_2021-05-05_22-59-01.txt
-->
Traceback (most recent call last):
  File "gui.py", line 877, in generate
  File "ntime.py", line 11, in ntime
  File "world.py", line 792, in run
  File "world.py", line 159, in generate
  File "world.py", line 605, in gen_biomes
IndexError: index 532449 is out of bounds for axis 1 with size 12288

king_gen_log_2021-05-05_23-30-40.txt
-->

Traceback (most recent call last):
  File "gui.py", line 877, in generate
  File "ntime.py", line 11, in ntime
  File "world.py", line 792, in run
  File "world.py", line 169, in generate
  File "world.py", line 414, in gen_random_pois
  File "city.py", line 39, in __init__
  File "city.py", line 52, in generate
  File "city.py", line 285, in populate_grid
IndexError: index -4623966463798018048 is out of bounds for axis 0 with size 16384

These are NOT the same settings I was using (I changed a few for the new 8K maps I was doing), but the essence of it is nearly the same.

SETTINGS:
burnt_size=medium
cities_size=large
desert_size=large
grid_size=large
heightmap=None
mountains_size=medium
multiple_generations=1
name=Hills of Dalinor
pois_list=vanilla
pois_number=increased
seed=myshardbladeisbiggerthanyours
single_city=False
size=8
skip_preview=False
snow_size=medium
spawn_points=increased
terrain_roughness=medium
towns_size=large
traders_number=medium
villages_size=large
waste_size=medium
water_size=medium

This last round (I deleted all of the others and started fresh this last round to make sure my download wasn't corrupt) I tried a 12K, then a 16K.

 

Actually, thinking about it.  Nope,  these are the exact settings I was using for the 12 and 16 trys.  I settled for an 8k version that generated perfectly.


Sincerely,
Me

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

7 minutes ago, Koltran said:

SETTINGS:
burnt_size=medium
cities_size=large
desert_size=large
grid_size=large
heightmap=None
mountains_size=medium
multiple_generations=1
name=Hills of Dalinor
pois_list=vanilla
pois_number=increased
seed=myshardbladeisbiggerthanyours
single_city=False
size=8
skip_preview=False
snow_size=medium
spawn_points=increased
terrain_roughness=medium
towns_size=large
traders_number=medium
villages_size=large
waste_size=medium
water_size=medium

 

With these settings I do not get the error

Link to comment
Share on other sites

Posted (edited)

I just restarted the PC, Downloaded another fresh copy of the software, and put it in a C:\kinggen\ folder.

So far so good, but I always get to a certain point then it goes poof.

I have plenty of Drive space, 64 gig of ram, win 10 (updated) i7 proc, all the goodies.  Actually recently even did a full wipe of my own system.

Right now I'm generating villages,  using the settings above, with 16k selected.
Edit: few mins later, now generating random POI's *fingers crossed*

Generating Preview.

 

And that worked.  I have NO idea why it wasn't working, but I wonder if it had something to do with the folder the software was in.   the folder WAS on my desktop, so it was in the C:|blah\blah\blah\blah..  deep on the desktop.  I wonder if the folder structure gets too big for it to deal with.

Either way.  I guess it was either a fluke or a corrupt download.

 

Oh and I am running it as Administrator as well.  (I was before)  I read somewhere earlier in the forum others were having some permission errors or something, so I did that just in case.

Thank you for your time.

 

Sincerely,

Me

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

Posted (edited)
28 minutes ago, Koltran said:

And that worked.  I have NO idea why it wasn't working, but I wonder if it had something to do with the folder the software was in.   the folder WAS on my desktop, so it was in the C:|blah\blah\blah\blah..  deep on the desktop.  I wonder if the folder structure gets too big for it to deal with.

same here, didnt work on a desktop folder, mine was C://blah blah/desktop/kinggen

 

so i put on my second smaller SSD and all works fine

 

generated a 10k map, with increased cities and towns sizes etc, in 5 mins!! brilliant, and i havent even got a super nuclear PC (and still windows 7 64bit)!!

 

so pleased someone is working an a map gen :)

Edited by Data (see edit history)
  • Like 2
Link to comment
Share on other sites

36 minutes ago, KingSlayerGM said:

this seems to be an issue for many... I will investigate

could it be because the C drive is where windows is installed and theres some protection to write to it, just a thought, i dunno

Link to comment
Share on other sites

4 hours ago, KingSlayerGM said:

this seems to be an issue for many... I will investigate

 

Did I start a snowball effect with my problem I had :D

 

4 hours ago, Data said:

could it be because the C drive is where windows is installed and theres some protection to write to it, just a thought, i dunno

 

Not for me. I only got it to work when I put it on my C drive.

Link to comment
Share on other sites

Posted (edited)

Hiya, as a custom map maker who extensively uses custom height maps, and custom poi preferred placement maps to generate real world terrain and approximate position city maps for the game I would really love it if it was possible to include options for a poi placement map similar to the nitrogen city and town preference placement map which is used in the mask map which also allows me to limit the land volume where pois are actually placed - something quite important when making island based maps for example as I would not want poi's spawning out in the water areas.

I have not tried your tool yet but do intend  to give it a thorough work out over the coming weekend as it appears to have a lot of potential and it's refreshing to see something new come along that might indeed surpass the results nitrogen gives. I will be able to also give feedback on the linux side of things as I run both a win 10 gaming / editing rig and 3 ubuntu based servers

Keep up the great work

PS are the source files available at all if you do not want to add these changes to it so I can add them myself?

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

5 minutes ago, scallipus said:

Hiya, as a custom map maker who extensively uses custom height maps, and custom poi preferred placement maps to generate real world terrain and approximate position city maps for the game I would really love it if it was possible to include options for a poi placement map similar to the nitrogen city and town preference placement map which is used in the mask map which also allows me to limit the land volume where pois are actually placed - something quite important when making island based maps for example as I would not want poi's spawning out in the water areas.

I have not tried your tool yet but do intend  to give it a thorough work out over the coming weekend as it appears to have a lot of potential and it's refreshing to see something new come along that might indeed surpass the results nitrogen gives. I will be able to also give feedback on the linux side of things as I run both a win 10 gaming / editing rig and 3 ubuntu based servers

Keep up the great work

PS are the source files available at all if you do not want to add these changes to it so I can add them myself?

Hi,

custom heighmaps are supported. Custom biomes.png will be supported very soon (it's already working in the next release). That said, a mask for city generation has been asked many times before, so I will add it eventually. I just need to sort out higher priority things first.

Good luck have fun

  • Like 1
Link to comment
Share on other sites

5 hours ago, unlike them said:

Hello KingSlayerGM. I wonder is it possible to implement generated caves, like in the glory days? Since the devs refuse to bring them back, maybe modders can give us that option?

Hi, I would love to implement caves, but the game does not allow it. A world is based on heightmap that describes terrain elevation, but it does not support underground holes. That's very unfortunate.

Link to comment
Share on other sites

Posted (edited)

some feedback - based on my initial testing this morning


THE TLDR version -
PERMISSIONS ISSUES EXIST IN WINDOWS

GENERATES WORLDS FLAWLESSLY ON LINUX
GENERATES WORLDS FLAWLESSLY ON WINDOWS ONCE PERMISSION ISSUES ARE SORTED OUT

CANNOT GET IT TO COMPLETE GENERATION USING A CUSTOM HEIGHT MAP IN WINDOWS
CAN COMPLETE USING A CUSTOM MAP IN LINUX BUT DOES NOT SEEM TO USE THE CUSTOM HEIGHT MAP AT ALL.

THE FULL TEST (WALL OF TEXT)

Testing the permissions issues

GENERATING RANDOM WORLDS ONLY

WINDOWS 10
I created a directory (owned by my user account) on my dev drive (D:), put KingGen in there, ran it as my logged in user (which also has administrator privs)
Traceback (most recent call last):
<snipped>
PermissionError: [WinError 5] Access is denied: 'user_test_rwg'
 

I then copied the KingGen directory to my users home directory and ran it again from there and it worked just fine - For some clarification my users home directory is NOT on the C drive where windows is stored so perhaps its better for users to copy it to their home directory and just put a shortcut on their desktop for it.



Back on the D:\KingGen directory testing
Once I ran it as Administrator it worked just fine and generated a 10K world within 3 minutes.  
So for some people with permissions issues and do not want to run it from their home directory the simplest solution is to run as administrator but that will only work if their user account is part of the administrator group.


LINUX - UBUNTU 20.04 LTS SERVER (CLI ONLY)
I tested it on one of my linux servers and it worked just fine right out of the gate from the CLI after I put it into my users home directory.

I then sudo copied it to /usr/local/bin.  It runs fine from there and is available to all users and is working exactly as it should by assigning the user ownership of the generated directory and files correctly to the user who runs it.

This well may replace using built in RWG for generating totally random worlds on my servers given how fast it generates worlds and that it follows normal linux conventions.

 

 

CUSTOM HEIGHT MAP TESTING 

Initially I just used my Nitrogen prepared height map then I realised you require 16 bit grayscale so adjusted the image to 16 bit integer grayscale and exported it from GIMP using 16BPC GRAY as the pixel format in the PNG export settings.
 

Not big issue but it would be nice if the program checked for a 16 bit depth on loading the png map file and perhaps reported to the user the height map was not correct bit depth and exited gracefully as the simplest solution - that way the user would realise what the problem was.  Consider this as I imagine other people would have prepared their custom nitrogen maps similarly which requires an 8 bit greyscale image.


WINDOWS
Testing KingGen running from user directory and using the custom 10K height map.

When using a custom height map which is stored in another directory on my dev drive (D:\), and which my user account is the owner of the file, I seem to be getting issues with KingGen as it just sits on Generating random pois and after 15 - 20 minutes I stop the generation.  So far I have been completely unable to complete the generation using a custom height map in windows

 

LINUX
if I use the following command line

KingGen --seed 1234567890 --custom_heightmap /home/myuser/kinggen_testmap.png --cities_size large user_custom_map_test 10

it appears to ignore the custom map entirely.

 

Same result when I use the following command line

 KingGen  --custom_heightmap /home/myuser/kinggen_testmap.png --cities_size large user_custom_map_test_2 10                 

 

And yet again the same thing happens when I use this command line
 KingGen  --custom_heightmap=/home/myuser/kinggen_testmap.png --cities_size=large user_custom_map_test_3 10                    

So I am at a TOTAL LOSS as to how to get it to use my custom height map at all.  It does complete and generate a map but it really does not seem to use the height map so is there something I am missing here as far as command line parsing goes???

Also as an aside I have clamped my height map values in gimp prior to export as such that the water areas should be exactly that water areas according to the information given for generation.  I will happily DM you a link to the source height map on my webserver if you like, it's a 10K height map and is approx 5MB in size.


I further tested this by re-scaling my custom map to 4k and it still refuses to complete making a map in WINDOWS and it seems to ignore it in LINUX...  Of course it could well be the png file itself that is the issue or perhaps something I have misunderstood regarding the linux command line...  And yes for the 4K map tests I did change the size parameter to 4

I will happily be educated on how it's supposed to be used with importing custom maps

What IMHO would be an added improvement for the CLI versions would be simply allowing us to specify a config file on the command line with all the options we want the generator to use


It might also make it easier for debugging purposes...

Right now as it stands, from my perspective it's nice and fast for generating totally random worlds but completely useless to me for generating worlds using custom height maps...

Edited by scallipus (see edit history)
  • Like 1
Link to comment
Share on other sites

here is the generated KingGenConfig.txt file contents from the 4K custom map test on the linux server

Based on this command line

 

KingGen  --custom_heightmap /home/myuser/4ktest.png --cities_size large user_custom_map_test_3 4

 

  _  ___              _____
 | |/ (_)            / ____|
 | ' / _ _ __   __ _| |  __  ___ _ __
 |  < | | '_ \ / _` | | |_ |/ _ \ '_ \
 | . \| | | | | (_| | |__| |  __/ | | |
 |_|\_\_|_| |_|\__, |\_____|\___|_| |_|
                __/ |
               |___/
v0.5.0
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:
burnt_size=medium
cities_size=large
custom_heightmap=/home/myuser/4ktest.png
desert_size=medium
grid_size=medium
heightmap=None
mountains_size=medium
name=user_custom_map_test_3
pois_list=vanilla
pois_number=medium
seed=9h57Zz1TJH
single_city=False
size=4
skip_preview=False
snow_size=medium
spawn_points=medium
terrain_roughness=medium
towns_size=medium
traders_number=medium
villages_size=medium
waste_size=medium
water_size=medium

Link to comment
Share on other sites

This tool really makes great looking maps. Thank you.

 

A request for a couple small things:

1. Ability to create only a single biome, for example a winter world using only snow biome.

2. Either use any POI only once, or once per city/town. 

 

I use a custom POI list, made from vanilla, compopack, and a few other downloads. It seems to skip some (not using them) and placing multiple copies within close proximity. I would rather it leaves blank/empty spaces. I also get py list errors when I remove certain types of POI - perhaps allow for empty lists. 

Link to comment
Share on other sites

Posted (edited)
1 hour ago, Dajoor said:

This tool really makes great looking maps. Thank you.

 

A request for a couple small things:

1. Ability to create only a single biome, for example a winter world using only snow biome.

2. Either use any POI only once, or once per city/town. 

 

I use a custom POI list, made from vanilla, compopack, and a few other downloads. It seems to skip some (not using them) and placing multiple copies within close proximity. I would rather it leaves blank/empty spaces. I also get py list errors when I remove certain types of POI - perhaps allow for empty lists. 

Hi, thank you for the feedback. Let me answer your points.

1. It is a great idea. I will add the ability to have a single biome.

2. KingGen tries not to use the same poi multiple times, however sometimes it is forced to choose one it has used before. I can try to improve this, but given the fact that the list of pois is not infinite, at some point pois must be repeated.

3. I can't allow for empty lists. If you don't have a list, just use the vanilla list provided by KingGen

Edited by KingSlayerGM (see edit history)
  • Like 1
Link to comment
Share on other sites

Posted (edited)
3 hours ago, scallipus said:

some feedback - based on my initial testing this morning


THE TLDR version -
PERMISSIONS ISSUES EXIST IN WINDOWS

GENERATES WORLDS FLAWLESSLY ON LINUX
GENERATES WORLDS FLAWLESSLY ON WINDOWS ONCE PERMISSION ISSUES ARE SORTED OUT

CANNOT GET IT TO COMPLETE GENERATION USING A CUSTOM HEIGHT MAP IN WINDOWS
CAN COMPLETE USING A CUSTOM MAP IN LINUX BUT DOES NOT SEEM TO USE THE CUSTOM HEIGHT MAP AT ALL.

Hi, thank you for taking the time and for sharing this long feedback. Have you tried using the GUI at all? Or did you just use CLI?

 

3 hours ago, scallipus said:

Testing the permissions issues

GENERATING RANDOM WORLDS ONLY

WINDOWS 10
I created a directory (owned by my user account) on my dev drive (D:), put KingGen in there, ran it as my logged in user (which also has administrator privs)
Traceback (most recent call last):
<snipped>
PermissionError: [WinError 5] Access is denied: 'user_test_rwg'
 

I then copied the KingGen directory to my users home directory and ran it again from there and it worked just fine - For some clarification my users home directory is NOT on the C drive where windows is stored so perhaps its better for users to copy it to their home directory and just put a shortcut on their desktop for it.

I can't do much about permissions. It depends on the machine and on the user. What I can do is to clarify better inside the user guide what works and what doesn't.

 

3 hours ago, scallipus said:

Not big issue but it would be nice if the program checked for a 16 bit depth on loading the png map file and perhaps reported to the user the height map was not correct bit depth and exited gracefully as the simplest solution - that way the user would realise what the problem was.  Consider this as I imagine other people would have prepared their custom nitrogen maps similarly which requires an 8 bit greyscale image.

Noted. Thats a good idea.

 

3 hours ago, scallipus said:

WINDOWS
Testing KingGen running from user directory and using the custom 10K height map.

When using a custom height map which is stored in another directory on my dev drive (D:\), and which my user account is the owner of the file, I seem to be getting issues with KingGen as it just sits on Generating random pois and after 15 - 20 minutes I stop the generation.  So far I have been completely unable to complete the generation using a custom height map in windows

 

LINUX
if I use the following command line

KingGen --seed 1234567890 --custom_heightmap /home/myuser/kinggen_testmap.png --cities_size large user_custom_map_test 10

it appears to ignore the custom map entirely.

 

Same result when I use the following command line

 KingGen  --custom_heightmap /home/myuser/kinggen_testmap.png --cities_size large user_custom_map_test_2 10                 

 

And yet again the same thing happens when I use this command line
 KingGen  --custom_heightmap=/home/myuser/kinggen_testmap.png --cities_size=large user_custom_map_test_3 10                    

So I am at a TOTAL LOSS as to how to get it to use my custom height map at all.  It does complete and generate a map but it really does not seem to use the height map so is there something I am missing here as far as command line parsing goes???

I think there might be a bug where the custom heightmap is ingored. I will investigate.

 

3 hours ago, scallipus said:

What IMHO would be an added improvement for the CLI versions would be simply allowing us to specify a config file on the command line with all the options we want the generator to use

This is a good idea. I will add it.

Edited by KingSlayerGM (see edit history)
  • Like 1
Link to comment
Share on other sites

Thanks for your response to the feedback, to answer your question on CLI / GUI. On windows I tested the gui only, on my linux server it was CLI only as I do not even have an X server installed on it, so no desktop, all my linux servers are configured to be headless units that I ssh into from my main windows machine, my other server - a windows 10 pro machine I did not test anything on, the main windows machine is a win 10 home edition machine

 

I hope that helps

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...