Page 1 of 1

How to insert icons in station names without crystal ball?

Posted: Thu Apr 11, 2019 1:26 pm
by mrvn
Factorio now supports rich text in train station names. That means one can name the stations for a smelter "Smelter - in [item=iron-ore]" and "Smelter - out [item=iron-plate]". Which is great.

But it becomes quite hard to find the right string when trying to name a station [recipe=sulfur-processing-catalyst-brown]. To get the right string one has to first look at the icon in the crafting menu, iventory or while setting a signal in a constant combinator. Then grep the translation files from all modules to get from the visible name to the internal name of the icon. Which is quite annoying to do.

Isn't there some hot-key so one can select the icon from a popup?

Re: How to insert icons in station names without crystal ball?

Posted: Thu Apr 11, 2019 4:43 pm
by GrumpyJoe
while we are at it, i´d suggest a different color for the text

i just put in [item] and it turned yellow, which gives you eye cancer, trying to read from an apricot background
item.png
item.png (56.08 KiB) Viewed 23973 times
If it turns out your request is not possible yet, you might wanna rephrase it and get it moved to suggestions?

Re: How to insert icons in station names without crystal ball?

Posted: Fri Apr 12, 2019 11:54 am
by eduran
mrvn wrote:
Thu Apr 11, 2019 1:26 pm
Then grep the translation files from all modules to get from the visible name to the internal name of the icon.
You can make that step easier by displaying debug information in tooltips (F4 -> check show-debug-info-in-tooltips). That displays internal item names directly in tooltips. Still not ideal, but a lot quicker than your method.

Re: How to insert icons in station names without crystal ball?

Posted: Fri Apr 12, 2019 12:14 pm
by steinio
mrvn wrote:
Thu Apr 11, 2019 1:26 pm
Factorio now supports rich text in train station names. That means one can name the stations for a smelter "Smelter - in [item=iron-ore]" and "Smelter - out [item=iron-plate]". Which is great.

But it becomes quite hard to find the right string when trying to name a station [recipe=sulfur-processing-catalyst-brown]. To get the right string one has to first look at the icon in the crafting menu, iventory or while setting a signal in a constant combinator. Then grep the translation files from all modules to get from the visible name to the internal name of the icon. Which is quite annoying to do.

Isn't there some hot-key so one can select the icon from a popup?
+1

adding pseudo code into the text field is not user friendly at all and more a step to 0.11.x instead of 1.0

Re: How to insert icons in station names without crystal ball?

Posted: Fri Apr 12, 2019 2:29 pm
by mrvn
For items that you can craft I found a workaround:

1. put the item in your hand
2. open a chat line (^)
3. click at the chat line to insert an icon for the item
4. select the text and copy it with ctrl-c
5. close the chat line
6. open the train stop and click rename
7. paste with ctrl-v to get the icon for the item

Any reason why items can be dropped into the chat line but not into the train station rename dialog?

Re: How to insert icons in station names without crystal ball?

Posted: Sun Oct 13, 2019 12:36 am
by csduff
mrvn wrote:
Fri Apr 12, 2019 2:29 pm
For items that you can craft I found a workaround:

1. put the item in your hand
2. open a chat line (^)
3. click at the chat line to insert an icon for the item
4. select the text and copy it with ctrl-c
5. close the chat line
6. open the train stop and click rename
7. paste with ctrl-v to get the icon for the item

Any reason why items can be dropped into the chat line but not into the train station rename dialog?
Any suggestions on how this could be accomplished with liquids? I'm playing a Bob's playthrough, so lots of non-vanilla items.

Re: How to insert icons in station names without crystal ball?

Posted: Sun Oct 13, 2019 3:11 pm
by csduff
csduff wrote:
Sun Oct 13, 2019 12:36 am
Any suggestions on how this could be accomplished with liquids? I'm playing a Bob's playthrough, so lots of non-vanilla items.
I just figured out partly how to do this. Instead of [item=…] you need to put [fluid=…]. You still can't drag and drop the fluid to figure out what it is, though.

Re: How to insert icons in station names without crystal ball?

Posted: Mon Oct 14, 2019 9:51 am
by mrvn
What you can do is turn on more infos in the debug (F4) options. Then when you hover over a recipe or other things it shows you the internal names.

And yes, there is [item=...], fluid, virtual-signal, recipe, ... All the stuff used to define things in the prototypes.

Re: How to insert icons in station names without crystal ball?

Posted: Mon Oct 14, 2019 12:58 pm
by Stimpatch
This post will help you with some workarounds:

viewtopic.php?f=18&t=75977