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.
Request: Prototype/ResourceEntity custom_map_tooltip property
-
- Long Handed Inserter
- Posts: 72
- Joined: Sat Aug 27, 2016 1:50 pm
- Contact:
- micromario
- Fast Inserter
- Posts: 113
- Joined: Thu Apr 05, 2018 11:53 am
- Contact:
Re: Request: Prototype/ResourceEntity custom_map_tooltip property
+1 this would be extremely helpful for custom resource patches.
Re: Request: Prototype/ResourceEntity custom_map_tooltip property
+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
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