Page 1 of 1

Exact values for MapGenSize for create_surface

Posted: Mon Jul 02, 2018 10:46 pm
by Boodals
Instead of MapGenSize being a string with expected values ("normal", "high", etc), I propose that MapGenSize should be replaced with a number, but add defines.map_gen_size.normal, etc for the current values that are used.
This allows modders to more finely control the content of surfaces than just 5 discrete values (6 including "none"), as well as allowing values beyond "very-low" or "very-high", without affecting every surface (which would happen if the prototype's autoplace variables were changed).
I do not mind whether this changes the map generation GUI or not. I intend this to be used with create_surface.

For a mod i'm making, I would like to be able to make surfaces that have more varied climates than nauvis, but I do not want nauvis to be changed (thus I can't simply change the prototypes autoplace variables).
A more specific example, if I wanted to make a surface that is almost entirely water, but with a few tiny islands, this is the best I can do at the moment (very-high/very-big water, very-low/very-small grass, none everything else).
Image
I wanted huge oceans with the occasional tiny island (think seablock).

This may also be a good time to add separate concepts for MapGenFrequency and MapGenRichness to avoid confusion of "normal" vs "medium" vs "regular".

Re: Exact values for MapGenSize for create_surface

Posted: Tue Jul 03, 2018 1:04 am
by Rseding91
The way internal map generation logic works there are only those discrete values. It doesn't support numbers below/above what the values are associated with.

Re: Exact values for MapGenSize for create_surface

Posted: Tue Jul 03, 2018 1:20 am
by Boodals
Huh, that's too bad. Must be some odd algorithm you're using. Guess i'll just have to work with it.

Edit: How about being able to add a flat bonus to the influence of specific autoplace controls (or something similar)? If I understand how autoplace works, that would also allow the sort of control i'm looking for.
Idk, im kinda grasping for straws here. How else could I get fine control over surface generation?

Re: Exact values for MapGenSize for create_surface

Posted: Tue Jul 03, 2018 1:41 am
by Rseding91
Boodals wrote:How else could I get fine control over surface generation?
Do it yourself RSO style. Otherwise there is no fine control when it comes to using perlin noise - it's inherently random.

Re: Exact values for MapGenSize for create_surface

Posted: Tue Jul 03, 2018 1:58 am
by Boodals
That's gonna be a PITA to code, especially if I want to support modded tiles, hence why I wanted to leverage the existing generator.

Re: Exact values for MapGenSize for create_surface

Posted: Tue Jul 03, 2018 10:51 am
by Rseding91
Boodals wrote:That's gonna be a PITA to code, especially if I want to support modded tiles ...
That basically describes base game generation :P