Page 1 of 2

Removing localized item label name after the icon in console

Posted: Thu Mar 12, 2020 4:16 am
by Poch
Hello,

I just have a quick question : is there a way to remove the localized item name following the icon in console info messages ? They take so much place it gets confusion and keeps me from knowing what is happening quickly.

Here is an example :
Image

I would like to remove the part in bracket that appears in green (the localized string).

I noticed by watching Nilaus youtube channel that he does not have this problem, here is how it looks for him :
Image

It is much more compact and readable.

Does anyone have an idea how i could do that ?

Thanks

Re: Removing localized item label name after the icon in console

Posted: Thu Mar 12, 2020 5:04 pm
by dockmeister
Hi,

using tags like:

Code: Select all

[item=iron-plate]
results in those mixed text messages.

using:

Code: Select all

[img=item/iron-plate]
will result in the icon without text

Re: Removing localized item label name after the icon in console

Posted: Tue Mar 17, 2020 2:54 am
by Poch
Yes it worked ! Thank you very much for the information, sir :)

Rich Text in LTN stops?

Posted: Thu Mar 26, 2020 3:40 am
by evandy
I have noticed that LTN train stops do not support the new rich-text feature... is this something that's fixable?

Re: Rich Text in LTN stops?

Posted: Thu Mar 26, 2020 7:20 am
by Optera
LTN works fine with RT for me.

Re: Rich Text in LTN stops?

Posted: Thu Mar 26, 2020 5:12 pm
by evandy
Optera wrote:
Thu Mar 26, 2020 7:20 am
LTN works fine with RT for me.
That's odd. I put the same text into an LTN stop as a normal stop and it wasn't working. :|

Re: Rich Text in LTN stops?

Posted: Thu Mar 26, 2020 5:44 pm
by Optera
Be precise.
What did you use as stop name, what did you expect to happen, what did happen.

Re: Rich Text in LTN stops?

Posted: Thu Mar 26, 2020 11:19 pm
by evandy
I went to take a screenshot for you... and it is now working, so I am very confused... but at least we can call this not-a-bug (for now).

Re: Rich Text in LTN stops?

Posted: Sun Sep 27, 2020 9:35 pm
by Monsignor
Ok I also found the same error
Image

Update:
I'm stupid and don't know who to rich text.

Code: Select all

[item=iron-plate] is not [img=item/iron-plate]

Re: Rich Text in LTN stops?

Posted: Sun Nov 29, 2020 9:52 am
by slaneyrw
With v 1.1. now adding easy support for RT in names it looks like it will use the [item=] format not [img/item=] format. This makes the notices LTN posts rather verbose like the image posted my Monsignor.

Can we change the RT outputted by LTN messages only use the image only ( or at least make it an option ) ?

Re: Rich Text in LTN stops?

Posted: Sun Nov 29, 2020 2:27 pm
by Optera
LTN will use the same format as in game chat.
If you want images only use the img= format when naming stops.

Option for image version of icon picker

Posted: Thu Jan 21, 2021 11:40 pm
by mig5323
TL;DR
The rich text from the icon picker is ugly in LTN notifications
What ?
ltn icon.png
ltn icon.png (205.08 KiB) Viewed 6921 times
In the LTN notification shown, the first station tag was made with the icon picker, and looks like [item=copper-ore]. The second station tag is img=item.copper-ore (brackets omitted). I don't like seeing the green item links in the notifications.
Why ?
It makes the rich text generated by LTN, and possibly other mods, cleaner to look at.

Re: Option for image version of icon picker

Posted: Fri Jan 22, 2021 2:07 am
by NotRexButCaesar
No, please. If this is added, how will we differentiate between the different ones?

Re: Option for image version of icon picker

Posted: Fri Jan 22, 2021 3:36 am
by mig5323
I'll admit some icons are close in appearance. I envision a checkbox to let you choose if you want the item= version or the img= version.

Re: Option for image version of icon picker

Posted: Fri Jan 22, 2021 7:06 am
by Koub
[Koub] This is a LTN request I guess ?

Re: Option for image version of icon picker

Posted: Fri Jan 22, 2021 8:25 am
by Optera
Koub wrote:
Fri Jan 22, 2021 7:06 am
[Koub] This is a LTN request I guess ?
Not really an LTN issue. That's simply how chat parses rich text.
Since you moved it into LTN Subforum I'll merge it with an older thread explaining how to use rich text.

Re: Rich Text in LTN stops?

Posted: Sat Feb 13, 2021 4:48 pm
by Optera
Since I cant find my post about converting tags in console anymore here it is again:

Code: Select all

/c
local stops = game.surfaces["nauvis"].find_entities_filtered{type="train-stop"}
for _, stop in pairs(stops) do
stop.backer_name = string.gsub(stop.backer_name, "item=", "img=item/")
stop.backer_name = string.gsub(stop.backer_name, "fluid=", "img=fluid/")
end
I assume stops are on nauvis, for other surfaces change script accordingly.

Re: Rich Text in LTN stops?

Posted: Sat Feb 27, 2021 4:24 pm
by Bozhik
Is there any option to disable rich text gps (green text with map icon) for station names is chat messages?

Re: Rich Text in LTN stops?

Posted: Sat Feb 27, 2021 5:27 pm
by Optera
Added for next release.

Log messages containing icons show both the icon and the icondescription

Posted: Thu Nov 18, 2021 10:15 pm
by SteveMacGyver
When displaying log messages, a station name containing an icon will show both the icon and the name of the icon in the notification.
If at all possible, it would be prettier if only the icon could be displayed.
An example of this is the following screencap:
Screenshot_000065.png
Screenshot_000065.png (226.56 KiB) Viewed 5542 times