Jump to content

KingGen - A Random World Generator for 7 Days to Die


KingSlayerGM

Recommended Posts

Can you use ANY for  Biomes, City/Town/Village, Zones(Which is this),Required ,Unique,

 

So an example would be <POI Name, #'s, ANY, ANY, ANY,,,>

 

So a way to simplify WOTW - 

wotw_Store_StripMall1,34,20,41,-6,1,any,any,any,,
wotw_Store_UnrealStuper1,38,30,36,-5,0,any,any,any,,
wotw_Store_pcNtv2,42,11,33,-2,1,any,any,any,any,any,,
wotw_deco_RandomOre,2,11,2,-9,2,any,any,any,,
wotw_industrial_freighterv2,19,20,33,-8,2,any,any,any,,
wotw_industrial_shipyard,35,27,44,-5,2,any,any,any,,
wotw_relief_camp,29,12,24,-7,2,any,any,any,,
 

 

or is that way off base??

Edited by AmethystLainey
Adding Examples (see edit history)
Link to comment
Share on other sites

2 hours ago, McKeighan said:

BTW Stallionsden - Thanks for the tip - it WAS the doubling up that was hanging the production.  

Now that I finally got the maps to produce Almost exactly what I was after... stupid ZombieDayz updated to alpha19.6 on me and I gotta rework some of my efforts.


So onto round 2 of my newb questions for KingGen Masters.


1 - Which takes the precident in the scenario? 

 

The king-gen row definition or the xml of the prefab? 

What I mean is let's look at a common "mistake"... be it a mistake or maybe it's just my misunderstanding of how this all works still. I'll elaborate on my current understanding, and allow you guys to correct my logic.

Now - I've set up these 2 example lines below of a prefab called School_k6_02 and the  property parts of the XML of the prefab listed as well for reference.
 

##<name>,<x size>,<y size>,<z size>,<y offset>,<rotation to face north>,<allowed biomes>,<allowed townships>,<zones>,<required>,<unique>.
School_k6_02,49,18,79,-1,2,burnt_forest/pine_forest/desert,town/city,residentialnew/downtown,,
  
  
  POI called School_k6_02.xml  (example only)
  <property name="AllowedBiomes" value="snow,plains,pine_forest,forest,desert,wasteland"/>
  <property name="Zoning" value="downtown, residential" />
  <property name="AllowedTownships" value="city,town,rural" />
  

 

 

My question becomes.... Which takes precidence?

Does KingGen overlook the Allowed Biomes and tries to spawn the school into the burnt biome anyway? Does it ignore that it's using an older value for "residential" and substitutes in residential new?  What if I swapped in industrial, which isn't even a value? would that also work?  OR.... does the xml of the POI block the spawning in those zones - so while kinggen techniqually built a place for the building in the map for it, when it actually tries to populate into the map when the game fires up, it fails population because the actual POI rules are being broken (via it's own XML coding)??

Same basic question I supposed surround the use of zoning and townships.

Also - when modders put in the value of "none" for Zoning... what is that actually doing? Is that effectively blocking the poi from spawning anywhere?  I guess my question really becomes one of is this an append feature or an exclusion feature of an array (sort of).

 

 

So - while trying to clean up maps and get all these poi's to actually spawn in, I've been copying a lot of the poi's to my own sub-mod folder, renaming them all slightly, and correcting the XML files  to fix the zoning / biomes / townships.... often it's just easier to delete the biomes & townships I've found as those default to the full list on biomes and null for the townships. But I digress.

Thanks for reading this far, and any help is appreciated.

KG refers to the list generated. So the list takes precedence. However the list is generated from the poi xmls. So yes you can change the lines in the list and it will work fine.

Link to comment
Share on other sites

2 hours ago, AmethystLainey said:

Can anyone post an example of a POI  and the options that are allowed 

 

Kingslayer has posted a example in the o.p of how a poi should look like in the list. 

 

Your example isn't correct tho.

abandoned_house_01,24,18,26,-1,2,burnt_forest/snow/pine_forest/desert/wasteland,wilderness/city/town/rural,residentialold,,

poi name, size, yoffset,rotation, biome, township, zone ,,

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

5 hours ago, stallionsden said:

KG refers to the list generated. So the list takes precedence. However the list is generated from the poi xmls. So yes you can change the lines in the list and it will work fine.

So - it will work and generate a map - up until it tries to populate the map.

 

That's where the POI's xml code comes into play, and then validates if it's supposed to be able to spawn where it's been placed? Or does the POI no longer care where it's been placed anymore in the map?  Just trying to figure out if I'm editing poi based XML files and re-naming them for absolutely no reason :)  I suppose I could have just made a 4X4 or 2X2 map with 3 poi's on it that were totally set to be city/downtown/wasteland only poi's and forced them to spawn in pine_forest/city/industrial and desert/town/residentialold and see if they actually populated those areas - but then that's actually doing research on my own. And the chance of me actually coming back and sharing knowledge once derived is very low sadly :(   

Link to comment
Share on other sites

34 minutes ago, McKeighan said:

So - it will work and generate a map - up until it tries to populate the map.

 

That's where the POI's xml code comes into play, and then validates if it's supposed to be able to spawn where it's been placed? Or does the POI no longer care where it's been placed anymore in the map?  Just trying to figure out if I'm editing poi based XML files and re-naming them for absolutely no reason :)  I suppose I could have just made a 4X4 or 2X2 map with 3 poi's on it that were totally set to be city/downtown/wasteland only poi's and forced them to spawn in pine_forest/city/industrial and desert/town/residentialold and see if they actually populated those areas - but then that's actually doing research on my own. And the chance of me actually coming back and sharing knowledge once derived is very low sadly :(   


The xml information in the prefab itself only comes into play when creating the list itself. Once that list is created, it uses the list for reference.

Link to comment
Share on other sites

Is this expected behavior in the current version?

 

image.png.3ea75de364fa7048fedbd9799bb9ccd7.png

 

I have a heightmap and a water map and no other custom maps/overlays. I did not expect a POI in the lake. If the log window is to be believed, cities are generated before water. Maybe it's out of order? Or maybe the rule is just "if you do a water map, you gotta do a cities map too".

  • Like 1
Link to comment
Share on other sites

Using just the WOTW and my MUSTS this is what i get

 

Traceback (most recent call last):
  File "city.py", line 221, in random_poi
  File "rrlist.py", line 25, in get_random
IndexError: list index out of range

During handling of the above exception, another exception occurred:

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 1258, in run
  File "world.py", line 267, in generate
  File "world.py", line 532, in init_cities
  File "world.py", line 601, in gen_cities_from_mask
  File "world.py", line 567, in gen_hub_from_label
  File "hub_factory.py", line 31, in gen_random_city
  File "hub_factory.py", line 62, in gen_random_hub
  File "city.py", line 46, in __init__
  File "city.py", line 61, in generate
  File "city.py", line 265, in populate_grid
  File "city.py", line 232, in random_poi
Exception: No POIs found for desert, city, commercial
 

Link to comment
Share on other sites

18 hours ago, Cpt Krunch said:


The xml information in the prefab itself only comes into play when creating the list itself. Once that list is created, it uses the list for reference.

Krunch I know this state is huge so it may need 16k map size but a landmass shaped like Alaska would also be interesting since it can be an all snow map just like Alaska is in real life.

Link to comment
Share on other sites

4 hours ago, AndrewT said:

Krunch I know this state is huge so it may need 16k map size but a landmass shaped like Alaska would also be interesting since it can be an all snow map just like Alaska is in real life.

Its a little too late into A19 to mess with now, but there is a mod that will give all the ores in a single biome, I just need to tweak it a little when 20 drops.

Problem with doing Alaska is only a few big cities, that would be a @%$#load of wilderness lol. Id have to find a way to balance it.

Link to comment
Share on other sites

On 8/11/2021 at 1:02 AM, Tallman Brad said:

The lake bed is possibly still withing the height range the cities prefer?

 

Yep! Lake bed is at 71 or something like that. Cities set at 60. Surprised there isn't a "not on water" exclusion built in, but hey the tool has some not-really-that-difficult ways to work around it, so I will do that.

 

Custom cities map and custom splat map were always in my future for this project anyhow...

  • Like 1
Link to comment
Share on other sites

Good day KingSlayerGM

I Have a Request .. can you add a smaller area under small when using the advance setting for biomes  .. even since version 10 .. now when using small ( the areas are larger than they used to be ) they are about the size of medium was now. I clean the folder after each use, so there is no carry over to the next map. I trashed 7 maps yesterday, because the deserts were larger than I wanted " don't know it is combined together somehow as smalls becoming bigger or what.

 

This old guy would appreciate it, if at all possible.

 

Thank You ... the Old Gamer .. 😌

Link to comment
Share on other sites

29 minutes ago, gpcstargate said:

Good day KingSlayerGM

I Have a Request .. can you add a smaller area under small when using the advance setting for biomes  .. even since version 10 .. now when using small ( the areas are larger than they used to be ) they are about the size of medium was now. I clean the folder after each use, so there is no carry over to the next map. I trashed 7 maps yesterday, because the deserts were larger than I wanted " don't know it is combined together somehow as smalls becoming bigger or what.

 

This old guy would appreciate it, if at all possible.

 

Thank You ... the Old Gamer .. 😌

I will check if biome settings need balancing. But I promise nothing.

You can always use the biomes map to manually create the biomes you want.

btw @gpcstargate, try tinkering with the spacing option. It might be what you need

Link to comment
Share on other sites

KingSlayer or anyone whose been making maps awhile Ive gotton used to map making but Im curious is there a trick to the Water and making sure nothing is spawning in it ?

 

I currently do - 

Height

Biomes

Cities

 

I sometimes get Trees in my water , Grass and Stones and stuff are also showing in the water too , I find all this odd am I missing something?

Edited by AmethystLainey
adding Info -- (see edit history)
Link to comment
Share on other sites

16 hours ago, Cpt Krunch said:

Its a little too late into A19 to mess with now, but there is a mod that will give all the ores in a single biome, I just need to tweak it a little when 20 drops.

Problem with doing Alaska is only a few big cities, that would be a @%$#load of wilderness lol. Id have to find a way to balance it.

true

Link to comment
Share on other sites

Version 0.13.0 released!

Old POIs lists are no longer compatible with this version. Read the guide for more information.

Here is what's new:

  • POIs names are case insensitive to detect trader, oldwest and wasteland POIs
  • Added default hubs to POIs list. Users can now change the default generation of cities, towns and villages
  • Improved description inside POIs list
  • Improved error messages related to POIs list
  • POI prioritization: POIs that have never been placed are more likely to be placed next, POIs that have already been placed a lot, are less likely to be placed again
  • Changed POI's required and unique into min and max, which give more advanced control over the placement
  • Added min and max to hubs as well
  • Improved legend in preview
  • Added stats file to the world and to the preview. Stats contain how many times each hub and each POI have been placed
  • Added search bar to preview. You can now search individual POIs by name and see where they are located
  • Improved POIs mode. POIs are now in the center of the map and the spawn point is always at 0,0.
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Good Morning KS.  Thanks for the latest update. I have an error on the first map created - for "Cities number" I chose "one", and it threw up 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 1298, in run
  File "world.py", line 266, in generate
  File "world.py", line 543, in init_cities
  File "world.py", line 641, in gen_cities
TypeError: gen_random_town() got an unexpected keyword argument 'single'

Line 17 in the poislist is "default_single_city,burnt_forest/snow/pine_forest/desert/wasteland,city,residentialold/residentialnew/downtown/industrial/commercial,80/100/120,130/150/170,180/200/220,1,,"  so I'm assuming the "single_city" isn't liked by something. "single" doesn't occur anywhere else. This list was generated this morning, but worked fine in 12.2. Any ideas?

pj

Link to comment
Share on other sites

2 minutes ago, paulj_3 said:

Good Morning KS.  Thanks for the latest update. I have an error on the first map created - for "Cities number" I chose "one", and it threw up 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 1298, in run
  File "world.py", line 266, in generate
  File "world.py", line 543, in init_cities
  File "world.py", line 641, in gen_cities
TypeError: gen_random_town() got an unexpected keyword argument 'single'

Line 17 in the poislist is "default_single_city,burnt_forest/snow/pine_forest/desert/wasteland,city,residentialold/residentialnew/downtown/industrial/commercial,80/100/120,130/150/170,180/200/220,1,,"  so I'm assuming the "single_city" isn't liked by something. "single" doesn't occur anywhere else. This list was generated this morning, but worked fine in 12.2. Any ideas?

pj

Thank you for reporting :). It is a bug in KingGen. I will fix and send an update in the next few days. You can avoid using only one city in the meantime.

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