"Achievements" container
From TrainzOnline
(Redirected from Achievements container)
The achievements container is a top-level config.txt file entry used by achievement group assets.
The achievements container is a list of achievement subcontainers with no standalone tags. Each achievement subcontainer uses the following format.
Contents |
Supported Tags
Each achievements subcontainer supports the following tags. Each tag is shown here with its default value.
name "" description "" category <NULLKUID> awarded-html "" icon "" conditions { }
name
- Type: Text
- Desc: The name of a string table entry with the user visible name of the achievement in it. This string table entry will be used in the Trainz user interface to refer to the achievement. It should be fairly short.
description
- Type: Text
- Desc: The name of a string table entry with the user visible description of the achievement in it. This string table entry will be used in the Trainz user interface to give detail to the user about the achievement. It can be quite verbose.
category
- Type: KUID
- Desc: The achievement-category asset for this achievement. Achievement categories are used to group achievements together in the user interface.
awarded-html
- Type: Filename
- Desc: An .html file from the current asset, to be shown to the user when the achievement is granted. This may include a sub-path. This is optional - there is a default grant HTML style should it not be present.
icon
- Type: Filename
- Desc: An image file (preferably .TGA, 64x64) to use as an icon for the achievement. Optional.
Conditions Container
- Type: Container
- Desc: The conditions container lists the conditions required to achieve this achievement.
The format for a condition is the name of the variable, followed by the value.
Variable names are the KUID of the owning asset, a dash, and the text name of the variable.
Achievements example
The following is an example of a simple achievements container which has two achievements, one of which has two conditions.
achievements { tutorials-1-and-2 { name "tutorials-1-and-2-name" description "tutorials-1-and-2-desc" category <kuid:447264:1008> icon "tutorials_1_and_2_complete.tga" conditions { <kuid:447264:1010>-tutorial-<kuid:447264:1021>-progress 1 <kuid:447264:1010>-tutorial-<kuid:447264:1037>-progress 1 } } drive-1-hour-dcc { name "drive-1-hour-dcc-name" description "drive-1-hour-dcc-desc" category <kuid:447264:1001> icon "beginning_driver.tga" conditions { <kuid:-16:10240>-driving-experience-dcc 3600 } } }