Skip to content

Commit 9d1e3b1

Browse files
cs7.41 doc update
1 parent 490266a commit 9d1e3b1

File tree

1 file changed

+29
-23
lines changed

1 file changed

+29
-23
lines changed

WIKI/ChatScript-Advanced-User-Manual.md

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ the active string implicitly invokes the equivalent of sprintf.
114114

115115
User variables also come in permanent and transient forms.
116116

117-
|Variable scope| syntax example | description
117+
|variable scope| syntax<br>example| description
118118
|--------------|------------------|-----------------------------------------
119119
| permanent | `$permvar` | start with a single `$` and are preserved across user interactions (are saved and restored from disk). You can see and alter their value from anywhere.
120120
| transient | `$$transientvar` | start with `$$` and completely disappear when a user interaction happens (are not saved to disk). You can see and alter their value from anywhere.
@@ -354,27 +354,27 @@ the topic name and the (keywords list). You may have multiple flags. E.g.
354354

355355
The flags and their meanings are:
356356

357-
|flag | description
358-
|:----------------:|--------------
359-
|__`random`__ | search rules randomly instead of linearly
360-
|__`norandom`__ | (default) search rules linearly
361-
|__`keep`__ | do not erase responders ever. Gambits (and rejoinders) are not affected by this
362-
|__`erase`__ | (default) erase responders that successfully generate output.<br>Gambits automatically erase unless you suppress them specifically.
363-
|__`nostay`__ | do not consider this a topic to remain in, leave it (except for rejoinders)
364-
|__`stay`__ | (default) make this a pending topic when it generates output
365-
|__`repeat`__ | allow rules to generate output which has been output recently
366-
|__`norepeat`__ | (default) do not generate output if it matches output made recently
367-
|__`priority`__ | raise the priority of this topic when matching keywords
368-
|__`normal`__ | (default) give this topic normal priority when matching keywords
369-
|__`deprioritize`__| lower the priority of this topic when matching keywords
370-
|__`system`__ | this is a system topic. It is automatically `nostay`, `keep`.<br>`keep` automatically applies to gambits as well. The system never looks to these topics for gambits. System topics can never be considered pending (defined shortly). They can not have themselves or their rules be enabled or disabled. Their status/data is never saved to user files.
371-
|__`user`__ | (default) this is a normal topic
372-
|__`noblocking`__ | should not perform any blocking tests on this topic in `:verify`
373-
|__`nopatterns`__ | should not perform any pattern tests on this topic in `:verify`
374-
|__`nosamples`__ | should not perform any sample tests on this topic in `:verify`
375-
|__`nokeys`__ | should not perform any keyword tests on this topic in `:verify`
376-
|__`more`__ | normally if you try to redeclare a concept, you get an error. `more` tells CS you intend to extend the concept and allows additional keywords.
377-
|__`bot=name`__ | if this is given, only named bots are allowed to use this topic. See [ChatScript Multiple Bots](ChatScript-Multiple-Bots.md) manual.
357+
| flag | description
358+
|--------------|--------------
359+
|`random` | search rules randomly instead of linearly
360+
|`norandom` | (default) search rules linearly
361+
|`keep` | do not erase responders ever. Gambits (and rejoinders) are not affected by this
362+
|`erase` | (default) erase responders that successfully generate output.<br>Gambits automatically erase unless you suppress them specifically.
363+
|`nostay` | do not consider this a topic to remain in, leave it (except for rejoinders)
364+
|`stay` | (default) make this a pending topic when it generates output
365+
|`repeat` | allow rules to generate output which has been output recently
366+
|`norepeat` | (default) do not generate output if it matches output made recently
367+
|`priority` | raise the priority of this topic when matching keywords
368+
|`normal` | (default) give this topic normal priority when matching keywords
369+
|`deprioritize`| lower the priority of this topic when matching keywords
370+
|`system` | this is a system topic. It is automatically `nostay`, `keep`.<br>`keep` automatically applies to gambits as well. The system never looks to these topics for gambits. System topics can never be considered pending (defined shortly). They can not have themselves or their rules be enabled or disabled. Their status/data is never saved to user files.
371+
|`user` | (default) this is a normal topic
372+
|`noblocking` | should not perform any blocking tests on this topic in `:verify`
373+
|`nopatterns` | should not perform any pattern tests on this topic in `:verify`
374+
|`nosamples` | should not perform any sample tests on this topic in `:verify`
375+
|`nokeys` | should not perform any keyword tests on this topic in `:verify`
376+
|`more` | normally if you try to redeclare a concept, you get an error. `more` tells CS you intend to extend the concept and allows additional keywords.
377+
|`bot=name` | if this is given, only named bots are allowed to use this topic. See [ChatScript Multiple Bots](ChatScript-Multiple-Bots.md) manual.
378378

379379

380380
## Rules that erase and repeat
@@ -1453,7 +1453,7 @@ Whereas most programming language separate their arguments with commas because
14531453
they are reserved tokens in their language, in ChatScript a comma is a normal word. So
14541454
you separate arguments to functions just with spaces.
14551455

1456-
?: ( hi) ^FiveArgFunction( 1 3 my , word)
1456+
?: ( hi) ^FiveArgFunction( 1 3 my , word)
14571457

14581458
Outputmacros can return a value, just like a normal function. You just dump the text as
14591459
you would a message to the user.
@@ -1908,13 +1908,17 @@ nothing. If the boot layer is not current, then you call ^REBOOT() which erases
19081908
boot data and treats the remainder of the script as refilling the boot layer with new facts and
19091909
variables.
19101910

1911+
19111912
## `^CSSHUTDOWN()`
19121913

19131914
outputmacro: ^CSSHUTDOWN()
19141915

19151916

19161917
This function, if defined by you, will be executed on shutdown or restart of the ChatScript system.
19171918

1919+
1920+
## `^cs_topic_enter()`
1921+
19181922
outputmacro: ^cs_topic_enter(^topic ^mode)
19191923

19201924
When the system begins a topic and this function is defined by you, it will be invoked
@@ -1923,6 +1927,8 @@ representing the way it is being invoked.
19231927
Values of `^mode` are: `s`, `?`, `u`, `t`, which represent statements, questions, both, or gambits.
19241928
While your function is executing, neither `^cs_topic_enter` or `^cs_topic_exit` will be invoked.
19251929

1930+
## `^cs_topic_exit()`
1931+
19261932
outputmacro: ^cs_topic_exit(^topic ^result)
19271933

19281934
When the system exits a topic and this function is defined by you, it will be invoked after

0 commit comments

Comments
 (0)