Jump to content

Highly Crucial Fix!


SimDing0

Recommended Posts

Is it one of the ones coming out of the portals
Yes. As far as I remember, it didn't really have much in common with the real ice mephit (MEPICE01); I know that I copy MEPICE01 over MEPICE02 and just change the script name and scripts, but I forget why.
Link to comment

The four portals, mephsp[1-4] all generate different mephits. 1 produces smoke, 2 produces mepice02 (the one in question), 3 is magma, and 4 is radient. mepice02 has Ice Shard memorized and uses the ice mephit script. I'm with Sim--I think it's an ice mephit.

 

There are three ice mephits in the game, all of which appear to have issues. mepice01 seems to be the closest, except that it has Magma Ball as a memorized spell instead of ice shard.

 

mepice02 has incorrect resistances, AC, dexterity, and weapon, though it does, at least, have ice shard memorized. The third ice mephit in the game, obsice02, is the mephit from the cold room in the planar sphere. It has incorrect dexterity, alignment, and weapon.

 

obsice02's alignment has been added to the mass alignment patching, otherwise this is fixed as follows:

 

// ice mephit should have ice shard memorized, not magma ball
COPY_EXISTING ~mepice01.cre~ ~override~
 READ_LONG 0x2a0 "known_off"
 READ_LONG 0x2a4 "known_num"
 FOR (index = 0; index < known_num; index = index + 1) BEGIN
   READ_ASCII ("%known_off%" + ("%index%" * 0x0c)) "spell"
   PATCH_IF ("%spell%" STRING_COMPARE_CASE "spin930" = 0) BEGIN // if magma ball
     WRITE_ASCII ("%known_off%" + ("%index%" * 0x0c)) ~spin936~ // replace with ice shard
   END
 END
 // rest of these reads are to fix obsice02, mepice02 below
 READ_ASCII 0x2c  "color" (6) // entire coloring block
 READ_LONG  0x46  "ac" // natural and effective AC
 READ_ASCII 0x59  "resistances" (11) // entire resistances block
 READ_BYTE  0x23c "dex" // natural and effective AC
 BUT_ONLY_IF_IT_CHANGES
 
COPY_EXISTING ~mepice02.cre~ ~override~
             ~obsice02.cre~ ~override~
 // writes in correct values from mepice01
 WRITE_EVALUATED_ASCII 0x2c  "%color%" #6        // entire coloring block
 WRITE_LONG            0x46  "%ac%"              // natural and effective AC
 WRITE_EVALUATED_ASCII 0x59  "%resistances%" #11 // entire resistances block
 WRITE_BYTE            0x23c "%dex%"             // natural and effective AC
 SAY NAME1 #22553
 SAY NAME2 #22553
 READ_LONG 0x2a0 "known_off"
 READ_LONG 0x2a4 "known_num"
 READ_LONG 0x2b8 "slot_offset"
 READ_LONG 0x2bC "item_offset"
 FOR (index = 0; index < known_num; index = index + 1) BEGIN
   READ_ASCII ("%known_off%" + ("%index%" * 0x0c)) "spell"
   PATCH_IF ("%spell%" STRING_COMPARE_CASE "spin930" = 0) BEGIN // if magma ball
     WRITE_ASCII ("%known_off%" + ("%index%" * 0x0c)) ~spin936~ // replace with ice shard
   END
 END
 READ_SHORT  ("%slot_offset%" + 0x12) "item_index" // reads location of primary weapon
 WRITE_ASCII ("%item_offset%" +        (0x14 * "%item_index%")) ~mepice~ #8 // replaces it with ice mephit weapon
 WRITE_LONG  ("%item_offset%" + 0x08 + (0x14 * "%item_index%")) 0
 WRITE_LONG  ("%item_offset%" + 0x0c + (0x14 * "%item_index%")) 0
 WRITE_LONG  ("%item_offset%" + 0x10 + (0x14 * "%item_index%")) 0
 BUT_ONLY_IF_IT_CHANGES

 

Added to the wiki.

Link to comment

Two last notes: Sim's string is the original, which is altered by BD. I've altered the Game Text Update not to change the string.

 

I noticed one more bug while looking at the portals--one of them has a different dexterity score than the others.

 

//one mephit portal has inconsistent dexterity
COPY_EXISTING ~mephsp1.cre~ ~override~
 WRITE_BYTE 0x23c 20 // dex
 BUT_ONLY_IF_IT_CHANGES

 

Added to the wiki.

Link to comment
There are three ice mephits in the game, all of which appear to have issues. mepice01 seems to be the closest, except that it has Magma Ball as a memorized spell instead of ice shard.
In general, none of them should have the correct spells memorized. It's all done with ForceSpell().
Link to comment

Archived

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

×
×
  • Create New...