Jump to content

A19e Nitrogen - UNSTABLE


Damocles

Recommended Posts

Relating to the request to edit the generated map separately to the final world generation, its not implement as a workflow, but can be done with a workaround:

 

#1 generate the map as wished

#2 wait till everything generates (or cancel early after the genHM.png and biomes.png where saved.)

#3 save the biomes.png to another location

#4 copy the genHM.png to the resources folder, and rename it to import_HM.png (replacing the example custom hightmap image)

#5 (do your custom edits to the biomes.png and genHM.png as required, for example replacing the biome pixels or changing the hightmap details such as painting a river)

#6 restart the generation, and choose "use import_HP.png" (make sure to use the same map dimensions)

#7 after the world is finished, replace the generated biomes.png with the saved one

 

This way you can already alter the worlds landscape manually, if you need specific details on the otherwise random map.

 

The POIs are placed randomly, so there is no way currently to set specific city locations. That could be a feature, using some kind of marker map...

 

----

 

There is a bug with the biomes.png generated from an imported HM (putting snow in high mountains): the png is exported flipped upside down, I have to fix that.

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

Nitrogen is using the standard Java pseudorandom number generator. The seed is determined by the systemclock, and thus random enough for this kind of purpose. (Not for cryptographically secure number generation)

 

In the end all computers are deterministic, so “true” random numbers cannot come from them. The best method would be to capture some real world (space) noise signal, or simpler just capture the mouse movement of the user to periodically update the seed.

 

Most rng will just use the system clock. So unless you want to use it for strong encryption or simulating physics, this is totally enough.

 

The advantage of rng is that it IS deterministic. So in the case of the vanilla world generator it allows the user to pass the seed to others to generate the same output. In nitrogen this makes less sense as there are lots of configuration options that would also have to be set precisely the same.

Thanks for reply!

I remember that chips from Intel (I think i810 series) contain a hardware random number generator, but then it seems that they stopped doing it.

Why i asked about this - i have very often generated worlds to customize biomes, and noticed that i sometimes get a series of similar results until i reboot the operating system. I used seed generator https://7daystodie.com/forums/showthread.php?33014-Random-gen-for-world-s-seed&highlight=seed from Argeos, and watched the length of the numbers affect that.

 

Thank You for adding custom map size!

I believe that there is sense increase our RAM if enormous the world this is worth!

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

all export are flipped upside down Damocles atm to use a heightmap i switch it vertically before using it as import_HM (to be on the right side) and for preview map generated i reswitch it again to have the correct map.

Edit btw 12k maps are fine :)

 

Yes, the game is loading in the maps from the "bottom up" instead of "top down".

So if you want to see the actual ingame map, you would have to flip the preview vertically.

 

Doing that while exporting the preview would require more memory, wich I did not want to impose on the user.

(the preview is mostly used for debugging)

 

If you use the generated biomes.png when using a custom imported Hightmap, there is still a bug, exporting it flipped.

So snow might appear on flat ground, instead of the mountain tops. You could use a workaround by manually flipping the png for now until that is fixed.

Link to comment
Share on other sites

When I have time I could make a mask-image to import, that can mark nospawn and preferred spawn areas.

(easily drawn in Photoshop as a separate layer over the custom terrain)

 

This should give the user all the options to define the rough layout of the POIs in the map, without having to place them by themself.

Link to comment
Share on other sites

You can always help me by telling others that a tool like this exists.

 

Will definitely do that! At the moment I cannot get it to work though. Been at it literally non stop and I cannot complete the generation of the world files no matter what..

 

ATM stuck in an infinite loop of " Biome image contains unkown biome color RGBA(225, 161, 0, 225) at *

 

 

I have not edited the biome file at all, so it must be generating unknown colors then :s

 

I tried changing the radiation border from burnt to wasteland suspecting it might be that color being off, but it is still producing same issue. Could it be somehow the colorhex of temperate, snow or desert has changed or is wrong by default?

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

those are the colors used, in ARGB format, (starting with the alpha)

-the game is pretty picky about loading the correct values-

 

public static final int BIOME_COL_FOREST=0xFF004000;

public static final int BIOME_COL_SNOW=0xFFFFFFFF;

public static final int BIOME_COL_DESERT=0xFFFFE477;

public static final int BIOME_COL_BURNED_FOREST=0xffba00ff;

public static final int BIOME_COL_WASTELAND=0xffffa800;

 

RGBA(225, 161, 0, 225) looks like that the image was saved with the alpha and other channels "lowered" by the same amount. This color looks like the wasteland color.

 

Did you manually edit the biomes.png, having transparency set to a certain smaller level?

(The newest version is 0.241)

Else I have to see if there is some bug somewhere.

 

Can you tell me all the parameters you set when generating the map?

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

I didnt edit the biomes.png at all, so something was wonky on output. I have managed to get a world loaded now, but only upon selecting the "only greenland" option, I fooled around with about 15 different generations trying to get them to load. Cant quite recall the settings. I wonder if theres something off with the desert color?

 

Managed to finally generate one world though, and it looks absolutely stunning! But something is wonky with the biomes.png selection

Link to comment
Share on other sites

Thats really weird. I had no problems of this type yet.

 

Maybe you can open one of the (not working) biomes.png in a graphics editor (GIMP, Photoshop), and check the colors.

 

They should be:

 

(Hex, RGB)

 

004000 or 0,64,0 -> forest

ffe477 or 255,228,119 -> desert

ffffff or 255,255,255 -> snow

ba00ff or 186,0,255 -> burned forest

ffa800 or 255,168,0 -> wasteland

 

If they are not, there seems to be some differing behavior with the png export on your system/java version combination.

 

You could as a workaround replace the colors in the biomes.png with the above mentioned values, (everything fully opaque, alpha = 255, so no transparent pixel)

(In Gimp you can just select a color, change to the target color and overpaint the selection)

 

If the colors are correct however, there must be some issue in 7DtD when importing the png, and decoding it.

 

Also check if the biomes.png has the exact same dimensions as the map pngs. Maybe the image got stretched, thus altering the color values.

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

Having added multiple biome files in the past, the only instances where i got those errors was when i forgot to disable antialiasing for my paint-tool and the second time where i resized with a smoothing option, inventing new colors.

 

15mins for a nice 10k map. I'm thrilled. With your workaround workflow, it works really great.

 

A mask-image would be perfect.

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

64 bit java fixed any issues. Im generating 4k maps with 32gb of ram in about 45 seconds. I ran 2 varations of the names I normally use and these maps look INCREDIBLE. Game changer for me for A17. I let you know how it goes with 16k. Thank you very much!

 

 

 

EDIT: Ran a 16k map in 9 min 22 sec, looks like a very well rendered A16 map, so good. If people were missing good mountains, they are back. Tossing all my 17 maps and starting over with these. THANKS!

 

 

Heres the first 16K map with the trees etc turned off. Map looks so good I might leave em off.

 

https://imgur.com/UX8D4Ms

 

https://imgur.com/k6HtKIj

 

https://imgur.com/VSKuCkB

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

The ore clusters and detail vegetation/stones etc cant be defined by the world files. Its generated by the game after importing the world-files and generating the actual chunks.

So the only way for caves I see is creating cave-POIs currently. (NitroGen loads 4 caves from the prefabs, so technically there are some)

Once there are new cave-prefabs, they could be easily added to the NitroGen list of prefabs.

 

Procedural caves would be something they have to define in code, when generating the chunk voxels.

Or have additional imports for the world files. (like a voxel "overwrite patch")

Link to comment
Share on other sites

Is there any plans to put this up in Git? I wouldn't mind toying around with the world generation. Like removing the sand from ore clusters to produce caves.

 

That's actually defined in the biomes.xml file.

 

This tool just generates the world, then that XML file populates the ore, trees, decorations, etc when you load it. :)

Link to comment
Share on other sites

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