Page 1 of 1

Indicate existence of CollisionMaskLayer layer-13 etc in json structure

Posted: Sat Sep 14, 2024 5:09 pm
by sparr
Currently the json api docs definition of CollisionMaskLayer only mentions layer-13 through layer-55 in the description, which makes them unknown to tools like the factorio modding toolkit.

I would like to see them in the json type options, even if they are flagged as distinct in some way.

Re: Indicate existence of CollisionMaskLayer layer-13 etc in json structure

Posted: Sun Sep 15, 2024 12:47 am
by kelianmao
I also just ran into a similar confusion.

Specifically, the old wiki page for CollisionMask[1] does have info on these layers (maybe added manually?), but the new api website[2] does not.

It technically contains a link to CollisionMaskLayer[3], which does have the info, but this is buried a layer deeper and not immediately obvious (eg there is no explanation that the full list of layers is available inside the link). In fact, it could be explicitly clarified that only the pre-defined layers are accepted, as otherwise you might think you can use any string to define a new layer.

[1] https://wiki.factorio.com/Types/CollisionMask
[2] https://lua-api.factorio.com/latest/typ ... nMask.html
[3] https://lua-api.factorio.com/latest/typ ... Layer.html

Re: Indicate existence of CollisionMaskLayer layer-13 etc in json structure

Posted: Sun Sep 15, 2024 5:57 am
by curiosity
kelianmao wrote:
Sun Sep 15, 2024 12:47 am
It technically contains a link to CollisionMaskLayer[3], which does have the info, but this is buried a layer deeper and not immediately obvious (eg there is no explanation that the full list of layers is available inside the link). In fact, it could be explicitly clarified that only the pre-defined layers are accepted, as otherwise you might think you can use any string to define a new layer.
No, that's correct. CollisionMaskLayer describes the layer ID, so it makes sense the additional layer IDs to be mentioned there. And you know it's not any arbirtary string because CollisionMaskLayer's parent type is union, meaning it can only be one of the listed values. Which is why it's important for the additional IDs to be part of the definition, as the OP requests.

Re: Indicate existence of CollisionMaskLayer layer-13 etc in json structure

Posted: Mon Sep 16, 2024 6:49 am
by Bilka
This is solved for 2.0.