Miloch Posted June 1, 2008 Share Posted June 1, 2008 I just ran the code on my Test Install folder and it worked perfectly as far as re-ordering and indexing the spell memorization tables.Cool. Well the fj_cre_check went a little further and looked at stuff like HD to HP being out of whack, erratic saving throws, etc... Might save trying to eyeball stuff when there's a couple hundred CREs to wade through (for what I'm looking at anyway). Link to comment
Taimon Posted June 1, 2008 Share Posted June 1, 2008 Master areas. How does the engine determine, whether something is a master area or a child area? Link to comment
Taimon Posted June 1, 2008 Share Posted June 1, 2008 Oh, thanks. (I suspected something tricky with linked on worldmap or something, but failed to see the obvious.) Link to comment
cmorgan Posted June 17, 2008 Share Posted June 17, 2008 To confirm - this is the replacement for the older // Nythrun's Broken CRE Order and Effects Fix DEFINE_PATCH_MACRO ~enforce_cre_order~ BEGIN PATCH_IF ((SOURCE_SIZE > 0x02d3) AND !(~%SOURCE_RES%~ STRING_EQUAL_CASE ~charbase~)) THEN BEGIN READ_BYTE 0x0033 "eff" READ_LONG 0x02a0 "kso" READ_LONG 0x02a4 "ksc" READ_LONG 0x02a8 "smo" READ_LONG 0x02ac "smc" READ_LONG 0x02b0 "mso" READ_LONG 0x02b4 "msc" READ_LONG 0x02b8 "iso" READ_LONG 0x02bc "ilo" READ_LONG 0x02c0 "ilc" READ_LONG 0x02c4 "elo" READ_LONG 0x02c8 "elc" READ_ASCII "kso" ~ks~ ELSE ~fail~ (0x0c * "ksc") READ_ASCII "smo" ~sm~ ELSE ~fail~ (0x10 * "smc") READ_ASCII "mso" ~ms~ ELSE ~fail~ (0x0c * "msc") READ_ASCII "iso" ~is~ ELSE ~fail~ (0x50) READ_ASCII "ilo" ~il~ ELSE ~fail~ (0x14 * "ilc") READ_ASCII "elo" ~el~ ELSE ~fail~ ("elc" * (0x30 + ((("eff" & 0x01) = 0x01) ? 0xd8 : 0x00))) DELETE_BYTES 0x02d4 (SOURCE_SIZE - 0x02d4) SET "off" = 0x02d4 WRITE_LONG 0x02a0 "off" PATCH_IF !(~%ks%~ STRING_EQUAL ~fail~) THEN BEGIN INSERT_BYTES "off" (0x0c * "ksc") WRITE_ASCIIE "off" ~%ks%~ END ELSE BEGIN SET "ksc" = 0x00 WRITE_LONG 0x02a4 "ksc" END SET "off" += (0x0c * "ksc") WRITE_LONG 0x02a8 "off" INSERT_BYTES "off" (0x10 * 0x11) PATCH_IF ((~%sm%~ STR_CMP ~fail~) AND (smc = 0x11)) THEN BEGIN WRITE_ASCIIE "off" ~%sm%~ END ELSE BEGIN SET "smc" = 0x11 WRITE_LONG 0x2ac "smc" FOR ("i1" = 0x00; "i1" < 0x07; "i1" += 0x01) BEGIN WRITE_SHORT ("off" + (i1 * 0x10)) "i1" END FOR ("i1" = 0x00; "i1" < 0x09; "i1" += 0x01) BEGIN WRITE_SHORT ("off" + ("i1" * 0x10) + 0x070) "i1" WRITE_SHORT ("off" + ("i1" * 0x10) + 0x076) 0x01 END WRITE_SHORT ("off" + 0x106) 0x02 END SET "off" += (0x10 * "smc") WRITE_LONG 0x02b0 "off" PATCH_IF !(~%ms%~ STRING_EQUAL ~fail~) THEN BEGIN INSERT_BYTES "off" (0x0c * "msc") WRITE_ASCIIE "off" ~%ms%~ END ELSE BEGIN SET "msc" = 0x00 WRITE_LONG 0x02b4 "msc" END SET "off" += (0x0c * "msc") WRITE_LONG 0x02c4 "off" PATCH_IF !(~%el%~ STRING_EQUAL ~fail~) THEN BEGIN INSERT_BYTES "off" ("elc" * (0x30 + ((("eff" & 0x01) = 0x01) ? 0xd8 : 0x00))) WRITE_ASCIIE "off" ~%el%~ END ELSE BEGIN SET "elc" = 0x00 WRITE_LONG 0x02c8 "elc" END SET "off" += ("elc" * (0x30 + ((("eff" & 0x01) = 0x01) ? 0xd8 : 0x00))) WRITE_LONG 0x02bc "off" PATCH_IF !(~%il%~ STRING_EQUAL ~fail~) THEN BEGIN INSERT_BYTES "off" (0x14 * "ilc") WRITE_ASCIIE "off" ~%il%~ END ELSE BEGIN SET "ilc" = 0x00 WRITE_LONG 0x02c0 "ilc" END SET "off" += (0x14 * "ilc") WRITE_LONG 0x02b8 "off" INSERT_BYTES "off" 0x50 PATCH_IF !(~%is%~ STRING_EQUAL ~fail~) THEN BEGIN WRITE_ASCIIE "off" ~%is%~ END ELSE BEGIN FOR ("i1" = 0x00; "i1" < 0x4c; "i1" += 0x02) BEGIN WRITE_SHORT ("off" + "i1") 0xffff END END SET SOURCE_SIZE = ("off" + 0x50) END END DEFINE_PATCH_MACRO ~use_v2_eff~ BEGIN PATCH_IF ((SOURCE_SIZE > 0x02d3) AND !(~%SOURCE_RES%~ STRING_EQUAL_CASE ~charbase~)) THEN BEGIN READ_BYTE 0x0033 "eff_type" WRITE_BYTE 0x0033 0x1 PATCH_IF (("eff_type" & 0x1) = 0x0) THEN BEGIN READ_LONG 0x02c8 "elc" PATCH_IF ("elc" > 0x0) THEN BEGIN READ_LONG 0x02c4 "elo" READ_ASCII "elo" ~efx~ (0x30 * "elc") PATCH_FOR_EACH "off1" IN 0x02a0 0x02a8 0x02b0 0x02b8 0x02bc BEGIN READ_LONG "off1" "off2" WRITE_LONG "off1" (("off2" > "elo") ? ("off2" + ("elc" * (0x108 - 0x30))) : ("off2" < 0x2d4 ? 0x2d4 : "off2")) END DELETE_BYTES "elo" (0x030 * "elc") INSERT_BYTES "elo" (0x108 * "elc") SPRINT ~rfx~ ~~ INNER_PATCH ~%efx%~ BEGIN FOR ("i1" = 0x0; "i1" < "elc"; "i1" += 0x1) BEGIN SET SOURCE_SIZE += 0xd8 READ_SHORT (("i1" * 0x30) + 0x00) "opcode" READ_BYTE (("i1" * 0x30) + 0x02) "target" READ_BYTE (("i1" * 0x30) + 0x03) "power" READ_LONG (("i1" * 0x30) + 0x04) "parameter1" READ_LONG (("i1" * 0x30) + 0x08) "parameter2" READ_BYTE (("i1" * 0x30) + 0x0c) "timing_mode" READ_BYTE (("i1" * 0x30) + 0x0d) "dispellability" READ_LONG (("i1" * 0x30) + 0x0e) "duration" READ_BYTE (("i1" * 0x30) + 0x12) "probability1" READ_BYTE (("i1" * 0x30) + 0x13) "probability2" READ_ASCII (("i1" * 0x30) + 0x14) ~resref~ INNER_PATCH_SAVE ~rfx~ ~%rfx%~ BEGIN INSERT_BYTES (("i1" * 0x108) + 0x00) 0x110 WRITE_LONG (("i1" * 0x108) + 0x10) "opcode" WRITE_LONG (("i1" * 0x108) + 0x14) "target" WRITE_LONG (("i1" * 0x108) + 0x18) "power" WRITE_LONG (("i1" * 0x108) + 0x1c) "parameter1" WRITE_LONG (("i1" * 0x108) + 0x20) "parameter2" WRITE_BYTE (("i1" * 0x108) + 0x24) "timing_mode" WRITE_LONG (("i1" * 0x108) + 0x28) "duration" WRITE_SHORT (("i1" * 0x108) + 0x2c) "probability1" WRITE_SHORT (("i1" * 0x108) + 0x2e) "probability2" WRITE_ASCIIE (("i1" * 0x108) + 0x30) ~%resref%~ WRITE_BYTE (("i1" * 0x108) + 0x5c) "dispellability" WRITE_LONG (("i1" * 0x108) + 0x80) (` 0x0) WRITE_LONG (("i1" * 0x108) + 0x84) (` 0x0) WRITE_LONG (("i1" * 0x108) + 0x88) (` 0x0) WRITE_LONG (("i1" * 0x108) + 0x8c) (` 0x0) WRITE_LONG (("i1" * 0x108) + 0xa4) (` 0x0) DELETE_BYTES (("i1" * 0x108) + 0x08) 0x8 END END END WRITE_ASCIIE "elo" ~%rfx%~ END END END END and i should rip out the old and use the new... Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.