Skip to content

Commit

Permalink
docs(objects): fixup internal links and broken formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Feb 23, 2024
1 parent 39c0606 commit 546c4bd
Show file tree
Hide file tree
Showing 20 changed files with 229 additions and 128 deletions.
1 change: 1 addition & 0 deletions docs/engine/objects/oCCSTrigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
— Gothic I: `24577`<br/>
— Gothic II: `24577`<br/>
**ZenKit Class:** `VCutsceneTrigger`<br/>
**Sources:**<br/>
[spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)<br/>
[gothic-library.ru](http://www.gothic-library.ru/publ/class_occstrigger/1-1-0-530)

Expand Down
2 changes: 1 addition & 1 deletion docs/engine/objects/oCMobBed.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
— Gothic II: `35585`<br/>
**ZenKit Class:** `VBed`<br/>
**Sources:**<br/>
[spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)<br/>
[spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)

VObject marking beds for NPCs and the player to sleep on. In the original Gothic I, there is a bug which prevents
`oCMobBed`s from working correctly, so it is recommended to instead use [`oCMobDoor`](oCMobDoor.md) and attach the
Expand Down
32 changes: 16 additions & 16 deletions docs/engine/objects/oCMobInter.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Interactive objects can be interacted with by NPCs and the player. Every time th
{: .sp-class}
- [stateNum](#statenum) = 0
{: .sp-int}
- [triggerTarget](#triggerTarget) = ""
- [triggerTarget](#triggertarget) = ""
{: .sp-string}
- [useWithItem](#useWithItem) = ""
- [useWithItem](#usewithitem) = ""
{: .sp-string}
- [conditionFunc](#conditionFunc) = ""
- [conditionFunc](#conditionfunc) = ""
{: .sp-string}
- [onStateFunc](#onStateFunc) = ""
- [onStateFunc](#onstatefunc) = ""
{: .sp-string}
- [rewind](#rewind) = FALSE
{: .sp-bool}
Expand All @@ -52,13 +52,13 @@ Interactive objects can be interacted with by NPCs and the player. Every time th
{: .sp-class}
- [stateNum](#statenum) = 0
{: .sp-int}
- [triggerTarget](#triggerTarget) = ""
- [triggerTarget](#triggertarget) = ""
{: .sp-string}
- [useWithItem](#useWithItem) = ""
- [useWithItem](#usewithitem) = ""
{: .sp-string}
- [conditionFunc](#conditionFunc) = ""
- [conditionFunc](#conditionfunc) = ""
{: .sp-string}
- [onStateFunc](#onStateFunc) = ""
- [onStateFunc](#onstatefunc) = ""
{: .sp-string}
- [rewind](#rewind) = FALSE
{: .sp-bool}
Expand All @@ -75,13 +75,13 @@ Interactive objects can be interacted with by NPCs and the player. Every time th
{: .sp-class}
- [stateNum](#statenum) = 0
{: .sp-int}
- [triggerTarget](#triggerTarget) = ""
- [triggerTarget](#triggertarget) = ""
{: .sp-string}
- [useWithItem](#useWithItem) = ""
- [useWithItem](#usewithitem) = ""
{: .sp-string}
- [conditionFunc](#conditionFunc) = ""
- [conditionFunc](#conditionfunc) = ""
{: .sp-string}
- [onStateFunc](#onStateFunc) = ""
- [onStateFunc](#onstatefunc) = ""
{: .sp-string}
- [rewind](#rewind) = FALSE
{: .sp-bool}
Expand All @@ -98,13 +98,13 @@ Interactive objects can be interacted with by NPCs and the player. Every time th
{: .sp-class}
- [stateNum](#statenum) = 0
{: .sp-int}
- [triggerTarget](#triggerTarget) = ""
- [triggerTarget](#triggertarget) = ""
{: .sp-string}
- [useWithItem](#useWithItem) = ""
- [useWithItem](#usewithitem) = ""
{: .sp-string}
- [conditionFunc](#conditionFunc) = ""
- [conditionFunc](#conditionfunc) = ""
{: .sp-string}
- [onStateFunc](#onStateFunc) = ""
- [onStateFunc](#onstatefunc) = ""
{: .sp-string}
- [rewind](#rewind) = FALSE
{: .sp-bool}
Expand Down
2 changes: 1 addition & 1 deletion docs/engine/objects/oCMobSwitch.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
— Gothic II: `35585`<br/>
**ZenKit Class:** `VSwitch`<br/>
**Sources:**<br/>
[spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)<br/>
[spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)

A VObject representing a switch with two states.

Expand Down
2 changes: 1 addition & 1 deletion docs/engine/objects/oCMobWheel.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
— Gothic II: `35585`<br/>
**ZenKit Class:** `VWheel`<br/>
**Sources:**<br/>
[spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)<br/>
[spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)

A wheel with four different states. For example, this is used for the gates of the old camp in Gothic I.

Expand Down
2 changes: 1 addition & 1 deletion docs/engine/objects/oCZoneMusic.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

A VObject which defines the music to be played within its bounding box. Music zones may overlap; if they do, their
[`priority`](#priority) property determines which music zone should be used. The camera object is used to test which
music zone applies. If no music zone applies the music defined in the optional [`zCZoneMusicDefault`](#zCZoneMusicDefault)
music zone applies. If no music zone applies the music defined in the optional [`oCZoneMusicDefault`](oCZoneMusicDefault.md)
is used.

The name of the music theme to be played is defined by the [`vobName`](zCVob.md#vobname).
Expand Down
2 changes: 1 addition & 1 deletion docs/engine/objects/oCZoneMusicDefault.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
**Sources:**<br/>
[spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)

Determines the default music to be played when the camera is outside any [`oCZoneMusic`](#oCZoneMusic) zones. The
Determines the default music to be played when the camera is outside any [`oCZoneMusic`](oCZoneMusic.md) zones. The
volume-related options of the zone are ignored. There may only be one `oCZoneMusicDefault` object in a world.

=== "Gothic 1"
Expand Down
188 changes: 140 additions & 48 deletions docs/engine/objects/zCCodeMaster.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,95 +9,187 @@
— Gothic I: `0`<br/>
— Gothic II: `0`<br/>
**ZenKit Class:** `zCCodeMaster`
**Source:**<br/>
[spacerhilfedatei.sph](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei)<br/>
[gothic-library.ru](http://www.gothic-library.ru/publ/zccodemaster/1-1-0-526)

`zCCodeMaster` VObjects keep a list of 'slave' VObjects and keep track of events received by them. If the master
receives an `OnTrigger` event from a slave, it remembers that it did. After it has receives an `OnTrigger` message
from all slaves, it emits an `OnTrigger` event to the [`triggerTarget`](#triggerTarget). Receiving or sending an
from all slaves, it emits an `OnTrigger` event to the [`triggerTarget`](#triggertarget). Receiving or sending an
`OnTrigger` event is also referred to as an 'activation' for this purpose.

<ul class="sp-list">
<li class="sp-class"><a href="../zCVob/">zCVob</a></li>
<li class="sp-class">
<span>zCCodeMaster</span>
<ul class="sp-list">
<li class="sp-string"><a href="#triggerTarget">triggerTarget</a> = ""</li>
<li class="sp-folder">
<span>CodeMaster</span>
<ul class="sp-list">
<li class="sp-bool"><a href="#orderRelevant">orderRelevant</a> = TRUE</li>
<li class="sp-folder">
<span>OrderRelevant</span>
<ul class="sp-list">
<li class="sp-bool"><a href="#firstFalseIsFailure">firstFalseIsFailure</a> = TRUE</li>
<li class="sp-string"><a href="#triggerTargetFailure">triggerTargetFailure</a> = ""</li>
</ul>
</li>
<li class="sp-folder">
<span>OrderNotRelevant</span>
<ul class="sp-list">
<li class="sp-bool"><a href="#untriggerCancels">untriggerCancels</a> = FALSE</li>
</ul>
</li>
<li class="sp-string"><a href="#slaveVobName">slaveVobName0</a> = ""</li>
<li class="sp-string"><a href="#slaveVobName">slaveVobName1</a> = ""</li>
<li class="sp-string"><a href="#slaveVobName">slaveVobName2</a> = ""</li>
</ul>
</li>
</ul>
</li>
</ul>
=== "Gothic 1"

- [zCVob](zCVob.md)
{: .sp-class}
- zCCodeMaster
{: .sp-class}
- [triggerTarget](#triggertarget) = ""
{: .sp-string}
- CodeMaster
{: .sp-folder}
- [orderRelevant](#orderrelevant) = FALSE
{: .sp-bool}
- OrderRelevant
{: .sp-folder}
- [firstFalseIsFailure](#firstfalseisfailure) = TRUE
{: .sp-bool}
- [triggerTargetFailure](#triggertargetfailure) = ""
{: .sp-string}
- OrderNotRelevant
{: .sp-folder}
- [untriggerCancels](#untriggercancels) = FALSE
{: .sp-bool}
- [slaveVobName0](#slavevobname) = ""
{: .sp-string}
- [slaveVobName1](#slavevobname) = ""
{: .sp-string}
- [slaveVobName2](#slavevobname) = ""
{: .sp-string}

=== "Gothic 2"

- [zCVob](zCVob.md)
{: .sp-class}
- zCCodeMaster
{: .sp-class}
- [triggerTarget](#triggertarget) = ""
{: .sp-string}
- CodeMaster
{: .sp-folder}
- [orderRelevant](#orderrelevant) = FALSE
{: .sp-bool}
- OrderRelevant
{: .sp-folder}
- [firstFalseIsFailure](#firstfalseisfailure) = TRUE
{: .sp-bool}
- [triggerTargetFailure](#triggertargetfailure) = ""
{: .sp-string}
- OrderNotRelevant
{: .sp-folder}
- [untriggerCancels](#untriggercancels) = FALSE
{: .sp-bool}
- [slaveVobName0](#slavevobname) = ""
{: .sp-string}
- [slaveVobName1](#slavevobname) = ""
{: .sp-string}
- [slaveVobName2](#slavevobname) = ""
{: .sp-string}

=== "Gothic 1 (Save)"

- [zCVob](zCVob.md)
{: .sp-class}
- zCCodeMaster
{: .sp-class}
- [triggerTarget](#triggertarget) = ""
{: .sp-string}
- CodeMaster
{: .sp-folder}
- [orderRelevant](#orderrelevant) = FALSE
{: .sp-bool}
- OrderRelevant
{: .sp-folder}
- [firstFalseIsFailure](#firstfalseisfailure) = TRUE
{: .sp-bool}
- [triggerTargetFailure](#triggertargetfailure) = ""
{: .sp-string}
- OrderNotRelevant
{: .sp-folder}
- [untriggerCancels](#untriggercancels) = FALSE
{: .sp-bool}
- [slaveVobName0](#slavevobname) = ""
{: .sp-string}
- [slaveVobName1](#slavevobname) = ""
{: .sp-string}
- [slaveVobName2](#slavevobname) = ""
{: .sp-string}

=== "Gothic 2 (Save)"

- [zCVob](zCVob.md)
{: .sp-class}
- zCCodeMaster
{: .sp-class}
- [triggerTarget](#triggertarget) = ""
{: .sp-string}
- CodeMaster
{: .sp-folder}
- [orderRelevant](#orderrelevant) = FALSE
{: .sp-bool}
- OrderRelevant
{: .sp-folder}
- [firstFalseIsFailure](#firstfalseisfailure) = TRUE
{: .sp-bool}
- [triggerTargetFailure](#triggertargetfailure) = ""
{: .sp-string}
- OrderNotRelevant
{: .sp-folder}
- [untriggerCancels](#untriggercancels) = FALSE
{: .sp-bool}
- [slaveVobName0](#slavevobname) = ""
{: .sp-string}
- [slaveVobName1](#slavevobname) = ""
{: .sp-string}
- [slaveVobName2](#slavevobname) = ""
{: .sp-string}
- [numSlavesTriggered](#numslavestriggered)
{: .sp-int}
- slaveTriggered0
{: .sp-type}
- slaveTriggered1
{: .sp-type}

## Properties

### `triggerTarget` {: .sp-string}
#### `triggerTarget` {: .sp-string}

: The name of the VObject to send an `OnTrigger` event to after all slaves have fired in the correct order.

### `orderRelevant` {: .sp-bool}
#### `orderRelevant` {: .sp-bool}

: Controls whether the master should keep track of the order it receives messages from its slaves.

* `TRUE` — Only send an `OnTrigger` event to the [`triggerTarget`](#triggerTarget) if the slaves have fired in
* `TRUE` — Only send an `OnTrigger` event to the [`triggerTarget`](#triggertarget) if the slaves have fired in
the exact order they are configured here. Also counts multiple activations.
* `FALSE` — Send an `OnTrigger` event to the [`triggerTarget`](#triggerTarget) after all slaves have fired at least
* `FALSE` — Send an `OnTrigger` event to the [`triggerTarget`](#triggertarget) after all slaves have fired at least
once, regardless of order.

### `firstFalseIsFailure` {: .sp-bool}
#### `firstFalseIsFailure` {: .sp-bool}

: Controls when the slave activation sequence is considered to be incorrect. After the sequence is marked as
incorrect an `OnTrigger` event is sent to [`triggerTargetFailure`](#triggerTargetFailure).
incorrect an `OnTrigger` event is sent to [`triggerTargetFailure`](#triggertargetfailure).

* `TRUE` — The sequence is considered to be incorrect as soon as one slave is activated out-of-order.
* `FALSE` — The sequence is considered to be incorrect only after all slaves have been activated at least once and
they were activated out-of-order.

!!! warning
Only relevant if [`orderRelevant`](#orderRelevant) is set to `TRUE`.
Only relevant if [`orderRelevant`](#orderrelevant) is set to `TRUE`.

### `triggerTargetFailure` {: .sp-string}
#### `triggerTargetFailure` {: .sp-string}

: The name of the VObject to emit an `OnTrigger` event to if the activation sequence fails. This is controlled by
[`firstFalseIsFailure`](#firstFalseIsFailure).
[`firstFalseIsFailure`](#firstfalseisfailure).

!!! warning
Only relevant if [`orderRelevant`](#orderRelevant) is set to `TRUE`.
Only relevant if [`orderRelevant`](#orderrelevant) is set to `TRUE`.

### `untriggerCancels` {: .sp-bool}
#### `untriggerCancels` {: .sp-bool}

: Controls whether slaves can emit `OnUntrigger` events to the master VObject to mark themselves as deactivated.

* `TRUE` — When the master receives an `OnUntrigger` event from the slave, it marks it as not having been activated.
* `FALSE` — The master ignore `OnUntrigger` events from its slaves.

!!! warning
Only relevant if [`orderRelevant`](#orderRelevant) is set to `FALSE`.
Only relevant if [`orderRelevant`](#orderrelevant) is set to `FALSE`.


### `slaveVobName` {: .sp-string}
#### `slaveVobName` {: .sp-string}

: The name of a slave VObject.

## Sources
### `numSlavesTriggered` {: .sp-int}

The help file for the Spacer, found [here](https://wiki.worldofgothic.de/doku.php?id=spacer:hilfedatei) and the
Russian-language knowledge accumulator [gothic-library.ru](http://www.gothic-library.ru/publ/zccodemaster/1-1-0-526).
: Unknown.
6 changes: 3 additions & 3 deletions docs/engine/objects/zCMessageFilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ Transforms any incoming `OnTrigger` and `OnUntrigger` events before passing them
#### `triggerTarget` {: .sp-string}

: The name of the target VObject. All `OnTrigger` and `OnUntrigger` messages received by this `zCMessageFilter`
VObject are transformed according to [`onTrigger`](#onTrigger) and [`onUntrigger`](#onUntrigger) and then
VObject are transformed according to [`onTrigger`](#ontrigger) and [`onUntrigger`](#onuntrigger) and then
passed on to the VObject with the name specified in this field.

#### `onTrigger` {: .sp-enum}

: The type of event to emit to the [`triggerTarget`](#triggerTarget) if this VObject receives an `OnTrigger` message.
: The type of event to emit to the [`triggerTarget`](#triggertarget) if this VObject receives an `OnTrigger` message.

* `MT_NONE` — Don't emit another event.
* `MT_TRIGGER` — Emit an `OnTrigger` event.
Expand All @@ -87,7 +87,7 @@ Transforms any incoming `OnTrigger` and `OnUntrigger` events before passing them

#### `onUntrigger` {: .sp-enum}

: The type of event to emit to the [`triggerTarget`](#triggerTarget) if this VObject receives an `OnUntrigger` message.
: The type of event to emit to the [`triggerTarget`](#triggertarget) if this VObject receives an `OnUntrigger` message.

* `MT_NONE` — Don't emit another event.
* `MT_TRIGGER` — Emit an `OnTrigger` event.
Expand Down
Loading

0 comments on commit 546c4bd

Please sign in to comment.