Jump to content

Display String


Nythrun

Recommended Posts

Posted

Excellent. Good thing I'm kinda hot.

 

Hrm. Did you add the bless opcode to your local efftext.2da? Because it does diddly on my offical-patch-only install.

Posted

I was about to say that it's something I don't turn off.

 

But I double checked, and there's a chunk of WeiDU code sitting in baldur.ini. Specifically, the evasion patch.

 

BEGIN @2000 // ~Evasion for Thieves and Monks~
SILENT

DEFINE_PATCH_MACRO ~fj_spell_evasion~ BEGIN
 PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN
   TO_LOWER ~SOURCE_RES~
   SPRINT ~eff_imm_res~ ~%SOURCE_RES%~
   SPRINT ~spell_res~   ~%SOURCE_RES%~
   INNER_PATCH_SAVE ~eff_imm_res~ ~%eff_imm_res%~ BEGIN
     DELETE_BYTES 0x00 0x02
     DELETE_BYTES 0x01 0x01
     INSERT_BYTES 0x00 0x04
     WRITE_ASCII  0x00 ~fjim~ #4
   END
   PATCH_IF NOT (FILE_EXISTS_IN_GAME EVALUATE_BUFFER ~%eff_imm_res%.eff~) THEN BEGIN
     INNER_ACTION BEGIN
       COPY_EXISTING ~magicdam.eff~ ~override/%eff_imm_res%.eff~
         PATCH_IF (SOURCE_SIZE = 0x110) THEN BEGIN
           WRITE_LONG   0x010 206
           WRITE_LONG   0x01c 0xffffffff
           WRITE_LONG   0x020 0x00
           WRITE_LONG   0x024 0x00
           WRITE_ASCIIE 0x30 ~%spell_res%~ #8
           WRITE_LONG   0x03c 0x00
           WRITE_LONG   0x038 0x00
         END
       // BUT_ONLY
     END
   END
   READ_LONG  0x64 "ho"
   READ_SHORT 0x68 "hc"
   READ_LONG  0x6a "eo"
   FOR ("i1" = ("ho" + ("hc" * 0x28) - 0x28); "i1" > ("ho"  - 0x28); "i1" -= 0x28) BEGIN
     READ_SHORT  ("i1" + 0x1e) "ec"
     READ_SHORT  ("i1" + 0x20) "ei"
     SPRINT ~ns~ ~~
     SPRINT ~as~ ~~
     SPRINT ~fx~ ~~
     SPRINT ~eff_save_res~ ~~
     FOR ("i2" = ("eo" + (("ec" + "ei" - 0x01) * 0x30)); "i2" > ("eo" + (("ei" - 0x01) * 0x30)); "i2" -= 0x30) BEGIN
       READ_SHORT ("i2" + 0x00) "op"
       PATCH_IF ("op" = 0x0c) THEN BEGIN
         READ_LONG  ("i2" + 0x04) "dc"
         READ_LONG  ("i2" + 0x08) "td"
         READ_LONG  ("i2" + 0x1c) "dt"
         READ_LONG  ("i2" + 0x20) "ds"
         READ_LONG  ("i2" + 0x24) "sv"
         PATCH_IF ("sv" = 0x00) THEN BEGIN
           READ_ASCII ("i2" + 0x00) ~ns~ (0x30)
         END ELSE BEGIN
           READ_ASCII ("i2" + 0x00) ~as~ (0x30)
           PATCH_IF          ("td" = 0x00080000) THEN BEGIN // fire
             SPRINT ~eff_save_res~ ~fjf~
           END ELSE PATCH_IF ("td" = 0x00020000) THEN BEGIN // cold
             SPRINT ~eff_save_res~ ~fjc~
           END ELSE PATCH_IF ("td" = 0x00010000) THEN BEGIN // acid
             SPRINT ~eff_save_res~ ~fja~
           END ELSE PATCH_IF ("td" = 0x00040000) THEN BEGIN // electricity
             SPRINT ~eff_save_res~ ~fje~
           END ELSE PATCH_IF ("td" = 0x00400000) THEN BEGIN // magic
             SPRINT ~eff_save_res~ ~fjm~
           END
           PATCH_IF          ("dt" = 0x01) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%01~
           END ELSE PATCH_IF ("dt" = 0x02) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%02~
           END ELSE PATCH_IF ("dt" = 0x03) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%03~
           END ELSE PATCH_IF ("dt" = 0x04) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%04~
           END ELSE PATCH_IF ("dt" = 0x05) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%05~
           END ELSE PATCH_IF ("dt" = 0x06) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%06~
           END ELSE PATCH_IF ("dt" = 0x07) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%07~
           END ELSE PATCH_IF ("dt" = 0x08) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%08~
           END ELSE PATCH_IF ("dt" = 0x09) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%09~
           END ELSE PATCH_IF ("dt" = 0x0a) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%0a~
           END
           PATCH_IF          ("ds" = 0x01) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%01~
           END ELSE PATCH_IF ("ds" = 0x02) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%02~
           END ELSE PATCH_IF ("ds" = 0x03) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%03~
           END ELSE PATCH_IF ("ds" = 0x04) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%04~
           END ELSE PATCH_IF ("ds" = 0x05) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%05~
           END ELSE PATCH_IF ("ds" = 0x06) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%06~
           END ELSE PATCH_IF ("ds" = 0x07) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%07~
           END ELSE PATCH_IF ("ds" = 0x08) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%08~
           END ELSE PATCH_IF ("ds" = 0x09) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%09~
           END ELSE PATCH_IF ("ds" = 0x0a) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%0a~
           END
           PATCH_IF          ("dc" = 0x00) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%0~
           END ELSE PATCH_IF ("dc" = 0x01) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%1~
           END ELSE PATCH_IF ("dc" = 0x02) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%2~
           END ELSE PATCH_IF ("dc" = 0x03) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%3~
           END ELSE PATCH_IF ("dc" = 0x04) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%4~
           END ELSE PATCH_IF ("dc" = 0x05) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%5~
           END ELSE PATCH_IF ("dc" = 0x06) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%6~
           END ELSE PATCH_IF ("dc" = 0x07) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%7~
           END ELSE PATCH_IF ("dc" = 0x08) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%8~
           END ELSE PATCH_IF ("dc" = 0x09) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%9~
           END ELSE PATCH_IF ("dc" = 0x0a) THEN BEGIN
             SPRINT ~eff_save_res~ ~%eff_save_res%a~
           END
         END
         DELETE_BYTES ("i2" + 0x00) 0x30
         SET "ec" -= 0x1
       END
     END
     PATCH_IF NOT (FILE_EXISTS_IN_GAME EVALUATE_BUFFER ~%eff_save_res%.eff~) THEN BEGIN
       INNER_ACTION BEGIN
         COPY_EXISTING ~magicdam.eff~ ~override/%eff_save_res%.eff~
           PATCH_IF (SOURCE_SIZE = 0x110) THEN BEGIN
             WRITE_LONG 0x1c "dc"
             WRITE_LONG 0x20 "td"
             WRITE_LONG 0x38 "dt"
             WRITE_LONG 0x3c "ds"
           END
         // BUT_ONLY
       END
     END
     SPRINT ~fx~ ~%as%%as%%ns%%ns%%as%%as%%ns%%ns%%as%%as%%ns%%ns%%as%%as%%ns%%ns%%as%%as%%ns%%ns%%as%%as%%ns%%ns%~
     INNER_PATCH_SAVE ~fx~ ~%fx%~ BEGIN
       FOR ("i3" = 0x00; "i3" < (0x18 * 0x30); "i3" += 0x30) BEGIN
         WRITE_SHORT ("i3" + 0x00) 0xb1
         WRITE_LONG  ("i3" + 0x04) (("i3" < (0x04 * 0x30)) ? 0x04 : ("i3" < (0x08 * 0x30)) ? 0x09 : ("i3" < (0x0c * 0x30)) ? 0x0a : ("i3" < (0x10 * 0x30)) ? 0x0d : ("i3" < (0x14 * 0x30)) ? 0x0f : 0x14)
         WRITE_LONG  ("i3" + 0x08) 0x05
         WRITE_LONG  ("i3" + 0x1c) 0x00
         WRITE_LONG  ("i3" + 0x20) 0x07
       END
       FOR ("i3" = 0x00; "i3" < 0x0480; "i3" += 0xc0) BEGIN
         WRITE_ASCIIE ("i3" + 0x14) ~%eff_save_res%~ // class-specific save for half damage
         WRITE_BYTE   ("i3" + 0x3c) 0x0
         WRITE_ASCIIE ("i3" + 0x44) ~%eff_imm_res%~  // class specific save for spell immunity
         WRITE_ASCII  ("i3" + 0x74) ~fjevatxt~       // class specific display string
         WRITE_BYTE   ("i3" + 0x9c) 0x0
         WRITE_ASCIIE ("i3" + 0xa4) ~%eff_imm_res%~  // class specific unconditional spell immunity
       END
       INSERT_BYTES (0x18 * 0x30) 0x30
       WRITE_ASCIIE (0x18 * 0x30) ~%ns%~
       INSERT_BYTES (0x00 * 0x30) 0x30
       WRITE_ASCIIE (0x00 * 0x30) ~%as%~
     END
     WRITE_SHORT  ("i1" + 0x1e) ("ec" + 0x1a)
     INSERT_BYTES ("eo" + (("ei" + "ec" + 0x00) * 0x30)) (0x30 * 0x1a)
     WRITE_ASCIIE ("eo" + (("ei" + "ec" + 0x00) * 0x30)) ~%fx%~
   END
   READ_SHORT  0x70 "ec"
   READ_SHORT  0x6e "ei"
   SET "ei" += "ec"
   FOR ("i1" = "ho"; "i1" < ("ho" + (0x28 * "hc")); "i1" += 0x28) BEGIN
     WRITE_SHORT ("i1" + 0x20) "ei"
     READ_SHORT  ("i1" + 0x1e) "ec"
     SET "ei" += "ec"
   END
 END
END


COPY_EXISTING ~magicdam.eff~ ~override/fjevatxt.eff~
 PATCH_IF (SOURCE_SIZE = 0x110) THEN BEGIN
   WRITE_LONG 0x010 0x8b
   SAY        0x01c @2002 // ~evades effects~
   WRITE_LONG 0x020 0x00
   WRITE_LONG 0x03c 0x00
   WRITE_LONG 0x038 0x00
 END
// BUT_ONLY

COPY_EXISTING ~spwi001.spl~  ~override~ // Trap Fireball
             ~spwi002.spl~  ~override~ // Trap Lightning Bolt
             ~spwi015.spl~  ~override~ // Trap Frost
             ~spwi103.spl~  ~override~ // Burning Hands
             ~spwi304.spl~  ~override~ // FireBall
             ~spwi308.spl~  ~override~ // Lightning Bolt
             ~spwi313.spl~  ~override~ // Skull Trap
             ~spwi503.spl~  ~override~ // Cone of Cold
             ~spwi615.spl~  ~override~ // Chain Lightning
             ~spwi712.spl~  ~override~ // Delayed Blast Fireball
             ~spwi812.spl~  ~override~ // Abi-Dalzim's Horrid Wilting
 PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN
   LAUNCH_PATCH_MACRO ~fj_spell_evasion~
 END
BUT_ONLY

 

Guess it's time for a re-install.

Posted

Yeah, it works just fine even with crappy settings. I get "Abdel - Bless" and "Imoen - Bless" when they get hit.

 

I no longer modify EFFTEXT. It was always just a lazy hack (I so didn't want to add the effects to every single item and spell).

 

Obviously, you suck to have that in Baldur.ini, but I don't think there's a setting that would even let you turn that off (all the feedback options are for hardcoded strings and subtitles)?

 

The next time you reinstall, make backups of baldur.ini, cache, characters, chitin.key, dialog.tlk, keymap.ini, music, override, portraits, save, scripts, and sounds. I've gained years to my life from not having to reinstall every time I fuck up (I just run WeiDU --uninstall and drag and drop the backup files and folders to the Baldur's Gate II folder -- instant clean install!).

Posted

I think it's the "miscellanious" toggle that controls this, though I can't check at the moment, and that's right where this lump of mess is sitting.

 

I've BROEK baldur.ini before by accidentally pasting copied stuff into the console, but not like this - though it was momentarily amusing to have a test character named FOR (READ_SHORT 0x0068 "hc"; "hc" > 0x00; "hc" -= 0x01

 

I do keep backups of all that (bgmain.exe too - still a Windows girl, to my chagrin). But I've managed to pull something like this I'd feel better with a clean slate :)

 

The rest of the code worked, so it's probably fine. One day I'll have a brain, and then the world will tremble.

 

/edit

 

Yeah, works fine.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...