Jump to content

Lotta, lotta item changes in cre inventories


CamDawg

Recommended Posts

Putting weapons in slots for joinable NPCs might collide with the Ashes of Embers component that gives Ano weapon proficencies in Xbow - if he has a 2-handed Xbow and a shield equiped, wouldn't this crash the game?

 

Valid point. Were this to be made I'd recommend Ghrey put in a check for that and not equip the Xbow in that case.

Link to comment
// fixes Anath's 28 CON score

COPY_EXISTING ~rngwlf01.cre~ ~override~

              ~rngwlf02.cre~ ~override~

              ~rngwlf03.cre~ ~override~

              ~rngwlf04.cre~ ~override~

              ~rngwlf05.cre~ ~override~

  WRITE_BYTE 0x23d 25

/*---------------------------------------*/

  READ_LONG  0x2bc "itm_off" ELSE 0

  READ_LONG  0x2c0 "itm_num" ELSE 0

  FOR (index = 0; index < itm_num; index = index + 1) BEGIN // searches through items

    READ_ASCII ("%itm_off%" + (0x14 * "%index%")) "item"

    PATCH_IF ("%item%" STRING_COMPARE_CASE "ringloup" = 0) BEGIN // find invalid resref

      WRITE_ASCII ("%itm_off%" + (0x14 * "%index%")) "ringwolf" #8 // corrected resref

      SET "index" = "%itm_num%" // kills loop

    END

  END

/*---------------------------------------*/

  BUT_ONLY_IF_IT_CHANGES[/code]

The section between /*---------------------------------------*/ can be expressed in 188 as

REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~ringloup~ ~RINGWOLF~ (8)

(the 8 being the number of bytes to patch). In 187 or less, REPLACE_TEXTUALLY ~RINGLOUP~ ~RINGWOLF~ would work as well.

 

Personally I find more readable the second expression, but I'll leave you the choice :D

Link to comment
Putting weapons in slots for joinable NPCs might collide with the Ashes of Embers component that gives Ano weapon proficencies in Xbow - if he has a 2-handed Xbow and a shield equiped, wouldn't this crash the game?

Anomen has a shield equipped by default, so Ghrey has to move the shield regardless of whether we move the sling into a weapon slot. For the other two (Nalia and Edwin) they don't have anything in their offhand slots.

 

For the rest--honestly, how many folks are adding shields and offhand weapons?

Link to comment
Anomen has a shield equipped by default, so Ghrey has to move the shield regardless of whether we move the sling into a weapon slot. For the other two (Nalia and Edwin) they don't have anything in their offhand slots.

Er, you can wear a shield while wielding a sling - I suggest you play the game ASAP :D

I'm missing something here.

 

Anomen has a shield and mace equipped by default, with a sling in inventory.

 

We move the sling into a spare weapon slot, making no changes to the shield, because, yes, I do realize that slings go well with shields.

 

Ghrey would have to move the shield if he wanted to equip a crossbow for Anomen--this is true whether or not we move the sling to a weapon slot.

Link to comment
Anomen has a shield equipped by default, so Ghrey has to move the shield regardless of whether we move the sling into a weapon slot. For the other two (Nalia and Edwin) they don't have anything in their offhand slots.

Er, you can wear a shield while wielding a sling - I suggest you play the game ASAP :D

I'm missing something here.

 

Anomen has a shield and mace equipped by default, with a sling in inventory.

 

We move the sling into a spare weapon slot, making no changes to the shield, because, yes, I do realize that slings go well with shields.

 

Ghrey would have to move the shield if he wanted to equip a crossbow for Anomen--this is true whether or not we move the sling to a weapon slot.

Ghrey replaces the sling with a xbow, leaving the xbow in the location that was occupied by the sling, so, without this tweak, into the generic inventory. If we move the sling in the weapon slot, then by installing AoE after Bg2Fixpack the xbow will be in the weapon slot, along with the equiped shield.

Link to comment
The section between /*---------------------------------------*/ can be expressed in 188 as

REPLACE_TEXTUALLY CASE_INSENSITIVE EXACT_MATCH ~ringloup~ ~RINGWOLF~ (8)

(the 8 being the number of bytes to patch). In 187 or less, REPLACE_TEXTUALLY ~RINGLOUP~ ~RINGWOLF~ would work as well.

 

Personally I find more readable the second expression, but I'll leave you the choice  :D

Two questions; is this limited to the item section of the file? And is there any reason this can't be used for the typo fixes as well?

Link to comment
Two questions; is this limited to the item section of the file? And is there any reason this can't be used for the typo fixes as well?

I just posted that one as an example, but it can be used mostly everywhere you do a direct replace a reference with another (just replace (8) with (32) if patching a death variable). Of course, as dev points out, there is a small risk of overwriting an unrelated part of the file - but I'd wager it's small enough to be ignored (if you are anal-retentive, then keep to the actual code).

Link to comment
COPY_EXISTING
            ~cutmelis.cre~ ~override~
            ~mel01.cre~    ~override~
            ~meliss01.cre~ ~override~

If you do this, you'll change the appearance of Melissan. Just leave her robe in the inventory.

Link to comment

COPY_EXISTING ~pthral01.cre~ ~override~
            ~pthral04.cre~ ~override~
            ~pthral10.cre~ ~override~
            ~pthral11.cre~ ~override~

The stupid thrall collar changes their allegiance and can screw their AI, so don't move it from the inventory.

 

 COPY_EXISTING ~elekob01.cre~ ~override~
            ~kobcom01.cre~ ~override~
            ~swsfoll1.cre~ ~override~
            ~swsfoll6.cre~ ~override~

All kobold commandos have 2 arrows of fire in their quick slot (it's just a fake drop to disguise the fact that they have special undroppable arrows). As long as you don't ever add anything to quiver 4, I can't imagine it makes much difference (these things shouldn't live long enough to go through all 20 KC arrows and 20 AROW01s they already have).

 

COPY_EXISTING ~orc06.cre~ ~override~
ADD_CRE_ITEM ~xbow01~ #0 #0 #0 ~NONE~ ~WEAPON1 WEAPON3 WEAPON4~ // already has weapon equipped

This is going to look really ghetto in-game (the orog doesn't have a suitable shoot sequence).

Link to comment

Check and check. For the kobold commandoes, I'd rather move the arrows--more of a 'why can they still shoot fire arrows when I just pickpocketed them'. I'm not suggesting we do this in general (gah), but since this one is already coded I'm inclined to leave it. For thrall collars, does it interfere with the thralls who already have it equipped?

Link to comment

Archived

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

×
×
  • Create New...