forked from GwendolyneFreddy/temporary_repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patht-main.tpa
503 lines (415 loc) · 23 KB
/
t-main.tpa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
/* =================================================================================================================================================================================== *
* v 6.0.0 *
* M A I N C O M P O N E N T ( T o B ) *
* *
* =================================================================================================================================================================================== *
* change-log: *
* ----------- *
* - Split this huge component into smaller ones for more comfortable readability and maintenance. *
* - Variables needed for installation are read from infinityanimations-config-default.ini or infinityanimations-config-user.ini files. *
* The previous version interrupted installation when IA content was missing, asked for downloading them and to reinstall the mod. As of v6.0.0, those controls set during *
* installation have been moved into infinityanimations-config-default.ini file in infinityanimations folder. This file provides a standard installation. If players want to *
* define their own customized installation, they have to modify the variables in infinityanimations-config-default.ini and save it as infinityanimations-config-user.ini. The *
* installation process will read both .ini files and prioritize user values. If a value is not set or mismatched in infinityanimations-config-user.ini, any installation *
* failure will be prevented by reverting it back to its default value. *
* - Modified animations namespaces, now compatible with non-Western code pages: got rid of the the .exe patch routine forcing a code page change and rebooting if a non-Western *
* code page was detected (#50). *
* - Added new Correcting creature weapons animations routine that patches vanilla creature files with new cloned weapons compatible with their animations (#468). *
* - ToBEx compatibility: checks for ToBEx external walking sound files (#245) and resolves soundsets creature animation conflicts (#454). *
* an array to define new gems lore values to identify. Same library used for IWD and BG2 games. *
* - Used Gwendolyne's gw_install_archives function to install new animations (any extracted in /archives folder). *
* - Coding simplification: *
* Replaced READ_SHORT 0x28 and WRITE_SHORT 0x28 with READ_LONG 0x28 and WRITE_LONG 0x28. *
* Scripts and dialogs updates: Got rid of `DECOMPILE_BCS_TO_BAF` and `DECOMPILE_DLG_TO_D` deprecated functions replaced with `DECOMPILE_AND_PATCH`. *
* *
* specific fixes: *
* --------------- *
* - #266 ==> NTotSC compatibility: removed ntkeelor.dlg patch (Keelor the Dwarf dialog) because it has already been fixed in latest NTotSC versions. *
* - #296 ==> Patches soundsets 2da files with new animations names for consistency. *
* - #394 ==> Strings updates: No longer fixes strref typos (Deletes extra spaces and line breaks) if the selected mod language is not the game language. *
* =================================================================================================================================================================================== */
/* ----------------------------------------------------------- *
* FEATURES line *
* ----------------------------------------------------------- *
* Mod content checking # 109 *
* Patching executable # 124 *
* Replacing _LOW creature animations # 165 *
* Patching IDS files # 226 *
* Scripts and dialogs updates # 253 *
* 2DA files updates # 293 *
* Strings updates # 391 *
* Restoring previously overwritten BG2 animations # 421 *
* Update .CRE animation offsets # 428 *
* Copying new animations to the game # 435 *
* Correcting creature animations # 461 *
* Correcting creature weapons animations # 468 *
* Items fixes # 475 *
* ----------------------------------------------------------- */
/* DEPRECATED as of v6.0.0
Modified animations namespaces, now compatible with non-Western code pages: got rid of the the .exe patch routine forcing a code page change and rebooting if a non-Western code page was detected.
OUTER_SET t-acp = 0 // Non-Unicode code page check
ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ = 1) BEGIN // if Windows
<<<<<<<< .../infinityanimations-inlined/t-ansi1.reg
>>>>>>>>
COPY ~.../infinityanimations-inlined/t-ansi1.reg~ ~infinityanimations/batch/t-ansi1.reg~
AT_NOW ~infinityanimations/batch/t-ansi.bat~
COPY ~infinityanimations/batch/t-ansi1.reg~ ~infinityanimations/batch/t-ansi2.reg~
REPLACE_EVALUATE ~"ACP"="\([0-9]+\)~ BEGIN
SET t-acp = ~%MATCH1%~
END ~"ACP"="1252~
BUT_ONLY
ACTION_IF t-acp != 1252 BEGIN
ACTION_IF NOT FILE_EXISTS ~infinityanimations/batch/t-ansi3.reg~ BEGIN
COPY ~infinityanimations/batch/t-ansi1.reg~ ~infinityanimations/batch/t-ansi3.reg~
END
END
ACTION_IF FILE_EXISTS ~infinityanimations/batch/t-ansi2.reg~ BEGIN
ACTION_IF t-acp != 1252 BEGIN
PRINT @2 // Your ANSI code page is set to a value of %t-acp%. Changing it to 1252 (Latin) for mod animation compatibility.
AT_NOW ~regedit -s infinityanimations\batch\t-ansi2.reg~
PRINT @3 // You must reboot to continue the installation. Reboot now? [Y]es [N]o
ACTION_READLN ~reply~
OUTER_WHILE (~%reply%~ STRING_EQUAL_CASE ~y~ = 0) BEGIN
PRINT @3 // You must reboot to continue the installation. Reboot now? [Y]es [N]o
ACTION_READLN ~reply~
END
PRINT @4 // Rebooting in a few seconds. Please close all other applications.
AT_NOW ~shutdown -r -c "Rebooting is required to continue installing." -t 20~
ACTION_READLN ~nada~
OUTER_WHILE ((~%nada%~ STRING_EQUAL_CASE ~y~ = 0) OR (~%nada%~ STRING_EQUAL_CASE ~y~ = 1)) BEGIN
PRINT @4 // Rebooting in a few seconds. Please close all other applications.
ACTION_READLN ~nada~
END
END
ACTION_IF FILE_EXISTS ~infinityanimations/batch/t-ansi3.reg~ BEGIN
AT_INTERACTIVE_UNINSTALL ~regedit -s infinityanimations\batch\t-ansi3.reg~
END
END
END ELSE BEGIN
ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~ = 1) BEGIN //if OS X
FAIL @5 // This mod is not currently compatible with OS X
END
END
*/
/* ========= *
* If OS X *
* ========= */
ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~ = 1) BEGIN
FAIL @2 // ~This mod is not currently compatible with OS X...~
END
/* ====================== *
* Mod content checking *
* ====================== */
OUTER_SET modfail = 0 // Mod content checks
INCLUDE ~%MOD_FOLDER%/lib/ia_mod_content_check.tpa~
ACTION_IF modfail = 1 BEGIN
PRINT @12 // ~NOTE: Open the mod zip file and extract the whole archives subfolders in your infinityanimations/archives folder.~
PRINT @13 // ~Rerun this installer once you've extracted all needed content.~
FAIL @11 // ~Required content missing.~
END
/* ===================== *
* Patching executable *
* ===================== */
SILENT
OUTER_SET skip = 0 // Executable validity check
COPY ~BGMain.exe~ ~BGMain.exe~
sz = SOURCE_SIZE
READ_LONG 0x40742c c1
READ_LONG 0x40a8da c2
PATCH_IF sz > 0x7536e6 BEGIN
READ_LONG 0x7536e7 c3
END ELSE BEGIN
c3 = 0
END
READ_BYTE 0x4595c9 c4
BUT_ONLY
ACTION_IF (c1 = 0x3db6d84) AND (c2 = 0xc6004c48) AND (c3 = 0x54464958) AND (c4 = 0xf9) AND (sz = 0x77a02e) BEGIN
OUTER_SET skip = 1
PRINT @14 // ~BGMain.exe appears to be patched already; skipping .exe modifications...~
END ELSE BEGIN
ACTION_IF (c1 != 0xb48f) OR (c2 != 0x3d7c1) OR (c3 != 0x53505700) OR (sz != 0x77a02e) BEGIN
ACTION_IF (c1 = 0x3db6d84) AND (c2 = 0xc6004c48) AND (c3 = 0x54464958) AND (c4 = 0xfc) AND (sz = 0x77a02e) BEGIN
OUTER_SET skip = 0
END ELSE BEGIN
FAIL @15 // ~BGMain.exe not valid - make sure you have a ToB .exe patched to v26498!~
END
END
END
ACTION_IF skip = 0 BEGIN
PRINT @16 // ~Patching BGMain.exe to enable new animations...~
SILENT
COPY ~BGMain.exe~ ~BGMain.exe~
PATCH_INCLUDE ~%MOD_FOLDER%/patch/t-exe_patch_xdrupdate.tpp~
BUT_ONLY
END
/* ==================================== *
* Replacing _LOW creature animations *
* ==================================== */
PRINT @17 // ~Replacing _LOW creature animations (this may take a while)...~
SILENT
<<<<<<<< .../infinityanimations-inlined/t-cre_fixer.log
=================================================================================
Creature Item Slot Issue
=================================================================================
>>>>>>>>
<<<<<<<< .../infinityanimations-inlined/t-low_fix.log
==============================================================================================
Creature Old Animation New Animation
==============================================================================================
>>>>>>>>
COPY ~.../infinityanimations-inlined/t-cre_fixer.log~ ~infinityanimations/log~
~.../infinityanimations-inlined/t-low_fix.log~ ~infinityanimations/log~
OUTER_SPRINT t-exc ~bpdric01 bpdrif01 bpdrif02 bpdrifm1 bugarch bugbear cbbgber cbbgber1 cbbgber2 cbbgbera cbbgberb cbbgberc cbbgberd cbbgberw cbbgberx cbbgbery cbbgberz cbdrifal cbdrifml cbdrifsl cbdrimml cbdrimsl tcbugb01 tcbugb02 tcgrell ~
OUTER_SPRINT list ""
COPY_EXISTING_REGEXP GLOB ~^.+\.cre$~ ~override~
PATCH_INCLUDE ~infinityanimations/lib/fj_cre_validity.tpp~
PATCH_IF valid BEGIN
SPRINT sr ~%SOURCE_RES%~
TO_LOWER sr
READ_LONG 0x28 t-old
PATCH_IF (((t-old > 0x4fff) AND (t-old < 0x5004)) OR // CLERIC_MALE_xxx_LOW
((t-old > 0x500f) AND (t-old < 0x5014)) OR // CLERIC_FEMALE_xxx_LOW
((t-old > 0x50ff) AND (t-old < 0x5104)) OR // FIGHTER_MALE_xxx_LOW
((t-old > 0x510f) AND (t-old < 0x5114)) OR // FIGHTER_FEMALE_xxx_LOW
((t-old > 0x51ff) AND (t-old < 0x5203)) OR // MAGE_MALE_xxx_LOW
((t-old > 0x520f) AND (t-old < 0x5213)) OR // MAGE_FEMALE_xxx_LOW
((t-old > 0x52ff) AND (t-old < 0x5304)) OR // THIEF_MALE_xxx_LOW
((t-old > 0x530f) AND (t-old < 0x5314))) AND // THIEF_FEMALE_xxx_LOW
(~%t-exc%~ STRING_CONTAINS_REGEXP ~%sr% ~ = 1) BEGIN
// These CREs need fixing because of hosed slots
PATCH_IF (~c6bruen c6bruen2 cor jolus p#seas1 p#seasn tirthold ~ STRING_CONTAINS_REGEXP ~%sr% ~ = 0) BEGIN
PATCH_INCLUDE ~infinityanimations/lib/t-cre_fixer.tpp~
END ELSE BEGIN
PATCH_INCLUDE ~infinityanimations/lib/fj_cre_reindex.tpp~
END
t-new = t-old + 0x1000
WRITE_LONG 0x28 t-new
LOOKUP_IDS_SYMBOL_OF_INT t-oldt animate %t-old%
LOOKUP_IDS_SYMBOL_OF_INT t-newt animate %t-new%
LPF ~gw_format_string~ INT_VAR length = 8 STR_VAR string = EVAL "%sr%" RET sr = string_new END
LPF ~gw_format_string~ INT_VAR length = 34 STR_VAR string = EVAL "%t-oldt%" RET t-oldt = string_new END
SPRINT list "%list%%sr% %t-old% %t-oldt% %t-new% %t-newt%%WNL%"
END
END
BUT_ONLY
APPEND_OUTER ~infinityanimations/log/t-low_fix.log~ ~%list%~
/* ==================== *
* Patching IDS files *
* ==================== */
PRINT @18 // ~Patching IDS files...~
SILENT
OUTER_PATCH wlib BEGIN
WRITE_LONG 0x0 0x090a0d20
READ_ASCII 0x0 ws(4) // detects any whitespace
END
// Loads Argent77's functions library to install new animations slots into ANIMATE.ids (big thanks to him!) - Ajout automatique de slots d'animations de créatures dans BG2EE. Merci à Argent77 pour sa procédure !
INCLUDE ~%MOD_FOLDER%/lib/a7_functions.tpa~
// Loads library sorting ids files
INCLUDE ~%MOD_FOLDER%/lib/gw_ids_lib.tpa~
INCLUDE ~%MOD_FOLDER%/ids/t-animate.tpa~
INCLUDE ~%MOD_FOLDER%/ids/t-anisnd.tpa~
// Check for ToBEx external sound files
// ------------------------------------
ACTION_IF (FILE_EXISTS_IN_GAME ~aniwksnd.2da~) BEGIN
INCLUDE ~%MOD_FOLDER%/ids/t-aniwksnd.tpa~
END
/* ============================= *
* Scripts and dialogs updates *
* ============================= */
PRINT @19 // ~Updating scripts and dialogs files...~
SILENT
COPY_EXISTING ~%tutu_scriptt%halantr.bcs~ ~override~
DECOMPILE_AND_PATCH BEGIN
REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Polymorph(MAGE_MALE_HUMAN_LOW)~ ~Polymorph(MAGE_MALE_HUMAN)~
REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Polymorph(20992)~ ~Polymorph(25088)~
END
BUT_ONLY
/* DEPRECATED as of v6.0.0 because already fixed in latest NTotSC versions)
ACTION_IF FILE_EXISTS_IN_GAME ~ntkeelor.dlg~ BEGIN // Keelor the Dwarf (Northern Tales of the Sword Coast)
COPY_EXISTING ~ntkeelor.dlg~ ~override~
PATCH_IF SOURCE_SIZE > 0x34 BEGIN
DECOMPILE_AND_PATCH BEGIN
REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Polymorph(FIGHTER_MALE_DWARF_LOW)~ ~Polymorph(FIGHTER_MALE_DWARF)~
REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Polymorph(20738)~ ~Polymorph(24834)~
END
END
BUT_ONLY
END
*/
// Never Ending Journey
// --------------------
ACTION_IF FILE_EXISTS_IN_GAME ~dalbion.dlg~ BEGIN
COPY_EXISTING ~dalbion.dlg~ ~override~
PATCH_IF SOURCE_SIZE > 0x34 BEGIN
DECOMPILE_AND_PATCH BEGIN
REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~Polymorph(IC_YUANTI3)~ ~Polymorph(YUAN-TI_PRIEST)~
END
END
BUT_ONLY
END
/* =================== *
* 2DA files updates *
* =================== */
// Gwen fix: Harmonize animations names
// ------------------------------------
COPY_EXISTING ~mgh2.2da~ ~override~
REPLACE_TEXTUALLY ~ghoul~ ~ghoul greater~
BUT_ONLY
COPY_EXISTING ~mliz.2da~ ~override~
REPLACE_TEXTUALLY ~2 hand~ ~elite~
BUT_ONLY
COPY_EXISTING ~mli2.2da~ ~override~
REPLACE_TEXTUALLY ~ 1 hand~ ~~
BUT_ONLY
COPY_EXISTING ~mno3.2da~ ~override~
REPLACE_TEXTUALLY ~neo-orog chief~ ~orog chieftain~
BUT_ONLY
COPY_EXISTING ~mor1.2da~ ~override~
REPLACE_TEXTUALLY ~^MOR1.+$~ ~%DEST_RES% / orc melee w axe /~
BUT_ONLY
COPY_EXISTING ~mor2.2da~ ~override~
REPLACE_TEXTUALLY ~^MOR2.+$~ ~%DEST_RES% / orc range w bow /~
BUT_ONLY
COPY_EXISTING ~msah.2da~ ~override~
~msat.2da~ ~override~
REPLACE_TEXTUALLY ~Sahaugin~ ~sahuagin~
BUT_ONLY
COPY_EXISTING ~mska.2da~ ~override~
REPLACE_TEXTUALLY ~^MSKA.+$~ ~%DEST_RES% / skeleton_warrior~
BUT_ONLY
COPY_EXISTING ~mskb.2da~ ~override~
REPLACE_TEXTUALLY ~^MSKB.+$~ ~%DEST_RES% / skeleton_fiend~
BUT_ONLY
COPY_EXISTING ~mwig.2da~ ~override~
REPLACE_TEXTUALLY ~^MWIG.+$~ ~%DEST_RES% / wight_grey~
BUT_ONLY
// MCAR gets rerouted to MCWL according to devSin
// ----------------------------------------------
ACTION_IF FILE_EXISTS_IN_GAME mcar.2da AND NOT FILE_EXISTS_IN_GAME mcwl.2da BEGIN
COPY_EXISTING ~mcar.2da~ ~override/mcwl.2da~
REPLACE_TEXTUALLY ~^Mcar.+$~ ~%DEST_RES% / carrion crawler~
END
// Copy djinni to djinni_legs for consistency
// ------------------------------------------
ACTION_IF FILE_EXISTS_IN_GAME mdji.2da AND NOT FILE_EXISTS_IN_GAME mdjl.2da BEGIN
COPY_EXISTING ~mdji.2da~ ~override/mdjl.2da~
REPLACE_TEXTUALLY ~^Mdji.+$~ ~%DEST_RES% / djinni with legs~
END
// Copy mist_creature to blob_mist_creature
// ----------------------------------------
ACTION_IF FILE_EXISTS_IN_GAME mmis.2da AND NOT FILE_EXISTS_IN_GAME mmst.2da BEGIN
COPY_EXISTING ~mmis.2da~ ~override/mmst.2da~
REPLACE_TEXTUALLY ~^Mmis.+$~ ~%DEST_RES% / blob mist creature~
END
// Copy myconid to myconid2
// ------------------------
ACTION_IF FILE_EXISTS_IN_GAME mmyc.2da BEGIN
COPY_EXISTING ~mmyc.2da~ ~override/mmy2.2da~
REPLACE_TEXTUALLY ~^MMYC.+$~ ~%DEST_RES% / myconid blue~
END
// Copy orc_range2 to orc_range4
// ------------------------------
ACTION_IF NOT FILE_EXISTS_IN_GAME mor4.2da BEGIN
COPY_EXISTING ~mor2.2da~ ~override/mor4.2da~
REPLACE_TEXTUALLY ~^MOR2.+$~ ~%DEST_RES% / orc elite range w bow /~
END ELSE BEGIN
COPY_EXISTING ~mor4.2da~ ~override~
REPLACE_TEXTUALLY ~^MOR4.+$~ ~%DEST_RES% / orc elite range w bow /~
BUT_ONLY
END
// Copy skeleton warrior to skeleton monster
// -----------------------------------------
ACTION_IF NOT FILE_EXISTS_IN_GAME mskt.2da BEGIN
COPY_EXISTING ~mska.2da~ ~override/mskt.2da~
REPLACE_TEXTUALLY ~^MSKA.+$~ ~%DEST_RES% / skeleton_monster~
END ELSE BEGIN
COPY_EXISTING ~mskt.2da~ ~override~
REPLACE_TEXTUALLY ~^MSKT.+$~ ~%DEST_RES% / skeleton_monster~
BUT_ONLY
END
/* ======================================================== *
* Strings updates : Deletes extra spaces and line breaks *
* ======================================================== */
// Gwen Fix: no longer fixes strref typos if the selected mod language is not the game language.
ACTION_IF ("%soundset_lang%" STR_EQ "%LANGUAGE%") BEGIN
ACTION_CLEAR_ARRAY ia_fix_typos
ACTION_DEFINE_ASSOCIATIVE_ARRAY ia_fix_typos BEGIN
1154, 10000 => ytm1 // Yuan-Ti mage ==> Yuan-ti Mage
1294, 10000 => ytm2 // Yuan-Ti mage ==> Yuan-ti Mage
1323, 10001 => yt // Yuan-Ti ==> Yuan-ti
2243, 10002 => gnlcp1 // Gnoll Captain ==> Gnoll Captain
19694, 10002 => gnlcp2 // Gnoll Captain ==> Gnoll Captain
2258, 10003 => hobcp // Hobgoblin Captain ==> Hobgoblin Captain
2268, 10004 => hobwz // Hobgoblin Wizard ==> Hobgoblin Wizard
END
ACTION_PHP_EACH ia_fix_typos AS strref => typo BEGIN
ACTION_GET_STRREF %strref% %typo%
OUTER_SPRINT temp_strref (AT %strref_1%)
ACTION_IF ("%typo%" STR_CMP "%temp_strref%") BEGIN
// PRINT "DEBUGGING CONTROL ==> #%strref% = %typo% - str%strref% = %temp_strref%"
STRING_SET_EVALUATE strref (AT %strref_1%)
END
END
ACTION_CLEAR_ARRAY ia_fix_typos
END
/* ================================================= *
* Restoring previously overwritten BG2 animations *
* ================================================= */
INCLUDE ~%MOD_FOLDER%/lib/ia_restore_bg2_animations.tpa~
/* =============================== *
* Update .CRE animation offsets *
* =============================== */
INCLUDE ~%MOD_FOLDER%/lib/ia_update_cre_animation_offset.tpa~
/* ==================================== *
* Copying new animations to the game *
* ==================================== */
PRINT @21 // ~Copying new animations to the game (this may take a while)...~
/*DEPRECATED as of v6.0.0
SILENT
ACTION_BASH_FOR ~infinityanimations/content~ ~^.+$~ BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~%BASH_FOR_FILE%~ BEGIN
WARN ~%BASH_FOR_FILE% already exists in the game and will be overwritten by IA.~
END
SILENT
COPY_LARGE ~%BASH_FOR_FILESPEC%~ ~override~
END
VERBOSE*/
//LAF ps_recursive_copy INT_VAR WarnOnOverwrite = 2 STR_VAR ParentDir = "infinityanimations/content" DestinationDir = "override" RET Count END
LAM ~gw_install_archives~
LAM ~gw_install_modders_content~
// Resolves soundsets creature animation conflicts (Courtesy of skellytz - from his Infinity Sounds project mod).
// --------------------------------------------------------------------------------------------------------------
OUTER_SET fix_soundsets_conflicts = 0
INCLUDE ~%MOD_FOLDER%/lib/ia_soundsets_conflicts.tpa~
/* ================================ *
* Correcting creature animations *
* ================================ */
INCLUDE ~%MOD_FOLDER%/lib/ia_correcting_creature animations.tpa~
/* ======================================== *
* Correcting creature weapons animations *
* ======================================== */
INCLUDE ~%MOD_FOLDER%/lib/ia_correcting_weapon_animations.tpa~
/* ============= *
* Items fixes *
* ============= */
SILENT
ACTION_IF FILE_EXISTS_IN_GAME ring99.itm AND NOT FILE_EXISTS_IN_GAME ringn99.itm BEGIN
COPY_EXISTING ~ring99.itm~ ~override/ringn99.itm~
PATCH_IF (%SOURCE_SIZE% > 0x71) BEGIN // file size sanity check (filters out 0 byte files i.e. ALLOW_MISSING)
SET opcode_to_delete = "8"
LPM ~DELETE_ITEM_EQEFFECT~ // remove glow
END
END
ACTION_IF FILE_EXISTS_IN_GAME ring95.itm AND NOT FILE_EXISTS_IN_GAME ringg95.itm BEGIN
COPY_EXISTING ~ring95.itm~ ~override/ringg95.itm~ // glowing version of the ring
PATCH_IF (%SOURCE_SIZE% > 0x71) BEGIN // file size sanity check (filters out 0 byte files i.e. ALLOW_MISSING)
LPF ADD_ITEM_EQEFFECT // makes it glow
INT_VAR opcode = 8 // set colorglow solid
target = 1 // self
timing = 2 // while equipped
parameter1 = 0xc800 // green/blue/red/2 empty
parameter2 = 2 // Major Color
probability1 = 100 // probability1: 100%
END
END
END