Page 1 of 1
[0.17.4] tile_restriction not applicable to new ore generation
Posted: Tue Mar 05, 2019 5:22 am
by EnigmaticAussie
When using the peak methods from the previous ore generation, setting
tile_restriction to a list of a tiles the ore was allowed to generate on.
This settings seems to be ignored when using the new ore generation techniques.
The following autoplace parameters will still generate ores on
ground-tiles:
Code: Select all
autoplace = resource_autoplace.resource_autoplace_settings {
name = "deep-sea-iron-ore",
order = "c", -- Other resources are "b"; oil won't get placed if something else is already there.
base_density = 0.9,
base_spots_per_km2 = 1.25,
random_spot_size_minimum = 2,
random_spot_size_maximum = 3,
has_starting_area_placement = true,
regular_rq_factor_multiplier = 1,
tile_restriction={"water-tile"}
},
Re: [0.17.4] tile_restriction not applicable to new ore generation
Posted: Tue Mar 05, 2019 8:13 am
by Rseding91
Do you have an example mod and a see which shows the problem?
Re: [0.17.4] tile_restriction not applicable to new ore generation
Posted: Tue Mar 05, 2019 12:45 pm
by Klonan
Internally it looks like tile_restriction needs a TileID, not a collision mask,
Moving to modding help
EDIT: Also you are only adding that as a param to a function that returns the full autoplace specification, so that property is not even loaded into the game,
If it was it would error:
When used correctly, and loaded into the game correctly, it works correctly:
Re: [0.17.4] tile_restriction not applicable to new ore generation
Posted: Tue Mar 05, 2019 3:26 pm
by EnigmaticAussie
"Internally it looks like tile_restriction needs a TileID, not a collision mask,"
That makes no sense, as when used in parallel with the peaks methods this works.
I will try to get examples tomorrow morning.
"When used correctly, and loaded into the game correctly, it works correctly:"
Do you have an example code-block for this?
Re: [0.17.4] tile_restriction not applicable to new ore generation
Posted: Tue Mar 05, 2019 6:05 pm
by Klonan
EnigmaticAussie wrote: ↑Tue Mar 05, 2019 3:26 pm
"Internally it looks like tile_restriction needs a TileID, not a collision mask,"
That makes no sense, as when used in parallel with the peaks methods this works.
You are adding the tile_restriction as a parameter to a method, not to the actual autplace.
The method you are calling does not look for or set tile_restriction in the returned table.
Re: [0.17.4] tile_restriction not applicable to new ore generation
Posted: Wed Mar 06, 2019 1:01 am
by EnigmaticAussie
Klonan wrote: ↑Tue Mar 05, 2019 6:05 pm
You are adding the tile_restriction as a parameter to a method, not to the actual autplace.
The method you are calling does not look for or set tile_restriction in the returned table.
Ok, that makes more sense.
EnigmaticAussie wrote: ↑Tue Mar 05, 2019 3:26 pm
Klonan wrote: ↑Tue Mar 05, 2019 12:45 pm
When used correctly, and loaded into the game correctly, it works correctly:
Do you have an example code-block for this?
Having a working example would be greatly appreciated.