Difference between revisions of "Datalinks syntax"

From Alpha Centauri Wiki
Jump to: navigation, search
m (added linebreak guidance.)
m
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<poem>Syntax for use in datalinks and other text files:
+
The game text files are encoded in [http://en.wikipedia.org/wiki/Windows-1252 Windows-1252].
<nowiki>
+
Lines which are too long (gotta figure out exact limits) cause crashes. Putting linebreaks in (not ^, real linebreaks) to divide up lines avoids this.
+
  
^ - Newline. Literal newlines are ignored, and often required on longer texts, since there's a per-line character limit (you get crashes if you exceed it).
+
== Mark-up used in concepts(x).txt and help(x).txt ==
^^ - Center text
+
Lines beginning with “;” are comments in the files and are not displayed.
{text} - Makes text bold.
+
 
$LINK<X=Y> - Link. X is displayed text, Y is the number of the concept you're linking to. Starting point for various classes of concept/help file section:
+
Lines beginning with the number sign “#” are control lines. The word that adjoins the number sign is required for the executable to identify the entry.
Conceptsx
+
 
#CONCEPT: 0 (e.g. $LINK<Mineral=42>)
+
Carriage returns are ignored, rather lines beginning with ^ begin on new lines.
#ADVCONCEPT: 1000 (e.g. $LINK<Commerce (Advanced)=10003>, $LINK<Advanced Morale=10017>)
+
Lines beginning with ^^ are centred. If these characters are used within a line they will appear as text.
----
+
 
Helpx
+
Bracketing text with the { and } characters highlights it by changing the text colour from #749c38 to the lighter #b8c060 (at normal gamma settings).
#UNITDESC: 3000 (e.g. $LINK<probe teams=30006>)
+
 
#CHASSISDESC: 4000 (e.g. $LINK<Missile=40008>)
+
Links are formatted like so: $LINK<some text=55>
#REACTORDESC: 5000 (e.g. $LINK<reactor technology=50001>)
+
 
#WEAPONDESC: 6000 (e.g. $LINK<Tectonic Missiles=60024>)
+
Where “some text” is the text of the link and 55 determines which help(x).txt or concepts(x).txt article will be the target of the link. The text of the link is highlighted as above and underlined.
#ARMORDESC: 7000 (e.g. $LINK<Resonance 3 Armor=70011>)
+
== Links formatting ==
#ABILDESC: 8000 (e.g. $LINK<Algorithmic Enhancement=80028>)
+
=== concepts(x).txt ===
#HELPTERRALAND: 9000 (e.g. $LINK<farm=90000>)
+
A list of article titles follows “#TITLES”, each one on a new line
#HELPFAC: 10000 (e.g. $LINK<Tachyon Field=100005>)
+
 
#HELPPROJ: 11000 (e.g. $LINK<The Hunter-Seeker Algorithm=110085>)
+
This is followed by the control line “#ADVTITLES” and a list of advanced concepts titles in the same format as above.
#HELPSOC: 12000 (e.g. $LINK<Cybernetic Society=120017>)
+
 
#HELPEFFECT: 13000 (e.g. $LINK<GROWTH=130006>)
+
The concepts and advanced concepts are then listed below under control lines where the line “#CONCEPT6” links the following article to the sixth title appearing under “#TITLES” and “#ADVCONCEPT14” links the following article to the fourteenth title listed under “#ADVTITLES” and so on.
----
+
{| class="wikitable"
Other
+
|-
Technologies: 14000 (e.g. $LINK<Advanced Ecological Engineering=140062>)
+
! Category !! Control prefix !! Starting link identifier
Factions: 15000 (e.g. $LINK<factions=150001>)
+
|-
</poem></nowiki>
+
| Concepts || CONCEPT || 0
 +
|-
 +
| Advanced concepts || ADVCONCEPT || 10000
 +
|}
 +
''Concept link identifiers depend on the control line identifier of the concept so “#ADVCONCEPT4” is linked to using “10004”.''
 +
=== help(x).txt ===
 +
{| class="wikitable"
 +
|-
 +
! Category !! Control prefix !! Starting link identifier
 +
|-
 +
| Units || UNITDESC || 30000
 +
|-
 +
| Chassis || CHASSISDESC || 40000
 +
|-
 +
| Reactors || REACTORDESC || 50000
 +
|-
 +
| Weapons || WEAPONDESC || 60000
 +
|-
 +
| Armour || ARMORDESC || 70000
 +
|-
 +
| Special abilities || ABILDESC || 80000
 +
|-
 +
| Terraforming (land) || HELPTERRALAND || 90000
 +
|-
 +
| Terraforming (sea) || HELPTERRASEA || 90020
 +
|}
 +
''Terraforming (sea) link identifiers act as a subset of terraforming beginning from 90000 so “#HELPTERRASEA2” is linked to using “90022”.''
 +
{| class="wikitable"
 +
|-
 +
! Category !! Control prefix !! Starting link identifier
 +
|-
 +
| Facilities || HELPFAC || 100000
 +
|-
 +
| Secret Projects || HELPPROJ || 110000
 +
|-
 +
| Politics || HELPSOC || 120000
 +
|-
 +
| Economics || HELPSOC || 120005
 +
|-
 +
| Values || HELPSOC || 120010
 +
|-
 +
| Future society || HELPSOC || 120015
 +
|-
 +
| Social factors || HELPEFFECT || 130000
 +
|}
 +
=== Hardcoded ===
 +
{| class="wikitable"
 +
|-
 +
! Category !! Starting link identifier
 +
|-
 +
| Technologies || 140000
 +
|}
 +
''Technology link identifiers depend on the order in which the technology appears in the alpha(x).txt file so “140006” links to “Centauri”.''
 +
{| class="wikitable"
 +
|-
 +
! Category !! Starting link identifier
 +
|-
 +
| Factions || 150000
 +
|}
 +
''Faction link identifiers depend on which factions are included in a particular game, and link dynamically (150001–150007) so should not be used in the datalinks.''
 +
 
 +
== Standardization ==
 +
 
 +
Entries should be in passive language, information contained in other entries should be linked to rather than repeated, the story should be maintained at all times. Formulas and mechanics should be reserved for Advanced Concepts.
 +
 
 +
The first instance in an article of the article’s title in full, should be bold.
 +
 
 +
References to menu items or key presses should be written in Tile Case and bracketed with single quotation marks: in Press ‘Space Bar’.
 +
 
 +
Breaks in emphasis should be em dashes “—” rather than double hyphens “--”
 +
 
 +
All quotation marks should be curled.
 +
 
 +
Division should use the division symbol “÷” rather than the solidus “/”. Multiplication should use the multiplication symbol “×” rather than the asterisk “*” or the letter “x”.
 +
 
 +
Probabilities should be written as percentages rather then fractions “50%” rather then “1/2”.
 +
 
 +
There should be a non-breaking space “ ” between a distance and it’s unit of measurement. “25 mm” rather then “25mm”
 +
 
 +
[[Category:Modifications]]

Latest revision as of 23:03, 2 December 2014

The game text files are encoded in Windows-1252.

Contents

Mark-up used in concepts(x).txt and help(x).txt

Lines beginning with “;” are comments in the files and are not displayed.

Lines beginning with the number sign “#” are control lines. The word that adjoins the number sign is required for the executable to identify the entry.

Carriage returns are ignored, rather lines beginning with ^ begin on new lines. Lines beginning with ^^ are centred. If these characters are used within a line they will appear as text.

Bracketing text with the { and } characters highlights it by changing the text colour from #749c38 to the lighter #b8c060 (at normal gamma settings).

Links are formatted like so: $LINK<some text=55>

Where “some text” is the text of the link and 55 determines which help(x).txt or concepts(x).txt article will be the target of the link. The text of the link is highlighted as above and underlined.

Links formatting

concepts(x).txt

A list of article titles follows “#TITLES”, each one on a new line

This is followed by the control line “#ADVTITLES” and a list of advanced concepts titles in the same format as above.

The concepts and advanced concepts are then listed below under control lines where the line “#CONCEPT6” links the following article to the sixth title appearing under “#TITLES” and “#ADVCONCEPT14” links the following article to the fourteenth title listed under “#ADVTITLES” and so on.

Category Control prefix Starting link identifier
Concepts CONCEPT 0
Advanced concepts ADVCONCEPT 10000

Concept link identifiers depend on the control line identifier of the concept so “#ADVCONCEPT4” is linked to using “10004”.

help(x).txt

Category Control prefix Starting link identifier
Units UNITDESC 30000
Chassis CHASSISDESC 40000
Reactors REACTORDESC 50000
Weapons WEAPONDESC 60000
Armour ARMORDESC 70000
Special abilities ABILDESC 80000
Terraforming (land) HELPTERRALAND 90000
Terraforming (sea) HELPTERRASEA 90020

Terraforming (sea) link identifiers act as a subset of terraforming beginning from 90000 so “#HELPTERRASEA2” is linked to using “90022”.

Category Control prefix Starting link identifier
Facilities HELPFAC 100000
Secret Projects HELPPROJ 110000
Politics HELPSOC 120000
Economics HELPSOC 120005
Values HELPSOC 120010
Future society HELPSOC 120015
Social factors HELPEFFECT 130000

Hardcoded

Category Starting link identifier
Technologies 140000

Technology link identifiers depend on the order in which the technology appears in the alpha(x).txt file so “140006” links to “Centauri”.

Category Starting link identifier
Factions 150000

Faction link identifiers depend on which factions are included in a particular game, and link dynamically (150001–150007) so should not be used in the datalinks.

Standardization

Entries should be in passive language, information contained in other entries should be linked to rather than repeated, the story should be maintained at all times. Formulas and mechanics should be reserved for Advanced Concepts.

The first instance in an article of the article’s title in full, should be bold.

References to menu items or key presses should be written in Tile Case and bracketed with single quotation marks: in Press ‘Space Bar’.

Breaks in emphasis should be em dashes “—” rather than double hyphens “--”

All quotation marks should be curled.

Division should use the division symbol “÷” rather than the solidus “/”. Multiplication should use the multiplication symbol “×” rather than the asterisk “*” or the letter “x”.

Probabilities should be written as percentages rather then fractions “50%” rather then “1/2”.

There should be a non-breaking space “ ” between a distance and it’s unit of measurement. “25 mm” rather then “25mm”