[0.17.4] tile_restriction not applicable to new ore generation

Place to get help with not working mods / modding interface.
EnigmaticAussie
Fast Inserter
Fast Inserter
Posts: 129
Joined: Mon Dec 18, 2017 7:53 am
Contact:

[0.17.4] tile_restriction not applicable to new ore generation

Post 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"}
},
Rseding91
Factorio Staff
Factorio Staff
Posts: 14363
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.4] tile_restriction not applicable to new ore generation

Post by Rseding91 »

Do you have an example mod and a see which shows the problem?
If you want to get ahold of me I'm almost always on Discord.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5290
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.4] tile_restriction not applicable to new ore generation

Post 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:
Image


When used correctly, and loaded into the game correctly, it works correctly:
Image
EnigmaticAussie
Fast Inserter
Fast Inserter
Posts: 129
Joined: Mon Dec 18, 2017 7:53 am
Contact:

Re: [0.17.4] tile_restriction not applicable to new ore generation

Post 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?
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5290
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.4] tile_restriction not applicable to new ore generation

Post 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.
EnigmaticAussie
Fast Inserter
Fast Inserter
Posts: 129
Joined: Mon Dec 18, 2017 7:53 am
Contact:

Re: [0.17.4] tile_restriction not applicable to new ore generation

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

Return to “Modding help”