I'm working on a very small mod and need support for custom named entities. The first thing I think of to look for is the train stop, since players can rename it to whatever they want. I've looked through demo-entities.lua and demo-item.lua and found the train-stop entries, but I'm not seeing where it gets the ability to hold a player entered name (Iron 1, Copper Dropoff, Base, etc).
I'm new to modding in Factorio so it's entirely possible I've just missed it, but if anyone can lend a hand, I'd really appreciate it. I *think* I can do the rest of my mod once I know how I can add this feature, and read up on how it was implemented for train stops
Where does the Train Stop get support for a player enterable name?
Re: Where does the Train Stop get support for a player enterable name?
Look at backer_name.
Re: Where does the Train Stop get support for a player enterable name?
It is hardcoded for train stops and any other entity that supports_backer_name(). You can't add it to anything else.
Re: Where does the Train Stop get support for a player enterable name?
Dang, so there is no ability to have custom named entities in the game, other than train stops?