CamDawg Posted January 22, 2005 Share Posted January 22, 2005 Quasits had broken abilities and their attack produced a spurious poison message. First, the spells: // fixes for famquas; moves all spells to level 1 COPY_EXISTING ~famquas.ITM~ ~override~ WRITE_BYTE 0x273 1 // class to mage READ_LONG 0x2a0 "spl_off" READ_LONG 0x2a4 "spl_num" WHILE ("%spl_num%" > 0) BEGIN SET "spl_num" = ("%spl_num%" - 1) WRITE_SHORT ("%spl_off%" + 0x08 + (0x0c * "%spl_num%")) 1 // sets spell levels to 1 END WRITE_SHORT ("%meminfo_off%" + 0x02 + (7 * 0x10)) "%spl_num%" WRITE_SHORT ("%meminfo_off%" + 0x04 + (7 * 0x10)) "%spl_num%" WRITE_SHORT ("%meminfo_off%" + 0x0C + (7 * 0x10)) "%spl_num%" WRITE_SHORT ("%meminfo_off%" + 0x02 + (8 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x04 + (8 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x0C + (8 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x02 + (9 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x04 + (9 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x0C + (9 * 0x10)) 0 IF ~CRE~ BUT_ONLY_IF_IT_CHANGES ... and the item (just sets any effects on the melee ability to have probability =0) //removes poison ability from quasit attack COPY_EXISTING ~impqua.itm~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" WHILE ("%abil_num%" > 0) BEGIN SET "abil_num" = ("%abil_num%" - 1) READ_SHORT ("%abil_off%" + ("%abil_num%" * 0x38)) "type" PATCH_IF ("%type%" = 1) BEGIN // if melee ability READ_SHORT ("%abil_off%" + 0x1e + ("%abil_num%" * 0x38)) "fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) "fx_idx" WHILE ("%fx_num%" > 0) BEGIN // sets prob = 0 to any effects that go with it SET "fx_num" = ("%fx_num%" - 1) WRITE_BYTE ("%fx_off%" + 0x12 + (("%fx_idx%" + "%fx_num%") * 0x30)) 0 END END END IF ~ITM~ BUT_ONLY_IF_IT_CHANGES Link to comment
Ghreyfain Posted January 23, 2005 Share Posted January 23, 2005  WRITE_SHORT ("%meminfo_off%" + 0x02 + (7 * 0x10)) "%spl_num%" Where do you read the "meminfo_off" value? Link to comment
CamDawg Posted January 23, 2005 Author Share Posted January 23, 2005 This was an initial draft--I had to make a couple of fixes to the code, not least of which was changing the filename from famquas.itm to famquas.cre. Here's the final, working version: // fixes for famquas; moves all spells to level 1 COPY_EXISTING ~famquas.cre~ ~override~ WRITE_BYTE 0x273 1 // class to mage READ_LONG 0x2a0 "spl_off" READ_LONG 0x2a4 "spl_num" READ_LONG 0x2a8 "meminfo_off" WRITE_SHORT ("%meminfo_off%" + 0x02 + (7 * 0x10)) "%spl_num%" WRITE_SHORT ("%meminfo_off%" + 0x04 + (7 * 0x10)) "%spl_num%" WRITE_SHORT ("%meminfo_off%" + 0x0C + (7 * 0x10)) "%spl_num%" WRITE_SHORT ("%meminfo_off%" + 0x02 + (8 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x04 + (8 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x0C + (8 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x02 + (9 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x04 + (9 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x0C + (9 * 0x10)) 0 WHILE ("%spl_num%" > 0) BEGIN SET "spl_num" = ("%spl_num%" - 1) WRITE_SHORT ("%spl_off%" + 0x08 + (0x0c * "%spl_num%")) 1 // sets spell levels to 1 END IF ~CRE~ BUT_ONLY_IF_IT_CHANGES //removes poison ability from quasit attack COPY_EXISTING ~impqua.itm~ ~override~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" WHILE ("%abil_num%" > 0) BEGIN SET "abil_num" = ("%abil_num%" - 1) READ_SHORT ("%abil_off%" + ("%abil_num%" * 0x38)) "type" PATCH_IF ("%type%" = 1) BEGIN // if melee ability READ_SHORT ("%abil_off%" + 0x1e + ("%abil_num%" * 0x38)) "fx_num" READ_SHORT ("%abil_off%" + 0x20 + ("%abil_num%" * 0x38)) "fx_idx" WHILE ("%fx_num%" > 0) BEGIN // sets prob = 0 to any effects that go with it SET "fx_num" = ("%fx_num%" - 1) WRITE_BYTE ("%fx_off%" + 0x12 + (("%fx_idx%" + "%fx_num%") * 0x30)) 0 END END END IF ~ITM~ BUT_ONLY_IF_IT_CHANGES Link to comment
CamDawg Posted February 25, 2005 Author Share Posted February 25, 2005 Added in alpha v2. Link to comment
devSin Posted February 25, 2005 Share Posted February 25, 2005 Note that almost all (if not all) of the familiars have the Blur spell, but they're not supposed to actually be able to cast it. Link to comment
CamDawg Posted March 28, 2005 Author Share Posted March 28, 2005 Did a more thorough review of familiars and found all sorts of discrepancies between descriptions and actual abilities. The ToB familiars were pretty consistent in not accounting for dexterity, generally resulting in their AC and thieving abilities way off. Blow by blow errors: Cat, dust mephits, fairy dragons, ferret (SoA only), and pseudodragon (SoA only) had incorrect melee damage due to wrong weapon assigned ToB cat had incorrect AC and thief skills (dex bonuses) ToB dust mephit had incorrect AC (dex bonuses again) Fairy dragons should have movement rates of 10 ToB fairy dragon wrong AC (dex bonuses) and missing resistances ToB ferret has wrong AC and thief skills (dex bouses) Imps had 100% electrical resistance (should be none), missing slashing/crushing/missile resistance (shold be 50%) ToB imp had incorrect AC (dex bonus) Pseudodragons should have movement rate of 10 ToB Psuedodragon had incorrect AC (dex bonus) Quasits should have 10 movement rate ToB quasits have incorrect AC (dex bonuses), had blur memorized but not known Rabbits had incorrect melee damage ToB rabbit had incorrect AC and thief skills (dex bonuses), missing all SoA resistances So, err, that's a lot of crap. Fixed as follows: // some familiars have wrong weapons; should be doing 1d6 melee not 1d3 or 1d2 COPY_EXISTING ~famcat.cre~ ~override~ ~famcat25.cre~ ~override~ ~famdust.cre~ ~override~ ~famdus25.cre~ ~override~ ~famfer.cre~ ~override~ ~fampsd.cre~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files READ_LONG 0x2bc "item_off" READ_LONG 0x2c0 "item_num" WHILE ("%item_num%" > 0) BEGIN SET "item_num" = ("%item_num%" - 1) READ_ASCII ("%item_off%" + (0x14 * "%item_num%")) "item" PATCH_IF (("%item%" STRING_COMPARE_CASE "s1-2" = 0) OR ("%item%" STRING_COMPARE_CASE "s1-3" = 0)) BEGIN WRITE_ASCII ("%item_off%" + (0x14 * "%item_num%")) ~s1-6~ #8 END END END BUT_ONLY_IF_IT_CHANGES // cat familiar has wrong stats COPY_EXISTING ~famcat25.cre~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_SHORT 0x46 0 // natural ac WRITE_SHORT 0x48 0 // effective ac WRITE_BYTE 0x69 55 // find/disarm traps WRITE_BYTE 0x6a 50 // pick pockets END BUT_ONLY_IF_IT_CHANGES // cat familiar has wrong stats COPY_EXISTING ~famdus25.cre~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_SHORT 0x46 6 // natural ac WRITE_SHORT 0x48 6 // effective ac END BUT_ONLY_IF_IT_CHANGES // corrects melee weapon COPY_EXISTING ~famfair.cre~ ~override~ ~famfai25.cre~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files READ_LONG 0x2bc "item_off" READ_LONG 0x2c0 "item_num" WHILE ("%item_num%" > 0) BEGIN SET "item_num" = ("%item_num%" - 1) READ_ASCII ("%item_off%" + (0x14 * "%item_num%")) "item" PATCH_IF (("%item%" STRING_COMPARE_CASE "s1-2" = 0) OR ("%item%" STRING_COMPARE_CASE "meplig" = 0)) BEGIN WRITE_ASCII ("%item_off%" + (0x14 * "%item_num%")) ~cdmeplig~ #8 END END END // sets movement rate to 10 as applicable COPY_EXISTING ~famfair.cre~ ~override~ ~famfai25.cre~ ~override~ ~famimp.cre~ ~override~ ~famimp25.cre~ ~override~ ~fampsd.cre~ ~override~ ~famquas.cre~ ~override~ ~famqua25.cre~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files ADD_CRE_ITEM ~movrat10~ #0 #0 #0 ~NONE~ ~BOOTS~ END // fixes resistances, hp, ac for famfai25 COPY_EXISTING ~famfai25.CRE~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_SHORT 0x24 48 // max hp WRITE_SHORT 0x26 48 // current hp WRITE_SHORT 0x46 4 // natural ac WRITE_SHORT 0x48 4 // effective ac WRITE_BYTE 0x59 100 WRITE_BYTE 0x5b 125 WRITE_BYTE 0x5e 100 END BUT_ONLY_IF_IT_CHANGES // fixes resistances ac, thief skills COPY_EXISTING ~famfer25.CRE~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_BYTE 0x45 50 // hide in shadows WRITE_SHORT 0x46 0 // natural ac WRITE_SHORT 0x48 0 // effective ac WRITE_BYTE 0x68 50 // move silently WRITE_BYTE 0x69 55 // find/disarm traps WRITE_BYTE 0x6a 85 // pick pockets END BUT_ONLY_IF_IT_CHANGES // fixes resistances, ac for famfai25 COPY_EXISTING ~famimp.cre~ ~override~ ~famimp25.CRE~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_SHORT 0x46 2 // natural ac WRITE_SHORT 0x48 2 // effective ac WRITE_BYTE 0x5b 0 // electrical resist WRITE_BYTE 0x60 50 // slashing resist WRITE_BYTE 0x61 50 // crushing resist WRITE_BYTE 0x63 50 // missile resist END BUT_ONLY_IF_IT_CHANGES // mag res for fampsd COPY_EXISTING ~fampsd.cre~ ~override~ WRITE_BYTE 0x5d 50 // resist magic BUT_ONLY_IF_IT_CHANGES // fixes resistances, ac for fampsd25 COPY_EXISTING ~fampsd25.CRE~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_SHORT 0x46 4 // natural ac WRITE_SHORT 0x48 4 // effective ac WRITE_BYTE 0x5d 50 // resist magic END BUT_ONLY_IF_IT_CHANGES // fixes for famquas; moves all spells to level 1 COPY_EXISTING ~famquas.cre~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_BYTE 0x273 1 // class to mage READ_LONG 0x2a0 "spl_off" READ_LONG 0x2a4 "spl_num" READ_LONG 0x2a8 "meminfo_off" WRITE_SHORT ("%meminfo_off%" + 0x02 + (7 * 0x10)) "%spl_num%" WRITE_SHORT ("%meminfo_off%" + 0x04 + (7 * 0x10)) "%spl_num%" WRITE_SHORT ("%meminfo_off%" + 0x0C + (7 * 0x10)) "%spl_num%" WRITE_SHORT ("%meminfo_off%" + 0x02 + (8 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x04 + (8 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x0C + (8 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x02 + (9 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x04 + (9 * 0x10)) 0 WRITE_SHORT ("%meminfo_off%" + 0x0C + (9 * 0x10)) 0 WHILE ("%spl_num%" > 0) BEGIN SET "spl_num" = ("%spl_num%" - 1) WRITE_SHORT ("%spl_off%" + 0x08 + (0x0c * "%spl_num%")) 1 // sets spell levels to 1 END END BUT_ONLY_IF_IT_CHANGES // fixes resistances, ac for famqua25 COPY_EXISTING ~famqua25.CRE~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_SHORT 0x46 2 // natural ac WRITE_SHORT 0x48 2 // effective ac ADD_KNOWN_SPELL ~spwi201~ #1 ~wizard~ END BUT_ONLY_IF_IT_CHANGES // corrects melee weapon COPY_EXISTING ~famrab.cre~ ~override~ ~famrab25.cre~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files READ_LONG 0x2bc "item_off" READ_LONG 0x2c0 "item_num" WHILE ("%item_num%" > 0) BEGIN SET "item_num" = ("%item_num%" - 1) READ_ASCII ("%item_off%" + (0x14 * "%item_num%")) "item" PATCH_IF (("%item%" STRING_COMPARE_CASE "s1-2" = 0) OR ("%item%" STRING_COMPARE_CASE "meplig" = 0)) BEGIN WRITE_ASCII ("%item_off%" + (0x14 * "%item_num%")) ~cdmepfir~ END END END // fixes resistances, ac, thief skills COPY_EXISTING ~famrab25.CRE~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) THEN BEGIN // protects against invalid files WRITE_BYTE 0x45 50 // hide in shadows WRITE_SHORT 0x46 5 // natural ac WRITE_SHORT 0x48 5 // effective ac WRITE_BYTE 0x59 125 // resist fire WRITE_BYTE 0x5a 75 // resist cold WRITE_BYTE 0x5b 75 // resist electricity WRITE_BYTE 0x5c 75 // resist acid WRITE_BYTE 0x5d 65 // resist magic WRITE_BYTE 0x5e 125 // resist magic fire WRITE_BYTE 0x5f 75 // resist magic cold WRITE_BYTE 0x68 50 // move silently WRITE_BYTE 0x69 80 // find/disarm traps WRITE_BYTE 0x6a 20 // pick pockets ADD_CRE_ITEM ~hastring~ #0 #0 #0 ~NONE~ ~LRING~ END BUT_ONLY_IF_IT_CHANGES ...plus two new items: // need new mephit lightning/fire attack items for familiars COPY_EXISTING ~meplig.itm~ ~override/cdmeplig.itm~ ~mepfir.itm~ ~override/cdmepfir.itm~ READ_LONG 0x64 "abil_off" READ_SHORT 0x68 "abil_num" READ_LONG 0x6a "fx_off" WHILE ("%abil_num%" > 0) BEGIN SET "abil_num" = ("%abil_num%" - 1) READ_BYTE ("%abil_off%" + ("%abil_num%" * 0x38)) "type" PATCH_IF ("%type%" = 1) BEGIN // melee WRITE_SHORT ("%abil_off%" + 0x16 + ("%abil_num%" * 0x38)) 6 // sets dice size to 6 END END I also made some changes in the Game Text Update to try and make the familiar item descriptions consistent and accurate. edit: Included in alpha v3. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.