Localisation modding

From Stellaris Wiki
Jump to: navigation, search

Version

Outliner top.png
This article may contain outdated information that is inaccurate for the current version of the game. It was last updated for 1.6.

Localization is done in .yml files in the localisation/ folder, and is also used in literals in the common/random_names/00_war_names.txt file. The naming convention for .yml files is <file>_l_<language>.yml where <file> is the name given for this group of localizations, and <language> is the language the localization is for. Stellaris currently supports braz_por, english, french, german, polish, russian and spanish. The localization tag is followed by a colon, the numeral 0, and the localization text within double quotes (" ").

File Encoding[edit]

Stellaris's localisation files are encoded as UTF-8-BOM. They must be encoded in UTF-8-BOM, as even UTF-8 will fail to be parsed by Stellaris, and your localisation entries will not work

Bracket Commands[edit]

Bracket commands are enclosed in brackets ([ ]), start with a primary scope, end with a text retrieval, and can have one or more secondary scopes in between. The fields are separated by periods (.).

Scopes[edit]

Primary Scope[edit]

Command Example usage Comments
Actor [Actor.GetAllianceName] Used in diplomatic response messages. The faction initiating an action
Recipient [Recipient.GetName] Used in diplomatic response messages. The faction targeted by the action
Third_party [Third_party.GetName] Used in diplomatic response messages. A third party involved in the action
Root [Root.GetName] The event's ROOT scope
This [This.GetName] The current scope
From [From.From.GetName] The calling event's ROOT scope. For events further back in the call stack, From can also be used as a secondary scope
Prev [Prev.From.GetName] The previous scope. It is not obvious to me what Prev.From points to, but some project descriptions use it
<event target tag> [my_event_target.GetName] Event target tags are used without preceding them with event_target: in localization

Secondary Scopes[edit]

Command Example usage Comments
Capital [Root.Capital.GetName] The capital of the current scope
MainAttacker [This.MainAttacker.GetAllianceName] The main attacker of the current scope (must be used in a war scope), used in war name formats
Owner [Root.Owner.GetName] The current scope's owner
Planet [Root.Planet.GetName] The planet where the current scope is located
System [Root.System.GetName] The system where the primary scope is located

Text Retrieval[edit]

Command Example usage Comments
GetAdj [Root.GetAdj] The adjective associated with the current scope
GetAllianceName [This.MainAttacker.GetAllianceName] The name of the alliance the current scope belongs to
GetFleetName [Root.GetFleetName] The name of the fleet associated with the current scope
GetHomeWorldName [Root.GetHomeWorldName] The name of the home world of the current scope
GetLeaderName [Root.GetLeaderName] The name of the leader associated with the current scope
GetName [Root.GetName] The name associated with the current scope
GetPlanetMoon [Root.GetPlanetMoon] "planet" or "moon" depending on whether the current scope is a planet or moon
GetPopFactionName [Root.GetPopFactionName] The name of the currently scoped pop's faction
GetRandomSpeciesSound [Root.GetRandomSpeciesSound] A sound chosen randomly from a list of sounds associated with current scope's species
GetRegnalName [Root.GetRegnalName] The regnal name of the current scope
GetRulerName [Root.GetRulerName] The name of the ruler associated with the current scope
GetRulerTitle [Root.GetRulerTitle] The title of the ruler associated with the current scope
GetSpeciesAdj [Root.GetSpeciesAdj] The adjective for the species of the current scope
GetSpeciesClass [Root.GetSpeciesClass] The class to which the species of the current scope belongs
GetSpeciesClassPlural [Root.GetSpeciesClassPlural] The plural of the current scope's species' clas
GetSpeciesMouthName [Root.GetSpeciesMouthName] The word for the current scope's species' mouth
GetSpeciesName [Root.GetSpeciesName The name of the current scope's species
GetSpeciesNameCompliment [From.GetSpeciesNameCompliment] A compliment using the current scope's species
GetSpeciesNameInsult [From.From.GetSpeciesNameInsult] An insult using the current scope's species
GetSpeciesNamePlural [This.GetSpeciesNamePlural] The plural of current scope's species' name
GetSpeciesNamePluralCompliment [Root.SpeciesNamePluralCompliment] A compliment using the plural of the current scope's species' name
GetSpeciesNamePluralInsult [From.SpeciesNamePluralInsult] An insult using the plural of the current scope's species' name
GetSpeciesOrganName [From.GetSpeciesOrganName] The word for the current scope's species' internal organ
GetSpeciesSpawnNamePlural [Root.GetSpeciesSpawnNamePlural The word for the children of the current scope's species
GetStarName [Root.Capital.GetStarName] The name of the star where the current scope is located

Color Codes[edit]

Color codes start with §, which is followed by a single character specifying the color to be used until another color code is detected, or the end of the string. There may be other supported color codes, these are the ones found in a brief perusal of localization files. Within a $ command, the color for the displayed command may also be specified by preceding the closing $ with | and the color code character: $AGE|Y$

Code Color
B Blue
E Teal
G Green
H Orange
L Brown
M Purple
P Light red
R Red
S Dark orange
T Light grey
W White
Y Yellow
 ! Default

$ Codes[edit]

$ is used to delimit strings defined elsewhere to be expanded in the current string, or system statistics in GUI elements.

£ Codes[edit]

£ codes are used for the names of various system stats, including energy, minerals, influence, and the three research categories (engineering, physics and society.)

\ Codes[edit]

The sole \ code is \n, which inserts a newline, unless it is inside one of the above codes.

References[edit]


Modding
Static modding DefinesStatic modifiersMapSpeciesTraitsEthosGovernmentsEmpiresPoliciesEdictsTechnologyBuildingsShipsFleetsEventsCrisisAnomaliesAgenda
Dynamic modding EffectsConditionsScopesModifiersGameplayDecisionsObjectivesAI
Media/localisation Maya exporterGraphicsPortraitsFlagsEvent picturesEvent soundsInterfaceIconsMusicLocalisation
Other Console commandsSave-game editingSteam Workshop