Jump to content


Disable Duplicate Effect Code


  • Please log in to reply
8 replies to this topic

#1 -Onerous-

-Onerous-
  • Guest

Posted 08 February 2011 - 06:47 PM

When I have this enabled bard song lasts forever regardless if the bard is singing or not, and regardless if the bard is alive in the party or not. Also the effects of bard song stack when turning bard song on and off. This occurred when playing BGT, I had Eldoth play his bard song, but he was spooked by a mage. Once that effect wore off I restarted the bard song and turned it off once the battle was over. The effect never diminished with resting and when I checked my saved game using NI I saw three duplicate bard song effects for each character effected. If you need my weidu posted I'll do that, otherwise it's a heavily modded game with both song and silence and rogue rebalancing installed.

#2 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 08 February 2011 - 10:45 PM

Thanks for the report. I think someone reported the Bladesinger's song going forever. Same issue.
This is being perm disabled for next release until I fix it up. In the mean time, just don't use it.

--------------
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)


#3 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 08 February 2011 - 11:16 PM

This is being perm disabled for next release until I fix it up.

Introduce a SPL/ITM flag to remove an already existing instance?

Retired from modding.


#4 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 938 posts

Posted 08 February 2011 - 11:23 PM

Seconded. But this will require new opcodes: Dispel resource, where resource can come from an .eff/.itm/.spl, and dispel opcode inside resource (same thing, but leaves the rest of the effects intact, and the effect list applied at the time is not dispelled).

-Galactygon
Posted Image

#5 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 09 February 2011 - 04:22 AM

How exactly would you use this? Is it such that: if spell A is already affecting player X, then casting spell A again on player X will remove the old instance of spell A on player X? If so, then the previous implementation of this hack is probably what you want.

--------------
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)


#6 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 09 February 2011 - 06:24 AM

I suppose what Galactygon says is better. Removing a single resource has always been a pain to handle, and it also allows greater flexibility, such as wizard and priest versions of the same spell (like Protection from Some_Element).

Retired from modding.


#7 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 938 posts

Posted 09 February 2011 - 01:54 PM

How exactly would you use this? Is it such that: if spell A is already affecting player X, then casting spell A again on player X will remove the old instance of spell A on player X? If so, then the previous implementation of this hack is probably what you want.


The first effect in the effect list would so a "remove the effects by resource" by removing previous effects but without touching those effects that come after the effect in the effect list. If this opcode were to be done (which would have many other uses), then it's unnecessary to worry about effect flags.

-Galactygon
Posted Image

#8 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 06 October 2012 - 10:41 PM

After however many months, I managed to fix the Disable Duplicate Effect Code stuff, and implemented Galactygon's suggestion of using effect IDs for stacking behaviour. The implementation is as follows:

-----240 Configurable Effect Stacking [M]
Adds bit 25 (Limit Effect Stacking) of the EFF V2.0 Header offset 0x0040 (Save Type), ITM V1.0 Feature Block offset 0x0024 (Save Type), and SPL V1.0 Feature Block offset 0x0024 (Save Type).
When set, TobEx checks EFF V2.0 Header offset 0x0048 (Special), ITM V1.0 Feature Block offset 0x002C (Special), and SPL V1.0 Feature Block offset 0x002C (Special)
for a unique stacking ID. If two effects of the same opcode are applied, both have Limit Effect Stacking Set, and both have the same stacking ID, then the latter applied effect is suspended in application until the former effect expires.
Regardless of whether it is applied, the latter effect will expire at the same time that it would expire if it was applied. In other words, the total duration of some non-stacking effect opcode is not extended because more than one copy of the effect was applied.
Stacking IDs are unique to the opcode being applied. To maintain uniqueness of stacking IDs between different mods, one recommendation is to use the higher word of Special as the modder's Infinity Engine Community Prefix, then use the lower word as an identifying ID. For example, 0x41360001 ('A6' 0x0001).
TobEx also implements bit 26 (Internal: Suspend Effect Application) of the EFF V2.0 Header offset 0x0040 (Save Type), ITM V1.0 Feature Block offset 0x0024 (Save Type), and SPL V1.0 Feature Block offset 0x0024 (Save Type) to prevent effects with limited stacking from being applied.

Options:
-0: disabled
-1: enabled


--------------
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)


#9 Galactygon

Galactygon

    Modding since 2002

  • Member
  • 938 posts

Posted 11 November 2012 - 01:30 PM

Thanks A64 so much for implementing this, I will try this out sometime this winter when I will have more time!

The suspend effect part seems especially interesting, and opens doors for many uses in the future.

-Galactygon

Edited by Galactygon, 11 November 2012 - 01:32 PM.

Posted Image