Skip to content

Commit

Permalink
docs: action condition configuration (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkafar authored Jun 4, 2022
1 parent ba49bef commit 7751aef
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
4. [Location configuration](#location-configuration)
5. [`GameObject` configuration](#gameobject-configuration)
6. [Action configuration](#action-configuration)
7. [Example of full configuration structure](#example-of-full-configuration-structure)
8. [Example configurations](#example-configurations)
7. [Condition configuration](#condition-configuration)
8. [Example of full configuration structure](#example-of-full-configuration-structure)
9. [Example configurations](#example-configurations)

## Root directory

Expand Down Expand Up @@ -177,7 +178,9 @@ common part first. Each action consists of following properties

* `tag` - Action tag; this is required however it is not used for now. Action tag does not have to be unique for now.
* `type` - One of action types mentioned above.
* *(optional)* `before` - Configuration of action to be triggered before the proper action is executed,
* *(optional)* `condition` - Condition configuration. The action won't be executed until the condition is satisfied.
Aliases: `requires`. See [condition configuration](#condition-configuration)
* *(optional)* `before` - Configuration of action to be triggered before the proper action is executed.
e.g. you may want to change location before starting the dialogue. (TODO: Logic is not implemented as for now).
* *(optional)* `after` - Configuration of action to be triggered after the proper action is executed, e.g. you may want
give player some output or item. (TODO: Logic is not implemented as for now).
Expand Down Expand Up @@ -212,6 +215,15 @@ Let's look at specific action types:
* `assetPath` - Path to the image with background for the dialogue window. As any path, it must be eiter absolute or relative to the engine's source root.
Aliases: `asset-path`, `asset`.

## Condition configuration

Describes condition that must be satisfied before the action can be executed.

Condition consists of following properties:

* `type` - One of types:
* `item-required` - Requires following props:
* `item-tag` - Tag of the item that must be in the player inventory for the action to be executed.

## Example of full configuration structure

Expand Down

0 comments on commit 7751aef

Please sign in to comment.