Rich Text in LTN stops?

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Poch
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Mar 13, 2017 3:35 pm
Contact:

Removing localized item label name after the icon in console

Post 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

dockmeister
Inserter
Inserter
Posts: 48
Joined: Tue Feb 26, 2019 5:49 pm
Contact:

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

Post 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

Poch
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Mar 13, 2017 3:35 pm
Contact:

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

Post by Poch »

Yes it worked ! Thank you very much for the information, sir :)

evandy
Fast Inserter
Fast Inserter
Posts: 228
Joined: Mon Apr 15, 2019 2:54 am
Contact:

Rich Text in LTN stops?

Post by evandy »

I have noticed that LTN train stops do not support the new rich-text feature... is this something that's fixable?

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Rich Text in LTN stops?

Post by Optera »

LTN works fine with RT for me.

evandy
Fast Inserter
Fast Inserter
Posts: 228
Joined: Mon Apr 15, 2019 2:54 am
Contact:

Re: Rich Text in LTN stops?

Post 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. :|

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Rich Text in LTN stops?

Post by Optera »

Be precise.
What did you use as stop name, what did you expect to happen, what did happen.

evandy
Fast Inserter
Fast Inserter
Posts: 228
Joined: Mon Apr 15, 2019 2:54 am
Contact:

Re: Rich Text in LTN stops?

Post 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).

Monsignor
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Sep 27, 2020 9:10 pm
Contact:

Re: Rich Text in LTN stops?

Post 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]

slaneyrw
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Aug 20, 2020 4:56 am
Contact:

Re: Rich Text in LTN stops?

Post 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 ) ?

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Rich Text in LTN stops?

Post by Optera »

LTN will use the same format as in game chat.
If you want images only use the img= format when naming stops.

mig5323
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Dec 01, 2019 4:02 am
Contact:

Option for image version of icon picker

Post 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 6700 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.

User avatar
NotRexButCaesar
Smart Inserter
Smart Inserter
Posts: 1120
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Re: Option for image version of icon picker

Post by NotRexButCaesar »

No, please. If this is added, how will we differentiate between the different ones?
—Crevez, chiens, si vous n'étes pas contents!

mig5323
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Dec 01, 2019 4:02 am
Contact:

Re: Option for image version of icon picker

Post 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.

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Option for image version of icon picker

Post by Koub »

[Koub] This is a LTN request I guess ?
Koub - Please consider English is not my native language.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Option for image version of icon picker

Post 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.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Rich Text in LTN stops?

Post 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.

Bozhik
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Nov 23, 2019 7:16 am
Contact:

Re: Rich Text in LTN stops?

Post by Bozhik »

Is there any option to disable rich text gps (green text with map icon) for station names is chat messages?

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Rich Text in LTN stops?

Post by Optera »

Added for next release.

SteveMacGyver
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Jul 30, 2017 10:51 am
Contact:

Log messages containing icons show both the icon and the icondescription

Post 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 5321 times
3000 hours+ ingame. Onboard the hypetrain since January 2017.

Post Reply

Return to “Logistic Train Network”