Trying to read the ore_protype.autoplace_specification attributes ( https://lua-api.factorio.com/0.17.3/Con ... cification ) at runtime doesn't work. Expected attributes like "placement_density" and "max_probability" are nil. Previously, my mods could access the "coverage" attribute, but this attribute seems to no longer exist.
Example:
/c game.print(game.entity_prototypes["iron-ore"].autoplace_specification.placement_density)
[0.17.3] autoplace_specification attributes missing
Re: [0.17.3] autoplace_specification attributes missing
Autoplace seems to be converted to richness_expression and probability_expression at least in data stage. That could explain why old attributes on prototype won't work.Mylon wrote: ↑Thu Feb 28, 2019 9:53 pmTrying to read the ore_protype.autoplace_specification attributes ( https://lua-api.factorio.com/0.17.3/Con ... cification ) at runtime doesn't work. Expected attributes like "placement_density" and "max_probability" are nil. Previously, my mods could access the "coverage" attribute, but this attribute seems to no longer exist.
Example:
/c game.print(game.entity_prototypes["iron-ore"].autoplace_specification.placement_density)
Re: [0.17.3] autoplace_specification attributes missing
That is correct. I've update the Lua API docs to indicate those two new properties. See the Types/NoiseExpression page on the wiki for more details about noise expressions.orzelek wrote: ↑Thu Feb 28, 2019 10:24 pmAutoplace seems to be converted to richness_expression and probability_expression at least in data stage. That could explain why old attributes on prototype won't work.Mylon wrote: ↑Thu Feb 28, 2019 9:53 pmTrying to read the ore_protype.autoplace_specification attributes ( https://lua-api.factorio.com/0.17.3/Con ... cification ) at runtime doesn't work. Expected attributes like "placement_density" and "max_probability" are nil. Previously, my mods could access the "coverage" attribute, but this attribute seems to no longer exist.
Example:
/c game.print(game.entity_prototypes["iron-ore"].autoplace_specification.placement_density)
- SuperSandro2000
- Filter Inserter
- Posts: 741
- Joined: Sun Jan 12, 2014 3:54 am
- Contact:
Re: [0.17.3] autoplace_specification attributes missing
next time link latest
https://lua-api.factorio.com/latest/Con ... cification
https://lua-api.factorio.com/latest/Con ... cification
Please call me simply Sandro.
My Main Mods: Sandro's fixes, Expanded Rocket Payloads Touched by an AngelBob and more can be found here
My Main Mods: Sandro's fixes, Expanded Rocket Payloads Touched by an AngelBob and more can be found here