Exact values for MapGenSize for create_surface

Things that already exist in the current mod API
Post Reply
Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Exact values for MapGenSize for create_surface

Post 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".

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Exact values for MapGenSize for create_surface

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: Exact values for MapGenSize for create_surface

Post 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?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Exact values for MapGenSize for create_surface

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: Exact values for MapGenSize for create_surface

Post 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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Exact values for MapGenSize for create_surface

Post 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
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Already exists”