[Lua API] Max size of entity_filters and tile_filters
- ickputzdirwech
- Filter Inserter
- Posts: 794
- Joined: Sun May 07, 2017 10:16 am
- Contact:
[Lua API] Max size of entity_filters and tile_filters
I suggest adding "Max. 30 filters." to both entity_filters and tile_filters. People should be aware of that since trying to add more crashes the game.
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Re: [Lua API] Max size of entity_filters and tile_filters
1. Lua API documentation improvements should be posted in bug reports or modding interface requests.
2. It does not crash the game, it gives a mod error.
3. It does not give an error in data.lua when setting entity_filter_count = 31. The error only occurs in control.lua when trying to set 31 filters.
2. It does not crash the game, it gives a mod error.
3. It does not give an error in data.lua when setting entity_filter_count = 31. The error only occurs in control.lua when trying to set 31 filters.
- ickputzdirwech
- Filter Inserter
- Posts: 794
- Joined: Sun May 07, 2017 10:16 am
- Contact:
Re: [Lua API] Max size of entity_filters and tile_filters
1. Thought it would be the best place for documentation improvements.
2. Sorry for unspecific phrasing.
3. It works if you increase entity_filter_count beforehand. Didn't think of that! Thanks for pointing it out.
The maximum number for entity_filter_count seems to be 255, not 65535 (uint16) however. There is something wrong with the wiki after all See https://wiki.factorio.com/Prototype/Dec ... lter_count
2. Sorry for unspecific phrasing.
3. It works if you increase entity_filter_count beforehand. Didn't think of that! Thanks for pointing it out.
The maximum number for entity_filter_count seems to be 255, not 65535 (uint16) however. There is something wrong with the wiki after all See https://wiki.factorio.com/Prototype/Dec ... lter_count
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Re: [Lua API] Max size of entity_filters and tile_filters
It is.ickputzdirwech wrote: ↑Mon Apr 05, 2021 3:21 pm 1. Thought it would be the best place for documentation improvements.
Fixed. The data type is ItemStackIndex (uint16) as already given on the page, but it's manually limited to not be larger than uint8 max.ickputzdirwech wrote: ↑Mon Apr 05, 2021 3:21 pm The maximum number for entity_filter_count seems to be 255, not 65535 (uint16) however. There is something wrong with the wiki after all See https://wiki.factorio.com/Prototype/Dec ... lter_count
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.