Cattle and Crops: Mission Documentation
condition
- Conditions are the mission's separate required steps that have to be fulfilled one after another. They are defined in the wanted execution order.
- Depending on the
drawMode
setting in the<mission>
-Element, they are listed in theMissionInfoWindow
in the top left corner of the screen. - They generally have at least one description text (
description
), but can display additional extended information (longer texts, images) in a separate window (<condition>/<window>
). - Each condition has a
type
attribute (with often its own extended settings) that defines the condition for the fulfillment. - Each condition can execute one or multiple
command
s upon fulfillment. These are defined within a commands block within the condition.
General attributes
Condition text: stringId, description
stringId
is the condition text's stringId (path in the translation table)description
is the condition text's fallback, which will be used when the entry defined instringId
can't be found.
Attribute | Type | Value | Description |
---|---|---|---|
stringId |
string |
* |
Text stringId path |
description |
string |
* |
Fallback text |
Display in the condition window: action, makeWindowTopMost
action
can optionally display the button or key of an assigned action, no matter if it matches the condition content or not.makeWindowTopMost
optionally defines if theMissionInfoWindow
should be rendered in front of all other windows while the condition is active. Mostly necessary when a menu is open at the same time which would cover the condition text otherwise.
Attribute | Type | Value | Description |
---|---|---|---|
(action ) |
string |
**** (4 chars) |
The ID of the action to be shown |
(makeWindowTopMost ) |
integer |
0 | 1 |
0 : window will not be rendered in the foreground, 1 : window will be rendered in the foregroundDefault: 0 , except when the type is widget |
Markers: mpInstance, mpPosition, mpRotation, mpBoxOffset
A .wld instance can be defined that will be placed at a definied position. For example: a marker, a vehicle ghost, ...
Certain condition types have default markers at their target positions:
The mentioned types overwrite the set mpPosition
with their own target position (e.g. posX
,posY
,posZ
when using driveVehicle
).
Attribute | Type | Value | Description |
---|---|---|---|
mpInstance |
string |
[path] |
Path to the .wld instance |
mpPosition |
float;float (;float ) |
*;*;* | *;* |
x, y und z component of the target coordinate |
mpRotation |
float |
[-360.0 , 360.0 ] |
Instance rotation around z, in degrees |
(mpBox ) |
float;float;float |
>0;>0;>0 |
Size (x, y, z) for the box geometries within the instance |
(mpBoxOffset ) |
float;float;float |
*;*;* |
Position offset (x, y, z). The offset is added to the existing local position of the box. If the original size of the box is smaller than the new size, the offset has to be subtracted per component from the position. |
Sound: completeSound, noCompleteSound
completeSound
optionally defines the path to a sound file that will be player upon fulfillment instead of the default sound.noCompleteSound
optionally defines if the completion sound should be skipped.
Attribute | Type | Value | Description |
---|---|---|---|
(completeSound ) |
string |
* |
Path to the sound file |
(noCompleteSound ) |
boolean |
true | false |
If true , NO sound is playedDefault: false |
Examples
…
<conditions>
<!-- Regular condition with text -->
<condition type="..." stringId="MISS-STP1" description="Step 1 Fallback Text" ... />
<!-- Condition with text and command callback -->
<condition type="..." stringId="MISS-STP2" description="Step 2 Fallback Text" ... >
<commands>
<command type="setMoney" money="12345">
</commands>
</condition>
<!-- Condition that's rendered above all other windows -->
<condition type="..." makeWindowTopMost="1" stringId="MISS-STP3" description="Step 3 Fallback Text" ... />
<!-- Condition with custom completion sound -->
<condition type="..." description="Step Fallback Text" completeSound="path/to/my/sound/file" ... />
<!-- Condition with deactivated completion sound -->
<condition type="..." noCompleteSound="true" ... />
<!-- Condition with a custom action -->
<condition type="..." action="lite" ... />
<!-- Condition with a custom marker -->
<condition type="..." mpInstance="path/to/my/marker" mpPosition="24.3;-701.0;3" mpRotation="123.4" mpBox="4;5;3" mpBoxOffset="0.73;-0.3;4.2" … />
</conditions>
…