Jump to content


Photo

[COMPLETE] Item Recharge in Bag Fix

For beta 0023

  • Please log in to reply
3 replies to this topic

#1 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 04 February 2012 - 04:59 AM

From G3 things unfixable by Fixpack. This is the second last G3 unfixable bug/exploit that hasn't been fixed by TobEx or in combination with another mod. There is only one 'unfixable' bug left.

Bags of Holding Recharge Items

Bags of Holding are essentially portable stores in the engine. Like stores, they recharge any item instantly--this is a function of stores themselves and can not be fixed.


This took me quite some time to discover the problem and work out a fix. Definitely needs some more extensive testing than simply by myself as it may muck up charges of items in bags and could possibly affect the stacking of items in bags. There is an issue so far that the items in the bag become 'suspended' in time, so they don't recharge if you rest with the item in the bag. However, I don't think partially drained items (with multiple charges) recharged in a bag anyway... please clarify if you know more.

This is definitely it before a proper 0023 beta release.

-----1470 Item Recharge in Bag Fix [F]
Fixes an exploit where depleted items can be recharged by putting them in a bag and taking it out again

Options:
-0: disabled
-1: enabled


Edited by Ascension64, 04 February 2012 - 05:05 AM.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#2 Avenger_teambg

Avenger_teambg
  • Member
  • 604 posts

Posted 11 March 2012 - 04:01 AM

Can we add a flag for this?

In gemrb, we got: #define IE_STORE_RECHARGE 0x4000 //gemrb extension, if set, store won't recharge (reverse behaviour for bags)
It is in store flags, just after the fence flag.

This will fix two things:
1. mods can still implement tricky recharging bags that worked before the bugfix
2. mods can implement shops that don't recharge items
Avenger

#3 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 06 April 2012 - 06:10 PM

Yes, I can implement above.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#4 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 24 April 2012 - 02:26 AM

The implementation of this fix has been changed significantly. New description is:

-----1470 Item Recharge Mod [F, M]
Modifies the following in relation to usages for non-stackable items with charges:
1. Items in a store with usages of 0 are no longer loaded with usages of 1
2. Putting items in bags no longer recharges the items (unless bit 14 of the store flags is set, see below)
3. Adds bit 14 (toggle recharge) to store flags. For bags, setting this bit will allow items to be recharged when placed in the bag. For stores, setting this bit will prevent items from recharging when sold to the store.
4. The buy and sell prices of items that recharge now take into account the fact that they recharge (hence, depleted rechargable items no longer buy/sell with a price of 1)

Options:
-0: disabled
-1: enabled


Edited by Ascension64, 24 April 2012 - 02:27 AM.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)