// Dark Side of the Sword Coast for BGT-WeiDU // Original creator of DSotSC: Cú'choinneach // BGT version by SirBillyBob // Maintainers: erebusant (up to version 215), Turambar BACKUP ~DSotSC/backup~ AUTHOR ~http://www.shsforums.net/forum/202-dsotsc-bgt/~ VERSION ~v 2.16.1~ README ~DSotSC/ReadMe-DSotSC.txt~ AUTO_TRA ~DSotSC/Language/%s/D~ // extra debug info while testing: //MODDER setup_tra none area_variables warn missing_extern warn missing_resref warn ict2_actions none missing_eval warn overwriting_file warn LANGUAGE ~English~ ~english~ ~DSotSC/Language/english/prompt.tra~ ~DSotSC/Language/english/setup.tra~ LANGUAGE ~Castilian (translation updated by Lisandro)~ ~castilian~ ~DSotSC/Language/castilian/prompt-%WEIDU_OS%.tra~ ~DSotSC/Language/castilian/setup.tra~ LANGUAGE ~Deutsch (translation Leonard Watson & Jastey)~ ~german~ ~DSotSC/Language/german/prompt-%WEIDU_OS%.tra~ ~DSotSC/Language/german/setup.tra~ LANGUAGE ~Italian (translation Ilot (rtt.altervista.org) in collaboration with Kelvan, reaper_cuts and Andariel (bgcommunity.forumfree.net) & Turambar)~ ~italian~ ~DSotSC/Language/italian/prompt-%WEIDU_OS%.tra~ ~DSotSC/Language/italian/setup.tra~ LANGUAGE ~Polish (translation Black Dragon & Promilus)~ ~polish~ ~DSotSC/Language/english/prompt.tra~ ~DSotSC/Language/english/setup.tra~ ~DSotSC/Language/polish/prompt-%WEIDU_OS%.tra~ ~DSotSC/Language/polish/setup.tra~ LANGUAGE ~Russian (translation aVoddle, Alex, Badgert & aerie.ru & prowler)~ ~russian~ ~DSotSC/Language/english/prompt.tra~ //Russian had different charsets in WinXP and Win7 // ~DSotSC/Language/english/setup.tra~ // ~DSotSC/Language/russian/prompt-%WEIDU_OS%.tra~ ~DSotSC/Language/russian/setup.tra~ BEGIN @0 REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~ar7200.are~ @2309 DESIGNATED 5 INCLUDE ~dsotsc/lib/tu_decompress.tpa~ //******************************************************************** // OS-specific //******************************************************************** <<<<<<<>>>>>>> DEFINE_ACTION_MACRO bash_log BEGIN //whenever this macro is invoked, it moves the contents of dsotsc/bash.debug to the real log. LOCAL_SET ln=0 LOCAL_SPRINT log ~~ SILENT ACTION_IF FILE_EXISTS ~dsotsc/bash.debug~ AND NOT FILE_SIZE ~dsotsc/bash.debug~ 0 BEGIN //don't do this if no log is available now. COPY + ~dsotsc/bash.debug~ ~dsotsc/bash.debug~ REPLACE_TEXTUALLY CASE_INSENSITIVE EVALUATE_REGEXP ~^.*[%MNL%]+\(.\)~ ~\1~ //Remove all "intermediate" output (ie, output with increasing %) ln=BUFFER_LENGTH READ_ASCII 0 log (ln) DELETE_BYTES 0 ln END LOG ~%log%~ OUTER_SPRINT log ~~ VERBOSE END DEFINE_ACTION_MACRO fail_conversion BEGIN LAM bash_log FAIL ~Error decompressing %BASH_FOR_FILE%~ END ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ BEGIN AT_EXIT ~del dsotsc\bash.debug~ AT_NOW ~dsotsc/win32/vertest.bat~ ACTION_IF FILE_EXISTS ~dsotsc/bash.debug~ BEGIN OUTER_SPRINT debug ~ 2>&1|dsotsc\win32\mtee.exe dsotsc\bash.debug /A~ END ELSE BEGIN OUTER_SPRINT debug ~~ COPY + ~inlined/placeholder.txt~ ~dsotsc/bash.debug~ REPLACE_TEXTUALLY CASE_SENSITIVE EXACT_MATCH ~aaa~ ~An old version of Windows has been detected. Limited logging will be available.%WNL%%WNL%~ //@100045 END OUTER_SPRINT debug_ogg ~%debug%~ OUTER_SPRINT slash ~\~ OUTER_SPRINT exe ~.exe~ OUTER_SPRINT deldir ~dsotsc\win32\deldir.bat~ OUTER_SET win=1 END ELSE BEGIN //unix OUTER_SET win=0 AT_EXIT ~rm -f dsotsc/bash.debug~ OUTER_SPRINT debug ~ 2>&1|tee -a dsotsc/bash.debug~ //~ 2>>dsotsc/bash.debug | tee -a dsotsc/bash.debug~ OUTER_SPRINT debug_ogg ~2>&1 >/dev/null|tee -a dsotsc/bash.debug~ COPY + ~inlined/placeholder.txt~ ~dsotsc/bash.debug~ REPLACE_TEXTUALLY CASE_SENSITIVE EXACT_MATCH ~aaa~ ~Unix-like OS detected. Logging of shell commands enabled.%LNL%%LNL%~ //@100044 OUTER_SPRINT slash ~/~ OUTER_SPRINT exe ~~ OUTER_SPRINT deldir ~rm -rf~ END LAM bash_log // Find the right path to external binaries, depending on OS and system-path argument OUTER_SPRINT tisunpack ~tisunpack~ ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~ BEGIN OUTER_SPRINT oggdec ~sox~ END ELSE BEGIN OUTER_SPRINT oggdec ~oggdec~ END OUTER_FOR (path=1 n=0;path && VARIABLE_IS_SET EVAL ~argv[%n%]~;++n) BEGIN // is system-path option selected? ACTION_IF (EVAL ~%argv[%n%]%~ STRING_EQUAL_CASE ~system-path~) BEGIN OUTER_SET path=0 LOG ~Looking for requested tools inside the system path because system-path option is set.~ END END ACTION_IF path BEGIN //use binaries from package ACTION_FOR_EACH tool IN ~tisunpack~ ~oggdec~ BEGIN ACTION_IF NOT (FILE_EXISTS EVAL ~dsotsc/%WEIDU_OS%/%WEIDU_ARCH%/%%tool%%%exe%~) BEGIN //check if file exists for relevant architecture FAIL ~Required binaries missing for your architecture. Please put tisunpack and %oggdec% into your system path and install again with system-path argument.~ END //FILE_EXISTS OUTER_SPRINT EVAL ~%tool%~ EVAL ~dsotsc%slash%%WEIDU_OS%%slash%%WEIDU_ARCH%%slash%%%tool%%%exe%~ END END ACTION_IF !("%WEIDU_OS%" STRING_EQUAL_CASE ~win32~) BEGIN // make all tools executable. AT_NOW ~chmod +x dsotsc/%WEIDU_OS%/%WEIDU_ARCH%/*~ //*/ ACTION_FOR_EACH tool IN ~tisunpack~ ~oggdec~ BEGIN OUTER_SPRINT bin EVAL ~%%tool%%~ AT_NOW ~(! which %bin% 2>&1 >/dev/null) && echo 1>dsotsc/test-x.err~ //this will create a test-x.err file if the commands don't work ACTION_IF FILE_EXISTS ~dsotsc/test-x.err~ BEGIN AT_NOW ~rm -f dsotsc/test-x.err%debug%~ LAM bash_log FAIL ~Unable to execute %tool%.%LNL%Please put tisunpack and %oggdec% into your system path and%LNL%install again with "system-path" argument.~ END END END LAM bash_log //logs the header ACTION_IF FILE_EXISTS ~DSotSC/dialog.tlk~ BEGIN ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ BEGIN AT_INTERACTIVE_UNINSTALL_EXIT ~dsotsc\win32\uninstal.bat %LANGUAGE%~ END ELSE BEGIN AT_INTERACTIVE_UNINSTALL_EXIT ~sh dsotsc/unix/uninstal.sh %LANGUAGE%~ END END ELSE BEGIN COPY_LARGE + ~dialog.tlk~ ~DSotSC/dialog.tlk~ END ACTION_IF NOT FILE_EXISTS ~DSotSC/dialogf.tlk~ AND FILE_EXISTS ~dialogf.tlk~ BEGIN COPY_LARGE + ~dialogf.tlk~ ~DSotSC/dialogf.tlk~ END OUTER_SET optcomp=1 ACTION_FOR_EACH component IN ~0~ ~100~ ~200~ ~210~ ~220~ BEGIN ACTION_IF MOD_IS_INSTALLED ~setup-dsotsc.tp2~ ~%component%~ BEGIN ACTION_IF %optcomp% BEGIN PRINT @2311 OUTER_SET optcomp=0 END UNINSTALL ~setup-dsotsc.tp2~ ~%component%~ END END //components which should be installed afterwards ACTION_DEFINE_ASSOCIATIVE_ARRAY forbidden BEGIN ~Worldmap~,~setup-bp-bgt-worldmap.tp2~ => 0 ~Generalized Biffing~,~generalized_biffing.tp2~ => 0 ~Infinity Animations - core~,~setup-infinityanimations.tp2~ => 0 END ACTION_PHP_EACH forbidden AS mod => comp BEGIN ACTION_IF MOD_IS_INSTALLED ~%mod_1%~ %comp% BEGIN OUTER_SPRINT warn @2312 OUTER_SPRINT read @2313 PRINT ~%warn%"%mod%" ([%mod_1%] #%comp%)%read%~ OUTER_SPRINT read ~~ OUTER_WHILE ~%read%~ STRING_MATCHES_REGEXP ~[aiu]~ BEGIN ACTION_READLN read END ACTION_MATCH ~%read%~ WITH ~a~ BEGIN FAIL @2314 END ~u~ BEGIN OUTER_SPRINT bak_LANGUAGE ~%LANGUAGE%~ //fixes http://forums.pocketplane.net/index.php/topic,28076.0.html OUTER_SPRINT bak_COMPONENT_NUMBER ~%COMPONENT_NUMBER%~ //fixes http://forums.pocketplane.net/index.php/topic,28076.0.html UNINSTALL ~%mod_1%~ %comp% OUTER_SPRINT ~LANGUAGE~ ~%bak_LANGUAGE%~ //otherwise, LANGUAGE would still have the value from the last uninstalled mod and could fail later OUTER_SPRINT ~COMPONENT_NUMBER~ ~%bak_COMPONENT_NUMBER%~ END DEFAULT // i OUTER_SPRINT warn @2315 WARN ~WARNING: %warn%%mod%~ END END END //******************************************************************** // Miscellaneous: BAM, tooltips... //******************************************************************** COPY ~DSotSC/BAM~ ~override~ LPM tu_decompress COPY_EXISTING - ~tooltip.2da~ ~inlined/tooltip.2da~ //determine required column number COUNT_2DA_COLS col col -= 1 modreq = 3 req = (%col%>%modreq%) ? %col% : %modreq% SPRINT header ~ TU###~ FOR (i=%req% ; i>0 ; i -= 1) BEGIN SPRINT header ~%i% %header%~ //writes 1 2 ... %req% TU### END //fix corrupted special characters REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~%WNL%~ ~%LNL%~ REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~%MNL%~ ~%LNL%~ REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~%TAB%~ ~ ~ REPLACE_TEXTUALLY CASE_INSENSITIVE EVALUATE_REGEXP ~^ +~ ~~ //remove initial spaces //reset 3rd row READ_2DA_ENTRY 2 0 1 test PATCH_IF NOT (~%test%~ STRING_MATCHES_REGEXP ~[0-9 ]+~) BEGIN REMOVE_2DA_ROW 2 1 END REPLACE_TEXTUALLY CASE_INSENSITIVE EVALUATE_REGEXP ~^0? *1 +2? *3? *[0-9 ]*%LNL%~ ~~ //kill misplaced header rows INSERT_2DA_ROW 2 1 ~%header%~ //determine number of columns to be appended (one more will be appended, to prevent S_2_E problems) COUNT_2DA_ROWS 3 rw shorter = rw FOR (i=3 ; (i<= (%req% + 2) AND shorter=rw) ; i+=1) BEGIN COUNT_2DA_ROWS i shorter END //stops when it reaches the first too short line toadd = %req%+ 4 - i //why 4? 1 for column 0, which is not counted in req + 2 because i indicates (2+shortest row) + 1 because I need an extra column for S_2_E SPRINT patch ~$ $ $~ COUNT_2DA_ROWS 1 rw FOR (i=3 ; i 0x2d3) THEN BEGIN // protects against invalid files REMOVE_CRE_ITEM ~BLUN02~ REMOVE_CRE_ITEM ~BRAC02~ REMOVE_CRE_ITEM ~SHLD03~ REMOVE_CRE_ITEM ~PLAT01~ REMOVE_CRE_ITEM ~CHAN04~ REPLACE_CRE_ITEM ~PLAT04~ #0 #0 #0 ~UNSTEALABLE~ ~ARMOR~ ADD_CRE_ITEM ~DSSTAF06~ #0 #0 #0 ~UNSTEALABLE~ ~WEAPON1~ ADD_CRE_ITEM ~POTN52~ #3 #0 #0 ~UNSTEALABLE~ ~QITEM2~ REPLACE_CRE_ITEM ~BRAC03~ #0 #0 #0 ~UNSTEALABLE~ ~GLOVES~ END BUT_ONLY_IF_IT_CHANGES COPY ~DSotSC/CRE/DSZOMBLO.cre~ ~override~ COPY ~DSotSC/CRE/SKELLORD.cre~ ~override~ SAY NAME1 @2296 SAY NAME2 @2296 COPY ~DSotSC/CRE/KOBLDGD.cre~ ~override~ SAY NAME1 @2297 SAY NAME2 @2297 COPY ~DSotSC/CRE/GNOLL02.CRE~ ~override~ COPY ~DSotSC/CRE/GNOLL03.CRE~ ~override~ COPY ~DSotSC/CRE/GNOLL3.CRE~ ~override~ COPY ~DSotSC/CRE/SKELET02.CRE~ ~override~ COPY ~DSotSC/CRE/KOBOLD02.CRE~ ~override~ COPY ~DSotSC/CRE/KOBOLD11.CRE~ ~override~ PRINT @2298 //cre /////////////////////////// // Build new areas // /////////////////////////// COPY ~dsotsc/area/nostring~ ~override~ LPM tu_decompress COPY ~DSotSC/AREA/DSC010.are~ ~override~ SAY 0x1f4c @2302 // Modify existing areas // AR3200 gets new travel region and new entrance for DSC020 COPY_EXISTING ~AR3200.ARE~ ~override~ WRITE_ASCII 0x94 ~AR3200~ //area script - just to make sure it's set 'cuz we need it anyway READ_LONG 0x54 "actors_offset" READ_SHORT 0x58 "actors_num" READ_SHORT 0x5a "infotrig_num" READ_LONG 0x5c "infotrig_offset" READ_LONG 0x60 "spawns_offset" READ_LONG 0x64 "spawns_num" READ_LONG 0x68 "entrances_offset" READ_LONG 0x6c "entrances_num" READ_LONG 0x70 "cont_offset" READ_SHORT 0x74 "cont_num" READ_SHORT 0x76 "items_num" READ_LONG 0x78 "items_offset" READ_LONG 0x7c "vert_offset" READ_SHORT 0x80 "vert_num" READ_SHORT 0x82 "amb_num" READ_LONG 0x84 "amb_offset" READ_LONG 0x88 "vars_offset" READ_LONG 0x8c "vars_num" READ_LONG 0xa0 "expbmp_offset" READ_LONG 0xa4 "doors_num" READ_LONG 0xa8 "doors_offset" READ_LONG 0xac "anim_num" READ_LONG 0xb0 "anim_offset" READ_LONG 0xb4 "tiled_num" READ_LONG 0xb8 "tiled_offset" READ_LONG 0xbc "songs_offset" READ_LONG 0xc0 "rest_spawns_offset" READ_LONG 0xc4 "automap_offset" READ_LONG 0xc8 "automap_num" //adding new trigger ************************************************ SET offset = ("%infotrig_offset%"+0xc4*"%infotrig_num%") INSERT_BYTES offset 0xc4 WRITE_ASCII offset ~Tranc020~ WRITE_SHORT (offset+0x20) 2 //travel trigger WRITE_SHORT (offset+0x22) 3018 //bounding box WRITE_SHORT (offset+0x24) 640 //bounding box WRITE_SHORT (offset+0x26) 3101 //bounding box WRITE_SHORT (offset+0x28) 721 //bounding box WRITE_SHORT (offset+0x2a) 4 //vertices number WRITE_LONG (offset+0x2c) "%vert_num%" //first vertex index WRITE_LONG (offset+0x34) 34 //cursor WRITE_ASCII (offset+0x38) ~DSC020~ //destination area WRITE_ASCII (offset+0x40) ~EXIT3200~ //destination area's entrance name WRITE_LONG (offset+0x60) 0x00000004 //flags - party required WRITE_SHORT (offset+0x70) 3054 //Trap location X WRITE_SHORT (offset+0x72) 687 //Trap location Y SET "infotrig_num"="%infotrig_num%"+1 WRITE_SHORT 0x5a "%infotrig_num%" SET "info_ext"=0xc4 PATCH_IF ("%actors_offset%">="%infotrig_offset%") BEGIN "actors_offset"="%actors_offset%"+"%info_ext%" WRITE_LONG 0x54 "%actors_offset%" END PATCH_IF ("%spawns_offset%">="%infotrig_offset%") BEGIN "spawns_offset"="%spawns_offset%"+"%info_ext%" WRITE_LONG 0x60 "%spawns_offset%" END PATCH_IF ("%entrances_offset%">="%infotrig_offset%") BEGIN "entrances_offset"="%entrances_offset%"+"%info_ext%" WRITE_LONG 0x68 "%entrances_offset%" END PATCH_IF ("%cont_offset%">="%infotrig_offset%") BEGIN "cont_offset"="%cont_offset%"+"%info_ext%" WRITE_LONG 0x70 "%cont_offset%" END PATCH_IF ("%items_offset%">="%infotrig_offset%") BEGIN "items_offset"="%items_offset%"+"%info_ext%" WRITE_LONG 0x78 "%items_offset%" END PATCH_IF ("%vert_offset%">="%infotrig_offset%") BEGIN "vert_offset"="%vert_offset%"+"%info_ext%" WRITE_LONG 0x7c "%vert_offset%" END PATCH_IF ("%amb_offset%">="%infotrig_offset%") BEGIN "amb_offset"="%amb_offset%"+"%info_ext%" WRITE_LONG 0x84 "%amb_offset%" END PATCH_IF ("%vars_offset%">="%infotrig_offset%") BEGIN "vars_offset"="%vars_offset%"+"%info_ext%" WRITE_LONG 0x88 "%vars_offset%" END PATCH_IF ("%expbmp_offset%">="%infotrig_offset%") BEGIN "expbmp_offset"="%expbmp_offset%"+"%info_ext%" WRITE_LONG 0xa0 "%expbmp_offset%" END PATCH_IF ("%doors_offset%">="%infotrig_offset%") BEGIN "doors_offset"="%doors_offset%"+"%info_ext%" WRITE_LONG 0xa8 "%doors_offset%" END PATCH_IF ("%anim_offset%">="%infotrig_offset%") BEGIN "anim_offset"="%anim_offset%"+"%info_ext%" WRITE_LONG 0xb0 "%anim_offset%" END PATCH_IF ("%tiled_offset%">="%infotrig_offset%") BEGIN "tiled_offset"="%tiled_offset%"+"%info_ext%" WRITE_LONG 0xb8 "%tiled_offset%" END PATCH_IF ("%songs_offset%">="%infotrig_offset%") BEGIN "songs_offset"="%songs_offset%"+"%info_ext%" WRITE_LONG 0xbc "%songs_offset%" END PATCH_IF ("%rest_spawns_offset%">="%infotrig_offset%") BEGIN "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%" WRITE_LONG 0xc0 "%rest_spawns_offset%" END PATCH_IF ("%automap_offset%">="%infotrig_offset%") BEGIN "automap_offset"="%automap_offset%"+"%info_ext%" WRITE_LONG 0xc4 "%automap_offset%" END //adding 4 new vertices for triggers SET offset = ("%vert_offset%"+0x04*"%vert_num%") INSERT_BYTES offset (0x04*4) WRITE_SHORT offset 3018 WRITE_SHORT (offset+2) 721 WRITE_SHORT (offset+4) 3101 WRITE_SHORT (offset+6) 721 WRITE_SHORT (offset+8) 3101 WRITE_SHORT (offset+10) 640 WRITE_SHORT (offset+12) 3018 WRITE_SHORT (offset+14) 640 SET "vert_num"="%vert_num%"+4 WRITE_SHORT 0x80 "%vert_num%" SET "info_ext"=0x04*4 PATCH_IF ("%actors_offset%">="%vert_offset%") BEGIN "actors_offset"="%actors_offset%"+"%info_ext%" WRITE_LONG 0x54 "%actors_offset%" END PATCH_IF ("%spawns_offset%">="%vert_offset%") BEGIN "spawns_offset"="%spawns_offset%"+"%info_ext%" WRITE_LONG 0x60 "%spawns_offset%" END PATCH_IF ("%entrances_offset%">="%vert_offset%") BEGIN "entrances_offset"="%entrances_offset%"+"%info_ext%" WRITE_LONG 0x68 "%entrances_offset%" END PATCH_IF ("%cont_offset%">="%vert_offset%") BEGIN "cont_offset"="%cont_offset%"+"%info_ext%" WRITE_LONG 0x70 "%cont_offset%" END PATCH_IF ("%items_offset%">="%vert_offset%") BEGIN "items_offset"="%items_offset%"+"%info_ext%" WRITE_LONG 0x78 "%items_offset%" END PATCH_IF ("%infotrig_offset%">="%vert_offset%") BEGIN "infotrig_offset"="%infotrig_offset%"+"%info_ext%" WRITE_LONG 0x5c "%infotrig_offset%" END PATCH_IF ("%amb_offset%">="%vert_offset%") BEGIN "amb_offset"="%amb_offset%"+"%info_ext%" WRITE_LONG 0x84 "%amb_offset%" END PATCH_IF ("%vars_offset%">="%vert_offset%") BEGIN "vars_offset"="%vars_offset%"+"%info_ext%" WRITE_LONG 0x88 "%vars_offset%" END PATCH_IF ("%expbmp_offset%">="%vert_offset%") BEGIN "expbmp_offset"="%expbmp_offset%"+"%info_ext%" WRITE_LONG 0xa0 "%expbmp_offset%" END PATCH_IF ("%doors_offset%">="%vert_offset%") BEGIN "doors_offset"="%doors_offset%"+"%info_ext%" WRITE_LONG 0xa8 "%doors_offset%" END PATCH_IF ("%anim_offset%">="%vert_offset%") BEGIN "anim_offset"="%anim_offset%"+"%info_ext%" WRITE_LONG 0xb0 "%anim_offset%" END PATCH_IF ("%tiled_offset%">="%vert_offset%") BEGIN "tiled_offset"="%tiled_offset%"+"%info_ext%" WRITE_LONG 0xb8 "%tiled_offset%" END PATCH_IF ("%songs_offset%">="%vert_offset%") BEGIN "songs_offset"="%songs_offset%"+"%info_ext%" WRITE_LONG 0xbc "%songs_offset%" END PATCH_IF ("%rest_spawns_offset%">="%vert_offset%") BEGIN "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%" WRITE_LONG 0xc0 "%rest_spawns_offset%" END PATCH_IF ("%automap_offset%">="%vert_offset%") BEGIN "automap_offset"="%automap_offset%"+"%info_ext%" WRITE_LONG 0xc4 "%automap_offset%" END //adding 1 new entrance SET offset = ("%entrances_offset%"+0x68*"%entrances_num%") INSERT_BYTES offset 0x68 WRITE_ASCII offset ~Exitc020~ WRITE_SHORT (offset+0x20) 3071 //X WRITE_SHORT (offset+0x22) 771 //Y WRITE_LONG (offset+0x24) "15" // facing SET "entrances_num"="%entrances_num%"+1 WRITE_LONG 0x6c "%entrances_num%" SET "info_ext"=0x68 PATCH_IF ("%actors_offset%">="%entrances_offset%") BEGIN "actors_offset"="%actors_offset%"+"%info_ext%" WRITE_LONG 0x54 "%actors_offset%" END PATCH_IF ("%spawns_offset%">="%entrances_offset%") BEGIN "spawns_offset"="%spawns_offset%"+"%info_ext%" WRITE_LONG 0x60 "%spawns_offset%" END PATCH_IF ("%vert_offset%">="%entrances_offset%") BEGIN "vert_offset"="%vert_offset%"+"%info_ext%" WRITE_LONG 0x7c "%vert_offset%" END PATCH_IF ("%cont_offset%">="%entrances_offset%") BEGIN "cont_offset"="%cont_offset%"+"%info_ext%" WRITE_LONG 0x70 "%cont_offset%" END PATCH_IF ("%items_offset%">="%entrances_offset%") BEGIN "items_offset"="%items_offset%"+"%info_ext%" WRITE_LONG 0x78 "%items_offset%" END PATCH_IF ("%infotrig_offset%">="%entrances_offset%") BEGIN "infotrig_offset"="%infotrig_offset%"+"%info_ext%" WRITE_LONG 0x5c "%infotrig_offset%" END PATCH_IF ("%amb_offset%">="%entrances_offset%") BEGIN "amb_offset"="%amb_offset%"+"%info_ext%" WRITE_LONG 0x84 "%amb_offset%" END PATCH_IF ("%vars_offset%">="%entrances_offset%") BEGIN "vars_offset"="%vars_offset%"+"%info_ext%" WRITE_LONG 0x88 "%vars_offset%" END PATCH_IF ("%expbmp_offset%">="%entrances_offset%") BEGIN "expbmp_offset"="%expbmp_offset%"+"%info_ext%" WRITE_LONG 0xa0 "%expbmp_offset%" END PATCH_IF ("%doors_offset%">="%entrances_offset%") BEGIN "doors_offset"="%doors_offset%"+"%info_ext%" WRITE_LONG 0xa8 "%doors_offset%" END PATCH_IF ("%anim_offset%">="%entrances_offset%") BEGIN "anim_offset"="%anim_offset%"+"%info_ext%" WRITE_LONG 0xb0 "%anim_offset%" END PATCH_IF ("%tiled_offset%">="%entrances_offset%") BEGIN "tiled_offset"="%tiled_offset%"+"%info_ext%" WRITE_LONG 0xb8 "%tiled_offset%" END PATCH_IF ("%songs_offset%">="%entrances_offset%") BEGIN "songs_offset"="%songs_offset%"+"%info_ext%" WRITE_LONG 0xbc "%songs_offset%" END PATCH_IF ("%rest_spawns_offset%">="%entrances_offset%") BEGIN "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%" WRITE_LONG 0xc0 "%rest_spawns_offset%" END PATCH_IF ("%automap_offset%">="%entrances_offset%") BEGIN "automap_offset"="%automap_offset%"+"%info_ext%" WRITE_LONG 0xc4 "%automap_offset%" END BUT_ONLY_IF_IT_CHANGES //******************************************************** ~AR3200.are~ // AR4600 gets new travel region and new entrance for DSC006 COPY_EXISTING ~AR4600.ARE~ ~override~ WRITE_ASCII 0x94 ~AR4600~ //area script - just to make sure it's set 'cuz we need it anyway READ_LONG 0x54 "actors_offset" READ_SHORT 0x58 "actors_num" READ_SHORT 0x5a "infotrig_num" READ_LONG 0x5c "infotrig_offset" READ_LONG 0x60 "spawns_offset" READ_LONG 0x64 "spawns_num" READ_LONG 0x68 "entrances_offset" READ_LONG 0x6c "entrances_num" READ_LONG 0x70 "cont_offset" READ_SHORT 0x74 "cont_num" READ_SHORT 0x76 "items_num" READ_LONG 0x78 "items_offset" READ_LONG 0x7c "vert_offset" READ_SHORT 0x80 "vert_num" READ_SHORT 0x82 "amb_num" READ_LONG 0x84 "amb_offset" READ_LONG 0x88 "vars_offset" READ_LONG 0x8c "vars_num" READ_LONG 0xa0 "expbmp_offset" READ_LONG 0xa4 "doors_num" READ_LONG 0xa8 "doors_offset" READ_LONG 0xac "anim_num" READ_LONG 0xb0 "anim_offset" READ_LONG 0xb4 "tiled_num" READ_LONG 0xb8 "tiled_offset" READ_LONG 0xbc "songs_offset" READ_LONG 0xc0 "rest_spawns_offset" READ_LONG 0xc4 "automap_offset" READ_LONG 0xc8 "automap_num" //adding new trigger ************************************************ SET offset = ("%infotrig_offset%"+0xc4*"%infotrig_num%") INSERT_BYTES offset 0xc4 WRITE_ASCII offset ~Tranc006~ WRITE_SHORT (offset+0x20) 2 //travel trigger WRITE_SHORT (offset+0x22) 3803 //bounding box WRITE_SHORT (offset+0x24) 547 //bounding box WRITE_SHORT (offset+0x26) 3895 //bounding box WRITE_SHORT (offset+0x28) 669 //bounding box WRITE_SHORT (offset+0x2a) 9 //vertices number WRITE_LONG (offset+0x2c) "%vert_num%" //first vertex index WRITE_LONG (offset+0x34) 28 //cursor WRITE_ASCII (offset+0x38) ~DSC006~ //destination area WRITE_ASCII (offset+0x40) ~EXIT4600~ //destination area's entrance name WRITE_LONG (offset+0x60) 0x000000000 //flags - none WRITE_SHORT (offset+0x70) 3839 //Trap location X WRITE_SHORT (offset+0x72) 622 //Trap location Y SET "infotrig_num"="%infotrig_num%"+1 WRITE_SHORT 0x5a "%infotrig_num%" SET "info_ext"=0xc4 PATCH_IF ("%actors_offset%">="%infotrig_offset%") BEGIN "actors_offset"="%actors_offset%"+"%info_ext%" WRITE_LONG 0x54 "%actors_offset%" END PATCH_IF ("%spawns_offset%">="%infotrig_offset%") BEGIN "spawns_offset"="%spawns_offset%"+"%info_ext%" WRITE_LONG 0x60 "%spawns_offset%" END PATCH_IF ("%entrances_offset%">="%infotrig_offset%") BEGIN "entrances_offset"="%entrances_offset%"+"%info_ext%" WRITE_LONG 0x68 "%entrances_offset%" END PATCH_IF ("%cont_offset%">="%infotrig_offset%") BEGIN "cont_offset"="%cont_offset%"+"%info_ext%" WRITE_LONG 0x70 "%cont_offset%" END PATCH_IF ("%items_offset%">="%infotrig_offset%") BEGIN "items_offset"="%items_offset%"+"%info_ext%" WRITE_LONG 0x78 "%items_offset%" END PATCH_IF ("%vert_offset%">="%infotrig_offset%") BEGIN "vert_offset"="%vert_offset%"+"%info_ext%" WRITE_LONG 0x7c "%vert_offset%" END PATCH_IF ("%amb_offset%">="%infotrig_offset%") BEGIN "amb_offset"="%amb_offset%"+"%info_ext%" WRITE_LONG 0x84 "%amb_offset%" END PATCH_IF ("%vars_offset%">="%infotrig_offset%") BEGIN "vars_offset"="%vars_offset%"+"%info_ext%" WRITE_LONG 0x88 "%vars_offset%" END PATCH_IF ("%expbmp_offset%">="%infotrig_offset%") BEGIN "expbmp_offset"="%expbmp_offset%"+"%info_ext%" WRITE_LONG 0xa0 "%expbmp_offset%" END PATCH_IF ("%doors_offset%">="%infotrig_offset%") BEGIN "doors_offset"="%doors_offset%"+"%info_ext%" WRITE_LONG 0xa8 "%doors_offset%" END PATCH_IF ("%anim_offset%">="%infotrig_offset%") BEGIN "anim_offset"="%anim_offset%"+"%info_ext%" WRITE_LONG 0xb0 "%anim_offset%" END PATCH_IF ("%tiled_offset%">="%infotrig_offset%") BEGIN "tiled_offset"="%tiled_offset%"+"%info_ext%" WRITE_LONG 0xb8 "%tiled_offset%" END PATCH_IF ("%songs_offset%">="%infotrig_offset%") BEGIN "songs_offset"="%songs_offset%"+"%info_ext%" WRITE_LONG 0xbc "%songs_offset%" END PATCH_IF ("%rest_spawns_offset%">="%infotrig_offset%") BEGIN "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%" WRITE_LONG 0xc0 "%rest_spawns_offset%" END PATCH_IF ("%automap_offset%">="%infotrig_offset%") BEGIN "automap_offset"="%automap_offset%"+"%info_ext%" WRITE_LONG 0xc4 "%automap_offset%" END //adding 9 new vertices for triggers SET offset = ("%vert_offset%"+0x04*"%vert_num%") INSERT_BYTES offset (0x04*9) WRITE_SHORT offset 3840 WRITE_SHORT (offset+2) 669 WRITE_SHORT (offset+4) 3895 WRITE_SHORT (offset+6) 609 WRITE_SHORT (offset+8) 3868 WRITE_SHORT (offset+10) 571 WRITE_SHORT (offset+12) 3840 WRITE_SHORT (offset+14) 547 WRITE_SHORT (offset+16) 3822 WRITE_SHORT (offset+18) 548 WRITE_SHORT (offset+20) 3804 WRITE_SHORT (offset+22) 558 WRITE_SHORT (offset+24) 3803 WRITE_SHORT (offset+26) 593 WRITE_SHORT (offset+28) 3815 WRITE_SHORT (offset+30) 623 WRITE_SHORT (offset+32) 3823 WRITE_SHORT (offset+34) 639 SET "vert_num"="%vert_num%"+9 WRITE_SHORT 0x80 "%vert_num%" SET "info_ext"=0x04*9 PATCH_IF ("%actors_offset%">="%vert_offset%") BEGIN "actors_offset"="%actors_offset%"+"%info_ext%" WRITE_LONG 0x54 "%actors_offset%" END PATCH_IF ("%spawns_offset%">="%vert_offset%") BEGIN "spawns_offset"="%spawns_offset%"+"%info_ext%" WRITE_LONG 0x60 "%spawns_offset%" END PATCH_IF ("%entrances_offset%">="%vert_offset%") BEGIN "entrances_offset"="%entrances_offset%"+"%info_ext%" WRITE_LONG 0x68 "%entrances_offset%" END PATCH_IF ("%cont_offset%">="%vert_offset%") BEGIN "cont_offset"="%cont_offset%"+"%info_ext%" WRITE_LONG 0x70 "%cont_offset%" END PATCH_IF ("%items_offset%">="%vert_offset%") BEGIN "items_offset"="%items_offset%"+"%info_ext%" WRITE_LONG 0x78 "%items_offset%" END PATCH_IF ("%infotrig_offset%">="%vert_offset%") BEGIN "infotrig_offset"="%infotrig_offset%"+"%info_ext%" WRITE_LONG 0x5c "%infotrig_offset%" END PATCH_IF ("%amb_offset%">="%vert_offset%") BEGIN "amb_offset"="%amb_offset%"+"%info_ext%" WRITE_LONG 0x84 "%amb_offset%" END PATCH_IF ("%vars_offset%">="%vert_offset%") BEGIN "vars_offset"="%vars_offset%"+"%info_ext%" WRITE_LONG 0x88 "%vars_offset%" END PATCH_IF ("%expbmp_offset%">="%vert_offset%") BEGIN "expbmp_offset"="%expbmp_offset%"+"%info_ext%" WRITE_LONG 0xa0 "%expbmp_offset%" END PATCH_IF ("%doors_offset%">="%vert_offset%") BEGIN "doors_offset"="%doors_offset%"+"%info_ext%" WRITE_LONG 0xa8 "%doors_offset%" END PATCH_IF ("%anim_offset%">="%vert_offset%") BEGIN "anim_offset"="%anim_offset%"+"%info_ext%" WRITE_LONG 0xb0 "%anim_offset%" END PATCH_IF ("%tiled_offset%">="%vert_offset%") BEGIN "tiled_offset"="%tiled_offset%"+"%info_ext%" WRITE_LONG 0xb8 "%tiled_offset%" END PATCH_IF ("%songs_offset%">="%vert_offset%") BEGIN "songs_offset"="%songs_offset%"+"%info_ext%" WRITE_LONG 0xbc "%songs_offset%" END PATCH_IF ("%rest_spawns_offset%">="%vert_offset%") BEGIN "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%" WRITE_LONG 0xc0 "%rest_spawns_offset%" END PATCH_IF ("%automap_offset%">="%vert_offset%") BEGIN "automap_offset"="%automap_offset%"+"%info_ext%" WRITE_LONG 0xc4 "%automap_offset%" END //adding 2 new entrance SET offset = ("%entrances_offset%"+0x68*"%entrances_num%") INSERT_BYTES offset 0x68 WRITE_ASCII offset ~Exitc006~ WRITE_SHORT (offset+0x20) 3923 //X WRITE_SHORT (offset+0x22) 680 //Y WRITE_LONG (offset+0x24) "14" // facing INSERT_BYTES offset 0x68 WRITE_ASCII offset ~Exitc010~ WRITE_SHORT (offset+0x20) 5018 //X WRITE_SHORT (offset+0x22) 1283 //Y WRITE_LONG (offset+0x24) "4" // facing SET "entrances_num"="%entrances_num%"+2 WRITE_LONG 0x6c "%entrances_num%" SET "info_ext"=0x68*2 PATCH_IF ("%actors_offset%">="%entrances_offset%") BEGIN "actors_offset"="%actors_offset%"+"%info_ext%" WRITE_LONG 0x54 "%actors_offset%" END PATCH_IF ("%spawns_offset%">="%entrances_offset%") BEGIN "spawns_offset"="%spawns_offset%"+"%info_ext%" WRITE_LONG 0x60 "%spawns_offset%" END PATCH_IF ("%vert_offset%">="%entrances_offset%") BEGIN "vert_offset"="%vert_offset%"+"%info_ext%" WRITE_LONG 0x7c "%vert_offset%" END PATCH_IF ("%cont_offset%">="%entrances_offset%") BEGIN "cont_offset"="%cont_offset%"+"%info_ext%" WRITE_LONG 0x70 "%cont_offset%" END PATCH_IF ("%items_offset%">="%entrances_offset%") BEGIN "items_offset"="%items_offset%"+"%info_ext%" WRITE_LONG 0x78 "%items_offset%" END PATCH_IF ("%infotrig_offset%">="%entrances_offset%") BEGIN "infotrig_offset"="%infotrig_offset%"+"%info_ext%" WRITE_LONG 0x5c "%infotrig_offset%" END PATCH_IF ("%amb_offset%">="%entrances_offset%") BEGIN "amb_offset"="%amb_offset%"+"%info_ext%" WRITE_LONG 0x84 "%amb_offset%" END PATCH_IF ("%vars_offset%">="%entrances_offset%") BEGIN "vars_offset"="%vars_offset%"+"%info_ext%" WRITE_LONG 0x88 "%vars_offset%" END PATCH_IF ("%expbmp_offset%">="%entrances_offset%") BEGIN "expbmp_offset"="%expbmp_offset%"+"%info_ext%" WRITE_LONG 0xa0 "%expbmp_offset%" END PATCH_IF ("%doors_offset%">="%entrances_offset%") BEGIN "doors_offset"="%doors_offset%"+"%info_ext%" WRITE_LONG 0xa8 "%doors_offset%" END PATCH_IF ("%anim_offset%">="%entrances_offset%") BEGIN "anim_offset"="%anim_offset%"+"%info_ext%" WRITE_LONG 0xb0 "%anim_offset%" END PATCH_IF ("%tiled_offset%">="%entrances_offset%") BEGIN "tiled_offset"="%tiled_offset%"+"%info_ext%" WRITE_LONG 0xb8 "%tiled_offset%" END PATCH_IF ("%songs_offset%">="%entrances_offset%") BEGIN "songs_offset"="%songs_offset%"+"%info_ext%" WRITE_LONG 0xbc "%songs_offset%" END PATCH_IF ("%rest_spawns_offset%">="%entrances_offset%") BEGIN "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%" WRITE_LONG 0xc0 "%rest_spawns_offset%" END PATCH_IF ("%automap_offset%">="%entrances_offset%") BEGIN "automap_offset"="%automap_offset%"+"%info_ext%" WRITE_LONG 0xc4 "%automap_offset%" END BUT_ONLY_IF_IT_CHANGES //******************************************************** ~AR4600.are~ // AR8703 gets new entrance from DSC037 COPY_EXISTING ~AR8703.ARE~ ~override~ READ_LONG 0x54 "actors_offset" READ_SHORT 0x58 "actors_num" READ_SHORT 0x5a "infotrig_num" READ_LONG 0x5c "infotrig_offset" READ_LONG 0x60 "spawns_offset" READ_LONG 0x64 "spawns_num" READ_LONG 0x68 "entrances_offset" READ_LONG 0x6c "entrances_num" READ_LONG 0x70 "cont_offset" READ_SHORT 0x74 "cont_num" READ_SHORT 0x76 "items_num" READ_LONG 0x78 "items_offset" READ_LONG 0x7c "vert_offset" READ_SHORT 0x80 "vert_num" READ_SHORT 0x82 "amb_num" READ_LONG 0x84 "amb_offset" READ_LONG 0x88 "vars_offset" READ_LONG 0x8c "vars_num" READ_LONG 0xa0 "expbmp_offset" READ_LONG 0xa4 "doors_num" READ_LONG 0xa8 "doors_offset" READ_LONG 0xac "anim_num" READ_LONG 0xb0 "anim_offset" READ_LONG 0xb4 "tiled_num" READ_LONG 0xb8 "tiled_offset" READ_LONG 0xbc "songs_offset" READ_LONG 0xc0 "rest_spawns_offset" READ_LONG 0xc4 "automap_offset" READ_LONG 0xc8 "automap_num" //adding 1 new entrance SET offset = ("%entrances_offset%"+0x68*"%entrances_num%") INSERT_BYTES offset 0x68 WRITE_ASCII offset ~Exitc037~ WRITE_SHORT (offset+0x20) 991 //X WRITE_SHORT (offset+0x22) 370 //Y WRITE_LONG (offset+0x24) "4" // facing SET "entrances_num"="%entrances_num%"+1 WRITE_LONG 0x6c "%entrances_num%" SET "info_ext"=0x68 PATCH_IF ("%actors_offset%">="%entrances_offset%") BEGIN "actors_offset"="%actors_offset%"+"%info_ext%" WRITE_LONG 0x54 "%actors_offset%" END PATCH_IF ("%spawns_offset%">="%entrances_offset%") BEGIN "spawns_offset"="%spawns_offset%"+"%info_ext%" WRITE_LONG 0x60 "%spawns_offset%" END PATCH_IF ("%vert_offset%">="%entrances_offset%") BEGIN "vert_offset"="%vert_offset%"+"%info_ext%" WRITE_LONG 0x7c "%vert_offset%" END PATCH_IF ("%cont_offset%">="%entrances_offset%") BEGIN "cont_offset"="%cont_offset%"+"%info_ext%" WRITE_LONG 0x70 "%cont_offset%" END PATCH_IF ("%items_offset%">="%entrances_offset%") BEGIN "items_offset"="%items_offset%"+"%info_ext%" WRITE_LONG 0x78 "%items_offset%" END PATCH_IF ("%infotrig_offset%">="%entrances_offset%") BEGIN "infotrig_offset"="%infotrig_offset%"+"%info_ext%" WRITE_LONG 0x5c "%infotrig_offset%" END PATCH_IF ("%amb_offset%">="%entrances_offset%") BEGIN "amb_offset"="%amb_offset%"+"%info_ext%" WRITE_LONG 0x84 "%amb_offset%" END PATCH_IF ("%vars_offset%">="%entrances_offset%") BEGIN "vars_offset"="%vars_offset%"+"%info_ext%" WRITE_LONG 0x88 "%vars_offset%" END PATCH_IF ("%expbmp_offset%">="%entrances_offset%") BEGIN "expbmp_offset"="%expbmp_offset%"+"%info_ext%" WRITE_LONG 0xa0 "%expbmp_offset%" END PATCH_IF ("%doors_offset%">="%entrances_offset%") BEGIN "doors_offset"="%doors_offset%"+"%info_ext%" WRITE_LONG 0xa8 "%doors_offset%" END PATCH_IF ("%anim_offset%">="%entrances_offset%") BEGIN "anim_offset"="%anim_offset%"+"%info_ext%" WRITE_LONG 0xb0 "%anim_offset%" END PATCH_IF ("%tiled_offset%">="%entrances_offset%") BEGIN "tiled_offset"="%tiled_offset%"+"%info_ext%" WRITE_LONG 0xb8 "%tiled_offset%" END PATCH_IF ("%songs_offset%">="%entrances_offset%") BEGIN "songs_offset"="%songs_offset%"+"%info_ext%" WRITE_LONG 0xbc "%songs_offset%" END PATCH_IF ("%rest_spawns_offset%">="%entrances_offset%") BEGIN "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%" WRITE_LONG 0xc0 "%rest_spawns_offset%" END PATCH_IF ("%automap_offset%">="%entrances_offset%") BEGIN "automap_offset"="%automap_offset%"+"%info_ext%" WRITE_LONG 0xc4 "%automap_offset%" END BUT_ONLY_IF_IT_CHANGES //******************************************************** ~AR8703.are~ // AR8900 gets new entrance from DSC001 COPY_EXISTING ~AR8900.ARE~ ~override~ READ_LONG 0x54 "actors_offset" READ_SHORT 0x58 "actors_num" READ_SHORT 0x5a "infotrig_num" READ_LONG 0x5c "infotrig_offset" READ_LONG 0x60 "spawns_offset" READ_LONG 0x64 "spawns_num" READ_LONG 0x68 "entrances_offset" READ_LONG 0x6c "entrances_num" READ_LONG 0x70 "cont_offset" READ_SHORT 0x74 "cont_num" READ_SHORT 0x76 "items_num" READ_LONG 0x78 "items_offset" READ_LONG 0x7c "vert_offset" READ_SHORT 0x80 "vert_num" READ_SHORT 0x82 "amb_num" READ_LONG 0x84 "amb_offset" READ_LONG 0x88 "vars_offset" READ_LONG 0x8c "vars_num" READ_LONG 0xa0 "expbmp_offset" READ_LONG 0xa4 "doors_num" READ_LONG 0xa8 "doors_offset" READ_LONG 0xac "anim_num" READ_LONG 0xb0 "anim_offset" READ_LONG 0xb4 "tiled_num" READ_LONG 0xb8 "tiled_offset" READ_LONG 0xbc "songs_offset" READ_LONG 0xc0 "rest_spawns_offset" READ_LONG 0xc4 "automap_offset" READ_LONG 0xc8 "automap_num" //adding 1 new entrance SET offset = ("%entrances_offset%"+0x68*"%entrances_num%") INSERT_BYTES offset 0x68 WRITE_ASCII offset ~Exitc001~ WRITE_SHORT (offset+0x20) 4702 //X WRITE_SHORT (offset+0x22) 873 //Y WRITE_LONG (offset+0x24) "3" // facing SET "entrances_num"="%entrances_num%"+1 WRITE_LONG 0x6c "%entrances_num%" SET "info_ext"=0x68 PATCH_IF ("%actors_offset%">="%entrances_offset%") BEGIN "actors_offset"="%actors_offset%"+"%info_ext%" WRITE_LONG 0x54 "%actors_offset%" END PATCH_IF ("%spawns_offset%">="%entrances_offset%") BEGIN "spawns_offset"="%spawns_offset%"+"%info_ext%" WRITE_LONG 0x60 "%spawns_offset%" END PATCH_IF ("%vert_offset%">="%entrances_offset%") BEGIN "vert_offset"="%vert_offset%"+"%info_ext%" WRITE_LONG 0x7c "%vert_offset%" END PATCH_IF ("%cont_offset%">="%entrances_offset%") BEGIN "cont_offset"="%cont_offset%"+"%info_ext%" WRITE_LONG 0x70 "%cont_offset%" END PATCH_IF ("%items_offset%">="%entrances_offset%") BEGIN "items_offset"="%items_offset%"+"%info_ext%" WRITE_LONG 0x78 "%items_offset%" END PATCH_IF ("%infotrig_offset%">="%entrances_offset%") BEGIN "infotrig_offset"="%infotrig_offset%"+"%info_ext%" WRITE_LONG 0x5c "%infotrig_offset%" END PATCH_IF ("%amb_offset%">="%entrances_offset%") BEGIN "amb_offset"="%amb_offset%"+"%info_ext%" WRITE_LONG 0x84 "%amb_offset%" END PATCH_IF ("%vars_offset%">="%entrances_offset%") BEGIN "vars_offset"="%vars_offset%"+"%info_ext%" WRITE_LONG 0x88 "%vars_offset%" END PATCH_IF ("%expbmp_offset%">="%entrances_offset%") BEGIN "expbmp_offset"="%expbmp_offset%"+"%info_ext%" WRITE_LONG 0xa0 "%expbmp_offset%" END PATCH_IF ("%doors_offset%">="%entrances_offset%") BEGIN "doors_offset"="%doors_offset%"+"%info_ext%" WRITE_LONG 0xa8 "%doors_offset%" END PATCH_IF ("%anim_offset%">="%entrances_offset%") BEGIN "anim_offset"="%anim_offset%"+"%info_ext%" WRITE_LONG 0xb0 "%anim_offset%" END PATCH_IF ("%tiled_offset%">="%entrances_offset%") BEGIN "tiled_offset"="%tiled_offset%"+"%info_ext%" WRITE_LONG 0xb8 "%tiled_offset%" END PATCH_IF ("%songs_offset%">="%entrances_offset%") BEGIN "songs_offset"="%songs_offset%"+"%info_ext%" WRITE_LONG 0xbc "%songs_offset%" END PATCH_IF ("%rest_spawns_offset%">="%entrances_offset%") BEGIN "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%" WRITE_LONG 0xc0 "%rest_spawns_offset%" END PATCH_IF ("%automap_offset%">="%entrances_offset%") BEGIN "automap_offset"="%automap_offset%"+"%info_ext%" WRITE_LONG 0xc4 "%automap_offset%" END BUT_ONLY_IF_IT_CHANGES //******************************************************** ~AR8900.are~ PRINT @2303 //areas ///////////////////////// // Dialogs to compile // ///////////////////////// COMPILE ~DSotSC/D~ COMPILE ~DSotSC/D/dlgfix/DSotSCDLGFix.d~ USING ~DSotSC/Language/%s/DSotSCDLGFix.tra~ PRINT @2299 //dlg ////////////////////////////////////// // Compile and append scripts // ////////////////////////////////////// EXTEND_BOTTOM ~AR3200.bcs~ ~DSotSC/BAF/Area/AR3200.BAF~ COPY_EXISTING ~AR3400.are~ ~override/AR3400.are~ WRITE_ASCII 0x94 ~AR3400~ BUT_ONLY_IF_IT_CHANGES EXTEND_TOP ~AR3400.BCS~ ~DSotSC/BAF/Area/AR3400.BAF~ COPY_EXISTING ~AR3499.are~ ~override~ WRITE_ASCII 0x94 ~AR3499~ BUT_ONLY_IF_IT_CHANGES //EXTEND_BOTTOM ~AR3499.bcs~ ~DSotSC/BAF/Area/AR3499.BAF~ EXTEND_BOTTOM ~AR3497.bcs~ ~DSotSC/BAF/Area/AR3497.BAF~ EXTEND_BOTTOM ~AR3498.bcs~ ~DSotSC/BAF/Area/AR3498.BAF~ EXTEND_BOTTOM ~AR3700.bcs~ ~DSotSC/BAF/Area/AR3700.BAF~ COPY_EXISTING ~AR3701.are~ ~override/AR3701.are~ WRITE_ASCII 0x94 ~AR3701~ BUT_ONLY_IF_IT_CHANGES EXTEND_BOTTOM ~AR3701.bcs~ ~DSotSC/BAF/Area/AR3701.BAF~ COPY_EXISTING ~AR3704.are~ ~override/AR3704.are~ WRITE_ASCII 0x94 ~AR3704~ BUT_ONLY_IF_IT_CHANGES EXTEND_BOTTOM ~AR3704.bcs~ ~DSotSC/BAF/Area/AR3704.BAF~ COPY_EXISTING ~AR3705.are~ ~override/AR3705.are~ WRITE_ASCII 0x94 ~AR3705~ BUT_ONLY_IF_IT_CHANGES EXTEND_BOTTOM ~AR3705.bcs~ ~DSotSC/BAF/Area/AR3705.BAF~ EXTEND_BOTTOM ~AR3800.BCS~ ~DSotSC/BAF/Area/AR3800.BAF~ COPY_EXISTING ~AR4403.are~ ~override/AR4403.are~ WRITE_ASCII 0x94 ~AR4403~ BUT_ONLY_IF_IT_CHANGES EXTEND_TOP ~AR4403.BCS~ ~DSotSC/BAF/Area/AR4403.BAF~ EXTEND_TOP ~AR4405.BCS~ ~DSotSC/BAF/Area/AR4405.BAF~ EXTEND_BOTTOM ~AR4600.bcs~ ~DSotSC/BAF/Area/AR4600.BAF~ COPY_EXISTING ~AR6515.are~ ~override/AR6515.are~ WRITE_ASCII 0x94 ~AR6515~ BUT_ONLY_IF_IT_CHANGES EXTEND_BOTTOM ~AR6515.bcs~ ~DSotSC/BAF/Area/AR6515.BAF~ EXTEND_BOTTOM ~AR6600.bcs~ ~DSotSC/BAF/Area/AR6600.BAF~ EXTEND_BOTTOM ~AR6700.bcs~ ~DSotSC/BAF/Area/AR6700.BAF~ COPY_EXISTING ~AR6701.are~ ~override/AR6701.are~ WRITE_ASCII 0x94 ~AR6701~ BUT_ONLY_IF_IT_CHANGES EXTEND_BOTTOM ~AR6701.bcs~ ~DSotSC/BAF/Area/AR6701.BAF~ EXTEND_BOTTOM ~AR6704.bcs~ ~DSotSC/BAF/Area/AR6704.BAF~ COPY_EXISTING ~AR6707.are~ ~override/AR6707.are~ WRITE_ASCII 0x94 ~AR6707~ BUT_ONLY_IF_IT_CHANGES EXTEND_BOTTOM ~AR6707.bcs~ ~DSotSC/BAF/Area/AR6707.BAF~ EXTEND_BOTTOM ~AR6757.bcs~ ~DSotSC/BAF/Area/AR6757.BAF~ EXTEND_BOTTOM ~AR6800.bcs~ ~DSotSC/BAF/Area/AR6800.BAF~ REPLACE ~999999~ @2304 EXTEND_BOTTOM ~AR7211.bcs~ ~DSotSC/BAF/Area/AR7211.BAF~ EXTEND_BOTTOM ~AR7407.bcs~ ~DSotSC/BAF/Area/AR7407.BAF~ EXTEND_BOTTOM ~AR7408.bcs~ ~DSotSC/BAF/Area/AR7408.BAF~ EXTEND_BOTTOM ~AR8400.bcs~ ~DSotSC/BAF/Area/AR8400.BAF~ EXTEND_BOTTOM ~AR8401.bcs~ ~DSotSC/BAF/Area/AR8401.BAF~ EXTEND_BOTTOM ~AR8402.bcs~ ~DSotSC/BAF/Area/AR8402.BAF~ EXTEND_BOTTOM ~AR8600.bcs~ ~DSotSC/BAF/Area/AR8600.BAF~ EXTEND_BOTTOM ~AR8602.bcs~ ~DSotSC/BAF/Area/AR8602.BAF~ EXTEND_BOTTOM ~AR8603.bcs~ ~DSotSC/BAF/Area/AR8603.BAF~ EXTEND_BOTTOM ~AR8605.bcs~ ~DSotSC/BAF/Area/AR8605.BAF~ EXTEND_BOTTOM ~AR8900.bcs~ ~DSotSC/BAF/Area/AR8900.BAF~ COPY_EXISTING ~AR9200.are~ ~override/AR9200.are~ WRITE_ASCII 0x94 ~AR9200~ BUT_ONLY_IF_IT_CHANGES EXTEND_BOTTOM ~AR9200.bcs~ ~DSotSC/BAF/Area/AR9200.BAF~ EXTEND_BOTTOM ~AR9302.bcs~ ~DSotSC/BAF/Area/AR9302.BAF~ EXTEND_BOTTOM ~AR9501.bcs~ ~DSotSC/BAF/Area/AR9501.BAF~ EXTEND_BOTTOM ~AR9600.bcs~ ~DSotSC/BAF/Area/AR9600.BAF~ EXTEND_BOTTOM ~AR9700.BCS~ ~DSotSC/BAF/Area/AR9700.BAF~ //drow item disintegration EXTEND_TOP ~AR8700.bcs~ ~DSotSC/BAF/Area/AR8700.BAF~ EXTEND_TOP ~AR3200.bcs~ ~DSotSC/BAF/Area/AR8700.BAF~ //entrance to UD COMPILE ~DSotSC/BAF~ USING ~DSotSC/Language/%s/baf.tra~ ///////////////////////////////////////////////////////////////////////////////// /// Fix Cuchi going "Owww!!" all the time when you load the game. ///////////////////////////////////////////////////////////////////////////////// COPY_EXISTING ~DSCUSWD.ITM~ ~override~ READ_LONG 0x64 abil_off READ_SHORT 0x68 abil_num READ_LONG 0x6a fx_off READ_SHORT 0x70 fx_global_num SET abil_fx_idx_lowest = 65536 //find the index of the first ability effect FOR (i = 0; i < "%abil_num%"; i += 1) BEGIN //parse each ability READ_SHORT (%abil_off% + %i% * 0x38 + 0x20) abil_fx_idx SET abil_fx_idx_lowest = (%abil_fx_idx_lowest% > %abil_fx_idx% ? %abil_fx_idx% : %abil_fx_idx_lowest%) END FOR (i = 0; i < "%abil_fx_idx_lowest%"; i += 1) BEGIN //parse each global effect READ_SHORT (%fx_off% + %i% * 0x30) fx_type PATCH_IF (%fx_type% = 177) BEGIN DELETE_BYTES (%fx_off% + %i% * 0x30) 0x30 //delete effect SET %fx_global_num% -= 1 //update #global effects WRITE_SHORT 0x70 %fx_global_num% FOR (j = 0; j < "%abil_num%"; j += 1) BEGIN //update ability effect indices READ_SHORT (%abil_off% + %j% * 0x38 + 0x20) abil_fx_idx WRITE_SHORT (%abil_off% + %j% * 0x38 + 0x20) (%abil_fx_idx% - 1) END SET abil_fx_idx_lowest -= 1 SET i -= 1 END END BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~DSMACE03.ITM~ ~override~ READ_LONG 0x64 abil_off READ_SHORT 0x68 abil_num READ_LONG 0x6a fx_off READ_SHORT 0x70 fx_global_num SET abil_fx_idx_lowest = 65536 //find the index of the first ability effect FOR (i = 0; i < "%abil_num%"; i += 1) BEGIN //parse each ability READ_SHORT (%abil_off% + %i% * 0x38 + 0x20) abil_fx_idx SET abil_fx_idx_lowest = (%abil_fx_idx_lowest% > %abil_fx_idx% ? %abil_fx_idx% : %abil_fx_idx_lowest%) END FOR (i = 0; i < "%abil_fx_idx_lowest%"; i += 1) BEGIN //parse each global effect READ_SHORT (%fx_off% + %i% * 0x30) fx_type PATCH_IF (%fx_type% = 177) BEGIN DELETE_BYTES (%fx_off% + %i% * 0x30) 0x30 //delete effect SET %fx_global_num% -= 1 //update #global effects WRITE_SHORT 0x70 %fx_global_num% FOR (j = 0; j < "%abil_num%"; j += 1) BEGIN //update ability effect indices READ_SHORT (%abil_off% + %j% * 0x38 + 0x20) abil_fx_idx WRITE_SHORT (%abil_off% + %j% * 0x38 + 0x20) (%abil_fx_idx% - 1) END SET abil_fx_idx_lowest -= 1 SET i -= 1 END END BUT_ONLY_IF_IT_CHANGES // Add areas APPEND ~mastarea.2da~ ~DSC001 value DSC002 value DSC003 value DSC004 value DSC005 value DSC006 value DSC007 value DSC009 value DSC010 value DSC011 value DSC012 value DSC013 value DSC014 value DSC015 value DSC016 value DSC017 value DSC018 value DSC019 value DSC020 value DSC021 value DSC023 value DSC024 value DSC025 value DSC026 value DSC027 value DSC028 value DSC029 value DSC030 value DSC031 value DSC032 value DSC033 value DSC034 value DSC035 value DSC036 value~ UNLESS ~DSC001~ ////////////////////////////////// // Other 2DA files to update // ////////////////////////////////// APPEND ~PDIALOG.2DA~ ~JETLAYA JETLAP JETLAJ *** *** *** *** *** CUCHOINNEACH CUCHOINP CUCHOINJ *** *** *** *** *** CONCHOBHAIR CONCHOP CONCHOJ *** *** *** *** *** FERTHGIL FERTHP FERTHJ *** *** *** *** *** SKEEZER SKEEZP SKEEZJ *** *** *** *** *** DSBARDO BARDOP BARDOJ *** *** *** *** *** DSBUB BUBP BUBJ *** *** *** *** *** KEIRIA KEIRIP KEIRIJ *** *** *** *** *** THORFINN THORFP THORFJ *** *** *** *** ***~ UNLESS ~JETLAYA~ COPY ~dsotSC/chptxt-9.2DA~ ~override~ REPLACE ~99990~ @2305 REPLACE ~99991~ @2306 //************************************************** // WORLDMAP //************************************************** PRINT @2310 ACTION_IF FILE_EXISTS ~Worldmap/map_mods_areas.tbl~ THEN BEGIN COPY ~Worldmap/map_mods_areas.tbl~ ~Worldmap~ APPEND_FILE ~DSotSC/Worldmap/areas.tbl~ COPY ~Worldmap/map_mods_links.tbl~ ~Worldmap~ APPEND_FILE ~DSotSC/Worldmap/links.tbl~ COPY ~Worldmap/map_mods_trans.tra~ ~Worldmap~ APPEND_FILE_EVALUATE ~DSotSC/Worldmap/%LANGUAGE%/worldmap.tra~ //~tmp_worldmap.tra~ END ELSE BEGIN MKDIR ~Worldmap~ COPY ~DSotSC/Worldmap/areas.tbl~ ~Worldmap/map_mods_areas.tbl~ COPY ~DSotSC/Worldmap/links.tbl~ ~Worldmap/map_mods_links.tbl~ COPY ~DSotSC/Worldmap/%LANGUAGE%/worldmap.tra~ ~Worldmap/map_mods_trans.tra~ END //******************************************************************** // Tilesets //******************************************************************** PRINT @2307 AT_EXIT ~%deldir% dsotsc/bif~ MKDIR ~dsotsc/bif~ ACTION_BASH_FOR ~DSotSC/tiz~ EVALUATE_REGEXP ~^.*\.tiz$~ BEGIN OUTER_SPRINT dest ~dsotsc%slash%bif%slash%%BASH_FOR_RES%.tis~ // path must be compatible with EXACT ACTION_IF win BEGIN OUTER_INNER_PATCH_SAVE file ~%BASH_FOR_FILESPEC%~ BEGIN REPLACE_TEXTUALLY CASE_SENSITIVE EXACT_MATCH ~/~ ~\\~ //R_T requires backslashes to be ESCAPED END END ELSE BEGIN OUTER_SPRINT file ~%BASH_FOR_FILESPEC%~ ACTION_TO_LOWER file ACTION_TO_LOWER dest END //conversion AT_NOW ~%tisunpack% -s -h -o %dest% %file%%debug%~ EXACT ACTION_IF NOT FILE_EXISTS ~%dest%~ BEGIN LAM fail_conversion END END LAM bash_log //******************************************************************** // Audio Files //******************************************************************** ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ BEGIN PRINT ~Converting audio files... This will take some time.~ END ACTION_BASH_FOR ~DSotSC/Ogg~ EVALUATE_REGEXP ~^.*\.ogg$~ BEGIN //backup if already existing ACTION_IF FILE_EXISTS ~override/%BASH_FOR_RES%.wav~ BEGIN MOVE ~override/%BASH_FOR_RES%.wav~ ~dsotsc/backup/%COMPONENT_NUMBER%/%BASH_FOR_RES%.wav~ //-> DELETE END //detect if translated .ogg file exists ACTION_IF FILE_EXISTS ~DSotSC/Language/%LANGUAGE%/Ogg/%BASH_FOR_FILE%~ BEGIN OUTER_SPRINT file ~DSotSC%slash%Language%slash%%LANGUAGE%%slash%Ogg%slash%%BASH_FOR_RES%~ END ELSE BEGIN OUTER_SPRINT file ~DSotSC%slash%Ogg%slash%%BASH_FOR_RES%~ END OUTER_SPRINT dest ~dsotsc%slash%bif%slash%%BASH_FOR_RES%.wav~ //conversion ACTION_IF win THEN BEGIN AT_NOW ~%oggdec% %file%.ogg%debug_ogg%~ EXACT //the output file is now in the input dir SILENT ACTION_TRY MOVE + /*~%BASH_FOR_DIRECTORY%/%BASH_FOR_RES%.wav~*/~%file%.wav~ ~%dest%~ //failed in German VERBOSE WITH ~Unix.Unix_error(20, "rename", "%BASH_FOR_DIRECTORY%/%BASH_FOR_RES%.wav")~ BEGIN //conversion didn't work LAM fail_conversion END DEFAULT //some other, mysterious error VERBOSE ACTION_RERAISE END END ELSE BEGIN //unix-like //two different programs are used on Unix and Mac ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~ BEGIN AT_NOW ~%oggdec% %file%.ogg %dest%%debug%~ END ELSE BEGIN //unix AT_NOW ~%oggdec% %file%.ogg -o %dest% %debug_ogg%~// EXACT END // for unix AND Mac: did conversion work? ACTION_IF NOT FILE_EXISTS ~%dest%~ BEGIN LAM fail_conversion END END END LAM bash_log COPY + ~dsotsc/wed~ ~dsotsc/bif~ LPM tu_decompress PRINT @2308 MAKE_BIFF ~DSotSC~ BEGIN ~dsotsc/bif~ EVALUATE_REGEXP ~^.*\.\(wav\|tis\|bmp\|wed\|mos\)$~ END //------------------------------------------// // OPTIONAL COMPONENTS // //------------------------------------------// ///Interparty banters coded by Miloch. Thanks for the great work, my friend!! //! Dark Side Interparty Banter ///////////////////////////////////////////// BEGIN @2510 REQUIRE_PREDICATE ((FILE_EXISTS_IN_GAME ~ar0125.are~) OR (FILE_EXISTS_IN_GAME ~fw0125.are~) OR (FILE_EXISTS_IN_GAME ~ar7200.are~)) @2511 DESIGNATED 100 //uses: row_add col_add table_var interact death COPY_EXISTING ~interact.2da~ ~override~ PATCH_INCLUDE ~DSotSC/lib/ds_col_add.tpp~ BUT_ONLY ACTION_IF cl < mc THEN BEGIN OUTER_FOR (c3 = (cl + 1); c3 < (mc + 1); c3 += 1) BEGIN OUTER_SPRINT cm $c(~%c3%~) APPEND_COL ~interact.2da~ ~%cm%~ 2 END END COPY_EXISTING ~interact.2da~ ~override~ PATCH_INCLUDE ~DSotSC/lib/ds_row_add.tpp~ BUT_ONLY ACTION_IF rw < mc THEN BEGIN OUTER_FOR (r3 = rw; r3 < mc; r3 += 1) BEGIN OUTER_SPRINT rp $r(~%r3%~) APPEND ~interact.2da~ ~%rp%~ END END COPY_EXISTING ~interact.2da~ ~override~ PATCH_INCLUDE ~DSotSC/lib/ds_table_var.tpp~ BUT_ONLY INCLUDE ~DSotSC/lib/ds_interact.tpa~ COPY_EXISTING ~death.2da~ ~override~ PATCH_INCLUDE ~DSotSC/lib/ds_col_add.tpp~ BUT_ONLY ACTION_IF cl < mc THEN BEGIN OUTER_FOR (c3 = cl + 1; c3 < (mc + 1); c3 += 1) BEGIN OUTER_SPRINT cm $c(~%c3%~) APPEND_COL ~death.2da~ ~%cm%~ 2 END END COPY_EXISTING ~death.2da~ ~override~ PATCH_INCLUDE ~DSotSC/lib/ds_row_add.tpp~ BUT_ONLY ACTION_IF rw < mc THEN BEGIN OUTER_FOR (r3 = rw; r3 < mc; r3 += 1) BEGIN OUTER_SPRINT rp $r(~%r3%~) APPEND ~death.2da~ ~%rp%~ END END COPY_EXISTING ~death.2da~ ~override~ PATCH_INCLUDE ~DSotSC/lib/ds_table_var.tpp~ BUT_ONLY INCLUDE ~DSotSC/lib/ds_death.tpa~ COPY_EXISTING ~interact.2da~ ~override~ ~death.2da~ ~override~ REPLACE_TEXTUALLY EXACT_MATCH ~_~ ~ ~ BUT_ONLY //! Extended NPC Soundsets ////////////////////////////////////////////////// BEGIN @2521 SUBCOMPONENT @2520 REQUIRE_PREDICATE ((FILE_EXISTS_IN_GAME ~fw0125.are~) OR (FILE_EXISTS_IN_GAME ~ar7200.are~)) @2524 DESIGNATED 200 OUTER_SET dominate = 0 INCLUDE ~DSotSC/lib/wb_ext_sounds.tpa~ BEGIN @2522 SUBCOMPONENT @2520 DESIGNATED 210 OUTER_SET dominate = 1 INCLUDE ~DSotSC/lib/wb_ext_sounds.tpa~ BEGIN @2523 SUBCOMPONENT @2520 DESIGNATED 220 OUTER_SET dominate = 2 INCLUDE ~DSotSC/lib/wb_ext_sounds.tpa~ //------------------------------------------// // ALTERNATE PORTRAITS // //------------------------------------------// //! Alternate Bardo Portrait //////////////////////////////////////////////// BEGIN @2541 DESIGNATED 400 GROUP @2540 REQUIRE_COMPONENT ~setup-dsotsc.tp2~ ~5~ @2502 //requires main COPY ~DSotSC/portralt/bardol.bmp~ ~override~ ~DSotSC/portralt/bardos.bmp~ ~override~ //! Alternate Bub Snikt Portrait //////////////////////////////////////////// BEGIN @2542 DESIGNATED 410 GROUP @2540 REQUIRE_COMPONENT ~setup-dsotsc.tp2~ ~5~ @2502 //requires main COPY ~DSotSC/portralt/dsbubl.bmp~ ~override~ ~DSotSC/portralt/dsbubs.bmp~ ~override~ //! Alternate Conchobhair Portrait ////////////////////////////////////////// BEGIN @2543 DESIGNATED 420 GROUP @2540 REQUIRE_COMPONENT ~setup-dsotsc.tp2~ ~5~ @2502 //requires main COPY ~DSotSC/portralt/conchol.bmp~ ~override~ ~DSotSC/portralt/conchos.bmp~ ~override~ //! Alternate CúChoinneach Portrait ///////////////////////////////////////// BEGIN @2544 DESIGNATED 430 GROUP @2540 REQUIRE_COMPONENT ~setup-dsotsc.tp2~ ~5~ @2502 //requires main COPY ~DSotSC/portralt/cuchoinl.bmp~ ~override~ ~DSotSC/portralt/cuchoins.bmp~ ~override~ //! Alternate Ferthgil Portrait ///////////////////////////////////////////// BEGIN @2545 DESIGNATED 440 GROUP @2540 REQUIRE_COMPONENT ~setup-dsotsc.tp2~ ~5~ @2502 //requires main COPY ~DSotSC/portralt/ferthgl.bmp~ ~override~ ~DSotSC/portralt/ferthgs.bmp~ ~override~ //! Alternate Jet'laya Portrait ///////////////////////////////////////////// BEGIN @2546 DESIGNATED 450 GROUP @2540 REQUIRE_COMPONENT ~setup-dsotsc.tp2~ ~5~ @2502 //requires main COPY ~DSotSC/portralt/jetlayal.bmp~ ~override~ ~DSotSC/portralt/jetlayas.bmp~ ~override~ //! Alternate Keiria Portrait /////////////////////////////////////////////// BEGIN @2547 DESIGNATED 460 GROUP @2540 REQUIRE_COMPONENT ~setup-dsotsc.tp2~ ~5~ @2502 //requires main COPY ~DSotSC/portralt/keirial.bmp~ ~override~ ~DSotSC/portralt/keirias.bmp~ ~override~ //! Alternate Skeezer Portrait ////////////////////////////////////////////// BEGIN @2548 DESIGNATED 470 GROUP @2540 REQUIRE_COMPONENT ~setup-dsotsc.tp2~ ~5~ @2502 //requires main COPY ~DSotSC/portralt/skeezrl.bmp~ ~override~ ~DSotSC/portralt/skeezrs.bmp~ ~override~ //! Alternate Thorfinn Portrait ///////////////////////////////////////////// BEGIN @2549 DESIGNATED 480 GROUP @2540 REQUIRE_COMPONENT ~setup-dsotsc.tp2~ ~5~ @2502 //requires main COPY ~DSotSC/portralt/thorfl.bmp~ ~override~ ~DSotSC/portralt/thorfs.bmp~ ~override~ //------------------------------------------// // BIFF EVERYTHING // //------------------------------------------// BEGIN @2500 DESIGNATED 500 REQUIRE_PREDICATE NOT FILE_EXISTS_IN_GAME ~nt10pb.are~ @2501 //this will automatically recognize the new NTotSC version REQUIRE_COMPONENT ~setup-dsotsc.tp2~ ~5~ @2502 //requires main //remove remaining folders after uninstallation ACTION_IF ~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~ BEGIN AT_UNINSTALL ~dsotsc\win32\deldir.bat dsotsc\backup\%COMPONENT_NUMBER%\biff~ END ELSE BEGIN AT_UNINSTALL ~rm -rf dsotsc/backup/%COMPONENT_NUMBER%/biff~ END OUTER_SPRINT backup ~dsotsc/backup~ MKDIR ~%backup%/%COMPONENT_NUMBER%/biff/0~ OUTER_INNER_PATCH ~0~ BEGIN currentTotal = 0 currentFile = 0 PATCH_BASH_FOR ~override~ ~^[^^& ]*\.\(bmp\|mve\|wav\|wac\|plt\|bam\|wed\|chu\|tis\|mos\|itm\|spl\|bcs\|ids\|cre\|are\|dlg\|2da\|gam\|sto\|wmp\|chr\|eff\|vvc\|vef\|pro\)$~ BEGIN INNER_ACTION BEGIN ACTION_IF %BASH_FOR_SIZE% + currentTotal > 30000000 /* 30M */ && currentTotal > 0 BEGIN MAKE_BIFF ~DSC%currentFile%~ BEGIN ~%backup%/%COMPONENT_NUMBER%/biff/%currentFile%~ ~^.*$~ END OUTER_SET currentFile = currentFile + 1 OUTER_SET currentTotal = 0 MKDIR ~%backup%/%COMPONENT_NUMBER%/biff/%currentFile%~ END MOVE ~override/%BASH_FOR_FILE%~ ~%backup%/%COMPONENT_NUMBER%/biff/%currentFile%/%BASH_FOR_FILE%~ END currentTotal += BASH_FOR_SIZE END END ACTION_IF currentTotal > 0 BEGIN MAKE_BIFF ~DSC%currentFile%~ BEGIN ~%backup%/%COMPONENT_NUMBER%/biff/%currentFile%~ ~^.*$~ END END