[Request] Equivalent of LuaForce.add_chart_tag() for LuaPlayer

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Pi-C
Smart Inserter
Smart Inserter
Posts: 1655
Joined: Sun Oct 14, 2018 8:13 am
Contact:

[Request] Equivalent of LuaForce.add_chart_tag() for LuaPlayer

Post by Pi-C »

We can use LuaForce.add_chart_tag(surface, tag) to place a tag (icon and/or text) on the map. Unfortunately, such tags are visible to all players belonging to that force.

I'm looking for add_chart_tag on a per-player level, so I can leave tags on the map that are only visible to an individual player. In this post, it was suggested that something like player.add_chart_tag(surface, tag) or force.add_chart_tag(surface, tag, player) would be needed instead. Would you consider adding this, please (it probably would make sense to add that to find_chart_tags() as well)?

While I'm at it: tag requires an icon and/or a text. However, "text" is expected to be a string. It would be nice if it could also be a localized string. Is there any chance on getting that implemented?

Finally, I'd like to know whether it's possible to change the icon of an entity in map view.

My use case is again this mod: When a vehicle "owned" by a player is destroyed, I want to mark the spot where it was on the map so that it is only visible to the "owner" (no need to clutter up the map with information that is of no interest to other players).

Also, if a vehicle that "belongs" to somebody is used by other players, I'd like to have its icon on the map -- as a kind of tracker, so the "owner" can see where his vehicle is moving. Currently, all vehicles are marked with that triangle sign; it's impossible to tell them apart just from looking at this icon. Therefore, I want to use the entity icon of that particular vehicle (i.e. the icon of the vanilla car/tank, or any other vehicle of the car prototype that has been added by mods) when the map is displayed to the vehicle's "owner". Would that even be possible without desyncs?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Request] Equivalent of LuaForce.add_chart_tag() for LuaPlayer

Post by eradicator »

+1

I've asked so many times for better tag moddability...*sigh* (yes, i still want per player tags!)

Also recently asked for map support for LuaRendering which would be useful for your problems too. Especially because LuaRendering already supports attaching renders to (moving) entities.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13223
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Request] Equivalent of LuaForce.add_chart_tag() for LuaPlayer

Post by Rseding91 »

eradicator wrote:
Wed Oct 23, 2019 4:09 pm
I've asked so many times for better tag moddability...*sigh* (yes, i still want per player tags!)
Interesting. I try to read every post that comes through Modding interface requests and I don't remember any other posts about chart tags. Not to say there aren't any i just don't remember any - especially not any from you.

Have you been asking *here* for things or where specifically?

On the topic of the actual request: That's not so much a mod interface request as a mod feature request. The game does not support that concept at all so first the feature of player-specific chart tags would have to be added and then a mod interface (lua API) added for it. Not to say that's impossible but "Modding interface requests" that start by asking for new game features tend to get lower priority.
If you want to get ahold of me I'm almost always on Discord.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1655
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: [Request] Equivalent of LuaForce.add_chart_tag() for LuaPlayer

Post by Pi-C »

Rseding91 wrote:
Wed Oct 23, 2019 9:26 pm
On the topic of the actual request: That's not so much a mod interface request as a mod feature request. The game does not support that concept at all so first the feature of player-specific chart tags would have to be added and then a mod interface (lua API) added for it. Not to say that's impossible but "Modding interface requests" that start by asking for new game features tend to get lower priority.
So, where is the appropriate place to ask for new game features? Perhaps I could raise the priority by asking there again? :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Pi-C
Smart Inserter
Smart Inserter
Posts: 1655
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: [Request] Equivalent of LuaForce.add_chart_tag() for LuaPlayer

Post by Pi-C »

eradicator wrote:
Wed Oct 23, 2019 4:09 pm
Also recently asked for map support for LuaRendering which would be useful for your problems too. Especially because LuaRendering already supports attaching renders to (moving) entities.
Yip, different approach, but I guess something like that could help me, too. :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Rseding91
Factorio Staff
Factorio Staff
Posts: 13223
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Request] Equivalent of LuaForce.add_chart_tag() for LuaPlayer

Post by Rseding91 »

Pi-C wrote:
Thu Oct 24, 2019 11:13 am
Rseding91 wrote:
Wed Oct 23, 2019 9:26 pm
On the topic of the actual request: That's not so much a mod interface request as a mod feature request. The game does not support that concept at all so first the feature of player-specific chart tags would have to be added and then a mod interface (lua API) added for it. Not to say that's impossible but "Modding interface requests" that start by asking for new game features tend to get lower priority.
So, where is the appropriate place to ask for new game features? Perhaps I could raise the priority by asking there again? :-)
Ideas and suggestions mostly :P
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Request] Equivalent of LuaForce.add_chart_tag() for LuaPlayer

Post by eradicator »

Rseding91 wrote:
Wed Oct 23, 2019 9:26 pm
eradicator wrote:
Wed Oct 23, 2019 4:09 pm
I've asked so many times for better tag moddability...*sigh* (yes, i still want per player tags!)
Interesting. I try to read every post that comes through Modding interface requests and I don't remember any other posts about chart tags. Not to say there aren't any i just don't remember any - especially not any from you.

Have you been asking *here* for things or where specifically?
Eh. Well, obviously i don't make new threads on topics i percieve to be "old and rejected" all the time. If that perception is correct or not is not for me to judge. Mostly i'm jumping in on everything chart tag related (like this thread) and shout "yes, this!".

viewtopic.php?f=28&t=70375
viewtopic.php?f=28&t=62893
Rseding91 wrote:
Wed Oct 23, 2019 9:26 pm
On the topic of the actual request: That's not so much a mod interface request as a mod feature request. The game does not support that concept at all so first the feature of player-specific chart tags would have to be added and then a mod interface (lua API) added for it. Not to say that's impossible but "Modding interface requests" that start by asking for new game features tend to get lower priority.
That's a bit unfair. Without detailed engine knowledge it's near impossible to tell by that definition what is a "feature" and what is an "interface". For all i know tags could already support per player visibility and there's just no way to toggle it per player yet. My perception™ says that "Ideas and suggestions" is for vague gameplay ideas, and interface requests is for specific technical requests.
On the same level i have no idea if "map support for LuaRendering" is a feature or an interface.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Modding interface requests”