Jump to content
Damocles

[A19] NITROGEN , a random world generator for 7DtD

Recommended Posts

16.jpg

It's a beautiful view...

 

I take it You don't have a city street generation right now?

 

By the way, everyone loves the mountains?

Unnatural mountains - the most common trouble of all generators.

In 16 alpha i did the generator settings that removed such high mountains - and it looked so natural!

It is not even necessary to make them low, but you need to make gentle slopes, and when the mountains are less common in the journey - they cause more admiration.

Otherwise, everything I've seen always looks like an extraterrestrial landscape in the distance.

 

Perhaps You should make it a standalone utility as soon as possible.

I understand that the convenience of programming is important for You now...but...You need to come up with something :)

Edited by n2n1 (see edit history)

Share this post


Link to post
Share on other sites

Hi Damocles

 

Thank you for the soluce, it works properly now (with the 64bit version of java)

Map 8k generated in less than 3 minutes.

Share this post


Link to post
Share on other sites
It's a beautiful view...

 

I take it You don't have a city street generation right now?

 

By the way, everyone loves the mountains?

Unnatural mountains - the most common trouble of all generators.

In 16 alpha i did the generator settings that removed such high mountains - and it looked so natural!

It is not even necessary to make them low, but you need to make gentle slopes, and when the mountains are less common in the journey - they cause more admiration.

Otherwise, everything I've seen always looks like an extraterrestrial landscape in the distance.

 

Perhaps You should make it a standalone utility as soon as possible.

I understand that the convenience of programming is important for You now...but...You need to come up with something :)

 

Cities also generate streets of course. Its nessecary for gameplay reasons anyway (certain resources).

 

17.jpg

18.jpg

19.jpg

 

The mountains: the game only allows terrain hights from 0 to 255 meters. Since some POIs have extensive underground areas, the normal hight of flat land is at 35 meters. So there is not much hight to play with. Realistic Alpine mountains would not work anyways.

The player can turn off each landscape type in the settings, if needed.

 

Also: since its a first person game (walking around), the scale of the world and its features need to be compressed compared to realworld landscapes. Skyrim is a good example of this. Everything (mountains, lakes, rivers) is actually very small, but seams huge from a distance to convey a scenic look and have enough variation in the landscape.

 

Each biome is used in a specific landscape type, and not randomly placed onto the terrain. I think thats visually more pleasing and plausible, than random blobs of biomes.

Edited by Damocles (see edit history)

Share this post


Link to post
Share on other sites

Hi there, I was wondering is there a way to access settings on your rwgmixer or are you gonna add more options for landscape, I created mountains and flatlands and maps are 80% or more high mountains, can we adjust the ratio or make desert/forest/mountain maps somehow? I would also like to add big or huge lakes instead of many small ones.

Share this post


Link to post
Share on other sites

I can add more variety in the future. The landscape dropdown has a variety of predefined mixes, that turn on an off more or less of the features.

I can make that ratio more specific on future versions.

 

Whole new landscape types would have to be made too, but that takes a bit more effort.

Things like swamps, high green mountains, very deep canyons on a high desert plateau.

 

I have not finished implementing big lakes (7DtD is quite picky about water flooding the level if not placed correctly, so that has to be done carefully).

There are lots of smaller lakes - at different elevations - dotting the landscape, to have a source of water available in all areas.

Share this post


Link to post
Share on other sites
Cities also generate streets of course. Its nessecary for gameplay reasons anyway (certain resources).

 

Whoa!

Well.... then why is there such a difference in the generation rate compared to the vanilla generator ? Nothing is free.

 

- - - Updated - - -

 

The mountains: the game only allows terrain hights from 0 to 255 meters. Since some POIs have extensive underground areas, the normal hight of flat land is at 35 meters. So there is not much hight to play with. Realistic Alpine mountains would not work anyways.

The player can turn off each landscape type in the settings, if needed.

No, i did not mean that you need to do the mountain higher. I was doing gentle slopes, global restrictions does not interfere here. I've seen real mountains, their base(footing) is very extensive.

 

Each biome is used in a specific landscape type, and not randomly placed onto the terrain. I think thats visually more pleasing and plausible, than random blobs of biomes.

Yes, this is a very important and fundamental thing!

Edited by n2n1 (see edit history)

Share this post


Link to post
Share on other sites

New version 0.21 (same Download-Link).

 

- Map now generates larger lakes.

 

- You can now import your own hightmap. (handdrawn, real data)

Its quite flexible, and takes any greyscale image, as long as its square. (read details in the readme.txt)

There is an example hightmap included, that I had drawn in a minute.

The generator will use the hightmap and generate the POIs and streets etc randomly ontop of it.

 

(The imported hightmaps also allow you to have nicely sloped mountains then)

 

20.jpg

21.jpg

23.jpg

Edited by Damocles (see edit history)

Share this post


Link to post
Share on other sites
Whoa!

Well.... then why is there such a difference in the generation rate compared to the vanilla generator ? Nothing is free.

Different approach how the map is generated. The vanilla RWG is probably putting a lot of effort into the noise-map generation, and its also embedded in a larger project, wich tends to slow things down.

 

(I also have full creative freedom ... if I want a feature, I just implement it. No design-paper to write and standup-meetings to attend to)

Edited by Damocles (see edit history)

Share this post


Link to post
Share on other sites

I may be being quite dumb but is there a way to make this load up the Ravenhearst POIs? I assume it has a heap of custom ones included as there are loads I never saw in vanilla. Would love to use this combined with Ravenhearst but have no idea what to do or combine!

Share this post


Link to post
Share on other sites
I may be being quite dumb but is there a way to make this load up the Ravenhearst POIs? I assume it has a heap of custom ones included as there are loads I never saw in vanilla. Would love to use this combined with Ravenhearst but have no idea what to do or combine!

 

RH uses its own RWG so no it is not (likely) to be compatible.

Share this post


Link to post
Share on other sites
I may be being quite dumb but is there a way to make this load up the Ravenhearst POIs? I assume it has a heap of custom ones included as there are loads I never saw in vanilla. Would love to use this combined with Ravenhearst but have no idea what to do or combine!

 

You can use NitroGen to use your custom POIs (or in this case import the Ravenhearst POIs)

 

For this you would need to edit the included resources/prefablist.txt

 

the format is like this:

 

business_old_01,COMMERCIAL;DOWNTOWN,2,-1,21,18,47,downtown

 

add a new line to this list, using the following format:

 

my_poi_name, something(not read), 2(face north), y-offset, x-wide, y-high, z-deep, NitroGet-Zone

the y-offset is usually -1 for most flat pois with a ground layer. The x,y,z dimensions are visible in the prefabeditor.

 

example: (if the POIs filename is called Ravenhearst_house_poi)

 

Ravenhearst_house_poi, COMMERCIAL, 2, -1, 34, 20, 45, smalltown;downtown;houses

 

(Then start NitroGen and generate a new world, and copy the generated world to the games "GeneratedWorlds" folder)

 

You can check if your prefab was inserted by looking at the generated prefabs.xml, and look for the pois name there. It defines its name and location in the world at startup.

 

...

 

I have not looked at how Ravenhearst is structured, but the POIs could be theoretically be copied to the vanilla prefab folder, and loaded by the game using the NitroGen generated world.

But is would then require to insert all af them into the resources/prefablist.txt for the generator to insert them into the map-file.

 

------

 

If anyone knows where the prefabs dimensions (x,y,z) are stored, other than inside the binary files, I could quickly write an importer for that.

The y-offset is descibed the prebals xml, but for knowing the dimensions I would have to open each POI in the prefabeditor and note it down... not fun.

 

The dimensions are needed for the generator to place the POIs correctly in the world, else they might float in the air, or are placed in a hole...

Edited by Damocles (see edit history)

Share this post


Link to post
Share on other sites

Hello Damocles,

first of all thanks a lot for this new tool which give us new way to make "custom" maps very efficiently and with great speed.

I'm really into it and as your versions update I'm sure to add custom prefabs on my list (will keep you inform of dimensions if so).

I generate around 10 maps and playtest 3 of them, You can have massive maps around 550ko prefabs size in 8k (which is to much tbf) and can adapt them to your playstyle easily so it's really good for that.

On the "minus" side it seems that ground level needs a small amount of smoothing because atm it felt too rough (spikes of land ground) imo.

The biomes are not my tastes but i have a good collection of them on my own so i don't really care but feel you should add more options on this side.

 

Can't wait for new additions to Nitrogen more water and stuff and i'm gonna give a try to HM generation which seems really cool.

Thank you for your work which is highly considerate.

Edited by Hell_Vice (see edit history)

Share this post


Link to post
Share on other sites

Hi, thanks for testing.

 

The maps get a smoothing run, but I could make the amount a settable parameter. Too smooth also looks boring.

 

The biomes where done relatively quickly, I can add more in the future.

 

Water is a bit risky at the moment. The small lakes work good, but the large lakes (filled into areas below 34 hight) use a different water spawn mechanicsm. And water in 7DtD is pretty "leaky", where a wrongly placed waternode can quickly flood the level. Hard to track down beforehand.

So the large lakes are at a set hight below any POI spawns. (small lakes can have any hight, as they are prepared more precisely using the POI methods)

 

As you can import your own hightmaps, I suggest to use the same size as the final map, else the generator runs some smoothing over it. You could use any graphical editor to draw your own map then, save it in a greyscale PNG and let the generator load and populate it.

 

When manually editing the biomes.png, 7DtD is very picky of using the exact color values. (use the vanilla RWGs output as a color reference). So you can also manually "paint" all areas in the biome of your choice, and replace the generated biomes.png... adding the dreadful wasteland biome in again for example.

 

You can basically create any map of your liking within 7DtD contraints that way... playing on a cat picture map for example.

 

For a "serious" multiplayermap, I suggest to replace the main.ttw file with one generated by RWG (just generate a map of the same size and copy it over), as I down know if there are issues with the unique identification of the gameworld in multiplayer. In singleplayer it works fine.

Edited by Damocles (see edit history)

Share this post


Link to post
Share on other sites

Couple of questions:

- Will there be support for the caves? :)

- Will there be support for multiple biomes? (now the code allows you to add a lot more types of biomes than vanilla)

- Still...32K support for those who don't care about memory. (if it's not difficult to introduce. But, those who want - can see for themselves the usefulness of this mode).

 

and...

perhaps, someday, when will get - You could share the generated map which in your opinion is very good, as a demonstration.

 

(well, to be honest for those who do not want to install Java, but want to see ;) )

Edited by n2n1 (see edit history)

Share this post


Link to post
Share on other sites
Couple of questions:

- Will there be support for the caves? :)

- Will there be support for multiple biomes? (now the code allows you to add a lot more types of biomes than vanilla)

- Still...32K support for those who don't care about memory. (if it's not difficult to introduce. But, those who want - can see for themselves the usefulness of this mode).

 

and...

perhaps, someday, when will get - You could share the generated map which in your opinion is very good, as a demonstration.

 

(well, to be honest for those who do not want to install Java, but want to see ;) )

 

Technically there are caves: several POI caves are placed in the world.

 

But if you mean procedural caves, or new POI caves: that would require to generate new prefabs, or directly change the game-code. In the generator I try to only create the "generatedWorlds" data, not other gamefiles to install.

 

Its not intended as a mod or conversion actually, but as a replacement for the original (current) RWG.

 

---

 

Biomes: I have not looked into the details of the biome xml definitions, but unfortunately changes to that would also require users to change the gamefiles, wich I dont want to do for now. I think thats more something for total conversion mods.

 

----

 

The problem with creating very large maps is the way the game handles the worlds data for starting up a new game.

For convenience it uses large png images (splat, biomes) and a raw terrain.map,

Each in one huge single file wich has to be loaded into memory.

Its bound to have limits then.

 

Up to 8k its totally ok to do it like that, but with 16k its already taxing the memory a lot.

 

If the game could load the generated worlds in chunks (8k map files for example) creating very large maps would be much easier to handle.

Generating 16k maps would only take 4 times as long as an 8k map (when considering proper transitions between the parts that is). Currently it takes much longer since the computer has to shift a lot of data around in memory.

Share this post


Link to post
Share on other sites

Hi, I just tried your maptool.

The speed the maps are generated is amazing.

I also happen to see a lot POI's i have never seen before, so that's great.

First map i got a Massive wall of water, the second time a fishing dock 10 blocks above ground, but now i got a really nice map.

Share this post


Link to post
Share on other sites

Yes, the water is still a problem, as a small missplacement can flood the map. I will put in an option to deactivate the large lakes, (there is a manual fix, by deleting the water from the water_info.xml, everything after the comment <!-- spawners for large lakes --> )

 

The fishing dock is one of the original Navezgane POIs that i have left in, it -and the other docks - are actually only suitable for a manually placed maps, but I think they are still interesting POIs to have. They just dont get placed well, as they are ment to stand in or at deep water.

 

Most usable POIs are in the list (including the skyscrapers like the dishong tower). Some POIs are left out, that are very specific to Navezgane, or where too complicated to include properly by an algorithm like the bridges or the "canyon ruins".

 

If the cities are too taxing on ther performance, its possible to make their size tiny, but spawn many of them. This spreads out the POIs over a larger area, yielding a higher framerate. (better option for players who like to travel a lot anyway)

 

The build times are not optimized yet. There could be even more performance gains with optimized algorithms and faster road generation. It should be possible to create an 8k map under 2 minutes when optimized.

Edited by Damocles (see edit history)

Share this post


Link to post
Share on other sites

Small Update v0.22 : lakes will lock terrain to avoid spilling water when a road is prepared nearby.

This should reduce the likelyhood of water flooding the level.

 

Added a feature to only use one biome type.

Edited by Damocles (see edit history)

Share this post


Link to post
Share on other sites
some weird results

 

bK675fxt.png

 

how did that get up there?!?

 

That can happen when a settlement (in this case probably the redneck trailerpark) get spawned very close to another town. The generator tries to keep the POIs of a settlement at the same hight, making some plateaus stand out. Not very often, but it can happen in densly populated maps with large elevation changes.

... the car in this case was abandoned by a drunk driver, diving off track to an unsuitable parking spot.

Share this post


Link to post
Share on other sites

Could you add an option for map size 12288 x 12288? Also a feature request, would you be willing to add a billboard to each town with the name on it? Something like "Welcome to Kiroki" or "If your the last to leave Marha, please turn off the lights"

 

Looks like in your readme this may work in Linux as well? Would i be able to send a long command line through an SSH console instead of it poping up the GUI?

 

Would be nice to be able to add switches to a command line argument "Java -Xmx8g -jar nitrogen.jar" --size 12288 --town many --townsize small

 

or even just expose the config file the GUI builds so that we can modify it if we run it from a command line.

Edited by morggin (see edit history)

Share this post


Link to post
Share on other sites

Great tool... but I can't expand the fields to read what they say. Fields remain truncated even when I maximize the program. Also tried adjusting other screen settings. It's probably something simple... but then again, I'm simpler!Untitled.jpg.729f0939e42daed3d781c836debf190a.jpg

Share this post


Link to post
Share on other sites
Could you add an option for map size 12288 x 12288? Also a feature request, would you be willing to add a billboard to each town with the name on it? Something like "Welcome to Kiroki" or "If your the last to leave Marha, please turn off the lights"

 

Looks like in your readme this may work in Linux as well? Would i be able to send a long command line through an SSH console instead of it poping up the GUI?

 

Would be nice to be able to add switches to a command line argument "Java -Xmx8g -jar nitrogen.jar" --size 12288 --town many --townsize small

 

or even just expose the config file the GUI builds so that we can modify it if we run it from a command line.

 

For the map sizes: I would have to check if the generator has any issues with non power of 2 map sizes. But its certainly possible to use other (square) map sizes from the architectural side - as long as there is enough memory assigned.

 

Steet signs would have to be based on prefabs. The generator is only using the included prefabs from the vanilla game, and does not generate new POIs. I could place the signs at the town edge, but not really change their look (blocks). Making procedural POIs would be a whole different project.

 

The program is pure standard Java, so it should run on a linux machine. I have not tested how the UI looks there.

I can have a look at running the generator from command line arguments or read the default settings from a config file.

Edited by Damocles (see edit history)

Share this post


Link to post
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...