the bigg Posted May 1, 2007 Share Posted May 1, 2007 Can you add a predicate to the Refinements compatibility code (in the Additional dual-class component) so that the code isn't applied if the file ~refinements/lib/kit.tpa~ is present? The next version of Refinements (due sooner or later) will contain code to handle additional dual-able kits on our side, which wouldn't work if your Refinements compatibility code is installed (refinements/lib/kit.tpa being a file that will be present in next version of Refinements, obviously). Example code: /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ ///// \\\\\ ///// More dual-classes \\\\\ ///// \\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ BEGIN @214000 DESIGNATED 2140 GROUP @9 INCLUDE ~BG2_Tweaks/lib/kit_ids_fixer.tpa~ INCLUDE ~BG2_Tweaks/lib/tob2soa.tpa~ // first it replaces WILDMAGE and BARBARIAN values in these files if they're present COPY_EXISTING ~dualclas.2da~ ~override~ REPLACE_TEXTUALLY ~\bWILDMAGE\b.*~ ~WILDMAGE 1 1 0 1 0 0~ REPLACE_TEXTUALLY ~\bBARBARIAN\b.*~ ~BARBARIAN 0 1 1 1 1 0~ BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~abdcdsrq.2da~ ~override~ REPLACE_TEXTUALLY ~\bWILDMAGE\b.*~ ~WILDMAGE 0 0 0 17 0 0~ REPLACE_TEXTUALLY ~\bBARBARIAN\b.*~ ~BARBARIAN 17 0 0 0 0 0~ BUT_ONLY_IF_IT_CHANGES COPY_EXISTING ~abdcscrq.2da~ ~override~ REPLACE_TEXTUALLY ~\bWILDMAGE\b.*~ ~WILDMAGE 0 0 0 15 0 0~ REPLACE_TEXTUALLY ~\bBARBARIAN\b.*~ ~BARBARIAN 15 0 0 0 0 0~ BUT_ONLY_IF_IT_CHANGES // if they're not then it appends them to the files APPEND ~dualclas.2da~ ~WILDMAGE 1 1 0 1 0 0~ UNLESS ~\bWILDMAGE\b~ APPEND ~abdcdsrq.2da~ ~WILDMAGE 0 0 0 17 0 0~ UNLESS ~\bWILDMAGE\b~ APPEND ~abdcscrq.2da~ ~WILDMAGE 0 0 0 15 0 0~ UNLESS ~\bWILDMAGE\b~ APPEND ~dualclas.2da~ ~BARBARIAN 0 1 1 1 1 0~ UNLESS ~\bBARBARIAN\b~ APPEND ~abdcdsrq.2da~ ~BARBARIAN 17 0 0 0 0 0~ UNLESS ~\bBARBARIAN\b~ APPEND ~abdcscrq.2da~ ~BARBARIAN 15 0 0 0 0 0~ UNLESS ~\bBARBARIAN\b~ COPY ~BG2_Tweaks/spl/cdtitle0.spl~ ~override~ // spell to fix title and class name for d/c barbarians. Calls one of the EFFs below as appropriate COPY ~BG2_Tweaks/eff/cdtitle1.eff~ ~override~ SAY 0x1C @214001 COPY_EXISTING ~cdtitle1.eff~ ~override/cdtitle2.eff~ SAY 0x1C @214002 COPY_EXISTING ~cdtitle1.eff~ ~override/cdtitle3.eff~ SAY 0x1C @214003 COPY_EXISTING ~cdtitle1.eff~ ~override/cdtitle4.eff~ SAY 0x1C @214004 PRINT @1 COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files READ_BYTE 0x1f "usa2" READ_BYTE 0x29 "kit1" PATCH_IF ((("%kit1%" BAND 0b01000000) = 0b01000000) AND // if unusable by fighters and barbarians (("%usa2%" BAND 0b00001000) = 0b00001000)) THEN BEGIN WRITE_BYTE 0x29 ("%kit1%" BAND 0b10111111) //remove redundant barb flag END END BUT_ONLY_IF_IT_CHANGES ACTION_IF FILE_EXISTS ~Refinements/Hlab/Thief/clab/CLABEMPT.2DA~ AND NOT FILE_EXISTS ~Refinements/lib/kit.tpa~ THEN BEGIN ADD_KIT ~barbtF~ ~barbtF 1 1 1 1 1 0 0 0~ ~barbtF 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~ ~barbtF 0 9 0 0 0 0~ ~barbtF 0 0 0 0 0 0~ ~barbtF 0 17 0 0 0 0~ ~barbtF 0 15 0 0 0 0~ ~barbtF 0 1 1 1 1 1 1 1 1~ ~barbtF 1 1 1 0 0 0~ ~override/CLABEMPT.2DA~ ~~ ~0x40000000 2~ ~BRB~ ~* * * * * * * * * * * * * * * * * * * *~ SAY #45855 SAY #45859 SAY #45869 ADD_KIT ~barbtw~ ~barbtw 1 1 1 1 1 0 0 0~ ~barbtw 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0~ ~barbtw 0 9 0 0 0 0~ ~barbtw 0 0 0 0 0 0~ ~barbtw 0 17 0 0 0 0~ ~barbtw 0 15 0 0 0 0~ ~barbtw 0 1 1 1 1 1 1 1 1~ ~barbtw 1 1 1 0 0 0~ ~override/CLABTEMP.2DA~ ~~ ~0x40000000 2~ ~BRB~ ~* * * * * * * * * * * * * * * * * * * *~ SAY #45855 SAY #45859 SAY #45869 COPY_EXISTING ~kitlist.2da~ ~override~ REPLACE_TEXTUALLY ~45855 45859 45869 CLABTEMP ~ ~45855 45859 45869 CLABFI05 ~ SET_2DA_ENTRY 34 7 1 0x400000020 EXTEND_TOP ~dplayer.bcs~ ~BG2_Tweaks/baf/dplayer.baf~ EXTEND_TOP ~dplayer2.bcs~ ~BG2_Tweaks/baf/dplayer.baf~ EXTEND_TOP ~dplayer3.bcs~ ~BG2_Tweaks/baf/dplayer.baf~ //EXTEND_BOTTOM ~baldur.bcs~ ~BG2_Tweaks/baf/Runcheck.baf~ //EXTEND_BOTTOM ~baldur25.bcs~ ~BG2_Tweaks/baf/Runcheck.baf~ EXTEND_BOTTOM ~li#stri.bcs~ ~BG2_Tweaks/baf/li#stri.baf~ COPY_EXISTING ~weapprof.2da~ ~override~ // Full compatibility with all weapprof modifiers (like, say, AOE) FOR (row = 3; row < 35; row = row + 1) BEGIN READ_2DA_ENTRY "%row%" 52 1 "barb" SET_2DA_ENTRY "%row%" (22+"%barbtF%") 1 "%barb%" SET_2DA_ENTRY "%row%" (22+"%barbtw%") 1 "%barb%" END COPY_EXISTING ~KITLIST.2DA~ ~override~ READ_2DA_ENTRY 34 2 1 "lower" READ_2DA_ENTRY 34 3 1 "mixed" READ_2DA_ENTRY 34 4 1 "help" SET_2DA_ENTRY "%barbtF%"+3 2 1 "%lower%" SET_2DA_ENTRY "%barbtw%"+3 2 1 "%lower%" SET_2DA_ENTRY "%barbtF%"+3 3 1 "%mixed%" SET_2DA_ENTRY "%barbtw%"+3 3 1 "%mixed%" SET_2DA_ENTRY "%barbtF%"+3 4 1 "%help%" SET_2DA_ENTRY "%barbtw%"+3 4 1 "%help%" END Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.