Count rich text icons as one (or a few) characters for train stops

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
Teraka
Inserter
Inserter
Posts: 34
Joined: Mon Jun 27, 2016 7:50 pm
Contact:

Count rich text icons as one (or a few) characters for train stops

Post by Teraka »

Train stop names are currently limited to 106 100 characters, which is fine most of the time, except that it gets very restrictive when you start using icons instead since [item=automation-science-pack] counts as 30 characters instead of 1 symbol.

Image

Given how specific 106 seems to be there might be an actual internal reason for this limit I'm a dumb, but otherwise I'd like to see icons not counting as their full name for this restriction.
Last edited by Teraka on Wed Apr 03, 2019 12:59 pm, edited 2 times in total.

Darinth
Filter Inserter
Filter Inserter
Posts: 323
Joined: Wed Oct 17, 2018 12:17 pm
Contact:

Re: Count rich text icons as one (or a few) characters for train stops

Post by Darinth »

The limit is 100 characters, the stop name you tried to use is being counted as 106 characters. This seems like an arbitrary limit set to prevent ridiculously long names, not like a limit placed due to a technical constraint. Given that information, it's hopefully possible for icons to not be counted as their total character count.

mrvn
Smart Inserter
Smart Inserter
Posts: 5709
Joined: Mon Sep 05, 2016 9:10 am
Contact:

[0.17.23] Train station names are too length limited fo rich text

Post by mrvn »

TL;DR
Trying to name stations by listing the items they request or provide quickly exceeds the length limit.
What ?
I suggest that train station names should be dynamically allocated and have arbitrary length. Or at least 65535 bytes.
Why ?
I've started to use rich text to show what factory complex a train station is in as well as the requests or provides of the station. Some low throughput stations can carry a bunch of items though resulting in this:
station-name-too-long.png
station-name-too-long.png (1.18 MiB) Viewed 1376 times
The station is in the "Washing for geodes" factory complex and provides all the low throughput garbage items. Namely Mud, Landfill (sand-3), Crushed Stone, Stone, Stone Brick, Stone Pipe, Stone Undeground Pipe. Overall that would visually easily fit into the station name list. But at 3 output items I'm already exceeding the station name length. And those are short recipe and item names. Some other names are easily twice the size, meaning half the number of icons fit in the 100 characters.

For a game that easily uses gigabytes of memory to have strings hardcoded to maximum 100 bytes length is quite ridiculous. Is the name inlined into the station struct instead of being a pointer?

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

Re: Count rich text icons as one (or a few) characters for train stops

Post by Koub »

[Koub] Merged into older topic with suggestion on the same issue.
Koub - Please consider English is not my native language.

Post Reply

Return to “Ideas and Suggestions”