• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

A19e Nitrogen - UNSTABLE

Status
Not open for further replies.
Yeah, I get not wanting roads everywhere. It's sparked my interest, so I might write some height weighted A* roads in Unity myself, but with a different method. Rather than connecting each node to 2 or 3 neighbour nodes, which can make redundant paths as well as leave two halves entirely disconnected, I'd pick one node to be the primary, eg. the biggest city, then connect every appropriate POI to that, but... any pixel previously set as road are re-weighted to extremely low cost (or just terminate the search) so every new road feeds into the nearest existing road, rather than seeking a specific neighbour POI, so you'd get a branching pattern spreading out from the "main" city. Maybe if a node finds another unconnected node while looking for the connected group, it can add a road there too...

 
Hey mate,

Trying to get Nitrogen to work on a Server Core VM, with only the dedicated server installed. Managed to get Java installed, had to change your batch files to point directly to java.exe. App runs, can't edit the output folder and clicking the open button throws and exception (no explorer.exe installed on Server Core). When I try and generate, it complains that it can't load resources and says the working directory looks wrong.

Can you please point me in the right direction. Also, would be good if the output folder text box wasn't locked so I could edit it.

Cheers.

 
You need to navigate via console to the nitrogen main directory and start the bat there locally. Java needs to find the resource folder in its working (active) directory. Thats usually the one the jar is started from.

The world folder is the created inside the output folder with the maps name.

The open command is just a convenience function to find the generated folder, using the explorer command.

 
Yeah, I get not wanting roads everywhere. It's sparked my interest, so I might write some height weighted A* roads in Unity myself, but with a different method. Rather than connecting each node to 2 or 3 neighbour nodes, which can make redundant paths as well as leave two halves entirely disconnected, I'd pick one node to be the primary, eg. the biggest city, then connect every appropriate POI to that, but... any pixel previously set as road are re-weighted to extremely low cost (or just terminate the search) so every new road feeds into the nearest existing road, rather than seeking a specific neighbour POI, so you'd get a branching pattern spreading out from the "main" city. Maybe if a node finds another unconnected node while looking for the connected group, it can add a road there too...
That would work too, as long as you always search towards the nearest next node (town). Not sure if that might end up looking like a snake then, not generating branching/crossing roads, but one long winded road.

I have made a galaxy map (like in EvE) once with a similar distribution pattern, balancing out connections and dead ends to keep it interesting, while assuring that every system is connected to the grid.

 
Last edited by a moderator:
Thinking out loud on roads a bit more, say there is a single 8 bit channel for the road, maybe grab the unused blue of the splatmap temporarily... each time a road is created it does a ++ to road pixels on this channel, values in those pixels divide the default weight when placing additional roads, so the more a road gets re-used, the lower the weight, the more likely it will get used again... this would create single pixel wide paths with a byte range of values, then the road intensity in the splatmap can be a function of those values, where 1 is a barely visible dirt track, and the highest values make wide asphalt freeways.

I don't think Unity is the best platform to make this in, it doesn't natively support TGA or 16bit images etc.

 
Hi, is Nitrogen compatible with the latest 17.3 exp or is RWG changed too much?
Worked fine when I tested it. Its independent of the build-in RWG.

I have to check if there are new POIs that can be added to the list, or changed dimensions.

 
Worked fine when I tested it. Its independent of the build-in RWG.
I have to check if there are new POIs that can be added to the list, or changed dimensions.
OK thanks for your reply, and your great tool!

 
Thinking out loud on roads a bit more, say there is a single 8 bit channel for the road, maybe grab the unused blue of the splatmap temporarily... each time a road is created it does a ++ to road pixels on this channel, values in those pixels divide the default weight when placing additional roads, so the more a road gets re-used, the lower the weight, the more likely it will get used again... this would create single pixel wide paths with a byte range of values, then the road intensity in the splatmap can be a function of those values, where 1 is a barely visible dirt track, and the highest values make wide asphalt freeways.
I don't think Unity is the best platform to make this in, it doesn't natively support TGA or 16bit images etc.
Its quite trivial to write your own 16 importer in Unity for raw arrays like the terrain here. Not sure about its import options for 16 bit greyscale pngs. Java can handle many different png formats. But im sure there is some C# library that can also do that.

 
Ok, after i posted the prefablist i created for Darkness Falls and posted it i got asked about that.I send him(i believe) my script(python2.7) to allow making a genuine list based on the prefabs in the "7 days to die/data/prefabs" folder.

He told me i should post it in the forum as maybe some others could have interest in using it, so here we go:

Need to mention, that i packed a zip which when extracted will need to be in the "7 Days to die/data" folder as "NITROGEN_prefablistgenerator".

In that folder you find a "parser.py" which is the python script and a parser.exe, for those that do not have python2.7 installed.

The exe comes with a few files needed to run in case you do not have python installed, so ignore all aside the parser.py/exe.

Once the parser is done, should not take too long, you find a "prefabslist.txt" in the folder.

This list will contain ALL prefabs in your data/prefabs folder, means you will need to go through it and comment out what is not needed/wanted or should be avoided. In that matter i can only advise to check with the "prefabslist.txt" that comes with the NITROGEN package from Damocles.

Also, be aware that my script only reads out what is in the prefabs tts and xml files. You will need to do some manual editing, as that can't all be done by a non sentient script XD

Hope it will be of use for some/one... ;)

https://drive.google.com/open?id=1Lg4kwi0R8VJl34lB74_sVM_Mah9LrXUz
sounds complicated, any easier way to do it?

 
Damocles, any chance to add totally flat maps to the menu option? I mean "Prairies Flat". I like now and then (mostly now lol) to have a map with no mountains or hills. Just miles of perfectly flat area that I can build and farm on. I already have edited it so I have a flat map now but would like it if I could generate new ones without having to copy over my files. I am a forgetful S.O.B. sometimes :)

If not no problem. I will still use NITROGEN with my own manual edit.

Thanks

 
Damocles, any chance to add totally flat maps to the menu option? I mean "Prairies Flat". I like now and then (mostly now lol) to have a map with no mountains or hills. Just miles of perfectly flat area that I can build and farm on. I already have edited it so I have a flat map now but would like it if I could generate new ones without having to copy over my files. I am a forgetful S.O.B. sometimes :) If not no problem. I will still use NITROGEN with my own manual edit.

Thanks
For version 0.3 I will add some more complex landscape types.

Currently you have the option of "mostly flatland", but wich still has some noise attached to it.

The easiest way to have a completely flat "construction map" currently would be to just create some square image (64x64 suffices here), and just fill it with a dark grey (rgb 36,36,36) or (rgb 60,60,60) if you want to build deeper under ground.

Export it as import_HM.png , and safe it to the resources folder (or the output folder if you import it from there).

And use the gen-mode "use import_HM.png".

(I guess you probably did that already, but also for others who read it here)

The map will then not have larger lakes, but enough smaller ones to have a water supply everywhere.

If its completely flat, it might be better to turn off the mountain huts, else the mapper has some troubles finding a suitable spot, and takes longer than necessary.

It might also be helpful to copy over a biomes.png map from another generated map of the same size,

so you have some variation in the biomes. (imported maps will only use forest, and add some snow onto the mountains).

 
Last edited by a moderator:
sounds complicated, any easier way to do it?
Sorry, i believe with the parser you already save yourself a good few seconds.

Considering that you would have to load every single prefab in the game editor and write down the measurements to then add them to the corresponding name and other information like zone, rotation and yoffset from the xml files.

Long story less complicated, if you want to generate a prefablist from exactly the prefabs used in your 7d2d installation with maybe mods or Overhauls (that add prefabs), then "parsing" the data/prefabs folder and manually editing/commenting out the lines you don't want NITROGEN to use, is the fastest and easiest way.

The extract, execute parser and comment out lines should not stop you from your endeavors.

Regarding complicated:

The zip file now only contains an parser.exe and a parser.py.

If you use the application, it will save you a lot time manually gathering data.

Should you have python installed (slightly doubt that though), you can use the script and it will do just the same.

Just make sure the zip is extracted in the "7 Days To Die\Data" folder and you are good to parse.

After that, go through the prefablist.txt file and comment out the prefabs you don't want NITROGEN to use.

Eventually Damocles may get more of the currently advised to comment out prefabs to work too.

Oh and to comment out, just use "//" at the start of the line, just in case.

Good luck

 
surely already asked and answerede, but i didn't read all pages of the thread, the option "vicious crack" how it works?

there is a way to make biomes bigger?

 
surely already asked and answerede, but i didn't read all pages of the thread, the option "vicious crack" how it works? there is a way to make biomes bigger?
You can turn the cracks on, wich will create deep ravines in the landscape. They are fun, but also might annoy some players. I left them out of the default for now.

The biomes are linked to the landscape features, you can increase desert and mountains (snow) in the landscape selector to have more of them.

Burned forest and wasteland are more sparse.

In v0.3 I will add some more landscape options and types.

 
For version 0.3 I will add some more complex landscape types.
Currently you have the option of "mostly flatland", but wich still has some noise attached to it.

The easiest way to have a completely flat "construction map" currently would be to just create some square image (64x64 suffices here), and just fill it with a dark grey (rgb 36,36,36) or (rgb 60,60,60) if you want to build deeper under ground.

Export it as import_HM.png , and safe it to the resources folder (or the output folder if you import it from there).

And use the gen-mode "use import_HM.png".

(I guess you probably did that already, but also for others who read it here)

The map will then not have larger lakes, but enough smaller ones to have a water supply everywhere.

If its completely flat, it might be better to turn off the mountain huts, else the mapper has some troubles finding a suitable spot, and takes longer than necessary.

It might also be helpful to copy over a biomes.png map from another generated map of the same size,

so you have some variation in the biomes. (imported maps will only use forest, and add some snow onto the mountains).

Yeah I already did make a one color map. I did not know which color I used though as I just used the eye dropper to grab a color and made the entire map that color. Thanks for the rgb color suggestions. Do you know off hand which color will give the thickest ground. The color I used made the surface 37m above bedrock. Wouldn't mind it a bit deeper.

As for the biomes, do you mean I can use any biomes.png from any other map I have made to add variation? It doesn't matter if I don't use the one that was generated with the map I am going to use?

Thanks again for the info.

 
Yeah I already did make a one color map. I did not know which color I used though as I just used the eye dropper to grab a color and made the entire map that color. Thanks for the rgb color suggestions. Do you know off hand which color will give the thickest ground. The color I used made the surface 37m above bedrock. Wouldn't mind it a bit deeper.As for the biomes, do you mean I can use any biomes.png from any other map I have made to add variation? It doesn't matter if I don't use the one that was generated with the map I am going to use?

Thanks again for the info.
Use 64,64,64 rgb for the highest level that does not complicate spawning cities.

Not sure (would have to check the code), I think they might spawn anyhow, but thats the normal preferred max hight they get spawned at.

You can use any biomes.png of the SAME size as the maps dimensions.

When editing the biomes.png yourself you have to be carful about setting the colors ALL precisely to the games color-palette.

You could just generate some other map, any copy it over for some variation...

 
trying it, feels great, very impressive !! i love the customization settings

streets connecting cities could be a little more straight/less egdy noise looks like the engennier had parkison

 
Damocles, incredible work. Love this thing.

Two things:

1: Any way to make the # of connecting roads user-input, instead of always 3? I've been making some twisty-canyon type maps, and my canyons end up having 3-4 parallel roads running down them to get between cities.

2: Is there a minimum land-mass, or maximum water, that it scales up if you don't meet? I made a custom HM of Hawaii's Big Island, but it's acting funky. My surrounding ocean is set to 15-20 height, but when it renders it pushes the entire map up until that area is 85, and the island shore starts at 100ish instead of 37. I've tried adding a couple 255 pixels, thinking it might block it from raising the map, but no luck.

 
Status
Not open for further replies.
Back
Top