Running the server with a flat height generator
#1
I want to start working on this issue https://github.com/mc-server/MCServer/issues/1606 . In order to reproduce the problem I would need to generate a world with a flat height (if i understand correctly).

Could anyone guide me on how to do this.
Reply
Thanks given by:
#2
Hello, welcome to the forum.

You should make yourself familiar with the world configuration file, world.ini. It has all the settings that you want to manipulate in order to test this issue. We have a somewhat dated page about it in the wiki, it hasn't been updated for a year, so some of it is no longer valid, but it will at least give you the overall feel for things and it does indeed contain all the info about flat world generation: http://wiki.mc-server.org/doku.php?id=co...or_section

Basically, you need to set your [generator] section in world.ini to contain:
Code:
[Generator]
HeightGen=flat
CompositionGen=<use various values for testing; Biomal is the default>
Finishers=<first use none (empty), then try adding more and more; these are the ones failing the most>
FlatHeight=255
Also, drop a note in the GitHub issue saying you're working on it, so that someone else doesn't try it as well needlessly. (I see you've done it already, good thinking)

Finally, there's an (unfinished) article in the repo itself about how MCServer generates terrain. It might give you insight into some of the internal workings. This is the file in GitHub, but it's better to open it directly from your repo clone: https://github.com/mc-server/MCServer/bl...rator.html
Reply
Thanks given by:
#3
You might want to test the generators with FlatHeight=0 or FlatHeight=1 as well, there might be issues with that, too.
Reply
Thanks given by:
#4
This does not work for me, independent of what I set for flat high, it generate 3d terrain anyway.
Reply
Thanks given by:
#5
Where is the world.ini file being parsed. It could help me find the correct configuration. I'd like to read the code to understand the different options. I get a standard 3d world also.

Great job on the world generation documentation, it's really interesting.
Reply
Thanks given by:
#6
The entire generator is initialized in cChunkGenerator::Start() in $/src/Generating/ChunkGenerator.cpp. It chooses the main engine (which is Composable in 99.9% of the cases) and hands the individual initialization to it.

The Composable generator (which you want for this) reads the INI file in cComposableGenerator::Initialize() in $/src/Generating/ComposableGenerator.cpp. That's probably the best place to start digging around.
Reply
Thanks given by:
#7
(02-14-2015, 08:27 AM)xoft Wrote: The entire generator is initialized in cChunkGenerator::Start() in $/src/Generating/ChunkGenerator.cpp. It chooses the main engine (which is Composable in 99.9% of the cases) and hands the individual initialization to it.

The Composable generator (which you want for this) reads the INI file in cComposableGenerator::Initialize() in $/src/Generating/ComposableGenerator.cpp. That's probably the best place to start digging around.

Thanks, I was able to get a working flat world. However the value 255 doesn't seem to be valid. When I use it I only get water. Here is a working configuration for a flat world for anyone else.

Code:
[Generator]
FlatHeight=1
HeightGen=Flat
CompositionGen=Biomal
ShapeGen=HeightMap
Finishers=Ravines, WormNestCaves, WaterLakes, WaterSprings, LavaLakes, LavaSprings, OreNests, Mineshafts, Trees, Villages, SprinkleFoliage, Ice, Snow, Lilypads, BottomLava, DeadBushes, NaturalPatches, PreSimulator, Animals
SeaLevel=1
BottomLavaLevel=1
Generator=Composable
Reply
Thanks given by: LO1ZB
#8
The value 255 should be usable and should generate a regular world filled with blocks up to its top; if it doesn't, it's a bug worth solving.
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)