Datalinks syntax

From Alpha Centauri Wiki
Revision as of 03:20, 1 May 2013 by Guvner (Talk | contribs)

Jump to: navigation, search

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”

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.