Jump to content

KingGen - A Random World Generator for 7 Days to Die


KingSlayerGM

Recommended Posts

3 hours ago, drzachary said:

zztong_Tent_01,2,1,2,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,none,,
zztong_Tent_02,2,1,2,0,2,burnt_forest/snow/pine_forest/desert/wasteland,,none,,

 

I wouldn't put the Tents into your KingGen config file. While they were built in the Prefab Editor like a POI, they're really intended to be placed as decorations in the biome.xml file. The same is true of my Hunter's Traps.

 

Those tents are tiny pup-tents. As a decoration you'll come across them in the wilderness and sometimes in settlements. If you make them a POI, they'll chew up space that could have gone to more meaningful content. The biome.xml file in my modlet will take care of placing them for you even with a KingGen map. I think this is because decorations aren't part of world generation.

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

27 minutes ago, zztong said:

 

I wouldn't put the Tents into your KingGen config file. While they were built in the Prefab Editor like a POI, they're really intended to be placed as decorations in the biome.xml file. The same is true of my Hunter's Traps.

 

Those tents are tiny pup-tents. As a decoration you'll come across them in the wilderness and sometimes in settlements. If you make them a POI, they'll chew up space that could have gone to more meaningful content. The biome.xml file in my modlet will take care of placing them for you even with a KingGen map. I think this is because decorations aren't part of world generation.

 

Sweet!  Thanks for that detailed explanation.. I had no idea there was a difference!  I wonder how many decorations I have in my Prefabs... 😐

  • Like 1
Link to comment
Share on other sites

I like zztong's answer. I'm ok with the A16 campsites shown below, because they're a bit larger than a single tent, but there are quite a few interesting and unusual things around, still available from various 7D versions, plus odd items and ideas from other overhaul mods which I have used in my own pine forest here:  I especially like the nettles, ferns and burdock, as they really put some random "wild" into the wilderness. Adding them all is a little more complicated, but not difficult.
 

<append xpath="/worldgeneration/biomes/biome[@name='pine_forest']">
        <decorations>
            <decoration type="prefab" name="pond01_A16" prob="0.0002" rotatemax="3"/>
            <decoration type="prefab" name="dec_undergrshelter_A19" prob="0.0001" rotatemax="3"/>
            <decoration type="prefab" name="dec_driedPuddle_A19" prob="0.0008" rotatemax="3"/>            
            <decoration type="block" blockname="plantedMushroom3Harvest" prob="0.0045"/>
            <decoration type="block" blockname="plantedCorn3Harvest" prob="0.001"/>
            <decoration type="block" blockname="plantedPotato3Harvest" prob="0.004"/>
            <decoration type="block" blockname="plantedBlueberry3Harvest" prob=".0015"/>
            <decoration type="block" blockname="plantedGoldenrod3Harvest" prob="0.007"/>
            <decoration type="block" blockname="deadTree01Fall" prob="0.0004" rotatemax="3"/>
            <decoration type="prefab" name="dec_laddertree_A16" prob="0.0008"/>
            <decoration type="prefab" name="xcostum_deerstand_1(by_Axebeard)" prob="0.0008"/>
            <decoration type="prefab" name="xcostum_deerstand_2(by_Axebeard)" prob="0.0008"/>    
            <decoration type="block" blockname="lootBagsBackpackHelper" prob="0.0002" rotatemax="7"/>
            <decoration type="block" blockname="fern01" prob="0.18" rotatemax="7" />
            <decoration type="block" blockname="nettle" prob="0.18" rotatemax="7" />
            <decoration type="block" blockname="burdock01" prob="0.18" rotatemax="7" />            
            <decoration type="prefab" name="campsite_01_A16" prob="0.00005" rotatemax="3"/>
            <decoration type="prefab" name="campsite_02_A16" prob="0.0001" rotatemax="3"/>
            <decoration type="prefab" name="campsite_03_A16" prob="0.00005" rotatemax="3"/>
            <decoration type="prefab" name="campsite_04_A16" prob="0.00005" rotatemax="3"/>
            <decoration type="prefab" name="campsite_06_A16" prob="0.00005" rotatemax="3"/>
            <decoration type="prefab" name="campsite_06a_A16" prob="0.00005" rotatemax="3"/>
            <decoration type="block" blockname="treeBush01" prob="0.003" rotatemax="7"/>
            <decoration type="block" blockname="treeBush02" prob="0.003" rotatemax="7"/>
            <decoration type="block" blockname="treeBush03" prob="0.007" rotatemax="7"/>            
            <decoration type="block" blockname="Trunk01" prob="0.0005" rotatemax="3"/>
            <decoration type="block" blockname="Trunk02" prob="0.0005" rotatemax="3"/>
        </decorations>    
    </append>   

Great hobby!

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

23 hours ago, drzachary said:

 

Sweet!  Thanks for that detailed explanation.. I had no idea there was a difference!  I wonder how many decorations I have in my Prefabs... 😐

 

I don't think there are many Decorations out there in mods. I could be wrong.

 

Size would be a good indicator. My traps are 3x3, my tents are 2x3, IIRC. There might be one tent that is larger. Most TFP Decorations are a single block.

 

You could experiment with zztong_Storm_Cellar_01 which I have marked as a POI, but it is potentially small enough that you might try it as a Decoration on level ground. I don't think it will work out well, plus it would be weird to just find a random Storm Cellar off in the wilderness. For A20, that Storm Cellar will become a Part for farm POIs... or at least that's my plan since I don't have A20 I cannot work ahead to have something ready to go with an experimental release.

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

7 hours ago, BulkBoganTheThird said:

Original problem I figured out, new problem is, how do I use Min/Max? It keeps generating 24 of a building that is so damn big and fancy that it feels unrealistic. I tried adding 1,2 to the end but it gives me a error about float or something

 

I'm not part of the KingGen team, but I suspect they'd want to know some details, like the stack trace for the error and the configuration you're trying, such as a sample line where you added the min and max.

 

Your "error about float or something" sounds kind of like an unexpected type cast. If so, then there might be some value in your configuration file that it was hoping was in a different format. (Maybe text where a number should be?)

 

Based on your description, I'm curious. Did you take something like this...

 

abandoned_house_03,21,16,28,-1,2,burnt_forest/snow/pine_forest/desert/wasteland,wilderness/city/town/rural,residentialold,,

 

... and make it A or B...? (The difference is 1 comma)

 

A: (incorrect)

abandoned_house_03,21,16,28,-1,2,burnt_forest/snow/pine_forest/desert/wasteland,wilderness/city/town/rural,residentialold,,1,2

 

B: (correct)

abandoned_house_03,21,16,28,-1,2,burnt_forest/snow/pine_forest/desert/wasteland,wilderness/city/town/rural,residentialold,1,2

 

... as if you just added 1,2 to the end then you gave it too many parameters. There were already enough commas and you just had to fill in the blanks. If this was the problem, and you fix it, I've no idea how it threw an "error about float or something."

Link to comment
Share on other sites

  • 3 weeks later...
On 10/24/2021 at 9:51 PM, zztong said:

... as if you just added 1,2 to the end then you gave it too many parameters. There were already enough commas and you just had to fill in the blanks. If this was the problem, and you fix it, I've no idea how it threw an "error about float or something."

 

An "error about float or something" might happen if a . was used in place of a ,

  • Like 1
Link to comment
Share on other sites

Is anyone able to generate a single biome world (in my case now) biome world?

I tried 2 different single biome worlds, cities medium, city size medium, trader located in city.
When I get to the trader starter quest it says "No Trader", and no waypoint is on the compass/map.

Simply turning off single biome generated a world with the trader, but I hoping to do an all Snow map playthrough.

Link to comment
Share on other sites

19 minutes ago, Blayr said:

Is anyone able to generate a single biome world (in my case now) biome world?

I tried 2 different single biome worlds, cities medium, city size medium, trader located in city.
When I get to the trader starter quest it says "No Trader", and no waypoint is on the compass/map.

Simply turning off single biome generated a world with the trader, but I hoping to do an all Snow map playthrough.

The trader quest is only for traders in pine forest biomes.  If you got a single biome that is not pine forest, it won’t point you to the nearest trader.

Link to comment
Share on other sites

Here you go, Blayr: (Sorry, BFT2020!)  ( 😉 )  The answer is in the king_gen_config.txt. It has a dozen or more Traders. You should be able to make one yourself. The biomes.png, preview and a (New Zealand) heightmap are included too. I's an 8k map made a minute or two ago.

 

https://1drv.ms/u/s!AueVg7eVAeXMlRifZDxHM2fF29E_?e=PPy2sz

A
TB

pj

PS - that HM is a bit steep in the mountain areas, I have others of the same HM but less "mountain y" and more "hill y", if you want that particular HM..

PPS.. In thinking a bit deeper.... (I don't usually do the Quests) - BFT might be right about the need for a pine forest... in which case I apologise... but you can still play a full-on snow biome without the quests. . .   😎

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

Yes I was (I looked in the file to verify - not being cocky here as I will admit when I am wrong)

 

In the Quests xml file, you would need to change the following for the trader request

Quote

 

        <objective type="Goto" id="trader" value="5" phase="1">
            <property name="biome_filter_type" value="OnlyBiome" />
            <property name="biome_filter" value="pine_forest" />
            <!-- <property name="biome_filter_type" value="ExcludeBiome" /> -->
            <!-- <property name="biome_filter" value="wasteland" /> -->
            <property name="nav_object" value="go_to_trader" />
        </objective>

 

I will see if removing those lines opens up to any biome.  I think this was done to prevent people from having to go to harder biomes at the start of the game.

 

Edit:  yes, removing (or making into comments) the top 2 property name lines above fixes that issue.  I just did a desert only map and it found the nearest trader.

Edited by BFT2020 (see edit history)
  • Thanks 3
Link to comment
Share on other sites

Yes - me too.  Humilty is a precious virtue nowadays, i fear, BFT!  😄..  I just included a Desert Size=large, thinking that might be seen by KG as a second biome, offsetting the snow being dropped down to 38, and below the 43 water level. I didn't give credence to the Quest part until re-reading Blayr's post again, and then yours. 

Link to comment
Share on other sites

2 hours ago, BFT2020 said:

The trader quest is only for traders in pine forest biomes.  If you got a single biome that is not pine forest, it won’t point you to the nearest trader.

 

I have had a different experience (but that was playing under darkness falls so plausibly was a consequence of that mod).

Link to comment
Share on other sites

Link should be to a modlet I just created that will modify the file for anyone that is interested (remove conditions for initial trader quest)

 

https://github.com/BFT2020/MyMods

 

Let me know if this doesn't work (the link as this is the first time I am using github)

23 minutes ago, VicWint said:

 

I have had a different experience (but that was playing under darkness falls so plausibly was a consequence of that mod).

KhaineGB has a quest file in his mod that does the same thing, except he excludes Wasteland biomes

Link to comment
Share on other sites

1 hour ago, Nukem said:

Anyone know how to get cities to gen in the snow biome as well? snow elevation perhaps?


You need a cities.png map. Can you use the free GIMP software? If not - then Tallman Brad on the first page of this topic has a beautiful series of videos showing the whole process of map creation.

 

pj

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

9 hours ago, paulj_3 said:


You need a cities.png map. Can you use the free GIMP software? If not - then Tallman Brad on the first page of this topic has a beautiful series of videos showing the whole process of map creation.

 

pj

Thanks for this PJ appreciate it.

  • Like 1
Link to comment
Share on other sites

Hello all. I seem to be having an issue with using a custom zoning map. I have no idea what the issue is. Without it selected, the map generates fine, but it doesn't zone in things where I'd like them, and it doesn't seem to be using the custom zones at all.

 

I've posted the maps I'm using here: https://github.com/recognizerHD/7dtd-map

 

Any idea what's going on?

 

Generating heightmap.
Generating biomes.
Generating cities.
Generating water.
Generating roads.
Generating villages.
Generating random pois.
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 1301, in run
  File "world.py", line 274, in generate
  File "world.py", line 692, in gen_random_pois
StopIteration

 

Link to comment
Share on other sites

Hi Recog: I haven't checked the Zoning + Custom colors for a while - I don't think KS has changed them, but I may be wrong: These are the last colors I saw stated here:

Old Res = 255.100.0

New Res = 255.255.0

Downtown = 0.255.0

Industrial -= 0.0.255

Commercial = 255.0.255

Old West = 161.81.0

Wilderness = 255.0.0

+ the Trader and SP.

 It might also be something to do with the alpha layer and that 'checkerboard' transparency that shows as a "sort-of' background. I don't see that on my any of zones/city/biome mappings.

Fixed!  It is the checkerboard. I deleted the Alphas in each of the png's, then added them back by simply - under top menu  - "Layer" -> "Transparency" -> "Remove Alpha Channel" -" then "Color to Alpha", which adds it back in as white. I then ran KG, and it made what looks (to me!) a good map in one shot. I'll put them up on my OneDrive and post the link back here in a sec.

pj

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

Here's the link: I've posted all four, with the three RGB png's converted, and two are fairly big ( at 10k - size)
https://1drv.ms/u/s!AueVg7eVAeXMlR5ty6-37KeGexWF?e=iNgLja

Quick pic of the preview here:  (Nice volcano!)  Krunchy will be proud!

 

A quick edit here, too, Recog: I had the water set at an earlier map's height: I've corrected it now to 43/60 so it'll look more as you expected it to. I still haven't figured the town/village street  - the "+" shapes that are used as default roads inside the cities. In this map - and most others - "small" or "medium" doesn't seem to make the slightest difference - the towns all have short lengths of grass joining them up, whereas the city streets are all as one would want. Hmmph.

 

Preview_pic.JPG

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

Thanks for the help. The dirty secret is I just looked up a height map of a volcano then took inspiration of Mount Saint Helens to blow out the side. Used the smudge too like crazy. The look of it is more luck than anything :)

 

I may need to leave the zones out or at least restrict it to the original colours. Was attempting to have some control over them but it wasn't working like I had hoped. Those extra colours are part of the Magolis Compo Pack.

 

In the POI list:

@zones
# A zone is a group of POIs.
# ***** !!!!! DO NOT REPEAT THE SAME COLOR MULTIPLE TIMES !!!!! *****
# name,red,green,blue
#    name: name of the zone
#    red: red value of rgb color
#    green: green value of rgb color
#    blue: blue value of rgb color
residentialold,255,100,0 #orange
residentialnew,255,255,0 #yellow
downtown,0,255,0 #green
industrial,0,0,255 #blue
commercial,255,0,255 #purple
oldwest,161,81,0 #brown

#COMPOPACK POIS
Medieval_Zone,201,153,107
Asia_Town,184,132,160
Area_51,94,125,122
Farmers_Community,131,166,114
Destroyed_Zone_1,125,91,96
Destroyed_Zone_2,21,102,94

 

  • Like 1
Link to comment
Share on other sites

OK... Quick way:-

1). First copy your default game's "Prefabs" folder somewhere in case something gets screwed up, then - add your extra prefabs into the game's "Prefabs" folder. Just copy them into it.
2). Start KG - go into the "Advanced settings"

3). Select "Generate custom POIs list"
4). This will take you to the "Prefabs" folder (or should - but if it's the first time you're doing this, you might have to browse to it)
5). As you click  that folder - it will automatically put it into the "Folder" box at the bottom of the browse window. Hit "Select Folder".
6). This will then take you to a second browse window, where it's now looking for a "File name", so just type in "poislist.txt", and hit "Save"

7). It should now pop back into the KG Advanced settings, where you should see the new poislist.txt in the "POIs list" box. If it's not there, just down arrow in the box, and it should be there. I've always found that a bit "fiddle" and have often had to do the above twice before the filename actually got there!

Hope this helps!
 

Edited by paulj_3 (see edit history)
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...