Jump to content

A19e Nitrogen - UNSTABLE


Damocles

Recommended Posts

Hey, I'd really like to give this a go since RWG sucks so bad in A17. I downloaded your tool and the latest Java version, but when I start it using your batch file I get this warning:

 

#### WARNING #####

Cannot detect a 64 bit Java VM, you might run this programm in 32 a bit Java VM. please make sure you run a 64 bit installation of Java to avoid out of memory errors

##############

 

Then, when I try to generate a default 8K world, I get this error in the console:

 

Exception in thread "Thread-2" java.lang.OutOfMemoryError: Java heap space

at java.awt.image.DataBufferByte.<init>(Unknown Source)

at java.awt.image.Raster.createInterleavedRaster(Unknown Source)

at java.awt.image.BufferedImage.<init>(Unknown Source)

at nitrogen.terraingen.c.b(Unknown Source)

at nitrogen.gui.NitroGenUI.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

 

I have 64bit Windows 10 and 16GB of RAM. Why is this happening?

Link to comment
Share on other sites

Open a command shell (cmd in Windows), and type in

 

java -version

 

this show the version of java that the OS is using as active installation,

it might point to a 32bit version.

The 64 bit version is needed to reserve more memory for the larger map sizes.

 

Its often the case that several java versions are installed.

 

Can you tell me what java -version prints out?

Link to comment
Share on other sites

Here it is:

 

java -version

java version "1.8.0_211"

Java SE Runtime Environment (build 1.8.0_211-b12)

Java HotSpot Client VM (build 25.211-b12, mixed mode, sharing)

 

Also, here's this from the Java control panel. Seems to not be an x64 version that got installed. I wonder why?

 

Capture.jpg.99b93ea3cb1ae84459fb8ac3937399b3.jpg

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

I had to go to this link - https://java.com/en/download/manual.jsp

 

- and choose the Windows offline 64 bit installer to get it to install a 64 bit version. Now I get this:

 

java -version

java version "1.8.0_211"

Java SE Runtime Environment (build 1.8.0_211-b12)

Java HotSpot 64-Bit Server VM (build 25.211-b12, mixed mode)

 

And:

 

Capture.jpg.5d17b670d2e8262fc1a1574dbc6f52d3.jpg

 

Seems to be working now. Thanks for the quick reply and help, though!

Link to comment
Share on other sites

Thats why I've build in this version check message (Java can not clearly state what version it is using internal lookups for whatever reason),

Often there are several versions installed over time, and NitroGen is probably one of the few instances where that 64bit really matters (heap memory).

Link to comment
Share on other sites

I'm running a 16K NitroGen generated world. It works great, the world is beautiful, and my players are saying it's the best looking world they have ever seen. However, when anyone joins the server, the get a line in the client console that says:

 

EndOfStreamExceptoin Failed to read past end of Stream

 

There is nothing in the server log that I can see, but the client log has this:

 

2019-05-03T22:13:48 26.755 INF Started thread ChunkRegeneration

2019-05-03T22:13:48 26.755 INF Started thread ChunkCalc

EndOfStreamException: Failed to read past end of stream.

at PooledBinaryReader.FillBuffer (Int32 _numBytes) [0x00000] in <filename unknown>:0

at PooledBinaryReader.ReadInt32 () [0x00000] in <filename unknown>:0

at GameStats.Read (System.IO.BinaryReader _reader) [0x00000] in <filename unknown>:0

at NetPackageGameStats+<readStatsCo>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0

at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0

 

The client then proceeds to finish connecting to server and gameplay proceeds without any problem. The players can play for hours and nothing seems to be wrong anywhere.

 

Is anyone else running a 16K world and do your clients see this when connecting to server?

Link to comment
Share on other sites

Just wanted to comment on my NitroGen 16k world. It's the best looking world I've ever seen in A17, and really one of the best we have ever played. Dang fine work there! TFP should hire you to fix RWG!

Link to comment
Share on other sites

It is surprisingly easy to get this to work.

 

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" />

 

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.

 

 

 

In my serverconfig.xml file.....

 

 

<property name="ServerName" value="Map Test Server"/>

<property name="ServerDescription" value="Testing Generated Maps"/>

 

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

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

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

<property name="GameName" value="Map Test Server"/>

 

<property name="SaveGameFolder" value="C:\Tester Server Saves" />

 

 

 

_____________________________________________________________________________

 

 

 

Map directory is C:\Tester Server Saves\GeneratedWorlds\Fuddruckers

 

 

 

My server starts but the cmd window showing everything loaded flickers in and disappears.

Link to comment
Share on other sites

In my serverconfig.xml file.....

 

 

<property name="ServerName" value="Map Test Server"/>

<property name="ServerDescription" value="Testing Generated Maps"/>

 

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

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

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

<property name="GameName" value="Map Test Server"/>

 

<property name="SaveGameFolder" value="C:\Tester Server Saves" />

 

 

 

_____________________________________________________________________________

 

 

 

Map directory is C:\Tester Server Saves\GeneratedWorlds\Fuddruckers

 

 

 

My server starts but the cmd window showing everything loaded flickers in and disappears.

 

What is in the server log? That might tell us what the server does not like.

 

And does the server have read/wrote access to that directory?

 

I'm assuming Fuddruckers was a 4K world?

 

Your settings look just fine. I have a Windows 7 VM I'm going to try your settings on, and I'll get back here in about a half hour with my results.

Link to comment
Share on other sites

What is in the server log? That might tell us what the server does not like.

 

And does the server have read/wrote access to that directory?

 

I'm assuming Fuddruckers was a 4K world?

 

Your settings look just fine. I have a Windows 7 VM I'm going to try your settings on, and I'll get back here in about a half hour with my results.

 

I haven't checked the log...soon as I can find it I will see what it says :)

 

As far as I know the server can read/right to that directory

 

Not sure how to know if it was 4K. Did I have to pick that as an option?

 

My utter lack of knowledge on a lot of this stuff is showing through lol

 

 

EDIT: I did find this in the log file...

 

2019-05-04T16:11:31 2.172 ERR Error starting dedicated server: GameWorld "Fuddruckers" not found!

2019-05-04T16:11:31 2.256 INF Closing Terminal Window

2019-05-04T16:11:31 2.282 INF WinThread ended

2019-05-04T16:11:31 2.282 INF Ended Terminal Window

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

The default in NitroGen is an 8k map, you might just have to change the size to 8192 x 8192

 

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

 

You probably also have to change the name of the generated map folder (the one you copy over) to your chosen name,

the default folder name is NitroGenMap

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

I haven't checked the log...soon as I can find it I will see what it says :)

 

As far as I know the server can read/right to that directory

 

Not sure how to know if it was 4K. Did I have to pick that as an option?

 

My utter lack of knowledge on a lot of this stuff is showing through lol

 

 

EDIT: I did find this in the log file...

 

2019-05-04T16:11:31 2.172 ERR Error starting dedicated server: GameWorld "Fuddruckers" not found!

2019-05-04T16:11:31 2.256 INF Closing Terminal Window

2019-05-04T16:11:31 2.282 INF WinThread ended

2019-05-04T16:11:31 2.282 INF Ended Terminal Window

 

Yeah, it doesn't like something related to your world. I'm almost done setting it up to test on my end, I'll post back in a bit with results....

Link to comment
Share on other sites

My SaveGameFolder points directly to the generated world, not just the save-game root. perhaps it's that?

 

while my generated map is called map_test

 

Mine looks like this for example:

 

name="GameWorld" value="map_test"

name="WorldGenSeed" value="map_test"

name="WorldGenSize" value="122888"

name="GameName" value="map_test"

 

name="SaveGameFolder" value="/opt/sdtd/instances/map_test"

 

with my world stored in the servers "Worlds" directory. working perfectly. got a testserver and my community server up for weeks now.

Link to comment
Share on other sites

My SaveGameFolder points directly to the generated world, not just the save-game root. perhaps it's that?

 

while my generated map is called map_test

 

Mine looks like this for example:

 

name="GameWorld" value="map_test"

name="WorldGenSeed" value="map_test"

name="WorldGenSize" value="122888"

name="GameName" value="map_test"

 

name="SaveGameFolder" value="/opt/sdtd/instances/map_test"

 

with my world stored in the servers "Worlds" directory. working perfectly. got a testserver and my community server up for weeks now.

 

 

 

I get the same error with your settings.

 

The fix is to to set both UserDataFolder *and* SaveGameFolder to "C:\Tester Server Saves". Do that and it should work. Don't forget to un-comment them :).

Link to comment
Share on other sites

My SaveGameFolder points directly to the generated world, not just the save-game root. perhaps it's that?

 

while my generated map is called map_test

 

Mine looks like this for example:

 

name="GameWorld" value="map_test"

name="WorldGenSeed" value="map_test"

name="WorldGenSize" value="122888"

name="GameName" value="map_test"

 

name="SaveGameFolder" value="/opt/sdtd/instances/map_test"

 

with my world stored in the servers "Worlds" directory. working perfectly. got a testserver and my community server up for weeks now.

 

SaveGameFolder can probably be anything/anywhere you want, I think it is UserDataFolder that needs GeneratedWorlds under it, and then SaveGameFolder is where the actual saved world goes. In my case I set them both the same and it works. Sometimes I change settings and use different seeds/servers, so because of that my SaveGameFolders is the save game root, rather than the actual world save, but like I said I don't think it really matters.

 

I might be wrong, the serverconfig.xml documentation is a bit sparse and I don't have time to test it atm.... I just set both of them the same and it magically works. But I think his problem was he did not set UserDataFolder.

 

I blame that on my documentation, I neglected to mention that I set both of them, and he probably just followed my instructions. In that case I sincerely apologize - that is a critical step, setting UserDataFolder.

Link to comment
Share on other sites

Hey, Damocles, can you add to the post you copied to the main post here that gives dedicated server instructions?

 

 

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" />

 

 

 

 

My apologies to anyone that I might have messed up with that omission. I always do both and just assumed everyone else would also....

Link to comment
Share on other sites

I get the same error with your settings.

 

The fix is to to set both UserDataFolder *and* SaveGameFolder to "C:\Tester Server Saves". Do that and it should work. Don't forget to un-comment them :).

 

yup, that got it done is seems like so far....thank you very much.

you too Damocles

Link to comment
Share on other sites

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

 

-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)

Link to comment
Share on other sites

Bridges are not implemented yet, its a bit tricky to make them work properly.

 

Hey, have you seen this? If I understood correctly, the goal of the OP was to fix the bridges in Navezgane to achieve better stability. Maybe you could use his custom bridges to enhance the maps generated by your Nitrogen tool?

Link to comment
Share on other sites

Hey, have you seen this? If I understood correctly, the goal of the OP was to fix the bridges in Navezgane to achieve better stability. Maybe you could use his custom bridges to enhance the maps generated by your Nitrogen tool?

 

The topic was more about the prefabs details.

What I mean with tricky is less how the bridge has a smooth surface-terrain transition, and has more to to with matching roads to bridges (of fixed length) in a random map with random areas to bridge over.

 

Here there needs to be logic to:

-detect where a bridge should be placed

-have the road connect to both ends of the bridge

-create landfill for areas wider than the bridge

-have everything work in a straight line, as bridges can only be turned 90 degrees.

-place the bridge POI precisely and adjust the terrain as needed (so the ends of the bridge dont hang in the air)

 

Im also not super sure if the game will try to fill the area under the bridge POI automatically with terrain, as this would render bridges pretty useless.

Link to comment
Share on other sites

NEW VERSION (same download link) v 0.253

 

Can use city and town spawers for the mask (to define make your own town and city layout)

 

within the mask you can set 3 predefined colors

#1 solid Red: RGB 255,0,0 (full alpha 255) -> City Spawner

#2 solid Green: RGB 0,255,0 (full alpha 255) -> Town Spawner

#3 solid Yellow: RGB 255,255,0 (full alpha 255) -> help color (ignored)

 

wherever you set a city or town color PIXEL, a city or town is preferred to spawn there

the generator will (from top-left to bottom right) scan for pixels and spawn a city or town ad long as there are more to spawn,

(if you set more pixels than the number of cities, it will just ignore the spawners, in this case set the number of cities to spawn higher)

 

If it can not find a pixel it will spawn a city or town on a random suitable location as before.

 

beware: only use SINGLE PIXELS, as each pixel defines a spawner!

To make editing the mask easier you can set a yellow help color around those pixels, to make them easier to find.

The help color is regarded as passable area (not blocking POI spawns)

 

There is an example mask in the resource directory showcasing the city and town spawners.

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

The topic was more about the prefabs details.

What I mean with tricky is less how the bridge has a smooth surface-terrain transition, and has more to to with matching roads to bridges (of fixed length) in a random map with random areas to bridge over.

 

Here there needs to be logic to:

-detect where a bridge should be placed

-have the road connect to both ends of the bridge

-create landfill for areas wider than the bridge

-have everything work in a straight line, as bridges can only be turned 90 degrees.

-place the bridge POI precisely and adjust the terrain as needed (so the ends of the bridge dont hang in the air)

 

Im also not super sure if the game will try to fill the area under the bridge POI automatically with terrain, as this would render bridges pretty useless.

 

If detection is an issue, how about letting user manually place the mark so that Nitrogen would know where to put the bridge? Would that make it easier to start?

 

Also, I mentioned that thread because the bridge the OP showed in the screenshots looked like they could be repeated to make the actual bridge longer if needed and they do seem to have pillars for better stability, so making them longer shouldn't be an issue.

Link to comment
Share on other sites

If detection is an issue, how about letting user manually place the mark so that Nitrogen would know where to put the bridge? Would that make it easier to start?

 

Also, I mentioned that thread because the bridge the OP showed in the screenshots looked like they could be repeated to make the actual bridge longer if needed and they do seem to have pillars for better stability, so making them longer shouldn't be an issue.

 

Lets see, I will add some logic eventually.

 

Currently, you could add the bridge POIs manually by editing the prefabs.xml

 

something like

 

<decoration type="model" name="bridge_asphalt1" position="654,41,-247" rotation="1" />

 

where the second parameter in position is the hight (wich you probably need to run some tests to find the correct one)

 

those are the bridge POIs currently in vanilla:

 

//bridge_10x10_end_01,BRIDGE,2,-1,10,18,10,

//bridge_10x10_tile_01,BRIDGE,2,-1,10,18,10,

//bridge_asphalt1,BRIDGE,2,0,39,11,11,

//bridge_asphalt_broken,BRIDGE,2,0,39,16,11,

//bridge_concrete1,BRIDGE,2,0,39,11,11,

//bridge_wood1,BRIDGE,2,0,39,11,9,

//bridge_wood2,BRIDGE,2,0,32,10,7,

Link to comment
Share on other sites

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