Request: Prototype/ResourceEntity custom_map_tooltip property

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
ShadowGlass
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Sat Aug 27, 2016 1:50 pm
Contact:

Request: Prototype/ResourceEntity custom_map_tooltip property

Post by ShadowGlass »

Please add a new property for the 'resource' prototype:

name: custom_map_tooltip
type: LocalisedString
default: nil

If this is specified, then it should be displayed on the map view when hovering over the resource, instead of the default generated tooltip which shows the product names / amounts.

We have some special resources, which are modified by control scripts and the initial products/amounts are just meaningless placeholders. To avoid confusing the players, it'd be nice if the map tooltip could display a custom text instead of the meaningless placeholder item when hovering over the resource.

Optional: Maybe pass in the original generated tooltip as the __1__ parameter of the LocalisedString. We won't use this, but it would make this a bit more flexible.

You might also want to make this available as a read-only field at runtime on the LuaEntityPrototype.
User avatar
micromario
Fast Inserter
Fast Inserter
Posts: 113
Joined: Thu Apr 05, 2018 11:53 am
Contact:

Re: Request: Prototype/ResourceEntity custom_map_tooltip property

Post by micromario »

+1 this would be extremely helpful for custom resource patches.
SWeini
Inserter
Inserter
Posts: 39
Joined: Mon Apr 04, 2022 6:43 am
Contact:

Re: Request: Prototype/ResourceEntity custom_map_tooltip property

Post by SWeini »

+1, this would make my favorite mod more beginner-friendly

regarding parameter passing to LocalisedString:

passing the originally generated tooltip as __1__ allows mod authors to add extra information
passing the resource amount as __2__ allows to have totally custom tooltips which incorporate the resource amount

these are for different purposes, so if you add parameters it might make sense to just add both
Post Reply

Return to “Modding interface requests”