Calculator definition files are XML files.
The following is the general, minimal structure:
<?xml version="1.0" encoding="UTF-8" ?>
<Calculator name="<insert name of calculator>" version="2">
<UserInterface>
...
</UserInterface>
</Calculator>
The magic happens in the <UserInterface>
section
The <UserInterface>
section contains elements that describe the calculator UI.
Some elements require an ID. Each ID must be unique.
<Header>Title</Header>
A switch that can give points
<CheckboxMission description="When should points be awarded for this mission?" score="20" id="my.id"/>
Bonus missions that can only be scored if another mission already has been solved:
<CheckboxMission description="When should points be awarded for this mission?" score="20" id="my.id" bonusFor="other.id"/>
Instead of bonusFor
, you can use requirement
. The difference is that bonusFor
additionally Bonus:
in front of the description.
When the noMaterial
flag is set to true, the no-material-at-the-end-of-the-match icon is displayed:
<CheckboxMission noMaterial="true" description="When should points be awarded for this mission?" score="20" id="my.id"/>
When the default
flag is set to true, the checkbox is enabled when opening a new calculator.
<CheckboxMission default="true" description="When should points be awarded for this mission?" score="20" id="my.id"/>
Displays a basic counter
<CounterMission description="When should points be awarded for this mission?" scoreEach="10" max="10" id="my.id"/>
When the noMaterial
flag is set, the no-material-at-the-end-of-the-match icon is displayed:
<CounterMission noMaterial="true" description="When should points be awarded for this mission?" scoreEach="10" max="10" id="my.id"/>
With the optional min
argument, a minimum can be set:
<CounterMission description="When should points be awarded for this mission?" scoreEach="10" max="10" min="1" id="my.id"/>
With the optional default
argument, a default can be set:
<CounterMission description="When should points be awarded for this mission?" default="5" scoreEach="10" max="10" id="my.id"/>
Make the max dependent on other tasks:
<CounterMission description="A trident part is in the research vessel." scoreEach="5" max="2" id="research-vessel.trident.main">
<CounterBudget>
<Requirement budget="1" requirement="sample-collection.trident-removal.single"/>
<Requirement budget="1" requirement="sample-collection.trident-removal.both"/>
</CounterBudget>
</CounterMission>
Use a nonlinear curve for scores:
<CounterMission description="Remaining Precision Tokens" max="6" default="6" id="some-id">
<ScoringCurve>
<Score count="6" score="50" />
<Score count="5" score="50" />
<Score count="4" score="35" />
<Score count="3" score="25" />
<Score count="2" score="15" />
<Score count="1" score="10" />
<Score count="0" score="0" />
</ScoringCurve>
</CounterMission>
A combination of CounterBudget and ScoringCurve is valid.
A CounterMission considers itself completed if the achieved score is greater than 0.
<RadioButtonMission id="radio-button-mission">
<Option description="option description" id="radio-button-mission.option.1" score="10" default="true" />
<Option description="option description" id="radio-button-mission.option.2" score="20" />
</RadioButtonMission>
The RadioButtonMission is considered solved when acting as a bonus if it has a value other than the default. Each option is considered solved if it has been selected.
RadioButtonMissions currently don't support bonusFor
.
If no default value is specified, the first value is selected.
When the noMaterial
flag is set to true
, the no-material-at-the-end-of-the-match icon is displayed.