Rich text: Difference between revisions
m (Add example result for rare signal A) |
No edit summary |
||
(11 intermediate revisions by 6 users not shown) | |||
Line 11: | Line 11: | ||
When used in chat, the tag image will be followed by a text description, except for the img tag. | When used in chat, the tag image will be followed by a text description, except for the img tag. | ||
Used elsewhere only the image is shown. | Used elsewhere only the image is shown. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 32: | Line 30: | ||
[[File:Played green.png|28px]] | [[File:Played green.png|28px]] | ||
| Embeds only a small inline game graphic. The period format must be used in game save names. This tag uses [https://lua-api.factorio.com/latest/Concepts.html#SpritePath sprite paths]: | | Embeds only a small inline game graphic. The period format must be used in game save names. This tag uses [https://lua-api.factorio.com/latest/Concepts.html#SpritePath sprite paths]: | ||
<i>class</i> is any of: item, entity, technology, recipe, item-group, fluid, tile, virtual-signal, achievement, equipment or utility. | <i>class</i> is any of: item, entity, technology, recipe, item-group, fluid, tile, virtual-signal, achievement, equipment, space-location or utility. | ||
<i>name</i>: see below | <i>name</i>: see below | ||
Line 39: | Line 37: | ||
|- | |- | ||
| [item=<i>name | | [item=<i>name</i>] | ||
| [item=iron-plate] | |||
| [item=iron-plate | |||
| [[File:Iron_plate.png|28px]] [Item: Iron plate] | | [[File:Iron_plate.png|28px]] [Item: Iron plate] | ||
| <i>name</i> is the internal-name of the item | | <i>name</i> is the internal-name of the item | ||
|- | |- | ||
| [entity=<i>name | | [entity=<i>name</i>] | ||
| [entity=small-biter] | |||
| [entity=small-biter | |||
| [[File:Small_biter.png|28px]] [Entity: Small biter] | | [[File:Small_biter.png|28px]] [Entity: Small biter] | ||
| <i>name</i> is the internal-name of the entity | | <i>name</i> is the internal-name of the entity | ||
Line 61: | Line 55: | ||
|- | |- | ||
| [recipe=<i>name | | [recipe=<i>name</i>] | ||
| [recipe=basic-oil-processing] | |||
| [recipe=basic-oil-processing | |||
| [[File:Basic_oil_processing.png|28px]] [Recipe: Basic oil processing] | | [[File:Basic_oil_processing.png|28px]] [Recipe: Basic oil processing] | ||
| <i>name</i> is the internal-name of the recipe, usually the item name | | <i>name</i> is the internal-name of the recipe, usually the item name | ||
Line 75: | Line 67: | ||
|- | |- | ||
| [fluid=<i>name | | [fluid=<i>name</i>] | ||
| [fluid=water] | |||
| [fluid=water | |||
| [[File:Water.png|28px]] [Fluid: Water] | | [[File:Water.png|28px]] [Fluid: Water] | ||
| <i>name</i> is the internal name of the fluid | | <i>name</i> is the internal name of the fluid | ||
Line 89: | Line 79: | ||
|- | |- | ||
| [virtual-signal=<i>name | | [virtual-signal=<i>name</i>] | ||
| [virtual-signal=signal-A] | |||
| [virtual-signal=signal-A | | [[File:Signal-A.png|28px]] [Virtual Signal: Signal A] | ||
| [[File:Signal-A.png|28px]] [Virtual | |||
| <i>name</i> is the word signal followed by either an uppercase letter, number, color, each, everything or anything | | <i>name</i> is the word signal followed by either an uppercase letter, number, color, each, everything or anything | ||
Line 139: | Line 126: | ||
| Embeds a reference to a train stop. Clicking the icon will open the GUI for that train stop. | | Embeds a reference to a train stop. Clicking the icon will open the GUI for that train stop. | ||
<i>number</i> is the internal unit number of the train stop | <i>number</i> is the internal unit number of the train stop | ||
|- | |||
| [shortcut=<i>shortcut-name</i>] | |||
| [shortcut=give-spidertron-remote] | |||
| [[File:Spidertron_remote.png|28px]] [Shortcut: Create spidertron remote] | |||
| Embeds a reference to a shortcut from the [[Shortcut bar]]. Hovering over the rich text will show the shortcut's description. Clicking the rich text will act as if you clicked the shortcut. | |||
<i>shortcut-name</i> is the internal name of the shortcut. | |||
|- | |||
| [tip=<i>tip-name</i>] | |||
| [tip=spidertron-control] | |||
| [[File:Tip.png|28px]] [Tip: Spidertron control] | |||
| Embeds a reference to a tip from the "Tips and tricks" menu. Hovering over the icon will show the tip's text. Clicking the icon will open the "Tips and tricks" menu to that page. | |||
|- | |- | ||
Line 146: | Line 146: | ||
| Shows the given <i>text</i> with a <i>tooltip</i> that is specified with a [[Tutorial:Localisation#Localising_simple_strings|locale key]]. | | Shows the given <i>text</i> with a <i>tooltip</i> that is specified with a [[Tutorial:Localisation#Localising_simple_strings|locale key]]. | ||
|- | |||
| [quality=<i>tier</i>]<br> | |||
[item=<i>name</i>,quality=<i>tier</i>]<br> | |||
[entity=<i>name</i>,quality=<i>tier</i>]<br> | |||
<!--[recipe=<i>name</i>,quality=<i>tier</i>]<br> | |||
[fluid=<i>name</i>,quality=<i>tier</i>]<br> | |||
[virtual-signal=<i>name</i>,quality=<i>tier</i>]--> | |||
|[quality=normal]<br> | |||
[item=iron-plate,quality=normal]<br> | |||
[entity=small-biter,quality=uncommon]<br> | |||
<!--[recipe=basic-oil-processing,quality=rare]<br> | |||
[fluid=water,quality=epic]<br> | |||
[virtual-signal=signal-A,quality=legendary]--> | |||
| [[File:Quality normal.png|28px]] [Quality: Normal]<br> | |||
[[File:Iron_plate.png|28px]] [Item: Iron plate]<br> | |||
[[File:Uncommon small biter.png|28px]] [Entity: Uncommon Small biter]<br> | |||
| | |||
[[Quality]] can also be optionally specified on the following tags: item, entity, recipe, fluid, and virtual-signal<br> | |||
It can also be added to the other tags that use <i>name</i>, but they ignore it. | |||
The normal quality is the default quality and won't modify tags. Any other quality won't exist without [[Space Age]] and Quality | |||
<i>tier</i> is the internal-name of the quality | |||
|- | |||
| [space-platform=<i>number</i>] | |||
| [space-platform=3] | |||
| [[File:Space_platform_hub.png|28px]] [Space platform: My cool space platform] | |||
| <i>number</i> is the internal id of a space-platform, starting with 1. | |||
Hovering over the rich text will show a view of the space platform. Clicking the rich text will go to the platform in remote view. | |||
|- | |||
| [planet=<i>name</i>] | |||
| [planet=gleba] | |||
| [[File:Gleba.png|28px]] [Planet: Gleba] | |||
| <i>name</i> is the internal name of a planet. | |||
Available planets in Space Age are: nauvis, gleba, fulgora, vulcanus, and aquilo. | |||
[[Nauvis]] is part of the base game and will always be available. | |||
|- | |||
| [space-location=<i>name</i>] | |||
| [space-location=shattered-planet] | |||
[space-location=gleba] | |||
| [[File:Shattered Planet.png|28px]] [Space location: Shattered Planet] | |||
[[File:Gleba.png|28px]] [Planet: Gleba] | |||
| <i>name</i> is the internal name of a space-location in Space Age. | |||
Available locations in Space Age are: nauvis, gleba, fulgora, vulcanus, aquilo, solar-system-edge, and shattered-planet. | |||
For the planet's listed in the section above 'planet' will be used as the text prefix instead of 'space-location' | |||
|- | |||
| [space-age] | |||
| [space-age] | |||
| [[File:Space_age_icon.png|28px]] | |||
| Embeds the Space Age icon. | |||
|} | |} | ||
Latest revision as of 00:14, 8 November 2024
Rich text formatting in allows the use of tags within most of the game's textboxes to change the visual formatting of text or to embed interactable images/entities. Predefined text tags are employed for this purpose.
Tags
Tags are useful for sharing blueprints, marking map locations in chat or adding icons to map markers and train stations. Ctrl+alt clicking the map or ground will automatically insert a gps tag and post it into chat.
Shift clicking most things with the console open will insert a tag for that thing into chat. The chat and many other textboxes in the game have a button on the right edge that opens an icon selector. This can be used to easily insert rich text tags of recipes, items, fluids, virtual signals and entities into the textbox.
When used in chat, the tag image will be followed by a text description, except for the img tag. Used elsewhere only the image is shown.
Syntax | Example Input | Example Result | Description |
---|---|---|---|
[img=class/name] [img=class.name] |
[img=item.iron-plate] [img=quantity-time] |
Embeds only a small inline game graphic. The period format must be used in game save names. This tag uses sprite paths:
class is any of: item, entity, technology, recipe, item-group, fluid, tile, virtual-signal, achievement, equipment, space-location or utility. name: see below sprite-prototype-name is the internal-name of a sprite prototype. | |
[item=name] | [item=iron-plate] | [Item: Iron plate] | name is the internal-name of the item |
[entity=name] | [entity=small-biter] | [Entity: Small biter] | name is the internal-name of the entity |
[technology=name] | [technology=logistics] | [Technology: Logistics] | name is the internal-name of the technology |
[recipe=name] | [recipe=basic-oil-processing] | [Recipe: Basic oil processing] | name is the internal-name of the recipe, usually the item name |
[item-group=name] | [item-group=combat] | [Item Group: Combat] | name is any of: logistics, production, intermediate-products, combat, fluids or signals |
[fluid=name] | [fluid=water] | [Fluid: Water] | name is the internal name of the fluid |
[tile=name] | [tile=grass-3] | [Tile: Grass 3] | name is the internal name of the tile, usually the lowercase name with hyphens replacing spaces as written from the map editor |
[virtual-signal=name] | [virtual-signal=signal-A] | [Virtual Signal: Signal A] | name is the word signal followed by either an uppercase letter, number, color, each, everything or anything |
[achievement=name] | [achievement=minions] | [Achievement: Minions] | name is the internal-name of the achievement, usually the lowercase name with hyphens replacing spaces |
[gps=x,y]
[gps=x,y,surface] |
[gps=0,0] | [Location: 0,0] | Embeds a map location and marks the location on the map of other players.
x is the x point coordinate |
[special-item=blueprint_string] | [Blueprint] | Embeds a blueprint. Players can get a blueprint item by clicking the icon.
blueprint_string is the blueprint string of a blueprint, deconstruction planner or upgrade planners | |
[armor=player] | [armor=Player] | [Armor: Player] | Embeds the armor of a player. Allows other players to see the equipment installed.
player is the name of the player |
[train=number] | [train=93] | [Train: 2] | Embeds a reference to a train. Clicking the icon will open the train GUI for that train.
number is the internal unit number of the train |
[train-stop=number] | [train-stop=100] | [Train Stop: Trangar] | Embeds a reference to a train stop. Clicking the icon will open the GUI for that train stop.
number is the internal unit number of the train stop |
[shortcut=shortcut-name] | [shortcut=give-spidertron-remote] | [Shortcut: Create spidertron remote] | Embeds a reference to a shortcut from the Shortcut bar. Hovering over the rich text will show the shortcut's description. Clicking the rich text will act as if you clicked the shortcut.
shortcut-name is the internal name of the shortcut. |
[tip=tip-name] | [tip=spidertron-control] | [Tip: Spidertron control] | Embeds a reference to a tip from the "Tips and tricks" menu. Hovering over the icon will show the tip's text. Clicking the icon will open the "Tips and tricks" menu to that page. |
[tooltip=text,tooltip locale key] | [tooltip=Hover to see "Iron plate",item-name.iron-plate] | Hover to see "Iron plate" | Shows the given text with a tooltip that is specified with a locale key. |
[quality=tier] [item=name,quality=tier] |
[quality=normal] [item=iron-plate,quality=normal] |
[Quality: Normal] |
Quality can also be optionally specified on the following tags: item, entity, recipe, fluid, and virtual-signal The normal quality is the default quality and won't modify tags. Any other quality won't exist without Space Age and Quality tier is the internal-name of the quality |
[space-platform=number] | [space-platform=3] | [Space platform: My cool space platform] | number is the internal id of a space-platform, starting with 1.
Hovering over the rich text will show a view of the space platform. Clicking the rich text will go to the platform in remote view. |
[planet=name] | [planet=gleba] | [Planet: Gleba] | name is the internal name of a planet.
Available planets in Space Age are: nauvis, gleba, fulgora, vulcanus, and aquilo. Nauvis is part of the base game and will always be available. |
[space-location=name] | [space-location=shattered-planet]
[space-location=gleba] |
[Space location: Shattered Planet] | name is the internal name of a space-location in Space Age.
Available locations in Space Age are: nauvis, gleba, fulgora, vulcanus, aquilo, solar-system-edge, and shattered-planet. For the planet's listed in the section above 'planet' will be used as the text prefix instead of 'space-location' |
[space-age] | [space-age] | Embeds the Space Age icon. |
Text modifiers
The color and font of text can be changed
Syntax | Example Input | Example Result | Description |
---|---|---|---|
[color=rgb]...[/color] [color=#rrggbb]...[/color] |
[color=red]Red[/color] text [color=1,0,0]Red[/color] text |
Red text | rgb is a comma separated RGB color ranging from 0 to 1 or 0 to 255, or a color name
Available colors: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid. |
[font=font-name]...[/font] [font=font-name]...[.font] |
[font=default-bold]Bold text[/font] | Bold text | font-name is the name of the Factorio font to render |