[0.17.6] control-setting:temperature:bias does not work

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

[0.17.6] control-setting:temperature:bias does not work

Post by Earendel »

I'm trying to update the Alien Biomes mod.

The Moisture and Terrain Type (Aux) controls are already exposed.
I'm trying to add Temperature:

Code: Select all

{
    type = "autoplace-control",
    name = "temperature",
    order = "z",
    category = "terrain",
    richness = true,
  },
  {
    type = "noise-expression",
    name = "control-setting:temperature:frequency:multiplier",
    expression = noise.to_noise_expression(1)
  },
  {
    type = "noise-expression",
    name = "control-setting:temperature:bias",
    expression = noise.to_noise_expression(0.1)
  },
  {
    type = "noise-expression",
    name = "debug-temperature",
    intended_property = "temperature",
    expression = noise.define_noise_function( function(x,y,tile,map)
      return clamp_temperature(x * (1 / 4) * noise.var("control-setting:temperature:frequency:multiplier")
        + noise.var("control-setting:temperature:bias") * 100
    end)
  },
I can't see how to make it appear next to Moisture and Terrain Type, I guess that's hard coded. It appears above cliffs with scale and coverage sliders.

I'm using the debug temperature expression. The Scale slider works but the Coverage one does not, the "control-setting:temperature:bias" value does not affect anything.

Also, when I change the temperature generator from Normal to Debug the Water control changes to Island Size and the coverage is locked?

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [0.17.6] control-setting:temperature:bias does not work

Post by Earendel »

I have found something that does work:

Code: Select all

  {
    type = "noise-expression",
    name = "debug-temperature",
    intended_property = "temperature",
    expression = noise.define_noise_function( function(x,y,tile,map)
      return clamp_temperature(x * (1 / 4) * noise.var("control-setting:temperature:frequency:multiplier")
        + noise.get_control_setting("temperature").size_multiplier * 100
    end)
  }
 
So it looks like the Moisture and Terrain Type controls just work in a different way to other controls that a modder can add?

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [0.17.6] control-setting:temperature:bias does not work

Post by Earendel »

So I guess the main bug I reported is not a bug, just intuitive.
Earendel wrote:
Wed Mar 06, 2019 11:46 am
Also, when I change the temperature generator from Normal to Debug the Water control changes to Island Size and the coverage is locked?
But the water control changing then the temperature generator is changed does seem like a bug.

TOGoS
Former Staff
Former Staff
Posts: 93
Joined: Fri Jun 24, 2016 2:29 pm
Contact:

Re: [0.17.6] control-setting:temperature:bias does not work

Post by TOGoS »

Earendel wrote:
Wed Mar 06, 2019 12:30 pm
I have found something that does work:

Code: Select all

  {
    type = "noise-expression",
    name = "debug-temperature",
    intended_property = "temperature",
    expression = noise.define_noise_function( function(x,y,tile,map)
      return clamp_temperature(x * (1 / 4) * noise.var("control-setting:temperature:frequency:multiplier")
        + noise.get_control_setting("temperature").size_multiplier * 100
    end)
  }
 
So it looks like the Moisture and Terrain Type controls just work in a different way to other controls that a modder can add?
Yep. Temperature and humidity are "climate controls", which for now are a hard-coded list, since they are a bit different than the other autoplace controls and I haven't thought of a great way to unify those things, yet. As you point out, you can bypass them by writing your own noise expressions.
Earendel wrote:
Wed Mar 06, 2019 1:09 pm
So I guess the main bug I reported is not a bug, just intuitive.
Earendel wrote:
Wed Mar 06, 2019 11:46 am
Also, when I change the temperature generator from Normal to Debug the Water control changes to Island Size and the coverage is locked?
But the water control changing then the temperature generator is changed does seem like a bug.
That is a bug. The thing that checks which elevation generator is selected was looking at each of the dropdowns, not just the elevation one. This will be fixed in 0.17.8.

Thanks for the bug report!

Post Reply

Return to “Resolved Problems and Bugs”