Jump to content

[Bug] Ankheg Armor not included in cast arcane magic in armor component


Selis

Recommended Posts

To get the item name, you just need to open a save game that has the item in the inventory of one of the characters, know where it is, and then use an save game editor to look at it, EEKeeper(in an EE game), ShadowKeeper(in non-EE game) or up to date Near Infinity can do it easily.

Link to comment

I always thought this component was patching all armors installed before, not just a specific list. Does this component also not affect any mods that add new armor?

Basically it tries ...

 

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////                                                  \\\\\
///// Allow Arcane Spellcasting in Armor               \\\\\
/////                                                  \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

BEGIN @212000 DESIGNATED 2120
GROUP @9

// this file does nothing, it just allows other mods to detect this component
COPY_EXISTING ~sw1h01.itm~ ~override/cdt02120.g3~

ACTION_CLEAR_ARRAY cd_armor
INCLUDE ~bg2_tweaks/lib/arcane_descripts.tpa~  // text replacement macroes
INCLUDE ~bg2_tweaks/lib/common_armor_list.tpa~ // common armor types needed for both components

ACTION_PHP_EACH cd_armor AS item => type BEGIN

  ACTION_IF ((type < 300) AND (FILE_EXISTS_IN_GAME ~%item%.itm~)) BEGIN

    COPY_EXISTING ~%item%.itm~ ~override~
      READ_SHORT 0x1c sanity_check
      PATCH_IF ((sanity_check = 2) OR (sanity_check = 12)) BEGIN
        LPF DELETE_ITEM_EQEFFECT INT_VAR opcode_to_delete =  60 END
        LPF DELETE_ITEM_EQEFFECT INT_VAR opcode_to_delete = 145 END
        PATCH_IF ((type = 100) OR (type = 101)) BEGIN // buckler, small shield
          SET patch_miscast = 5
        END ELSE
        PATCH_IF ((type = 199) OR (type = 200)) BEGIN // leather, padded armor
          SET patch_miscast = 10
        END ELSE
        PATCH_IF ((type = 102) OR (type = 103) OR (type = 110) OR (type = 201) OR (type > 209)) BEGIN // medium/large shield, studded leather
          SET patch_miscast = 15
        END ELSE
        PATCH_IF (type = 202) BEGIN // hide armor
          SET patch_miscast = 20
        END ELSE
        PATCH_IF (type = 205) BEGIN // scale armor
          SET patch_miscast = 25
        END ELSE
        PATCH_IF ((type = 130) OR (type = 203)) BEGIN // chain armor
          SET patch_miscast = 30
        END ELSE
        PATCH_IF (type = 209) BEGIN // full plate
          SET patch_miscast = 35
        END ELSE
        PATCH_IF ((type = 206) OR (type = 207) OR (type = 208)) BEGIN // plate mail, banded mail, splint mail
          SET patch_miscast = 40
        END ELSE BEGIN // tower shield
          SET patch_miscast = 50
        END
        LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 60 target = 1 parameter1 = patch_miscast timing = 2 END
        // adjust descriptions
        PATCH_FOR_EACH offset IN 0x50 0x54 BEGIN
          READ_LONG ~%offset%~ desc_strref
          PATCH_IF (desc_strref >= 0 && desc_strref < 2147483646) BEGIN
            READ_STRREF ~%offset%~ desc
            INNER_PATCH_SAVE desc ~%desc%~ BEGIN
              LAUNCH_PATCH_MACRO ~arcane_descripts~
            END
            SAY_EVALUATED ~%offset%~ ~%desc%~ // write changes
          END
        END
      END
      BUT_ONLY
  END
END

But it need an armor type to be set into the bg2_tweaks/lib/common_armor_list.tpa -file. There's one for plat06, and one for _plat06, but no one for plat06_ ... so.

Link to comment

I always thought this component was patching all armors installed before, not just a specific list. Does this component also not affect any mods that add new armor?

The armor type can't be determined automatically by reading the file. A real person has to eyeball the item and take the item description into account. Mods like BG2 Tweaks and Item Revisions keep a list of all known armours and store each item's armour type and other information, like whether it allows spellcasting or thievery. A similar procedure is done for shields.

Link to comment

Hope it's okay to place this here, I wouldn't want to start another oops thread but:

 

(Concerning the thieving skills in armor)
Shadow Armor (supposedly the apex of armor for thieves, is given hefty penalties for thieving skills (except for hide in shadows)). It seems a bit odd to me, is this an oversight?

Link to comment

Archived

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

×
×
  • Create New...