Page 1 of 1

How to use Rich text properly

Posted: Mon Sep 23, 2019 7:28 am
by Stimpatch
Hello guys. Got a Question about best practice of using ingame rich text.

Setting: I want to flg all ingame train stations with a leading Icon corresponding to the stations contend. So, i use a tag like [item=iron-ore]. So far, so good.

Also i know the corresponding wiki pages:
https://wiki.factorio.com/Rich_text and https://wiki.factorio.com/Data.raw

Thing is... how do i look up an item name ingame? Because, if you play with mods, you may want to display an icon from modded contend. How do you find out names for modded contend?

Re: How to use Rich text properly

Posted: Mon Sep 23, 2019 7:33 am
by Optera
Looking up internal names for rich text is a pain, especially when using any locale other than English. This part certainly could be made a lot more user friendly.

Try Luzifers Rich Text Helper https://mods.factorio.com/mod/Rich_Text_Helper

Re: How to use Rich text properly

Posted: Mon Sep 23, 2019 7:44 am
by Bilka
Just shift click whatever you want the tag of when you have the console open and then copy pasta the resulting text from the console.

Re: How to use Rich text properly

Posted: Mon Sep 23, 2019 9:51 am
by Stimpatch
Bilka wrote: Mon Sep 23, 2019 7:44 am Just shift click whatever you want the tag of when you have the console open and then copy pasta the resulting text from the console.
YES!..... No. Not very helpful. FNEI sadly does not produce linkable results, and there are many examples you cannot shift click an item (e.g. you want to link a fluid, something you dont have in your inventory, or not yet researched, or craftable in your pocket) I did this for some time, and it helps (as does looking into the wiki and guessing what an item could be) but its far from a good solution, sadly.

Re: How to use Rich text properly

Posted: Mon Sep 23, 2019 9:53 am
by Stimpatch
Optera wrote: Mon Sep 23, 2019 7:33 am Looking up internal names for rich text is a pain, especially when using any locale other than English. This part certainly could be made a lot more user friendly.

Try Luzifers Rich Text Helper https://mods.factorio.com/mod/Rich_Text_Helper
will look into that, thx

Re: How to use Rich text properly

Posted: Mon Sep 23, 2019 9:57 am
by Bilka
Stimpatch wrote: Mon Sep 23, 2019 9:51 am there are many examples you cannot shift click an item (e.g. you want to link a fluid, something you [..] not craftable in your pocket) I did this for some time, and it helps (as does looking into the wiki and guessing what an item could be) but its far from a good solution, sadly.
You can link the recipe by shift-clicking the crafting button, which I find quite useful just to remember what I am working on and what ingredients it takes (it shows the tooltips). Yes, it is not a perfect solution, but people tend to miss it completely, so I like to make sure that it is known.

Re: How to use Rich text properly

Posted: Mon Sep 23, 2019 10:35 am
by Stimpatch
Bilka wrote: Mon Sep 23, 2019 9:57 am You can link the recipe by shift-clicking the crafting button, which I find quite useful just to remember what I am working on and what ingredients it takes (it shows the tooltips). Yes, it is not a perfect solution, but people tend to miss it completely, so I like to make sure that it is known.
I know, and yes that helps out a bit as workaround. Still i wont produce the result i would like to have. Example: If LTN logs a trainroute, i want only the icon to show and not the crafting recipie cluttering the screen.

Perhaps there is already a good solution for this i am not aware of, therefore the question.

Re: How to use Rich text properly

Posted: Mon Sep 23, 2019 10:54 am
by DerGraue
If you enable the "show debug info in tooltip" option in the debug menu (F4) then you see the real entity name.

I have set this up in my debug settings so I can just use F5 to quickly enable and disable the enhanced tooltip if I need to know the exact name.

Re: How to use Rich text properly

Posted: Mon Sep 23, 2019 10:56 am
by BlueTemplar

Re: How to use Rich text properly

Posted: Tue Sep 24, 2019 7:33 am
by billbo99
How about an "emoji" button on the text tool bar that opens up a GUI which displays all the current icons. Pick an icon and it gets dropped into the text.

Re: How to use Rich text properly

Posted: Tue Sep 24, 2019 7:46 am
by Stimpatch
DerGraue wrote: Mon Sep 23, 2019 10:54 am If you enable the "show debug info in tooltip" option in the debug menu (F4) then you see the real entity name.

I have set this up in my debug settings so I can just use F5 to quickly enable and disable the enhanced tooltip if I need to know the exact name.
This is very helpful, thx.

Re: How to use Rich text properly

Posted: Tue Sep 24, 2019 1:33 pm
by eradicator
Fluid richtext is a reoccuring issue. I just posted a command to generate all fluid icons the other day (here).
___________
Bilka wrote: Mon Sep 23, 2019 9:57 am You can link the recipe by shift-clicking the crafting button,
Is that even remotely moddable for custom GUIs? Maybe something like Player.append_chat() which just doesn't do anything if the player doesn't have chat open?