Friday Facts #237 - Rich & interactive text

Posted by kovarex on 2018-04-06

Hello,
since 0.16 is stable we can assign more of our effort into the work on 0.17. One of those features planned for that release is the Rich & interactive text.

Having more text formatting options was one of the things we wanted for quite some time, and it is finally starting to become reality in the 0.17 branch. The initial motivation was to have more possibilities in the tutorial related texts, but it proved to be useful having it available globally in the game.

The current format for any text markup we use is [<type>=<value>], but it might change somehow before 0.17 hits the public. This feature is being developed by wheybags, and it is progressing forward quite steadily.

Basic text formating - font and color

The obvious option is to allow changing text color:

and to allow to change font:

Images - icons

Since we already have a system to specify icons by the SpritePath, we can use it as well:

The cool thing about this, is that all these concepts work on basically all places where text is used, so you can use it in the station name for example:

or even save names (although, I needed to add a possibility to use "." instead of "/" in sprite path resolution to make it possible):

or blueprint names:

etc.

Element references

The next planned step will be to make it possible to allow this not only to be used as icons, but as references to the actual items, so the syntax would be something like: [item=straight-rail] or [recipe=advanced-oil-processing]. When used in the chat, it should allow the reader to hover over the icon and get a tooltip of the corresponding game element. When used with technology, it could allow the user to open the mentioned technology by clicking the reference icon.

More advanced usages

This brings us to the more advanced possibilities, like linking a map position as a clickable icon in the text (something like [gps=<position>]), referencing your armor, so other's can just hover it in the text and see it. Specifying target to specific train you want to mention and mainly, being able to reference blueprints this way, something like [blueprint=<blueprint string>] can you to show some specific setup in a chat, and others could be able to get the blueprint by just clicking on the icon if they want to.

I would be quite curious to see what other type of usages of this can you come up with, let us know on the forums.