entity.id, a unique, persistent ID

mk-fg
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Wed May 30, 2018 11:01 am
Contact:

Re: entity.id, a unique, persistent ID

Post by mk-fg »

Bit of a necro-post, but as this topic comes up in google with no apparent solutions, here's one "entity.id"-like value provided by factorio:
entity.unit_number - https://lua-api.factorio.com/latest/Lua ... nit_number

Afaik every valid EntityWithOwner and its children have it, which in practice means that things like trees, rocks, ore, don't have that unit_number.
Hence it's good enough for wide range of purposes where tracking of any kind of player buildings or units it needed.

Post Reply

Return to “Implemented mod requests”