@bgforge/mls-server 3.2.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,56 +1,56 @@
1
1
  {
2
- "BEGIN": {
2
+ "ADD_STATE_TRIGGER": {
3
3
  "contents": {
4
4
  "kind": "markdown",
5
- "value": "```weidu-d-tooltip\nBEGIN filename [ nonPausing ] state list\n```\nBEGIN tells WeiDU that you are creating a new DLG file from scratch. Any existing DLG file with the same name will be overwritten. The new DLG file contains exactly the states in the list. If you set nonPausing to a non-zero integer, the game will not \"stop time\" while the conversation takes place. By default time stops during conversations."
5
+ "value": "```weidu-d-tooltip\nADD_STATE_TRIGGER filename stateNumber stateTriggerString [ stateNumber list ] \tdActionWhen list\n```\nThis instructs WeiDU to add the stateTriggerString to all of the states with the given stateNumbers in the file filename.DLG (which must already exist). This is handy for adding extra conditions to an existing dialogue state."
6
6
  }
7
7
  },
8
- "APPEND": {
8
+ "ADD_TRANS_ACTION": {
9
9
  "contents": {
10
10
  "kind": "markdown",
11
- "value": "```weidu-d-tooltip\nAPPEND [ IF_FILE_EXISTS ] filename state list END\n```\nThis tells WeiDU to place the given states at the end of the already-existing dialogue filename.DLG. If there is IF_FILE_EXISTS and the file doesn't exists, this action is skipped."
11
+ "value": "```weidu-d-tooltip\nADD_TRANS_ACTION filename BEGIN stateNumber list END BEGIN transNumber list END transActionString dActionWhen list\n```\nThis instructs WeiDU to add the transActionString to all of the actions in all the transitions in all of the states specified by the stateNumber list and the transNumber list. You may use state labels in the stateNumber list. If the transNumber list is empty, the text added to all transitions on all listed states. Note that the BEGIN and END keywords must be present, even if you specify an empty list of transNumbers. The \"first\" transition is number 0. Any out-of-bounds transNumbers are silently ignored. The transActionString is prepended to any existing action text on a per-transition, per-state basis."
12
12
  }
13
13
  },
14
- "APPEND_EARLY": {
14
+ "ADD_TRANS_TRIGGER": {
15
15
  "contents": {
16
16
  "kind": "markdown",
17
- "value": "```weidu-d-tooltip\nAPPEND_EARLY [ IF_FILE_EXISTS ] filename state list END\n```\nWorks like APPEND, but the states are added early on in the compilation timeline (just after BEGIN is processed). Thus they can be the targets for INTERJECT_COPY_TRANS and friends."
17
+ "value": "```weidu-d-tooltip\nADD_TRANS_TRIGGER filename stateNumber transTriggerString [ moreStateNumbers list ] [ DO transNumber list ] dActionWhen list\n```\nThis instructs WeiDU to add the transTriggerString to all of the transitions in all of the states with the given stateNumbers in the file filename.DLG (which must already exist). This is often used in conjunction with EXTEND_BOTTOM to make a new branch in an existing state. Use ADD_TRANS_TRIGGER to add the negation of some predicate to all of the existing transitions, then use EXTEND_BOTTOM to add a transition with that predicate to that state. If a list of transNumbers is specified, only those transitions will have transTriggerString added to them. If such a list is not specified, every transition in every specified state will be modified. Note that the \"first\" transition is number 0."
18
18
  }
19
19
  },
20
- "CHAIN": {
20
+ "ALTER_TRANS": {
21
21
  "contents": {
22
22
  "kind": "markdown",
23
- "value": "```weidu-d-tooltip\nCHAIN\n [ IF [ WEIGHT #weight ] stateTriggerString THEN ]\n [ IF_FILE_EXISTS ] entryFilename entryLabel\n chainText list\n chainEpilogue\n```\nThis instructs WeiDU to make a long conversation in which the PC can say nothing. This is useful when you want the NPCs to talk among themselves for a long time. It and its friends, INTERJECT and INTERJECT_COPY_TRANS can incredible time-savers when you're writing non-trivial dialogue. See the examples for ideas. CHAIN will only append to existing dialogues. You cannot use CHAIN to create a new DLG. If the entryFilename file is missing and there is IF_FILE_EXISTS, the whole CHAIN is not compiled."
23
+ "value": "```weidu-d-tooltip\nALTER_TRANS filename BEGIN stateNumber list END BEGIN transNumber list END BEGIN changeWhat changeInto list END\n```\nFine altering of a single transition. See the ALTER_TRANS tutorial."
24
24
  }
25
25
  },
26
- "INTERJECT": {
26
+ "APPEND": {
27
27
  "contents": {
28
28
  "kind": "markdown",
29
- "value": "```weidu-d-tooltip\nINTERJECT entryFilename entryLabel globalVariable chainText list chainEpilogue\n```\nBehaves like CHAIN except that all of the chainText is additionally guarded by the transition predicate Global(\"globalVariable\",\"GLOBAL\",0) and accompanied by the action SetGlobal(\"globalVariable\",\"GLOBAL\",1). If you pick globalVariable to be unique, this will ensure that the chainText is only ever seen once per game. This is useful for making interjections."
29
+ "value": "```weidu-d-tooltip\nAPPEND [ IF_FILE_EXISTS ] filename state list END\n```\nThis tells WeiDU to place the given states at the end of the already-existing dialogue filename.DLG. If there is IF_FILE_EXISTS and the file doesn't exists, this action is skipped."
30
30
  }
31
31
  },
32
- "INTERJECT_COPY_TRANS": {
32
+ "APPEND_EARLY": {
33
33
  "contents": {
34
34
  "kind": "markdown",
35
- "value": "```weidu-d-tooltip\nINTERJECT_COPY_TRANS [ SAFE ] entryFilename entryLabel globalVariable chainText list\n```\nThis behaves just like INTERJECT except that the exitFilename and exitLabel are not present. Instead, whenever the dialogue would pass out of the chainText it follows a copy of the transitions that were at the state with stateLabel originally. This is convenient for making quick interjections from NPCs that do not actually change the true flow of the conversation. See the transition COPY_TRANS and the INTERJECT_COPY_TRANS tutorial for more information about this idea. If SAFE is specified, INTERJECT_COPY_TRANS will not warn about potentially unsafe uses (use this if you know it is safe)."
35
+ "value": "```weidu-d-tooltip\nAPPEND_EARLY [ IF_FILE_EXISTS ] filename state list END\n```\nWorks like APPEND, but the states are added early on in the compilation timeline (just after BEGIN is processed). Thus they can be the targets for INTERJECT_COPY_TRANS and friends."
36
36
  }
37
37
  },
38
- "INTERJECT_COPY_TRANS2": {
38
+ "BEGIN": {
39
39
  "contents": {
40
40
  "kind": "markdown",
41
- "value": "```weidu-d-tooltip\nINTERJECT_COPY_TRANS2 [ SAFE ] entryFilename entryLabel globalVariable chainText list\n```\nThis works just like INTERJECT_COPY_TRANS, except that any actions taken in the transitions of the state specified by entryFilename and entryLabel are preserved and kept with the speaker associated with entryFilename (rather than being mistakenly performed by your new speaker). See the INTERJECT_COPY_TRANS2 tutorial."
41
+ "value": "```weidu-d-tooltip\nBEGIN filename [ nonPausing ] state list\n```\nBEGIN tells WeiDU that you are creating a new DLG file from scratch. Any existing DLG file with the same name will be overwritten. The new DLG file contains exactly the states in the list. If you set nonPausing to a non-zero integer, the game will not \"stop time\" while the conversation takes place. By default time stops during conversations."
42
42
  }
43
43
  },
44
- "INTERJECT_COPY_TRANS3": {
44
+ "CHAIN": {
45
45
  "contents": {
46
46
  "kind": "markdown",
47
- "value": "```weidu-d-tooltip\nINTERJECT_COPY_TRANS3 [ SAFE ] entryFilename entryLabel globalVariable chainText list\n```\nThis works just like INTERJECT_COPY_TRANS, except that all states in chainText get a link in the entry state, rather than only the first one. Expecting documentation."
47
+ "value": "```weidu-d-tooltip\nCHAIN\n [ IF [ WEIGHT #weight ] stateTriggerString THEN ]\n [ IF_FILE_EXISTS ] entryFilename entryLabel\n chainText list\n chainEpilogue\n```\nThis instructs WeiDU to make a long conversation in which the PC can say nothing. This is useful when you want the NPCs to talk among themselves for a long time. It and its friends, INTERJECT and INTERJECT_COPY_TRANS can incredible time-savers when you're writing non-trivial dialogue. See the examples for ideas. CHAIN will only append to existing dialogues. You cannot use CHAIN to create a new DLG. If the entryFilename file is missing and there is IF_FILE_EXISTS, the whole CHAIN is not compiled."
48
48
  }
49
49
  },
50
- "INTERJECT_COPY_TRANS4": {
50
+ "EXTEND_BOTTOM": {
51
51
  "contents": {
52
52
  "kind": "markdown",
53
- "value": "```weidu-d-tooltip\nINTERJECT_COPY_TRANS4 [ SAFE ] entryFilename entryLabel globalVariable chainText list\n```\nThis is either INTERJECT_COPY_TRANS3 with INTERJECT_COPY_TRANS2-style action handling, or INTERJECT_COPY_TRANS2 with the extended INTERJECT_COPY_TRANS3 state creation rules, depending at how you look at it."
53
+ "value": "```weidu-d-tooltip\nEXTEND_BOTTOM filename stateNumber list [ #positionNumber ] transition list END\n```\nBehaves just like EXTEND_TOP but adds the transitions to the bottom of the list instead."
54
54
  }
55
55
  },
56
56
  "EXTEND_TOP": {
@@ -59,58 +59,64 @@
59
59
  "value": "```weidu-d-tooltip\nEXTEND_TOP filename stateLabel list [ #positionNumber ] transition list END\n```\nThis instructs WeiDU to add the transitions in list to the top of the transition list for the specified states in filename.DLG (which must already exist).If a positionNumber is given, WeiDU to insert the transitions just between already-existing transitions #positionNumber and #positionNumber+1 in the given states for the given file. The first transition is number 1."
60
60
  }
61
61
  },
62
- "EXTEND_BOTTOM": {
62
+ "INTERJECT": {
63
63
  "contents": {
64
64
  "kind": "markdown",
65
- "value": "```weidu-d-tooltip\nEXTEND_BOTTOM filename stateNumber list [ #positionNumber ] transition list END\n```\nBehaves just like EXTEND_TOP but adds the transitions to the bottom of the list instead."
65
+ "value": "```weidu-d-tooltip\nINTERJECT entryFilename entryLabel globalVariable chainText list chainEpilogue\n```\nBehaves like CHAIN except that all of the chainText is additionally guarded by the transition predicate Global(\"globalVariable\",\"GLOBAL\",0) and accompanied by the action SetGlobal(\"globalVariable\",\"GLOBAL\",1). If you pick globalVariable to be unique, this will ensure that the chainText is only ever seen once per game. This is useful for making interjections."
66
66
  }
67
67
  },
68
- "ADD_STATE_TRIGGER": {
68
+ "INTERJECT_COPY_TRANS": {
69
69
  "contents": {
70
70
  "kind": "markdown",
71
- "value": "```weidu-d-tooltip\nADD_STATE_TRIGGER filename stateNumber stateTriggerString [ stateNumber list ] \tdActionWhen list\n```\nThis instructs WeiDU to add the stateTriggerString to all of the states with the given stateNumbers in the file filename.DLG (which must already exist). This is handy for adding extra conditions to an existing dialogue state."
71
+ "value": "```weidu-d-tooltip\nINTERJECT_COPY_TRANS [ SAFE ] entryFilename entryLabel globalVariable chainText list\n```\nThis behaves just like INTERJECT except that the exitFilename and exitLabel are not present. Instead, whenever the dialogue would pass out of the chainText it follows a copy of the transitions that were at the state with stateLabel originally. This is convenient for making quick interjections from NPCs that do not actually change the true flow of the conversation. See the transition COPY_TRANS and the INTERJECT_COPY_TRANS tutorial for more information about this idea. If SAFE is specified, INTERJECT_COPY_TRANS will not warn about potentially unsafe uses (use this if you know it is safe)."
72
72
  }
73
73
  },
74
- "ADD_TRANS_TRIGGER": {
74
+ "INTERJECT_COPY_TRANS2": {
75
75
  "contents": {
76
76
  "kind": "markdown",
77
- "value": "```weidu-d-tooltip\nADD_TRANS_TRIGGER filename stateNumber transTriggerString [ moreStateNumbers list ] [ DO transNumber list ] dActionWhen list\n```\nThis instructs WeiDU to add the transTriggerString to all of the transitions in all of the states with the given stateNumbers in the file filename.DLG (which must already exist). This is often used in conjunction with EXTEND_BOTTOM to make a new branch in an existing state. Use ADD_TRANS_TRIGGER to add the negation of some predicate to all of the existing transitions, then use EXTEND_BOTTOM to add a transition with that predicate to that state. If a list of transNumbers is specified, only those transitions will have transTriggerString added to them. If such a list is not specified, every transition in every specified state will be modified. Note that the \"first\" transition is number 0."
77
+ "value": "```weidu-d-tooltip\nINTERJECT_COPY_TRANS2 [ SAFE ] entryFilename entryLabel globalVariable chainText list\n```\nThis works just like INTERJECT_COPY_TRANS, except that any actions taken in the transitions of the state specified by entryFilename and entryLabel are preserved and kept with the speaker associated with entryFilename (rather than being mistakenly performed by your new speaker). See the INTERJECT_COPY_TRANS2 tutorial."
78
78
  }
79
79
  },
80
- "ADD_TRANS_ACTION": {
80
+ "INTERJECT_COPY_TRANS3": {
81
81
  "contents": {
82
82
  "kind": "markdown",
83
- "value": "```weidu-d-tooltip\nADD_TRANS_ACTION filename BEGIN stateNumber list END BEGIN transNumber list END transActionString dActionWhen list\n```\nThis instructs WeiDU to add the transActionString to all of the actions in all the transitions in all of the states specified by the stateNumber list and the transNumber list. You may use state labels in the stateNumber list. If the transNumber list is empty, the text added to all transitions on all listed states. Note that the BEGIN and END keywords must be present, even if you specify an empty list of transNumbers. The \"first\" transition is number 0. Any out-of-bounds transNumbers are silently ignored. The transActionString is prepended to any existing action text on a per-transition, per-state basis."
83
+ "value": "```weidu-d-tooltip\nINTERJECT_COPY_TRANS3 [ SAFE ] entryFilename entryLabel globalVariable chainText list\n```\nThis works just like INTERJECT_COPY_TRANS, except that all states in chainText get a link in the entry state, rather than only the first one. Expecting documentation."
84
84
  }
85
85
  },
86
- "REPLACE_TRANS_ACTION": {
86
+ "INTERJECT_COPY_TRANS4": {
87
87
  "contents": {
88
88
  "kind": "markdown",
89
- "value": "```weidu-d-tooltip\nREPLACE_TRANS_ACTION filename BEGIN stateNumber list END BEGIN transNumber list END oldText newText dActionWhen list\n```\nThis instructs WeiDU to replace all instances of oldText in newText to all of the actions in all the transitions in all of the states specified by the stateNumber list and the transNumber list. You may use state labels in the stateNumber list. If the transNumber list is empty, the text added to all transitions on all listed states. Note that the BEGIN and END keywords must be present, even if you specify an empty list of transNumbers. The \"first\" transition is number 0. Any out-of-bounds transNumbers are silently ignored."
89
+ "value": "```weidu-d-tooltip\nINTERJECT_COPY_TRANS4 [ SAFE ] entryFilename entryLabel globalVariable chainText list\n```\nThis is either INTERJECT_COPY_TRANS3 with INTERJECT_COPY_TRANS2-style action handling, or INTERJECT_COPY_TRANS2 with the extended INTERJECT_COPY_TRANS3 state creation rules, depending at how you look at it."
90
90
  }
91
91
  },
92
- "REPLACE_TRANS_TRIGGER": {
92
+ "REPLACE": {
93
93
  "contents": {
94
94
  "kind": "markdown",
95
- "value": "```weidu-d-tooltip\nREPLACE_TRANS_TRIGGER filename BEGIN stateNumber list END BEGIN transNumber list END oldText newText dActionWhen list\n```\nThis instructs WeiDU to replace all instances of oldText in newText to all of the triggers in all of the transitions in all of the states specified by the stateNumber list and the transNumber list. You may use state labels in the stateNumber list. If the transNumber list is empty, the text added to all transitions on all listed states. Note that the BEGIN and END keywords must be present, even if you specify an empty list of transNumbers. The \"first\" transition is number 0. Any out-of-bounds transNumbers are silently ignored."
95
+ "value": "```weidu-d-tooltip\nREPLACE filename state list END\n```\nThis instructs WeiDU to load filename.DLG and replace some of its states with the new ones described in the state list. All of the states should have numeric stateLabels (e.g., \"5\" or \"67\"). A new state with label X will replace the old state number X."
96
96
  }
97
97
  },
98
- "ALTER_TRANS": {
98
+ "REPLACE_ACTION_TEXT": {
99
99
  "contents": {
100
100
  "kind": "markdown",
101
- "value": "```weidu-d-tooltip\nALTER_TRANS filename BEGIN stateNumber list END BEGIN transNumber list END BEGIN changeWhat changeInto list END\n```\nFine altering of a single transition. See the ALTER_TRANS tutorial."
101
+ "value": "```weidu-d-tooltip\nREPLACE_ACTION_TEXT filename oldText newText [ moreFilenames ] dActionWhen list\n```\nThis instructs WeiDU to destructively replace every occurrence of oldText (which may be a regexp) in the stateActionStrings of filename.DLG (which must exist). This should only be used to patch or workaround existing dialogues. Never use this if you can help it."
102
102
  }
103
103
  },
104
- "REPLACE": {
104
+ "REPLACE_ACTION_TEXT_PROCESS": {
105
105
  "contents": {
106
106
  "kind": "markdown",
107
- "value": "```weidu-d-tooltip\nREPLACE filename state list END\n```\nThis instructs WeiDU to load filename.DLG and replace some of its states with the new ones described in the state list. All of the states should have numeric stateLabels (e.g., \"5\" or \"67\"). A new state with label X will replace the old state number X."
107
+ "value": "```weidu-d-tooltip\nREPLACE_ACTION_TEXT_PROCESS filename oldText newText [ moreFilenames ] dActionWhen list\n```\nThis instructs WeiDU to destructively replace every occurrence of oldText (which may be a regexp) in the stateActionStrings of filename.DLG (which must exist) with newText. However, newText is first compiled as a BAF action list. In particular, this means that replacing with commands like: ~DisplayString(Myself,@123)~ ... will do what you expect. This should only be used to patch or workaround existing dialogues. Never use this if you can help it."
108
108
  }
109
109
  },
110
- "SET_WEIGHT": {
110
+ "REPLACE_ACTION_TEXT_PROCESS_REGEXP": {
111
111
  "contents": {
112
112
  "kind": "markdown",
113
- "value": "```weidu-d-tooltip\nSET_WEIGHT filename stateLabel #stateWeight\n```\nThis instructs WeiDU to destructively change the WEIGHT of the given state in filename.DLG (which must exist). This should only be used to patch or workaround existing dialogues. Never use SET_WEIGHT if you can help it."
113
+ "value": "```weidu-d-tooltip\nREPLACE_ACTION_TEXT_PROCESS_REGEXP filenameRegexp oldText newText [ moreFilenameRegexps ] dActionWhen list\n```\nJust like REPLACE_ACTION_TEXT_PROCESS, but the filenames are regexps. The .DLG is implied. R_A_T_P_R is shorthand for REPLACE_ACTION_TEXT_PROCESS_REGEXP."
114
+ }
115
+ },
116
+ "REPLACE_ACTION_TEXT_REGEXP": {
117
+ "contents": {
118
+ "kind": "markdown",
119
+ "value": "```weidu-d-tooltip\nREPLACE_ACTION_TEXT_REGEXP filenameRegexp oldText newText [ moreFilenameRegexps ] dActionWhen list\n```\nJust like REPLACE_ACTION_TEXT but the filenames are regexps. The .DLG is implied, do not include it in your regexps."
114
120
  }
115
121
  },
116
122
  "REPLACE_SAY": {
@@ -125,70 +131,76 @@
125
131
  "value": "```weidu-d-tooltip\nREPLACE_STATE_TRIGGER filename stateNumber stateTriggerString [ stateNumber list ] \tdActionWhen list\n```\nThis instructs WeiDU to destructively set the stateTriggerString of all of the states with the given stateNumbers in the file filename.DLG (which must already exist). It should be used with caution."
126
132
  }
127
133
  },
128
- "REPLACE_TRIGGER_TEXT": {
134
+ "REPLACE_TRANS_ACTION": {
129
135
  "contents": {
130
136
  "kind": "markdown",
131
- "value": "```weidu-d-tooltip\nREPLACE_TRIGGER_TEXT filename oldText newText dActionWhen list\n```\nThis instructs WeiDU to destructively replace every occurrence of oldText (which may be a regexp) in the stateTriggerStrings and transTriggerStrings of filename.DLG (which must exist). This should only be used to patch or workaround existing dialogues. Never use this if you can help it."
137
+ "value": "```weidu-d-tooltip\nREPLACE_TRANS_ACTION filename BEGIN stateNumber list END BEGIN transNumber list END oldText newText dActionWhen list\n```\nThis instructs WeiDU to replace all instances of oldText in newText to all of the actions in all the transitions in all of the states specified by the stateNumber list and the transNumber list. You may use state labels in the stateNumber list. If the transNumber list is empty, the text added to all transitions on all listed states. Note that the BEGIN and END keywords must be present, even if you specify an empty list of transNumbers. The \"first\" transition is number 0. Any out-of-bounds transNumbers are silently ignored."
132
138
  }
133
139
  },
134
- "REPLACE_TRIGGER_TEXT_REGEXP": {
140
+ "REPLACE_TRANS_TRIGGER": {
135
141
  "contents": {
136
142
  "kind": "markdown",
137
- "value": "```weidu-d-tooltip\nREPLACE_TRIGGER_TEXT_REGEXP filenameRegexp oldText newText dActionWhen list\n```\nJust like REPLACE_TRIGGER_TEXT but the filename is a regexp. The .DLG is implied."
143
+ "value": "```weidu-d-tooltip\nREPLACE_TRANS_TRIGGER filename BEGIN stateNumber list END BEGIN transNumber list END oldText newText dActionWhen list\n```\nThis instructs WeiDU to replace all instances of oldText in newText to all of the triggers in all of the transitions in all of the states specified by the stateNumber list and the transNumber list. You may use state labels in the stateNumber list. If the transNumber list is empty, the text added to all transitions on all listed states. Note that the BEGIN and END keywords must be present, even if you specify an empty list of transNumbers. The \"first\" transition is number 0. Any out-of-bounds transNumbers are silently ignored."
138
144
  }
139
145
  },
140
- "REPLACE_ACTION_TEXT": {
146
+ "REPLACE_TRIGGER_TEXT": {
141
147
  "contents": {
142
148
  "kind": "markdown",
143
- "value": "```weidu-d-tooltip\nREPLACE_ACTION_TEXT filename oldText newText [ moreFilenames ] dActionWhen list\n```\nThis instructs WeiDU to destructively replace every occurrence of oldText (which may be a regexp) in the stateActionStrings of filename.DLG (which must exist). This should only be used to patch or workaround existing dialogues. Never use this if you can help it."
149
+ "value": "```weidu-d-tooltip\nREPLACE_TRIGGER_TEXT filename oldText newText dActionWhen list\n```\nThis instructs WeiDU to destructively replace every occurrence of oldText (which may be a regexp) in the stateTriggerStrings and transTriggerStrings of filename.DLG (which must exist). This should only be used to patch or workaround existing dialogues. Never use this if you can help it."
144
150
  }
145
151
  },
146
- "REPLACE_ACTION_TEXT_REGEXP": {
152
+ "REPLACE_TRIGGER_TEXT_REGEXP": {
147
153
  "contents": {
148
154
  "kind": "markdown",
149
- "value": "```weidu-d-tooltip\nREPLACE_ACTION_TEXT_REGEXP filenameRegexp oldText newText [ moreFilenameRegexps ] dActionWhen list\n```\nJust like REPLACE_ACTION_TEXT but the filenames are regexps. The .DLG is implied, do not include it in your regexps."
155
+ "value": "```weidu-d-tooltip\nREPLACE_TRIGGER_TEXT_REGEXP filenameRegexp oldText newText dActionWhen list\n```\nJust like REPLACE_TRIGGER_TEXT but the filename is a regexp. The .DLG is implied."
150
156
  }
151
157
  },
152
- "REPLACE_ACTION_TEXT_PROCESS": {
158
+ "R_A_T_P_R": {
153
159
  "contents": {
154
160
  "kind": "markdown",
155
- "value": "```weidu-d-tooltip\nREPLACE_ACTION_TEXT_PROCESS filename oldText newText [ moreFilenames ] dActionWhen list\n```\nThis instructs WeiDU to destructively replace every occurrence of oldText (which may be a regexp) in the stateActionStrings of filename.DLG (which must exist) with newText. However, newText is first compiled as a BAF action list. In particular, this means that replacing with commands like: ~DisplayString(Myself,@123)~ ... will do what you expect. This should only be used to patch or workaround existing dialogues. Never use this if you can help it."
161
+ "value": "```weidu-d-tooltip\nR_A_T_P_R filenameRegexp oldText newText [ moreFilenameRegexps ] dActionWhen list\n```\nJust like REPLACE_ACTION_TEXT_PROCESS, but the filenames are regexps. The .DLG is implied. R_A_T_P_R is shorthand for REPLACE_ACTION_TEXT_PROCESS_REGEXP (to avoid undue scrollbars in the readme on a 1024x768 monitor)."
156
162
  }
157
163
  },
158
- "R_A_T_P_R": {
164
+ "SET_WEIGHT": {
159
165
  "contents": {
160
166
  "kind": "markdown",
161
- "value": "```weidu-d-tooltip\nR_A_T_P_R filenameRegexp oldText newText [ moreFilenameRegexps ] dActionWhen list\n```\nJust like REPLACE_ACTION_TEXT_PROCESS, but the filenames are regexps. The .DLG is implied. R_A_T_P_R is shorthand for REPLACE_ACTION_TEXT_PROCESS_REGEXP (to avoid undue scrollbars in the readme on a 1024x768 monitor)."
167
+ "value": "```weidu-d-tooltip\nSET_WEIGHT filename stateLabel #stateWeight\n```\nThis instructs WeiDU to destructively change the WEIGHT of the given state in filename.DLG (which must exist). This should only be used to patch or workaround existing dialogues. Never use SET_WEIGHT if you can help it."
162
168
  }
163
169
  },
164
- "UNLESS": {
170
+ "COPY_TRANS": {
165
171
  "contents": {
166
172
  "kind": "markdown",
167
- "value": "```weidu-d-tooltip\nUNLESS String\n```\nThe action is not processed if the element being altered/replaced/added to contains a substring matching against the String regexp."
173
+ "value": "```weidu-d-tooltip\nCOPY_TRANS [ SAFE ] filename stateNumber\n```\nAt the end of the CHAIN text, copy all transitions from the given state in the given file. This is useful for interjections (see INTERJECT). If SAFE is specified, CHAIN will not warn about potentially unsafe uses of COPY_TRANS (use this if you know it is safe).\n\n---\n\n```weidu-d-tooltip\nCOPY_TRANS [ SAFE ] filename stateLabel\n```\nThis instructs WeiDU to copy all of the transitions from the state with the given stateLabel in filename.DLG. This copying takes place before all other D Actions. For example, this is a valid transition list: IF ~Before()~ THEN GOTO my_state COPY_TRANS PLAYER1 33 IF ~After()~ THEN EXTERN SOLA 55 If SAFE is specified, COPY_TRANS will not warn about potentially unsafe uses (use this if you know it is safe)."
168
174
  }
169
175
  },
170
- "EXTERN": {
176
+ "COPY_TRANS_LATE": {
171
177
  "contents": {
172
178
  "kind": "markdown",
173
- "value": "```weidu-d-tooltip\nEXTERN [ IF_FILE_EXISTS ] filename stateLabel\n```\nThe dialogue continues at the state with label stateLabel in the file filename.DLG. The whole transition is not compiled if there's IF_FILE_EXISTS and the file filename doesn't exist."
179
+ "value": "```weidu-d-tooltip\nCOPY_TRANS_LATE [ SAFE ] filename stateNumber\n```\nSame as above, but only copy after all the other D Actions have been applied.\n\n---\n\n```weidu-d-tooltip\nCOPY_TRANS_LATE [ SAFE ] filename stateLabel\n```\nSame as COPY_TRANS, but is invoked after all other D Actions."
174
180
  }
175
181
  },
176
- "COPY_TRANS": {
182
+ "BRANCH": {
177
183
  "contents": {
178
184
  "kind": "markdown",
179
- "value": "```weidu-d-tooltip\nCOPY_TRANS [ SAFE ] filename stateLabel\n```\nThis instructs WeiDU to copy all of the transitions from the state with the given stateLabel in filename.DLG. This copying takes place before all other D Actions. For example, this is a valid transition list: IF ~Before()~ THEN GOTO my_state COPY_TRANS PLAYER1 33 IF ~After()~ THEN EXTERN SOLA 55 If SAFE is specified, COPY_TRANS will not warn about potentially unsafe uses (use this if you know it is safe)."
185
+ "value": "```weidu-d-tooltip\nBRANCH transTriggerString BEGIN chain_speaker list END\n```\nLike chain text, except that the first transTriggerString is appended to all existing dialogue units."
180
186
  }
181
187
  },
182
- "COPY_TRANS_LATE": {
188
+ "END": {
183
189
  "contents": {
184
190
  "kind": "markdown",
185
- "value": "```weidu-d-tooltip\nCOPY_TRANS_LATE [ SAFE ] filename stateLabel\n```\nSame as COPY_TRANS, but is invoked after all other D Actions."
191
+ "value": "```weidu-d-tooltip\nEND\n```\nBlock terminator for APPEND, EXTEND_TOP, EXTEND_BOTTOM, state, ALTER_TRANS, and other constructs.\n\n---\nChain epilogue: `END transition list` execute the given transitions after the final state in the CHAIN."
186
192
  }
187
193
  },
188
- "EXIT": {
194
+ "IF": {
189
195
  "contents": {
190
196
  "kind": "markdown",
191
- "value": "```weidu-d-tooltip\nEXIT\n```\nThe conversation ends."
197
+ "value": "```weidu-d-tooltip\nIF\n```\nTransition: `IF transTriggerString [ THEN ] transFeature list transNext`\n\nIf the transTriggerString evaluates to true or is empty, this transition is viable. If it contains no replyText within its transFeature list, it is immediately taken. Otherwise, the replyText is presented as an option to the user. If the transition is taken, any actions in the transFeature list are performed and the dialogue flows to the point indicated by the transNext. transitions are evaluated in \"reverse order\".\n\n---\nAction condition: `IF String`.\n\nThe action is processed if the element being altered/replaced/added to contains a substring matching against the String regexp.\n\n---\nState: `IF [ WEIGHT #weightNumber ] stateTriggerString [ THEN ] [ BEGIN ] stateLabel SAY sayText [ = sayText ... ] transition list END`\n\n[Online documentation](https://weidu.org/~thebigg/README-WeiDU.html#state)\n\n---\n\n```weidu-d-tooltip\nIF String\n```\nThe action is processed if the element being altered/replaced/added to contains a substring matching against the String regexp."
198
+ }
199
+ },
200
+ "text": {
201
+ "contents": {
202
+ "kind": "markdown",
203
+ "value": "```weidu-d-tooltip\ntext\n```\nsayText and replyText are both text."
192
204
  }
193
205
  },
194
206
  "APPENDI": {
@@ -203,28 +215,28 @@
203
215
  "value": "```weidu-d-tooltip\nCHAIN2 entryFilename entryLabel chain2Text list exitFilename exitLabel\n```\nThis is legacy syntax that behaves somewhat like the D Action CHAIN but is considered a state. In addition, chain2Text is slightly different from chainText. Avoid this construction."
204
216
  }
205
217
  },
206
- "text": {
218
+ "SAY": {
207
219
  "contents": {
208
220
  "kind": "markdown",
209
- "value": "```weidu-d-tooltip\ntext\n```\nsayText and replyText are both text."
221
+ "value": "```weidu-d-tooltip\nSAY sayText [ = sayText ... ]\n```\nThe creature then says all of the associated sayText."
210
222
  }
211
223
  },
212
- "+": {
224
+ "^": {
213
225
  "contents": {
214
226
  "kind": "markdown",
215
- "value": "```weidu-d-tooltip\n+ [ transTriggerString ] + replyText transFeature list transNext\n```\nThis abbreviated syntax for transitions that would contain REPLY (which is by far the most common case) allows you to save yourself some time and typing. It behaves like the full form above."
227
+ "value": "```weidu-d-tooltip\nString ^ String\n```\nString literal concatenation. The second string is appended to the first string. No whitespace is added. Thus \"hello\" ^ \"World\" is the same as \"helloWorld\"."
216
228
  }
217
229
  },
218
- "REPLY": {
230
+ "DO": {
219
231
  "contents": {
220
232
  "kind": "markdown",
221
- "value": "```weidu-d-tooltip\nREPLY replyText\n```\nIf this transition is taken, the PC says the replyText."
233
+ "value": "```weidu-d-tooltip\nDO stateActionString\n```\nIf this transition is taken, the stateActionString is executed."
222
234
  }
223
235
  },
224
- "DO": {
236
+ "FLAGS": {
225
237
  "contents": {
226
238
  "kind": "markdown",
227
- "value": "```weidu-d-tooltip\nDO stateActionString\n```\nIf this transition is taken, the stateActionString is executed."
239
+ "value": "```weidu-d-tooltip\nFLAGS integer\n```\nThis allows you to set the features associated with a transition directly using the binary format of DLG files."
228
240
  }
229
241
  },
230
242
  "JOURNAL": {
@@ -233,6 +245,12 @@
233
245
  "value": "```weidu-d-tooltip\nJOURNAL text\n```\nIf this transition is taken, the text is added to the PC's journal."
234
246
  }
235
247
  },
248
+ "REPLY": {
249
+ "contents": {
250
+ "kind": "markdown",
251
+ "value": "```weidu-d-tooltip\nREPLY replyText\n```\nIf this transition is taken, the PC says the replyText."
252
+ }
253
+ },
236
254
  "SOLVED_JOURNAL": {
237
255
  "contents": {
238
256
  "kind": "markdown",
@@ -245,10 +263,16 @@
245
263
  "value": "```weidu-d-tooltip\nUNSOLVED_JOURNAL text\n```\nIf this transition is taken, the text is added to the \"unsolved\" section of the PC's journal."
246
264
  }
247
265
  },
248
- "FLAGS": {
266
+ "EXIT": {
249
267
  "contents": {
250
268
  "kind": "markdown",
251
- "value": "```weidu-d-tooltip\nFLAGS integer\n```\nThis allows you to set the features associated with a transition directly using the binary format of DLG files."
269
+ "value": "```weidu-d-tooltip\nEXIT\n```\nThe conversation ends.\n\n---\nChain epilogue: at the end of the CHAIN text, exit the dialogue."
270
+ }
271
+ },
272
+ "EXTERN": {
273
+ "contents": {
274
+ "kind": "markdown",
275
+ "value": "```weidu-d-tooltip\nEXTERN [ IF_FILE_EXISTS ] filename stateLabel\n```\nThe dialogue continues at the state with label stateLabel in the file filename.DLG. The whole transition is not compiled if there's IF_FILE_EXISTS and the file filename doesn't exist.\n\n---\nChain epilogue: `EXTERN filename stateNumber` — transfer to the given state in the given dialogue file."
252
276
  }
253
277
  },
254
278
  "GOTO": {
@@ -257,16 +281,16 @@
257
281
  "value": "```weidu-d-tooltip\nGOTO stateLabel\n```\nThe dialogue continues at the state with label stateLabel in the same DLG file as the current state."
258
282
  }
259
283
  },
260
- "IF": {
284
+ "+": {
261
285
  "contents": {
262
286
  "kind": "markdown",
263
- "value": "```weidu-d-tooltip\nIF\n```\nTransition: `IF transTriggerString [ THEN ] transFeature list transNext`\n\nIf the transTriggerString evaluates to true or is empty, this transition is viable. If it contains no replyText within its transFeature list, it is immediately taken. Otherwise, the replyText is presented as an option to the user. If the transition is taken, any actions in the transFeature list are performed and the dialogue flows to the point indicated by the transNext. transitions are evaluated in \"reverse order\".\n\n---\nAction condition: `IF String`.\n\nThe action is processed if the element being altered/replaced/added to contains a substring matching against the String regexp.\n\n---\nState: `IF [ WEIGHT #weightNumber ] stateTriggerString [ THEN ] [ BEGIN ] stateLabel SAY sayText [ = sayText ... ] transition list END`\n\n[Online documentation](https://weidu.org/~thebigg/README-WeiDU.html#state)"
287
+ "value": "```weidu-d-tooltip\n+ [ transTriggerString ] + replyText transFeature list transNext\n```\nThis abbreviated syntax for transitions that would contain REPLY (which is by far the most common case) allows you to save yourself some time and typing. It behaves like the full form above."
264
288
  }
265
289
  },
266
- "^": {
290
+ "UNLESS": {
267
291
  "contents": {
268
292
  "kind": "markdown",
269
- "value": "```weidu-d-tooltip\nString ^ String\n```\nString literal concatenation. The second string is appended to the first string. No whitespace is added. Thus \"hello\" ^ \"World\" is the same as \"helloWorld\"."
293
+ "value": "```weidu-d-tooltip\nUNLESS String\n```\nThe action is not processed if the element being altered/replaced/added to contains a substring matching against the String regexp."
270
294
  }
271
295
  }
272
296
  }