Miloch Posted January 26, 2007 Share Posted January 26, 2007 I think it when it gives the multi-thieves the extra access to weapons, it also has to enable backstabbing for those, as an optional component at least. Maybe you could use it in conjunction with something like the Improved Backstabbing in Ding0's Tweak Pack. In theory, a thief could backstab with a halberd, there's just a hefty penalty for it. Though how do you 'stab' someone with a quarterstaff? Link to comment
Nythrun Posted January 27, 2007 Share Posted January 27, 2007 Druids can already use daggers and darts, I didn't change them at all Skip the backstab component if you don't want it, it's just to allow multi-thieves the ability to backstab with any of the weapons they can use. Won't hurt anything if you skip it. Link to comment
cmorgan Posted January 28, 2007 Share Posted January 28, 2007 Hey, Nythrun, is this actually going into the tweakpack, or do you want it up in your Wikki codebank? Link to comment
Miloch Posted February 11, 2007 Share Posted February 11, 2007 I don't think Nythrun screamed 'No! Don't put this in Tweaks!' - it'd be a good place for it. Though at this point, I suppose it will wait for the 'consolidated Tweaks' version. Link to comment
Shaitan Posted February 11, 2007 Share Posted February 11, 2007 It would be nice in the tweakpack. Thus avoiding AoE for my part atleast Link to comment
cmorgan Posted February 16, 2007 Share Posted February 16, 2007 Word on this, oh Mistress of Spells and Enchantress of Code? Is this a "send it to CamDawg and have him integrate it into Tweaks", or a "Put it up on the wikki and the sufficiently motivated and able with cut, paste, and set up thier own mod"? Link to comment
Nythrun Posted February 17, 2007 Share Posted February 17, 2007 I think poor CamDawg already has more than enough to maintain, especially without my filthy coding habits Let me throw together a slightly more presentable version, and it should be .tp2able (neologism from hell, sorry). /edit Ensuring that this actually works in languages other than english (or even in english, which I barely speak anyway ) is going to be a trial I may not be up for. /edit some more But let's hone the regexp anyway /edit some more some more Yikes, do non-english dialog.tlks really have this crazy inconsistent usage? DEFINE_ACTION_MACRO ~swpl~ BEGIN PRINT ~Allow clerics one star in any weapon a fighter can use.~ PRINT ~This is required for classes who dual to cleric to retain all old proficiencies.~ PRINT ~Hit 0 and enter for no change, 1 and enter for one star.~ ACTION_READLN "scc" ACTION_IF NOT (IS_AN_INT "scc") THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END ELSE BEGIN ACTION_IF ("scc" > 0x1) THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END END PRINT ~Allow druids one star in any weapon a fighter can use.~ PRINT ~This is required for classes who dual to druid to retain all old proficiencies.~ PRINT ~Hit 0 and enter for no change, 1 and enter for one star.~ ACTION_READLN "sdc" ACTION_IF NOT (IS_AN_INT "sdc") THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END ELSE BEGIN ACTION_IF ("sdc" > 0x1) THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END END PRINT ~Allow grandmastery for fighter multiclasses.~ PRINT ~Hit 0 and enter for no change, 1 and enter for yes.~ ACTION_READLN "gmc" ACTION_IF NOT (IS_AN_INT "gmc") THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END ELSE BEGIN ACTION_IF ("gmc" > 0x1) THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END END PRINT ~Allow thieves, mages, and bards to place one star in any weapon type.~ PRINT ~Hit 0 and enter for no change, 1 and enter for yes.~ ACTION_READLN "tmc" ACTION_IF NOT (IS_AN_INT "tmc") THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END ELSE BEGIN ACTION_IF ("tmc" > 0x1) THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END END PRINT ~Allow thieves and thief multi-classes three stars in dual-wielding.~ PRINT ~Hit 0 and enter for no change, 1 and enter for yes.~ ACTION_READLN "dwc" ACTION_IF NOT (IS_AN_INT "dwc") THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END ELSE BEGIN ACTION_IF ("dwc" > 0x1) THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END END PRINT ~Allow backstab with any weapon a mage/thief, fighter/thief, or cleric/thief can use.~ PRINT ~Unfortunately, single-class thieves will be able to equip any weapons thus altered.~ PRINT ~They won't, however, be able to spend proficiency points in forbidden categories.~ PRINT ~Hit 0 and enter for no change, 1 and enter for yes.~ ACTION_READLN "wpc" ACTION_IF NOT (IS_AN_INT "wpc") THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END ELSE BEGIN ACTION_IF ("wpc" > 0x1) THEN BEGIN PRINT ~Try that again.~ LAUNCH_ACTION_MACRO ~swpl~ END END END LAUNCH_ACTION_MACRO ~swpl~ OUTER_PATCH ~asdf~ BEGIN WRITE_SHORT 0x0 0x0a0d READ_ASCII 0x0 ~fj_mn~ (0x1) READ_ASCII 0x1 ~fj_ln~ (0x1) WRITE_SHORT 0x0 0x0920 READ_ASCII 0x0 ~fj_sp~ (0x1) READ_ASCII 0x1 ~fj_tb~ (0x1) SPRINT ~fj1~ ~[%fj_tb%%fj_sp%]*~ SPRINT ~fj2~ ~[^%fj_sp%%fj_tb%]+~ SPRINT ~fj3~ ~\(\|%fj_mn%\|%fj_ln%\|%fj_mn%%fj_ln%\)~ SPRINT ~fj4~ ~[%fj_ln%%fj_mn%]+~ SPRINT ~fj5~ ~%fj1%%fj2%%fj1%%fj4%~ SPRINT ~fj6~ ~[%fj_ln%%fj_mn%]*~ SPRINT ~fj_any~ ~\(\|%fj5%\|%fj5%%fj5%\|%fj5%%fj5%%fj5%\|%fj5%%fj5%%fj5%%fj5%\|%fj5%%fj5%%fj5%%fj5%%fj5%\|%fj5%%fj5%%fj5%%fj5%%fj5%%fj5%\|%fj5%%fj5%%fj5%%fj5%%fj5%%fj5%%fj5%\|%fj5%%fj5%%fj5%%fj5%%fj5%%fj5%%fj5%%fj5%\|%fj5%%fj5%%fj5%%fj5%%fj5%%fj5%%fj5%%fj5%%fj5%\)~ SPRINT ~fj_st~ ~\([%fj_tb%%fj_sp%]*\)~ END OUTER_SPRINT ~Not_Usable_By~ ~Not usable by:~ OUTER_SPRINT ~Druid~ ~\(%fj1%Druid%fj1%%fj6%\|%fj1%Druids%fj1%%fj6%\)~ OUTER_SPRINT ~Cleric~ ~\(%fj1%Cleric%fj1%%fj6%\|%fj1%Clerics%fj1%%fj6%\)~ OUTER_SPRINT ~Thief~ ~\(%fj1%Thief%fj1%%fj6%\|%fj1%Thieves%fj1%%fj6%\)~ OUTER_SPRINT ~Mage~ ~\(%fj1%Mage%fj1%%fj6%\|%fj1%Mages%fj1%%fj6%\)~ OUTER_SPRINT ~Bard~ ~\(%fj1%Bard%fj1%%fj6%\|%fj1%Bards%fj1%%fj6%\)~ ACTION_IF (~%LANGUAGE%~ STRING_EQUAL_CASE ~GERMAN~) THEN BEGIN OUTER_SPRINT ~Not_Usable_By~ ~Kann nicht verwendet werden von:~ OUTER_SPRINT ~Druid~ ~\(%fj1%Druide%fj1%%fj6%\|%fj1%Druiden%fj1%%fj6%\)~ OUTER_SPRINT ~Cleric~ ~\(%fj1%Kleriker%fj1%%fj6%\|%fj1%Klerikern%fj1%%fj6%\)~ OUTER_SPRINT ~Thief~ ~\(%fj1%Diebe%fj1%%fj6%\|%fj1%Dieben%fj1%%fj6%\)~ OUTER_SPRINT ~Mage~ ~\(%fj1%Magier%fj1%%fj6%\|%fj1%Magiern%fj1%%fj6%\)~ OUTER_SPRINT ~Bard~ ~\(%fj1%Barde%fj1%%fj6%\|%fj1%Barden%fj1%%fj6%\)~ END ELSE BEGIN ACTION_IF (~%LANGUAGE%~ STRING_EQUAL_CASE ~FRENCH~) THEN BEGIN OUTER_SPRINT ~Not_Usable_By~ ~Non utilisable par:~ OUTER_SPRINT ~Druid~ ~\(%fj1%Druide%fj1%%fj6%\|%fj1%Druide%fj1%%fj6%\)~ OUTER_SPRINT ~Cleric~ ~\(%fj1%Clerc%fj1%%fj6%\|%fj1%Clerc%fj1%%fj6%\)~ OUTER_SPRINT ~Thief~ ~\(%fj1%Voleur%fj1%%fj6%\|%fj1%Voleur%fj1%%fj6%\)~ OUTER_SPRINT ~Mage~ ~\(%fj1%Mage%fj1%%fj6%\|%fj1%Magicien%fj1%%fj6%\)~ OUTER_SPRINT ~Bard~ ~\(%fj1%Barde%fj1%%fj6%\|%fj1%Barde%fj1%%fj6%\)~ END ELSE BEGIN ACTION_IF (~%LANGUAGE%~ STRING_EQUAL_CASE ~SPANISH~) THEN BEGIN OUTER_SPRINT ~Not_Usable_By~ ~No usable por:~ OUTER_SPRINT ~Druid~ ~\(%fj1%Druida%fj1%%fj6%\|%fj1%El druida%fj1%%fj6%\)~ OUTER_SPRINT ~Cleric~ ~\(%fj1%Clérigo%fj1%%fj6%\|%fj1%El clérigo%fj1%%fj6%\)~ OUTER_SPRINT ~Thief~ ~\(%fj1%Ladrón%fj1%%fj6%\|%fj1%El ladrón%fj1%%fj6%\)~ OUTER_SPRINT ~Mage~ ~\(%fj1%Mago%fj1%%fj6%\|%fj1%El mago%fj1%%fj6%\)~ OUTER_SPRINT ~Bard~ ~\(%fj1%Bardo%fj1%%fj6%\|%fj1%El bardo%fj1%%fj6%\)~ END ELSE BEGIN ACTION_IF (~%LANGUAGE%~ STRING_EQUAL_CASE ~RUSSIAN~) THEN BEGIN OUTER_SPRINT ~Not_Usable_By~ ~ÃÂÃ¥ èñïîëüçóåòñÿ:~ OUTER_SPRINT ~Druid~ ~\(%fj1%Äðóèäàìè%fj1%%fj6%\|%fj1%Äðóèäàìè%fj1%%fj6%\)~ OUTER_SPRINT ~Cleric~ ~\(%fj1%ÑâÿùåÃÂÃÂèêàìè%fj1%%fj6%\|%fj1%ÑâÿùåÃÂÃÂèêàìè%fj1%%fj6%\)~ OUTER_SPRINT ~Thief~ ~\(%fj1%Âîðàìè%fj1%%fj6%\|%fj1%Âîðàìè%fj1%%fj6%\)~ OUTER_SPRINT ~Mage~ ~\(%fj1%Ìàãàìè%fj1%%fj6%\|%fj1%Ìàãàìè%fj1%%fj6%\)~ OUTER_SPRINT ~Bard~ ~\(%fj1%ÃÂàðäàìè%fj1%%fj6%\|%fj1%ÃÂàðäàìè%fj1%%fj6%\)~ END ELSE BEGIN ACTION_IF (~%LANGUAGE%~ STRING_EQUAL_CASE ~POLISH~) THEN BEGIN OUTER_SPRINT ~Not_Usable_By~ ~Nie mo¿e u¿ywaæ:~ OUTER_SPRINT ~Druid~ ~\(%fj1%Druid%fj1%%fj6%\|%fj1%Druid%fj1%%fj6%\)~ OUTER_SPRINT ~Cleric~ ~\(%fj1%Kap³an%fj1%%fj6%\|%fj1%Kap³an%fj1%%fj6%\)~ OUTER_SPRINT ~Thief~ ~\(%fj1%Z³odziej%fj1%%fj6%\|%fj1%Z³odziej%fj1%%fj6%\)~ OUTER_SPRINT ~Mage~ ~\(%fj1%Mag%fj1%%fj6%\|%fj1%Mag%fj1%%fj6%\)~ OUTER_SPRINT ~Bard~ ~\(%fj1%Bard%fj1%%fj6%\|%fj1%Bard%fj1%%fj6%\)~ END ELSE BEGIN /* ACTION_IF (~%LANGUAGE%~ STRING_EQUAL_CASE ~KOREAN~) THEN BEGIN OUTER_SPRINT ~Not_Usable_By~ ~XXXXX~ OUTER_SPRINT ~Druid~ ~XXXXX~ OUTER_SPRINT ~Cleric~ ~Ŭ·¹¸¯~ OUTER_SPRINT ~Thief~ ~½ÃÇÃÂ~ OUTER_SPRINT ~Mage~ ~¸ÞÀÌÃÂö~ OUTER_SPRINT ~Bard~ ~XXXXX~ END ELSE BEGIN ACTION_IF (~%LANGUAGE%~ STRING_EQUAL_CASE ~ITALIAN~) THEN BEGIN OUTER_SPRINT ~Not_Usable_By~ ~XXXXX~ OUTER_SPRINT ~Druid~ ~\(\|\)XXXXX~ OUTER_SPRINT ~Cleric~ ~\(\|\)XXXXX~ OUTER_SPRINT ~Thief~ ~\(\|\)XXXXX~ OUTER_SPRINT ~Mage~ ~\(\|\)XXXXX~ OUTER_SPRINT ~Bard~ ~\(\|\)XXXXX~ END ELSE BEGIN ACTION_IF (~%LANGUAGE%~ STRING_EQUAL_CASE ~CZECH~) THEN BEGIN OUTER_SPRINT ~Not_Usable_By~ ~XXXXX~ OUTER_SPRINT ~Druid~ ~\(\|\)XXXXXX~ OUTER_SPRINT ~Cleric~ ~\(\|\)Klerik~ OUTER_SPRINT ~Thief~ ~\(\|\)Zlodìj~ OUTER_SPRINT ~Mage~ ~\(\|\)Mág~ OUTER_SPRINT ~Bard~ ~\(\|\)XXXXXX~ END ELSE BEGIN ACTION_IF (~%LANGUAGE%~ STRING_EQUAL_CASE ~JAPANESE~) THEN BEGIN OUTER_SPRINT ~Not_Usable_By~ ~XXXXX~ OUTER_SPRINT ~Druid~ ~Æ’hƒ‹ƒCÆ’h~ OUTER_SPRINT ~Cleric~ ~XXXXX~ OUTER_SPRINT ~Thief~ ~Æ’VÂÂ[Æ’t~ OUTER_SPRINT ~Mage~ ~Æ’ÂÂÆ’CÆ’W~ OUTER_SPRINT ~Bard~ ~XXXXX~ END END END END */ END END END END END ACTION_IF (("scc" = 0x1) OR ("sdc" = 0x1) OR ("gmc" = 0x1) OR ("tmc" = 0x1) OR ("dwc" = 0x1)) THEN BEGIN COPY_EXISTING ~weapprof.2da~ ~override~ PATCH_IF SOURCE_SIZE THEN BEGIN READ_2DA_ENTRY 0x0 0x0 0x3 ~array_test~ PATCH_IF NOT (~array_test~ STRING_CONTAINS_REGEXP ~ID~) THEN BEGIN SET "ai" = 0x1 END ELSE BEGIN SET "ai" = 0x0 END FOR ("i1" = 0x32; "i1" < 0xff; "i1" += 0x01) BEGIN COUNT_2DA_ROWS "i1" "i2" PATCH_IF ("i2" > 0x0) THEN BEGIN SET "cols" = "i1" END ELSE BEGIN SET "i1" = 0xff END END FOR ("i1" = 0x2; "i1" < ("cols" - "ai"); "i1" += 0x1) BEGIN SET "ps" = 0x0 READ_2DA_ENTRY 0x0 "i1" ("cols" - "ai") ~cl~ PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~MAGE~ ) THEN BEGIN SET "ps" = ("tmc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~CLERIC~ ) THEN BEGIN SET "ps" = ("scc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~THIEF~ ) THEN BEGIN SET "ps" = ("tmc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~BARD~ ) THEN BEGIN SET "ps" = ("tmc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~DRUID~ ) THEN BEGIN SET "ps" = ("sdc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~FIGHTER_MAGE~ ) THEN BEGIN SET "ps" = ("gmc" = 0x0) ? 0x0 : 0x5 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~FIGHTER_CLERIC~ ) THEN BEGIN SET "ps" = ("scc" = 0x1) ? (("gmc" = 0x1) ? 0x5 : 0x2) : (("gmc" = 0x1) ? 0x5 : 0x0) END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~FIGHTER_THIEF~ ) THEN BEGIN SET "ps" = ("gmc" = 0x0) ? 0x0 : 0x5 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~FIGHTER_MAGE_THIEF~ ) THEN BEGIN SET "ps" = ("gmc" = 0x0) ? 0x0 : 0x5 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~MAGE_THIEF~ ) THEN BEGIN SET "ps" = ("tmc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~CLERIC_MAGE~ ) THEN BEGIN SET "ps" = ("scc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~CLERIC_THIEF~ ) THEN BEGIN SET "ps" = ("scc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~FIGHTER_DRUID~ ) THEN BEGIN SET "ps" = ("gmc" = 0x0) ? 0x0 : 0x5 END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~FIGHTER_MAGE_CLERIC~) THEN BEGIN SET "ps" = ("scc" = 0x1) ? (("gmc" = 0x1) ? 0x5 : 0x2) : (("gmc" = 0x1) ? 0x5 : 0x0) END ELSE PATCH_IF (~%cl%~ STRING_EQUAL_CASE ~CLERIC_RANGER~ ) THEN BEGIN SET "ps" = ("scc" = 0x1) ? 0x2 : 0x0 END ELSE PATCH_IF NOT (~%cl%~ STRING_MATCHES_REGEXP ~\(ABJURER\|CONJURER\|DIVINER\|ENCHANTER\|ILLUSIONIST\|INVOKER\|NECROMANCER\|TRANSMUTER\|WILDMAGE\)~) THEN BEGIN SET "ps" = ("tmc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF NOT (~%cl%~ STRING_MATCHES_REGEXP ~\(TALOS\|HELM\|LATHLANDER\)~) THEN BEGIN SET "ps" = ("scc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF NOT (~%cl%~ STRING_MATCHES_REGEXP ~\(BEAST_FRIEND\|AVENGER\|TOTEMIC_DRUID\|SHAPESHIFTER\)~) THEN BEGIN SET "ps" = ("sdc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF NOT (~%cl%~ STRING_MATCHES_REGEXP ~\(BLADE\|JESTER\|SKALD\)~) THEN BEGIN SET "ps" = ("tmc" = 0x1) ? 0x1 : 0x0 END ELSE PATCH_IF NOT (~%cl%~ STRING_MATCHES_REGEXP ~\(ASSAS[S]?IN\|BOUNTY_HUNTER\|SWASHBUCKLER\)~) THEN BEGIN SET "ps" = ("tmc" = 0x1) ? ((~%cl%~ STRING_EQUAL_CASE ~SWASHBUCKLER~ ) ? 0x2 : 0x1) : 0x0 END PATCH_IF ("ps" > 0x0) THEN BEGIN FOR ("i2" = 0x9; "i2" < 0x1d; "i2" += 0x1) BEGIN SET_2DA_ENTRY_LATER ~weapprof~ "i2" ("i1" + "ai") (("i2" > 0x17) AND (~%cl%~ STRING_EQUAL_CASE ~SWASHBUCKLER~ )) ? 0x1 : "ps" END SET_2DA_ENTRY_LATER ~weapprof~ 0x1d ("i1" + "ai") (("ps" > 0x1) ? 0x2 : 0x1) SET_2DA_ENTRY_LATER ~weapprof~ 0x1e ("i1" + "ai") (("ps" > 0x1) ? 0x2 : 0x1) SET_2DA_ENTRY_LATER ~weapprof~ 0x1f ("i1" + "ai") (("ps" > 0x1) ? 0x2 : 0x1) SET_2DA_ENTRY_LATER ~weapprof~ 0x20 ("i1" + "ai") (("ps" > 0x1) ? 0x3 : ((~%cl%~ STRING_EQUAL_CASE ~BLADE~ ) ? ((("dwc" = 0x1) AND (NOT ~%cl%~ STRING_CONTAINS_REGEXP ~\(THIEF\|SWASHB\|ASSAS\|BOUNTY\)~)) ? 0x3 : 0x1) : 0x1)) SET_2DA_ENTRIES_NOW ~weapprof~ 0x1 END END END BUT_ONLY ACTION_IF (("scc" = 0x1) OR ("sdc" = 0x1) OR ("tmc" = 0x1) OR ("wpc" = 0x1)) THEN BEGIN COPY_EXISTING_REGEXP GLOB ~^[^ .][^ .]?[^ .]?[^ .]?[^ .]?[^ .]?[^ .]?[^ .]?\.itm$~ ~override~ PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN PATCH_IF ((~%SOURCE_RES%~ STRING_COMPARE_CASE ~sw1h16~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~sw1h19~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~sw1h16~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~sw2h10~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~sw2h19~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~npstaf~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~npsw01~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~npsw02~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~npsw03~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~npsw04~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~npsw05~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~npsw06~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~sw1h16~) AND (~%SOURCE_RES%~ STRING_COMPARE_CASE ~xbow12~)) THEN BEGIN READ_SHORT 0x1c "ct" READ_BYTE 0x31 "wp" PATCH_IF (("wp" > 0x0) OR (("wp" = 0x0) AND ("ct" = 0x5)) OR (("wp" = 0x0) AND ("ct" = 0x1f))) THEN BEGIN READ_LONG 0x1e "uf" READ_LONG 0x50 "us" READ_STRREF 0x50 ~ud~ READ_LONG 0x54 "is" READ_STRREF 0x54 ~id~ PATCH_IF (("us" > 0x0) AND ("us" < 0x7fffffff)) THEN BEGIN INNER_PATCH_SAVE ~ud~ ~%ud%~ BEGIN REPLACE_TEXTUALLY ~%Not_Usable_By%%fj1%~ ~%Not_Usable_By%~ END END PATCH_IF (("is" > 0x0) AND ("is" < 0x7fffffff)) THEN BEGIN INNER_PATCH_SAVE ~id~ ~%id%~ BEGIN REPLACE_TEXTUALLY ~%Not_Usable_By%%fj1%~ ~%Not_Usable_By%~ END END PATCH_IF ("scc" = 0x1) THEN BEGIN PATCH_IF (("uf" & 0x000800) = 0x0) THEN BEGIN SET "uf" &= (` 0x0000c780) PATCH_IF (("us" > 0x0) AND ("us" < 0x7fffffff)) THEN BEGIN INNER_PATCH_SAVE ~ud~ ~%ud%~ BEGIN REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Cleric%~ ~%Not_Usable_By%\1\2~ END END PATCH_IF (("is" > 0x0) AND ("is" < 0x7fffffff)) THEN BEGIN INNER_PATCH_SAVE ~id~ ~%id%~ BEGIN REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Cleric%~ ~%Not_Usable_By%\1\2~ END END END END PATCH_IF ("sdc" = 0x1) THEN BEGIN PATCH_IF (("uf" & 0x000800) = 0x0) THEN BEGIN SET "uf" &= (` 0x40001800) PATCH_IF (("us" > 0x0) AND ("us" < 0x7fffffff)) THEN BEGIN INNER_PATCH_SAVE ~ud~ ~%ud%~ BEGIN REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Druid%~ ~%Not_Usable_By%\1\2~ END END PATCH_IF (("is" > 0x0) AND ("is" < 0x7fffffff)) THEN BEGIN INNER_PATCH_SAVE ~id~ ~%id%~ BEGIN REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Druid%~ ~%Not_Usable_By%\1\2~ END END END END PATCH_IF ("tmc" = 0x1) THEN BEGIN PATCH_IF (("uf" & 0x000800) = 0x0) THEN BEGIN SET "uf" &= (` 0x004fab40) PATCH_IF (("us" > 0x0) AND ("us" < 0x7fffffff)) THEN BEGIN INNER_PATCH_SAVE ~ud~ ~%ud%~ BEGIN REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Mage%~ ~%Not_Usable_By%\1\2~ REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Thief%~ ~%Not_Usable_By%\1\2~ REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Bard%~ ~%Not_Usable_By%\1\2~ END END PATCH_IF (("is" > 0x0) AND ("is" < 0x7fffffff)) THEN BEGIN INNER_PATCH_SAVE ~id~ ~%id%~ BEGIN REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Mage%~ ~%Not_Usable_By%\1\2~ REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Thief%~ ~%Not_Usable_By%\1\2~ REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Bard%~ ~%Not_Usable_By%\1\2~ END END END END PATCH_IF ("wpc" = 0x1) THEN BEGIN PATCH_IF (("uf" & 0x4b0200) != 0x4b0200) THEN BEGIN SET "uf" &= (` 0x004b0200) PATCH_IF (("us" > 0x0) AND ("us" < 0x7fffffff)) THEN BEGIN INNER_PATCH_SAVE ~ud~ ~%ud%~ BEGIN REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Thief%~ ~%Not_Usable_By%\1\2~ END END PATCH_IF (("is" > 0x0) AND ("is" < 0x7fffffff)) THEN BEGIN INNER_PATCH_SAVE ~id~ ~%id%~ BEGIN REPLACE_TEXTUALLY CASE_SENSITIVE ~%Not_Usable_By%%fj3%%fj_any%%Thief%~ ~%Not_Usable_By%\1\2~ END END END END WRITE_LONG 0x1e "uf" PATCH_IF (("us" > 0x0) AND ("us" < 0x7fffffff)) THEN BEGIN SAY_EVALUATED 0x50 ~%ud%~ END PATCH_IF (("is" > 0x0) AND ("is" < 0x7fffffff)) THEN BEGIN SAY_EVALUATED 0x54 ~%id%~ END END END END BUT_ONLY END END ELSE BEGIN FAIL ~You've opted to make no changes, that's fine too.~ END Link to comment
Nythrun Posted February 20, 2007 Share Posted February 20, 2007 Hrm. I wonder if I'm about to cause a read out of bounds with this now? Link to comment
Miloch Posted February 21, 2007 Share Posted February 21, 2007 Whoa. Do you have like dialog.tlk files for all the different languages or something? Would it be possible to use variables from a tra file or something? Link to comment
Nythrun Posted February 21, 2007 Share Posted February 21, 2007 No, I just have some mods Unfortunately, in English the item descriptions were pretty inconsistent (there's Not Usable By and Not usuable by) and the .tra files for mods seem to be exacerbating the inconsistencies (German .tras are sometimes writing the class in the plural, but usually not, there's a Spanish translator who prepends the definate article to each class's name, one of the Russian translators is declining the classes differently from everyone else...) About the only other thing I can think of to do would be to read off the item description as a variable and patch it byte-by-byte from the usability section on - kind of yucky, for a casual forum post. Link to comment
Miloch Posted February 21, 2007 Share Posted February 21, 2007 I was wondering how the BG2 Tweaks "Altered Weapon Proficiencies" component handles weapon descriptions in other languages. Well - it doesn't. I guess it does the REPLACE_TEXTUALLY using English names and those aren't carried over in any of the translations, as far as I can tell, since they're hard-coded in the TP2. So someone using the "Talentos con Armas Re-balanceados" component might be hosed as far as the descriptions. There does seem to be some code preventing read out of bounds though, maybe that will be useful. FOR (i =0; char != 0xfafa; i +=1) BEGIN READ_BYTE i char ELSE 0xfafa //if out of bounds, read custom EOF signal/value END Link to comment
Nythrun Posted February 21, 2007 Share Posted February 21, 2007 Yup, therein lies the tricky. I've got jillions of READ_BYTE "index" "size_check" ELSE 0xee in that creature corrector .tp2 but thanks What I'd like to avoid is having to byte-by-byte patch the descriptions. Hmm. Let me try it again once more with more REPLACE_TEXTUALLY SENSITIVE ~ *\(El ?\)%MAGE%[n]?\([ %tb%]*\)[%nl%]+~ ~~ and a separate patch for "Usable by" constructions, I guess. If I can't get that to work then we'll just do this the horrible way. Link to comment
Nythrun Posted February 22, 2007 Share Posted February 22, 2007 Unless this throws the regexp engine for an infinite loop, that should do it. Link to comment
Miloch Posted February 22, 2007 Share Posted February 22, 2007 Great. Can you upload it somewhere? Some of the characters are coming through funny in my browser (though I guess they wouldn't affect me if I'm picking English, but still...). Link to comment
Nythrun Posted February 22, 2007 Share Posted February 22, 2007 They ought to look funny - if the Russian actually looks like Cyrillic in the browser window code box, something's gone terribly wrong Can do with the upload - give me a bit, though, it's dinnertime Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.