You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Checks if grab sound name has more than 8 characters
30
+
// Checks if grab sound name has more than 8 characters.
31
31
ACTION_IF (STRING_LENGTH ~%soundGrab%~ > 8) THEN
32
32
BEGIN
33
33
OUTER_SET numbers = STRING_LENGTH ~%soundGrab%~
34
-
FAIL ~DEFINE_DIMORPHIC_FUNCTION ADD_ITEMTYPE_IN_2DA -> The argument '%soundGrab%' for sound is %numbers% characters long. The maximum allowed length for this argument is 8 characters~
34
+
FAIL ~DEFINE_DIMORPHIC_FUNCTION ADD_ITEMTYPE_IN_2DA -> The argument '%soundGrab%' for soundGrab is %numbers% characters long. The maximum allowed length for this argument is 8 characters.~
35
35
END
36
-
// Checks if drop sound name has more than 8 characters
36
+
// Checks if drop sound name has more than 8 characters.
37
37
ACTION_IF (STRING_LENGTH ~%soundDrop%~ > 8) THEN
38
38
BEGIN
39
39
OUTER_SET numbers = STRING_LENGTH ~%soundDrop%~
40
-
FAIL ~DEFINE_DIMORPHIC_FUNCTION ADD_ITEMTYPE_IN_2DA -> The argument '%soundDrop%' for sound is %numbers% characters long. The maximum allowed length for this argument is 8 characters~
40
+
FAIL ~DEFINE_DIMORPHIC_FUNCTION ADD_ITEMTYPE_IN_2DA -> The argument '%soundDrop%' for soundDrop is %numbers% characters long. The maximum allowed length for this argument is 8 characters.~
41
41
END
42
42
// Checks that inventorySlotType is not a negative number, because there are no negative slot numbers.
ACTION_IF (~%2daFilename%~ STRING_EQUAL ~!_NULL~) THEN
126
+
BEGIN
127
+
FAIL ~DEFINE_ACTION_FUNCTION CREATE_READINGSEQUENCE_2DA -> The correct argument for 2daFilename is missing. The argument !_NULL is forbidden.~
128
+
END
129
+
// Check if valid bgImage argument is given.
130
+
ACTION_IF (~%bgImage%~ STRING_EQUAL ~!_NULL~) THEN
131
+
BEGIN
132
+
FAIL ~DEFINE_ACTION_FUNCTION CREATE_READINGSEQUENCE_2DA -> The correct argument for bgImage is missing. The argument !_NULL is forbidden.~
133
+
END
134
+
// Checks if file name has more than 8 characters.
135
+
ACTION_IF (STRING_LENGTH ~%2daFilename%~ > 8) THEN
136
+
BEGIN
137
+
OUTER_SET numbers = STRING_LENGTH ~%2daFilename%~
138
+
FAIL ~DEFINE_ACTION_FUNCTION CREATE_READINGSEQUENCE_2DA -> The argument '%2daFilename%' for file name is %numbers% characters long. The maximum allowed length for this argument is 8 characters.~
139
+
END
140
+
// Checks if file name has more than 8 characters.
141
+
ACTION_IF (STRING_LENGTH ~%bgImage%~ > 8) THEN
142
+
BEGIN
143
+
OUTER_SET numbers = STRING_LENGTH ~%bgImage%~
144
+
FAIL ~DEFINE_ACTION_FUNCTION CREATE_READINGSEQUENCE_2DA -> The argument '%bgImage%' for background image file name is %numbers% characters long. The maximum allowed length for this argument is 8 characters.~
145
+
END
146
+
// Checks if a proper array name is given.
147
+
ACTION_IF (~%strrefArray%~ STRING_EQUAL ~!_NULL~) THEN
148
+
BEGIN
149
+
FAIL ~DEFINE_ACTION_FUNCTION CREATE_READINGSEQUENCE_2DA -> The correct array name as an argument is missing. The array name !_NULL is forbidden.~
150
+
END
151
+
152
+
// Defines file inline then creates and copies file to location(see COPY)
// --- Formating 2DA file (It is recommended to use PRETTY_PRINT_2DA after all the content of the 2DA is written into file or else inconsistent behaviour can happen.)
// Checks if the string reference value is not a negative value.
206
+
ACTION_IF (~%strref%~ < 0) THEN
207
+
BEGIN
208
+
FAIL ~DEFINE_DIMORPHIC_FUNCTION ADD_CONVERSABLE_ITEM_IN_2DA -> The provided value for the 'strref' parameter, '%strref%', is not a valid non-negative integer. Please ensure you provide a whole number greater than or equal to 0.~
209
+
END
210
+
// Check if valid itemName argument is given.
211
+
ACTION_IF (~%itemName%~ STRING_EQUAL ~!_NULL~) THEN
212
+
BEGIN
213
+
FAIL ~DEFINE_ACTION_FUNCTION CREATE_READINGSEQUENCE_2DA -> The correct argument for itemName is missing. The argument !_NULL is forbidden.~
214
+
END
215
+
// Checks if item name has more than 8 characters.
216
+
ACTION_IF (STRING_LENGTH ~%itemName%~ > 8) THEN
217
+
BEGIN
218
+
OUTER_SET numbers = STRING_LENGTH ~%itemName%~
219
+
FAIL ~DEFINE_ACTION_FUNCTION CREATE_READINGSEQUENCE_2DA -> The argument '%itemName%' for itemName is %numbers% characters long. The maximum allowed length for this argument is 8 characters.~
220
+
END
221
+
// Checks if dialog file has more than 8 characters.
222
+
ACTION_IF (STRING_LENGTH ~%dialogFile%~ > 8) THEN
223
+
BEGIN
224
+
OUTER_SET numbers = STRING_LENGTH ~%dialogFile%~
225
+
FAIL ~DEFINE_ACTION_FUNCTION CREATE_READINGSEQUENCE_2DA -> The argument '%dialogFile%' for dialogFile is %numbers% characters long. The maximum allowed length for this argument is 8 characters.~
226
+
END
227
+
228
+
// --- BUSINESS LOGIC
229
+
ACTION_IF (~%dialogFile%~ STRING_EQUAL ~!_NULL~) THEN
230
+
BEGIN
231
+
// If dialogFile value is not specified, use itemName value as the dialogue file.
0 commit comments