Skip to content

Commit b8e0eed

Browse files
committed
Updates config docs to reflect new values
1 parent 10c9e2d commit b8e0eed

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

docs/3.0/concept-actions-functions.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,9 @@ What a beautiful evening, Amelia.
199199
In this example, both `<<HideTheMoon>>` and `<<FlickerStars>>` are custom actions.
200200

201201
There are three ways that custom actions can be used in Chatterbox; to swap between the different implementations set [`CHATTERBOX_ACTION_MODE`](reference-configuration?id=chatterbox_action_mode) to one of the following (the default is option `1`):
202-
- `0` Pass ChatterScript actions as a raw string to a function, defined by `CHATTERBOX_ACTION_FUNCTION`
203202
- `1` Treat actions as expressions
204203
- `2` Treat actions as they were in version 1 (Python-esque function calls)
205204

206-
Mode `0` is provided for compatibility with YarnScript. This mode instructs a chatter to actions as a strings into the game engine for manual interpretation. Chatterbox's implementation is that the function defined by `CHATTERBOX_ACTION_FUNCTION` is called when Chatterbox encounters an action, the first argument (`argument0`) for the function call being the text inside the action as a string. The intention is that you'd then parse that text and execute behaviour accordingly but... this sucks, it's a ton of work to actually do this, let's move on.
207-
208205
Mode `1` is the default Chatterbox behaviour:
209206
1. Every custom action is expected to use GML-like syntax: functions are executed using their name followed by a comma-separated list of arguments e.g. `<<CustomFunction("string", "string with spaces", 3.14, true)>>`
210207
2. Variables are referenced by using the standard dollar-prefixed token e.g. `<<TransmutateLead("Gold", $lead)>>`

docs/3.0/reference-configuration.md

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Whether to allow scripts to be added as Chatterbox functions.
2424

2525
## `CHATTERBOX_FUNCTION_ARRAY_ARGUMENTS`
2626

27-
_Typical value:_ `true`
27+
_Typical value:_ `false`
2828

29-
Whether to execute callbacks with an array of arguments. Setting this to `false` will execute callbacks with individual arguments.
29+
Whether to execute callbacks with an array of arguments. Setting this to `false` will execute callbacks with individual arguments, setting this to `true` will execute callbacks with a single array that contains the arguments.
3030

3131
&nbsp;
3232

@@ -108,16 +108,11 @@ Whether nodes without an explicit `<<stop>>` or `<<hopback>>` instruct at the en
108108

109109
_Typical value:_ `1`
110110

111-
`CHATTERBOX_ACTION_MODE` should be either 0, 1, or 2:
111+
`CHATTERBOX_ACTION_MODE` should be either 1 or 2:
112112

113-
- `0` Pass ChatterScript actions as a raw string to a function, defined by `CHATTERBOX_ACTION_FUNCTION`
114113
- `1` Treat actions as expressions
115114
- `2` Treat actions as they were in version 1 (Python-esque function calls)
116115

117-
### `CHATTERBOX_ACTION_MODE` = 0
118-
119-
This is the officially recommended behaviour. The full contents of the direction (everything between `<<` and `>>`) are passed as a string to a function for parsing and execution by the developer (you). I think this behaviour is stupid but I've included it here because technically that is what the ChatterScript specification says. You can set the function that receives the direction string by setting `CHATTERBOX_ACTION_FUNCTION`. Exactly what syntax you use for actions is therefore completely up to you.
120-
121116
### `CHATTERBOX_ACTION_MODE` = 1
122117

123118
Chatterbox will treat actions as expressions to be executed in a similar manner to in-line expressions. This is covenient if you want to treat actions as little snippets of code that Chatterbox can run. Syntax for actions becomes the same as in-line expressions, which is broadly similar to "standard" GML syntax. Functions that you wish to execute must be added by calling ChatterboxAddFunction(). An example would be: `<<giveItem("amulet", 1)>>`
@@ -128,14 +123,6 @@ Chatterbox will treat actions as expressions with a greatly simplified syntax. T
128123

129124
&nbsp;
130125

131-
## `CHATTERBOX_DIRECTION_FUNCTION`
132-
133-
_Typical value:_ `ExampleActionFunction`
134-
135-
Function to use to handle actions. This only applies in mode `0` (see below).
136-
137-
&nbsp;
138-
139126
## `CHATTERBOX_END_OF_NODE_HOPBACK`
140127

141128
_Typical value:_ `true`
@@ -208,20 +195,6 @@ Directory inside Included Files that holds all external ChatterScript files. Use
208195

209196
&nbsp;
210197

211-
## `CHATTERBOX_DECLARE_ON_COMPILE`
212-
213-
_Typical value:_ `true`
214-
215-
Whether to declare variables when Chatterbox script is compiled. Set to `false` for legacy (2.1 and earlier) behaviour.
216-
217-
&nbsp;
218-
219-
## `CHATTERBOX_LEGACY_WEIRD_OPERATOR_PRECEDENCE`
220-
221-
_Typical value:_ `false`
222-
223-
&nbsp;
224-
225198
## `CHATTERBOX_INDENT_TAB_SIZE`
226199

227200
_Typical value:_ `4`

0 commit comments

Comments
 (0)