Advertisement
Guest User

Fireflower fix

a guest
Jul 18th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.08 KB | None | 0 0
  1. diff -ur yasraena/setup-yasraena.tp2 yasraena/setup-yasraena.tp2
  2. --- yasraena/setup-yasraena.tp2 2010-07-12 17:36:24.000000000 +0300
  3. +++ yasraena/setup-yasraena.tp2 2013-07-18 21:17:18.359103408 +0300
  4. @@ -176,6 +176,58 @@
  5.  
  6.  SAY DESC @71
  7.  
  8. +COPY_EXISTING ~fireflow.itm~   ~override~
  9. +              ~fireflo2.itm~   ~override~
  10. +  PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files
  11. +    READ_LONG   0x64 "abil_off"
  12. +    READ_SHORT  0x68 "abil_num"
  13. +    READ_LONG   0x6a "fx_off"
  14. +    READ_SHORT  0x70 "fx_num"
  15. +    SET delta = 0
  16. +    FOR (index = 0 ; index < fx_num ; ++index) BEGIN
  17. +      READ_SHORT ("%fx_off%" +        ("%index%" * 0x30)) "type"
  18. +      READ_ASCII ("%fx_off%" + 0x14 + ("%index%" * 0x30)) "eff_file"
  19. +      PATCH_IF (("%type%" = 177) AND
  20. +                 ("%eff_file%" STRING_COMPARE_CASE "UNDDAM1" = 0) OR
  21. +                 ("%eff_file%" STRING_COMPARE_CASE "TROLLD1" = 0) OR
  22. +                 ("%eff_file%" STRING_COMPARE_REGEXP "FT[1-3]DAM" = 0) OR
  23. +                 ("%eff_file%" STRING_COMPARE_REGEXP "SW1H62[BCDEF]" = 0)) BEGIN
  24. +        READ_ASCII   ("%fx_off%" +        ("%index%" * 0x30)) "clone" (48)
  25. +        DELETE_BYTES ("%fx_off%" +        ("%index%" * 0x30)) 0x30
  26. +        SET fx_num = (fx_num - 1)
  27. +        SET delta  = (delta - 1)
  28. +        SET index  = (index - 1)
  29. +        INNER_ACTION BEGIN // lazy, just grab ids targeting from eff
  30. +  
  31. +          COPY_EXISTING ~%eff_file%.eff~ ~override~
  32. +            READ_ASCII 0x1c "ids" (8)
  33. +            BUT_ONLY
  34. +  
  35. +        END
  36. +        FOR (index2 = 0 ; index2 < abil_num ; index2 = index2 + 1) BEGIN
  37. +          READ_BYTE   ("%abil_off%" +        ("%index2%" * 0x38)) "type"
  38. +          READ_SHORT  ("%abil_off%" + 0x20 + ("%index2%" * 0x38)) "abil_fx_idx"
  39. +          SET "abil_fx_idx" = "%abil_fx_idx%" + "%delta%"
  40. +          WRITE_SHORT ("%abil_off%" + 0x20 + ("%index2%" * 0x38)) "%abil_fx_idx%"
  41. +          PATCH_IF (("%type%" = 1) OR ("%type%" = 2)) BEGIN
  42. +            INSERT_BYTES (fx_off +        (0x30 * abil_fx_idx)) 0x30
  43. +            WRITE_ASCIIE (fx_off +        (0x30 * abil_fx_idx)) "%clone%"
  44. +            WRITE_SHORT  (fx_off +        (0x30 * abil_fx_idx)) 177     // use eff
  45. +            WRITE_BYTE   (fx_off + 0x02 + (0x30 * abil_fx_idx))   2     // preset target
  46. +            WRITE_ASCIIE (fx_off + 0x04 + (0x30 * abil_fx_idx)) "%ids%" // ids target from eff
  47. +            WRITE_BYTE   (fx_off + 0x0c + (0x30 * abil_fx_idx))   1     // instant/perm
  48. +            WRITE_ASCIIE (fx_off + 0x14 + (0x30 * abil_fx_idx)) "%eff_file%" #8 // for the items with changing effs
  49. +            READ_SHORT  ("%abil_off%" + 0x1e + ("%index2%" * 0x38)) "abil_fx_num"
  50. +            WRITE_SHORT ("%abil_off%" + 0x1e + ("%index2%" * 0x38)) ("%abil_fx_num%" + 1)
  51. +            SET delta = (delta + 1)
  52. +          END
  53. +        END
  54. +      END
  55. +    END
  56. +    WRITE_SHORT  0x70 "%fx_num%"
  57. +  END
  58. +  BUT_ONLY
  59. +
  60.  /* compile .d files into .dlg files which get stored in the Overide directory */
  61.  COMPILE ~Yasraena\Dialogues\YASRAENP.d~ ~Yasraena\Dialogues\YASRA25P.d~
  62.  USING ~Yasraena\English\JOURNAL.tra~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement