Jump to content

A19e Nitrogen - UNSTABLE


Damocles

Recommended Posts

WARNING: This is a dead project. It was dropped before Alpha 19 went Stable, and compatibility has dwindled since then. As of Alpha 19.5 it is strongly recommended to avoid using this tool.

- the forum moderators

 

NitroGen,

This is a random world generator. It will create customizable random worlds for 7DtD. Configure your own personal world..

 

You can select:

-type of landscape (currently included are Forests, Alpine Mountains, Canyon Desert, Rocky Hills)

-the number and size of cities and towns

-the general number of POIs and smaller settlements (Farms, trailerparks, old western towns, etc)

-4k, 8k, 16k (experimental) or custom dimension maps

-the player start positions (far away, close to towns or random)

-the number and position of traders (close to cities and towns, or far in the countryside)

-even import your selfmade hightmap (play on a realworld terrain or a cat picture)

-spawn together in Multiplayer, and spawn near a town if you want

-the number of traders

-[dedicated server, Ravenhearst, Darkness Falls (see bottom of the post)]

 

DOWNLOAD:

Spoiler

 

for Alpha 19:

NitroGen v0.501 A19 (experimental) A19 experimental version (NOT STABLE)

If the link does not work for you, the file is attached.

NitroGen_WorldGenerator_v0501.zip

 

for Alpha 18:

NitroGen v0474

NitroGen v0.481 Experimental   (new highway feature and ability to generate several maps at once)

 

 

Performance: After you finished generating and installing the map, and want to play, close NitroGen, as it reserves a substantial amount of memory for the generation.

 

A19:  CompoPack temporary workaround for A19, prefablist by CrainBramp - removing some import errors of A18 POIs

https://pastebin.com/raw/hf7mhe2D  (overwrite the resources/prefablist.txt with this, or add a custom prefablist)

 

 

 

 

 

Want more POIs? check CompoPack

 

 

It will require you to have JAVA installed. (like old Minecraft...), you can get JAVA here https://www.java.com/en/download/manual.jsp

!! Make sure the DEFAULT is the 64bit version, if you have multiple Java versions installed !!

 

The world-generation will take around 4 to 5 minutes for an 8K map

 

This is a playble 4k example map, if you want to see the generated output:

Example 4k Map (Alpha 18)

 

 

(unregular updates):

https://twitter.com/TheDamocles

 

 

 

GUIv05.jpg

 

 

waterBorder.jpg

nitro1.jpg

 

[Overview by youtubers]

English:

 

German:

https://7days2die.de/alpha-18-x-rwg-nitrogen-tool

 

video by Survager (Russian)

 

some streamers using NitroGen maps:

stream by JonahBirch  jonahbirch

stream by the bearded guys gaming https://www.twitch.tv/beardedguysgaming
 

 

[Quick Guide]

 

Hit 'GENERATE WORLD' to create a default 8K map.

The world data will be saved to a folder (map name) inside the output folder.

 

You will have to copy the created world-files folder to your 'GeneratedWorlds' Directory for 7 DaysToDie

It should be somewhat like this: C:\Users\--MyUserName--\AppData\Roaming\7DaysToDie\GeneratedWorlds

 

Then you can start a new world from within the game (the generated world-name will show up in the selection when starting a new world)

nitro2.jpg

river2.jpg

 

This is Version 0.21, please test if there are any problem when running a multiplayer game (only tested in singleplayer at this time)

 

older A17 version:

NitroGen for Alpha 17 (stable)

 

 

----------------

 

[HOW TO RUN NITROGEN]

 

JAVA:

 

You would need to first install JAVA on your machine. Its a Java App.

You can check if you have Java installed and configured by typing java in the console .. something should pop up then

The java Runtime can be easily obtained from https://www.java.com/en/download/

 

INSTALL:

 

-just copy the NitroGen folder anywhere you like.

All required files are included in its sub-folders.

 

RUN:

 

-doubleclick the nitrogen.jar file (if JAVA was configured to run it)

-OR use the bat file, wich basically just runs:

-OR type:

 

java -jar nitrogen.jar

 

into the console

(Nitrogen should work basically on Linux too)

 

COPY FILES:

 

copy the generated map folder to your 7DTD GeneratedWorlds folder.

If you select preview map you can have a look at the generated gamemap PNG file.

 

-best is to delete a previous folder of the same map name, (especially the dtm_processed.raw file, wich would be loaded instead of dtm.raw)

 

 

START NEW IN GAME:

 

Go to NEW GAME and browse throug the gameworlds, the generated map should appear then.

 

-----------------

 

Troubleshooting:

 

#1 there where several issues discussed in this thread, you might find you solution when searching though the posts

 

#2 Can not get it to run, how does that work?

-The generator needs Java to be installed, preferably a 64bit version

-you can check if Java is installed AND configured by opening a console (cmd in Windows) and entering:

java -version

this prints out details about Java (it should state 64-bit Server somewhere, so you know it is pointing to a 64 bit installation)

 

#3 Out of memory error:

-if you see a out of memory error, you either run a 32 bit Java version, or did not reserve high enough heap memory. You can edit the .bat files to start the generator with more memory (4 Gigabytes should be enough for a normal sized map, defined with the -Xmx4G parameter, increase it as needed)

 

#4 It does not start generating:

-check if you extracted everything from the .zip to a folder (can be started, but cannot operate out of the zip)

-check if you already have an output folder with generated files, use the option "check folder" to allow overwriting

 

-----------------

 

[more recent] Post by MelT regarding dedicated servers:

Post by zootal regarding dedicated servers:

 

zootal said:
It is surprisingly easy to get this to work.

 

Step 1 should start like this:

 

 

1) I recommend you specify the save game folder for your server, this is what I put in serverconfig.xml:

 

<property name="SaveGameFolder" value="/home1/sd/saved_games" />

<property name="UserDataFolder" value="/home1/sd/saved_games" />

 

 

Create the directory, and under it create the directory GeneratedWorlds. If your server root is /home1/sd like mine is, you should have:

 

/home1/sd/saved_games/GeneratedWorlds

 

2) Make these changes to your serverconfig.xml, these are what I use but you can use whatever you want. In this case my server name is "Vomiting Spleens", and the game world and seed is NitroGenMap_4096_flat_snow. I'm not sure what would happen if GameWorld and WorldGenSeed were different, I didn't try to find out as I was a bit short on time. I kept them the same and it worked great.

 

<property name="ServerName" value="Vomiting Spleens"/>

<property name="ServerDescription" value="Vomiting Spleens"/>

<property name="GameWorld" value="NitroGenMap_4096_flat_snow"/>

<property name="WorldGenSeed" value="NitroGenMap_4096_flat_snow"/>

<property name="WorldGenSize" value="4096"/>

<property name="GameName" value="Vomiting Spleens"/>

 

3) Use NitroGen to generate your world, give it the same name you use for GameWorld above. I used NitroGenMap_4096_flat_snow because it was a 4K flat snow world.

 

4) Copy the directory NitroGenMap_4096_flat_snow from the NitroGen output directory to the GeneratedWorlds directory. You should have:

 

/home1/sd/saved_games/GeneratedWorlds/NitroGenMap_4096_flat_snow

 

5) Cross your fingers, pray to the diety of your choice, and start the server. It will take this template and generate the world:

 

/home1/sd/saved_games/NitroGenMap_4096_flat_snow

 

When the server finishes generating the world, join the server and enjoy!

 

This works for me, YMMV. The above creates a 4096 world, I kept it small for testing. After I saw that it worked, I then created a 16K world, which likewise worked great.

 

Try it and let us know what happens.

 

A18 tutorial from the official server admin staff:

Guppycur said:
To set up on a dedicated server:

 

Copy the world from Nitrogen/Output

 

to

 

7 Days to Die Dedicated Server/data/worlds

 

...so it would say something like

 

7 Days to Die Dedicated Server/data/worlds/guppy8kGaia

 

Change these two lines in your serverconfig.xml file

 

<property name="GameWorld" value="guppy8kGaia"/>

<property name="WorldGenSeed" value="guppy8kGaia"/>

 

...are both lines required? Dunno. Probably just need the top line,but um, it works so fuggit. 😃

 

A hint for hosting very large server maps: NitroGen creates several intermediary outputs during generation:

 

-genHM.png

-poiHM.png

-previewMap.png

 

They could be deleted before hosting the game, so the clients dont download those images (takes more time than necessary, and looking at the preview might spoil the exploration aspect.)

 

Preview POI colors: (by EpicSpire)

houses

mountain

alone

farm

citycenter

industrial

trader

carlot

---------------

Modding:

 

Prefablists (Ravenhearst, Darkness Falls, CompoPack) by other users (MelT, Xylvier):

All prefab lists in a single file (latest versions)

https://github.com/NickPhaedra/7-Day...refablists.zip

-> you need to manually replace / rename it to prefablist.txt in the resources folder

 

Prefablist-Generator by Xylvier

https://drive.google.com/file/d/1Wfp...hFInbvTuC/view

 

links:

https://7daystodie.com/forums/showth...l=1#post972744

https://github.com/NickPhaedra/7-Day...ee/Prefablists

 

Compo-pack prefabs: https://community.7daystodie.com/topic/21900-magolis-compo-pack-current-thread-by-wolfbain5-and-stallionsdenMcTaco Compo-pack prefabs-list for NitroGen:https://7daystodie.com/forums/showth...lt-gt-NitroGen

 

 

Edited by Crater Creator
attributing the warning (see edit history)
Link to comment
Share on other sites

Awesome!

 

Would love to chat with you regarding your generation approach. I'm still actively working on my generator too, I've gone down a detour a bit because I thought it would be interesting to generate a map with a maze in it, but I'm pretty much up to generating roads and towns, would love to hear your thoughts.

Link to comment
Share on other sites

Some technical details:

 

[POIs]

 

The POIs are selected from an included list, in a format such as this:

 

skyscraper_01,DOWNTOWN,2,-1,93,134,87,citycenter

 

(Name, 7dtd zone, face-north-direction, y-offset, wide (x), high (y), deep (z), NitroGen zone

 

the zone defines where it will be placed (on mountain, on a farm, only in cities, in trailerparks)

 

New POIs can be added simply by inserting a new entry with the Prefabs name, and its dimensions (can be seen in the prefab editor).

 

NitroGen can load any POI included with the game, so its also using several from Navezgane and some good looking work-in-progress POIs.

 

The POIs are placed onto the terrain at its chosen location (depending how high that settlement is allowed to be). Since the POIs have a very rigid base-floor, the terrain is smoothed to a plateau at this location. Else they would hang in the air, and we dont want that the happen ...

 

[ROADS]

 

Here a preview map that can be generated: (8K map, generates in about 4 minutes)

 

roads.jpg

 

The roads are placed between cities. They use classic map pathfinding (similar to A*) to find the route with the shortest distance, but also the least elevation change... just like people would build roads.

 

Then they smooth out the terrain a bit along the path and place the road-splatmap textures.

 

I have written the pathfinding algorithm within a few minutes as a prototype, and did not optimize it yet. A proper A* would be quite a bit faster...

 

-----------

 

The terrain hightmap is first rendered to a normal 8 bit png. Then processed by the POI mapper (roads and POI plateaus), then exported to the 16bit RAW hightmap and smoothed over.

 

6.jpg

10.jpg

8.jpg

9.jpg

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

So.... You made an RWG generator?...

I'd like to check it out, but I'll wait in the hope that it stops requiring a separate Java...

... so, it uses its own terrain algorithms? All this seems rather complicated...i'm even confused...

 

Hmmm....is 32K mode possible for crazy Russians?...(or there is a limit in the game itself?)

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

EDIT: I think i know what happened: Did you start it from within the zip file? It needs to be extracted first.

It has the same behavior when I do that, then not using it installation directory by using the system path.

 

 

If not, there is still an issue for it to use relative paths.

i will have a look into that.

 

Try to get into the directory with the jar via the commando line, and enter

 

java -jar nitrogen.jar

 

the should make it have the right local path.

 

---------------

 

 

Hmmm....is 32K mode possible for crazy Russians?...(or there is a limit in the game itself?)

 

32K would likely blow the memory. 16k is already quite taxing on it.

 

For such large maps, the approach how to create the output files would have to be reworked, creating it in small chunks.

unforunately the game requires to have everything in one large file. (terrain, splat maps, etc) and does not split it into smaller chunks at world-generation. but you can populate the maps with a LOT of POIs, making the world more filled than the vanilla RWG. Several thousand POIs should give everyone a good playfield.

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

I had unzipped it and clicked on the .jar file that's associated with java. I'll try the line item, but the 8k map did "more", it just never got around to generating the map. =)

 

I will fiddle around with the paths a bit. Lets see if this helps.

 

- - - Updated - - -

 

Works for me on 4k, but nothing on 8k.

 

Though when playing on the 4k world I generated it has crashed 4 times in 1 hour

 

Can you see a bug coming up the the console (F1) in 7DTD?

 

You could try a map that places less POIs, it might be a resource problem, or the map instantiated a POI that is not in your games prefab folder.

It loaded all of them in my vanilla 17.2 installation.

Link to comment
Share on other sites

//// but you can populate the maps with a LOT of POIs, making the world more filled than the vanilla RWG. Several thousand POIs should give everyone a good playfield.

Big worlds are just needed in order not to fill their POI, but to have a lot of space for travel.

 

You plan later to compile the project that he did not use the external Java?

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

I have just uploaded Version 0.11. (same link)

It handles file-path a bit differently and checks for the resources before starting to generate the map.

 

Hope this helps to track down issues with the working directory.

 

- - - Updated - - -

 

Big worlds are just needed in order not to fill their POI, but to have a lot of space for travel.

 

You plan later to compile the project that he did not use the external Java?

 

I can later bundle it with a Standalone Java implementation. But not for now.

(It would also increase the filesize quite bit to have Java included in the Installation, Java is quite bloated.)

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

Do you find your roads smoother than vanilla?

 

They are not really "smooth", but thats also on purpose, as I dont want the roads to looks like artificial cuts on the terrain.

...Consider them badly maintained local roads of a poor county..

 

The roads will have some very steep angles on very steep terrain, but in general are way smoother than the surrounding landscape.

 

And they are actually "build" after the terrain was generated and populated, so they can make large curves around mountains, go though valleys, avoid lakes and existing POIs.

 

There are still some issues when they meet the first POI of a city on higher terrain, as they might steel some soil from the POIs, wich are where placed already on flattened terrain.

 

Later I could include some more country side roads between towns, when the pathgeneration works faster. They are quite demanding to generate the more settlements there are.

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

Hey mate,

 

Looks really awesome, I'm definitely going to download and try.

 

Hey, I'm up to doing the road generation in my program, could you share any insights as to what to research for the path finding? Like is the algorithm called something specific? Also, it looks like you're using some kind of erosion algorithm? something I've also struggled to find a decent example of.

 

Cheers mate.

 

[Edit] Yeah, nevermind on the path finding, what kind of name is A*!!

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

Hey mate,

 

Looks really awesome, I'm definitely going to download and try.

 

Hey, I'm up to doing the road generation in my program, could you share any insights as to what to research for the path finding? Like is the algorithm called something specific? Also, it looks like you're using some kind of erosion algorithm? something I've also struggled to find a decent example of.

 

Cheers mate.

 

[Edit] Yeah, nevermind on the path finding, what kind of name is A*!!

 

Not used here, but a very interesting demonstration of using erosion on a Unity terrain ... if you want to try out dynamic erosion.

 

and the github source:

https://github.com/SebLague/Hydraulic-Erosion

 

---

 

For A* there are lots of tutorials. Its quite straight forward here:

-have a hightmap representation in memory

-scale it down to a usabe size (I have used a quarter of the hightmaps resolution)

-mark the position of POIs and other areas that should be avoided (by increasing the hightvalue on those areas)

-make a path between POIs (between towns), the heuristic used here are distance and elevation change.

-follow the path, and smooth the terrain along the way on the original hightmap

-in parallel draw the road splatmap pixels (there are only 2 road texture types I know of, so 2 pixel colors for the splatmap). There are some random pixels left out to make it a bit more jagged and looking overgrown.

Link to comment
Share on other sites

My daughter downloaded your map generator last night, and we played a multiplayer game for a few hours. Thanks for sharing this - it's so much nicer to start a map knowing it's not going to end up being over half burned and wasteland. It did take a while for me to download the map once she'd started it, but it worked just fine.

The ground outside the settled areas is quite... rugged. Some high hills/mountains, yes, but also just a lot of bumpy ground. Not necessarily a bad thing, mind you, but it made running across the wild areas visually challenging.

Link to comment
Share on other sites

Not used here, but a very interesting demonstration of using erosion on a Unity terrain ... if you want to try out dynamic erosion.

 

and the github source:

https://github.com/SebLague/Hydraulic-Erosion

 

 

Yeah, I found that repo too, downloaded the source (it's mostly the Erosion.cs) and then tried to apply it to my bitmap code, but it took some tweaking to get it to compile, and then doesn't seem to work. Like, it doesn't seems to erode properly, so I'm not sure. I might have to write it from scratch, which wouldn't be a bad thing I guess as I'd fully understand what's going on.

 

For A* there are lots of tutorials. Its quite straight forward here:

-have a hightmap representation in memory

-scale it down to a usabe size (I have used a quarter of the hightmaps resolution)

-mark the position of POIs and other areas that should be avoided (by increasing the hightvalue on those areas)

-make a path between POIs (between towns), the heuristic used here are distance and elevation change.

-follow the path, and smooth the terrain along the way on the original hightmap

-in parallel draw the road splatmap pixels (there are only 2 road texture types I know of, so 2 pixel colors for the splatmap). There are some random pixels left out to make it a bit more jagged and looking overgrown.

 

Yeah, since posting I did some reading on it. And I can see why it would be slow. Even still I'm going to give it a shot.

Link to comment
Share on other sites

My daughter downloaded your map generator last night, and we played a multiplayer game for a few hours. Thanks for sharing this - it's so much nicer to start a map knowing it's not going to end up being over half burned and wasteland. It did take a while for me to download the map once she'd started it, but it worked just fine.

The ground outside the settled areas is quite... rugged. Some high hills/mountains, yes, but also just a lot of bumpy ground. Not necessarily a bad thing, mind you, but it made running across the wild areas visually challenging.

 

Good to hear that you both had a good time.

That what I make those tools for.

 

You could generate a random map without the rough terrain (only mountains, flat land and forests). Thats the advantage of having configuration options in an RWG.

And also place more or less POIs, depending on how much you want to spend on walking through the terrain.

 

Wasteland and buring forest biomes are not generated. I just dont think they are making the game any better, and basically just annoyed me, every time I was in them.

i could add maybe a few small patches of burned forest here and there...

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

Updated to v0.12 - same download link

 

-new country roads (gravel) between towns (more roads overall now)

-more efficient road generation

-additional setting for landscapes with a more balanced default (more flat land, less rough terrain)

Link to comment
Share on other sites

Updated to v0.121 - same download link

 

-more roads overall

-some changes in default preset (8k singleplayer map, more flat land, less rough)

-player can spawn a bit closer to town/city when spawning far away

-some changes to the prefabs list

-more junk for rednecks

 

16.jpg

Link to comment
Share on other sites

@Bhaaltazar, thanks for the feedback, that everything worked correctly.

 

Its a different approach how to generate the world, than the included RWG. It gives me more control about the look of the landscape, and placement of specific settlement types (cities, towns, farms, trailer parks, mountains huts). I could easily add a grand canyon type landscape, or volcanos, or a south asian limestone mountains + blue sea type of area. (If there where the biomes and water for that)

 

The noise-map based approach of the vanilla RWG turns out to be very hard to handle. Its a tad too random for deliberate landscapes. The noise function based type of terrain generation works better for very large random worlds (flight sim, space sim), not so much for relatively small areas traversed in first person.

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

Hi

 

I try the V0.121, I have no problem to generate 4k Map (in less than 1 minute) but for the 8k it seems that there is a problem after 1h still nothing.

The program is stuck in running terrain generation .......

 

Does the generator complain about files already being in the directory? Its a safety check that can be turned off.

 

If not, this might be a case of Java running out of heap-memory. Its quite memory intensive to process the data. An 8k map should be done in about 3 to 5 minutes with the default settings.

 

Try starting the generator using the commandline option / edit the .bat startscript:

 

java -Xmx2G -jar nitrogen.jar

 

or even

 

java -Xmx4G -jar nitrogen.jar (for 4 GB of allocated memory)

 

 

---

 

If java complains about that, you might have the 32 bit version of it installed. In this case you would need to upgrade to a 64 bit Java to generate the large maps. (4k maps are quite ok for a singleplayer game though, as the world can be populated more densely).

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

Guest
This topic is now closed to further replies.
×
×
  • Create New...