In other languages: Русский

Rich text: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(first draft)
 
No edit summary
Line 14: Line 14:
! style="width:50%"| Description
! style="width:50%"| Description
|-
|-
| <code>[color=<i>rgb</i>]...[/color]</code>
| [color=<i>rgb</i>]...[/color]
| <code>[color=red]Red[/color] text</code>
| [color=red]Red[/color] text
<code>[color=1,0,0]Red[/color] text</code>
[color=1,0,0]Red[/color] text
| <span style="color: #ff0000">Red</span> text
| <span style="color: #ff0000">Red</span> text
| <code><i>rgb</i></code> is a comma separated RGB color ranging from 0 to 1, or an English color name
| <i>rgb</i> is a comma separated RGB color ranging from 0 to 1, or a color name
Available colors: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid.
|-
|-
| <code>[font</i>=<i>font-name</i>]...[/font]</code>
| [font</i>=<i>font-name</i>]...[/font]
| <code>[font=default-bold]Bold text</code>
| [font=default-bold]Bold text
| <b>Bold text</b>
| <b>Bold text</b>
| <code><i>font-name</i></code> is the name of the factorio font to render
| <i>font-name</i> is the name of the Factorio font to render
|}
|}


Line 32: Line 33:


Shift clicking most things with the console open will insert a tag for that thing into chat.
Shift clicking most things with the console open will insert a tag for that thing into chat.
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.


{| class="wikitable"
{| class="wikitable"
Line 41: Line 45:


|-
|-
| <code>[img=<i>class</i>/<i>name</i>]</code>
| [img=<i>class</i>/<i>name</i>]
<code>[img=<i>class</i>.<i>name</i>]</code>
[img=<i>class</i>.<i>name</i>]
| <code>[img=item/iron-plate]</code>
| [img=item/iron-plate]
| [[File:Iron_plate.png|24px]]
| [[File:Iron_plate.png|28px]]
| Embeds only a small inline game graphic. The slash may be substituted for a period in save names.
| Embeds only a small inline game graphic. The slash may be substituted for a period in save names.
<code><i>class</i></code> is any of: item, entity, technology, recipe, item-group, fluid, tile, virtual-signal or achievement
<i>class</i> is any of: item, entity, technology, recipe, item-group, fluid, tile, virtual-signal or achievement
<code><i>name</i></code>: see below
<i>name</i>: see below


|-
|-
| <code>[item=<i>name</i>]</code>
| [item=<i>name</i>]
| <code>[item=iron-plate]</code>
| [item=iron-plate]
| [[File:Iron_plate.png|24px]]
| [[File:Iron_plate.png|28px]] [Item: Iron plate]
| <code>name</code> is the internal-name of the item
| <i>name</i> is the internal-name of the item


|-
|-
| <code>[entity=<i>name</i>]</code>
| [entity=<i>name</i>]
| <code>[entity=small-biter]</code>
| [entity=small-biter]
| [[File:Behemoth_biter.png|24px]]
| [[File:Small_biter.png|28px]] [Entity: Small biter]
| <code>name</code> is the internal-name of the entity
| <i>name</i> is the internal-name of the entity


|-
|-
| <code>[technology=<i>name</i>]</code>
| [technology=<i>name</i>]
| <code>[technology=logistics]</code>
| [technology=logistics]
| [[File:Logistics_(research).png|24px]]
| [[File:Logistics_(research).png|28px]] [Technology: Logistics]
| <code>name</code> is the internal-name of the technology
| <i>name</i> is the internal-name of the technology


|-
|-
| <code>[recipe=<i>name</i>]</code>
| [recipe=<i>name</i>]
| <code>[recipe=basic-oil-processing]</code>
| [recipe=basic-oil-processing]
| [[File:Basic_oil_processing.png|24px]]
| [[File:Basic_oil_processing.png|28px]] [Recipe: Basic oil processing]
| <code>name</code> is the internal-name of the recipe, usually the entity name
| <i>name</i> is the internal-name of the recipe, usually the entity name


|-
|-
| <code>[item-group=<i>name</i>]</code>
| [item-group=<i>name</i>]
| <code>[item-group=combat]</code>
| [item-group=combat]
| [[File:Item-group_military.png|24px]]
| [[File:Item-group_military.png|28px]] [Item Group: Combat]
| <code>name</code> is any of: logistics, production, intermediate-products, combat, fluids or signals
| <i>name</i> is any of: logistics, production, intermediate-products, combat, fluids or signals


|-
|-
| <code>[fluid=<i>name</i>]</code>
| [fluid=<i>name</i>]
| <code>[fluid=water]</code>
| [fluid=water]
| [[File:Water.png|24px]]
| [[File:Water.png|28px]] [Fluid: Water]
| <code>name</code> is the internal name of the fluid
| <i>name</i> is the internal name of the fluid


|-
|-
| <code>[tile=<i>name</i>]</code>
| [tile=<i>name</i>]
| <code>[tile=grass-3]</code>
| [tile=grass-3]
| [[File:Grass_3.png|24px]]
| [[File:Grass_3.png|28px]] [Tile: Grass 3]
| <code>name</code> is the internal name of the tile, usually the lowercase name with hyphens replacing spaces as written from the map editor
| <i>name</i> is the internal name of the tile, usually the lowercase name with hyphens replacing spaces as written from the map editor


|-
|-
| <code>[virtual-signal=<i>name</i>]</code>
| [virtual-signal=<i>name</i>]
| <code>[virtual-signal=signal-A]</code>
| [virtual-signal=signal-A]
| [[File:Signal-A.png|24px]]
| [[File:Signal-A.png|28px]] [Virtual Signal: Signal A]
| <code>name</code> 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


|-
|-
| <code>[achievement=<i>name</i>]</code>
| [achievement=<i>name</i>]
| <code>[achievement=minions]</code>
| [achievement=minions]
| [[File:Minions-achievement.png|24px]]
| [[File:Minions-achievement.png|28px]] [Achievement: Minions]
| <code>name</code> is the internal-name of the achievement, usually the lowercase name with hyphens replacing spaces
| <i>name</i> is the internal-name of the achievement, usually the lowercase name with hyphens replacing spaces


|-
|-
| <code>[gps=<i>x</i>,<i>y</i>]</code>
| [gps=<i>x</i>,<i>y</i>]
| <code>map origin: [gps=0,0]</code>
| [gps=0,0]
| map origin: [[File:Map.png|24px]]
| [[File:Map.png|28px]] [Location: 0,0]
| Embeds a map location and marks the location on the map of other players.
| Embeds a map location and marks the location on the map of other players.
<code>x</code> is the x point coordinate
<i>x</i> is the x point coordinate
<code>y</code> is the y point coordinate  
<i>y</i> is the y point coordinate  


|-
|-
| <code>[special-item=<i>blueprint_string</i>]</code>
| [special-item=<i>blueprint_string</i>]
|  
|  
|  
| [[File:Blueprint.png|28px]] [Blueprint]
| Embeds a blueprint. Other players can get a blueprint item by clicking the icon
| Embeds a blueprint. Players can get a blueprint item by clicking the icon.
<code>blueprint_string</code> is the blueprint string of a blueprint, deconstruction planner or upgrade planners
<i>blueprint_string</i> is the blueprint string of a blueprint, deconstruction planner or upgrade planners


|-
|-
| <code>[armor=<i>player</i>]</code>
| [armor=<i>player</i>]
| <code>[armor=Bilka]</code>
| [armor=Player]  
|  
| [[File:Power_armor_MK2.png|28px]] [Armor: Player]
| Embeds the armor of a player. Allows other players to see the equipment installed.
| Embeds the armor of a player. Allows other players to see the equipment installed.
<code>player</code> is the name of the player
<i>player</i> is the name of the player


|-
|-
| <code>[train=<i>number</i>]</code>
| [train=<i>number</i>]
| <code>[train=93]</code>
| [train=93]  
|  
| [[File:Locomotive.png|28px]] [Train: 2]
| Embeds a reference to a train. Clicking the icon will open the train GUI for that train.
| Embeds a reference to a train. Clicking the icon will open the train GUI for that train.
<code>number</code> is the ingame number of the train
<i>number</i> is the internal unit number of the train


|-
|-
| <code>[train-stop=<i>number</i>]</code>
| [train-stop=<i>number</i>]
| <code>[train-stop=100]</code>
| [train-stop=100]
|  
| [[File:Train_stop.png|28px]] [Train Stop: Trangar]
| 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.
<code>number</code> is the ingame number of the train
<i>numbe</i>r is the internal unit number of the train stop


|}
|}

Revision as of 17:23, 12 March 2019


Rich text formatting introduced in 0.17.0 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.

Text modifiers

The color and font of text can be changed

Syntax Example Input Example Result Description
[color=rgb]...[/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 a color name

Available colors: default, red, green, blue, orange, yellow, pink, purple, white, black, gray, brown, cyan, acid.

[font=font-name]...[/font] [font=default-bold]Bold text Bold text font-name is the name of the Factorio font to render

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.

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] Iron plate.png Embeds only a small inline game graphic. The slash may be substituted for a period in save names.

class is any of: item, entity, technology, recipe, item-group, fluid, tile, virtual-signal or achievement name: see below

[item=name] [item=iron-plate] Iron plate.png [Item: Iron plate] name is the internal-name of the item
[entity=name] [entity=small-biter] Small biter.png [Entity: Small biter] name is the internal-name of the entity
[technology=name] [technology=logistics] Logistics (research).png [Technology: Logistics] name is the internal-name of the technology
[recipe=name] [recipe=basic-oil-processing] Basic oil processing.png [Recipe: Basic oil processing] name is the internal-name of the recipe, usually the entity name
[item-group=name] [item-group=combat] Item-group military.png [Item Group: Combat] name is any of: logistics, production, intermediate-products, combat, fluids or signals
[fluid=name] [fluid=water] Water.png [Fluid: Water] name is the internal name of the fluid
[tile=name] [tile=grass-3] Grass 3.png [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] Signal-A.png [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] Minions-achievement.png [Achievement: Minions] name is the internal-name of the achievement, usually the lowercase name with hyphens replacing spaces
[gps=x,y] [gps=0,0] Map.png [Location: 0,0] Embeds a map location and marks the location on the map of other players.

x is the x point coordinate y is the y point coordinate

[special-item=blueprint_string] Blueprint.png [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] Power armor MK2.png [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] Locomotive.png [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.png [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