I'm not finding where I can set the Bias for Moisture and Terrain type.
I want to force a -0.5 for both
Thanks.
[Done] Map Pre-sets
[Done] Map Pre-sets
Last edited by TheSAguy on Wed Jun 12, 2019 2:22 pm, edited 1 time in total.
Re: Map Pre-sets
I can't find them in map-gen-presets or map-settings but moisture and aux are noise-layers
data.raw['noise-expression']["control-setting:aux:bias"]
data.raw['noise-expression']["control-setting:moisture:bias"]
So not sure how you would change them just for some presets and not all. I tried
but that didn't change the settings. (I haven't modded any noise-layers before so I just shotgun tested it)
So I don't know how to do it. Where did you look?
data.raw['noise-expression']["control-setting:aux:bias"]
Code: Select all
["control-setting:aux:bias"] = {
expression = {
expression_id = "literal-number:0",
literal_value = 0,
type = "literal-number"
},
name = "control-setting:aux:bias",
type = "noise-expression"
},
Code: Select all
["control-setting:moisture:bias"] = {
expression = {
expression_id = "literal-number:0",
literal_value = 0,
type = "literal-number"
},
name = "control-setting:moisture:bias",
type = "noise-expression"
},
Code: Select all
data.raw['noise-expression']["control-setting:aux:bias"].expression.literal_value = -0.5
data.raw['noise-expression']["control-setting:moisture:bias"].expression.literal_value = -0.5
So I don't know how to do it. Where did you look?
Re: Map Pre-sets
See https://github.com/Bilka2/ChangeMapSett ... i.lua#L514
Changing map gen settings runtime is obviously not the same thing as the presets, but they are close enough. Simply set the property_expression_names to "-0.5" in the map gen preset for the moisture/aux, the same way I am doing it there for the map gen settings. The location of the property_expression_names inside the map gen preset should be documented on the wiki: https://wiki.factorio.com/Types/MapGenPreset
Changing map gen settings runtime is obviously not the same thing as the presets, but they are close enough. Simply set the property_expression_names to "-0.5" in the map gen preset for the moisture/aux, the same way I am doing it there for the map gen settings. The location of the property_expression_names inside the map gen preset should be documented on the wiki: https://wiki.factorio.com/Types/MapGenPreset
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Map Pre-sets
I tried, but got lost in all that code. (I know I'm going to be yelled at..)
All I'd like to do is hard-code the two bias.
Why does the below not work?
Thanks.
All I'd like to do is hard-code the two bias.
Why does the below not work?
Code: Select all
data.raw['noise-expression']["control-setting:aux:bias"].expression.literal_value = -0.5
data.raw['noise-expression']["control-setting:moisture:bias"].expression.literal_value = -0.5
Re: Map Pre-sets
My code:
Your code:
Code: Select all
local property_expression_names_mine = {}
property_expression_names_mine["control-setting:moisture:frequency:multiplier"] = 1 / util.textfield_to_number_with_error(climate_table[ENTIRE_PREFIX .. "moisture-freq"]) -- inverse
property_expression_names_mine["control-setting:moisture:bias"] = util.textfield_to_number_with_error(climate_table[ENTIRE_PREFIX .. "moisture-size"])
property_expression_names_mine["control-setting:aux:frequency:multiplier"] = 1 / util.textfield_to_number_with_error(climate_table[ENTIRE_PREFIX .. "aux-freq"]) -- inverse
property_expression_names_mine["control-setting:aux:bias"] = util.textfield_to_number_with_error(climate_table[ENTIRE_PREFIX .. "aux-size"])
map_gen_settings.property_expression_names = property_expression_names_mine
Code: Select all
local property_expression_names_mine = {}
property_expression_names_mine["control-setting:moisture:frequency:multiplier"] = 1 / <number you want to have show up in the map generator screen> -- inverse
property_expression_names_mine["control-setting:moisture:bias"] = <number you want to have show up in the map generator screen>
property_expression_names_mine["control-setting:aux:frequency:multiplier"] = 1 / <number you want to have show up in the map generator screen> -- inverse
property_expression_names_mine["control-setting:aux:bias"] = <number you want to have show up in the map generator screen>
data.raw["map-gen-presets"]["default"].your_preset.basic_settings.property_expression_names = property_expression_names_mine
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Map Pre-sets
Thanks Bilka,
I do appreciate it!
I do appreciate it!