Allow mods to default custom presets

Things that we aren't going to implement
Post Reply
razahin
Inserter
Inserter
Posts: 40
Joined: Sat Feb 29, 2020 1:39 pm
Contact:

Allow mods to default custom presets

Post by razahin »

TL;DR
Allow custom settings when default flag is true on MapGenPreset. https://wiki.factorio.com/Types/MapGenPreset

What ?
Allow for custom settings when default flag is true, or automatically select the first MapGenPreset based on order when no default is present. It currently defaults to nothing selected.
Why ?
I'm creating a mod and have created a custom preset for map generation settings. It is my intention that these settings are how the mod should be played for player convenience. I am unable to set this as the default because the default setting doesn't allow for custom settings.

sparr
Smart Inserter
Smart Inserter
Posts: 1261
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Allow mods to default custom presets

Post by sparr »

What should happen when two different mods do this?

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5202
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Allow mods to default custom presets

Post by eradicator »

They don't want you to change the default preset.

viewtopic.php?f=11&t=61645
viewtopic.php?f=11&t=74286
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Xorimuth
Filter Inserter
Filter Inserter
Posts: 429
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Allow mods to default custom presets

Post by Xorimuth »

+1

Map Gen Presets are part of the intended experience for overhaul mods and not being able to change the default settings seems very strange. Currently you just have hacks like in Space Exploration where it prints "You haven't selected the Space Exploration preset" in the console if you don't change off default.

If two mods both set their presets to default, then just choose one arbitrarily or refuse to load the game - mod collisions have rarely been a reason for not allowing a feature.

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

Re: Allow mods to default custom presets

Post by Rseding91 »

The proper way to do what you’re after is to modify the map generation prototypes to generate how you want. The “normal” tells the system to use the generation values from the prototypes. Those are the defaults. Those are what you need to be changing.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Wiwiweb
Inserter
Inserter
Posts: 26
Joined: Sat May 08, 2021 2:36 am
Contact:

Re: Allow mods to default custom presets

Post by Wiwiweb »

Rseding91 wrote:
Sat May 28, 2022 12:22 am
The proper way to do what you’re after is to modify the map generation prototypes to generate how you want.
Directly changing the mapgen during load and ignoring the player settings would remove the choice aspect.

For an SE example, we want every "default" player who's getting into the mod without knowledge to play with lower biter evolution than vanilla's default, to compensate for the more spread-out upgrades.
But if people know what they're doing and want to play SE deathworld then we don't want to prevent that.

I guess we could "if evo value is at vanilla's default then set it to SE default" but that seems weird. It would also trick anyone who would actually want that specific evolution value.
Last edited by Wiwiweb on Mon May 30, 2022 3:59 pm, edited 1 time in total.

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

Re: Allow mods to default custom presets

Post by Rseding91 »

Wiwiweb wrote:
Mon May 30, 2022 2:29 pm
Rseding91 wrote:
Sat May 28, 2022 12:22 am
The proper way to do what you’re after is to modify the map generation prototypes to generate how you want.
Directly changing the mapgen prototype and ignoring the player settings would remove the choice aspect.
The player settings change the map gen prototype values. So when you change the map gen prototype values the player can still modify them using the settings in the GUI. That's how it's supposed to work.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Wiwiweb
Inserter
Inserter
Posts: 26
Joined: Sat May 08, 2021 2:36 am
Contact:

Re: Allow mods to default custom presets

Post by Wiwiweb »

Code: Select all

data.raw["map-settings"]["map-settings"].enemy_evolution = {
  enabled = true,
  time_factor =       0.000001,
  destroy_factor =    0.001,
  pollution_factor =  0.0000005
}
Indeed that works for enemy evolution! I didn't know updating this would affect the "Default" preset.

Is there any way to change the default values for autoplace_settings and property_expression_names too? The SE preset needs to change values in the "Terrain" tab to make the default Nauvis look different, while allowing people to customize their Nauvis.

Post Reply

Return to “Won't implement”