[RESOLVED] Spell protections bug
#41
Posted 14 January 2012 - 06:11 PM
--------------
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)
#42
Posted 15 January 2012 - 07:25 AM
I think it's ok just to replace exe's without doing any modifications to resources(at least for testing).
Howto: mage in Baldur's Gate. My lame guide.
List of issues I have encountered in BWP 10.3 tactical
Stutter-fixer for Infinity Engine
While you were reading this signature, I have probably edited the post above. Twice.
#43
Posted 16 January 2012 - 01:20 AM
But the answer is dumb obvious from what we already know.
In 22941, visual effect X has the cre as eOwner but is never referenced by the cre. It plays to completion and purges.
In 23037/26498, the extra code in CVisualEffect::AIUpdate() purges visual effect X because the cre already has an eVisualEffect reference. The extra code would also set the cre eVisualEffect if the cre did not already have one. But since it already does, the X is purged. Throughout this process, X is still never referenced by the cre. If we decide to add X's vid cell, X-dash, to the existing eVisualEffect, we effectively make the cre reference X-dash, causing it to undergo a variety of checks that it has not been done before.
I presume that the extra code added to CVisualEffect::AIUpdate() tightens up creature visual effects to prevent multiple visual effects being applied to the creature, which may cause a memory leak. I am not sure though, and I don't think removing the extra code will help if it was purposely added in the first instance.
--------------
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)
#44
Posted 16 January 2012 - 04:53 AM
But if creature already has a visual effect, can't we just add our new one as its child?
Howto: mage in Baldur's Gate. My lame guide.
List of issues I have encountered in BWP 10.3 tactical
Stutter-fixer for Infinity Engine
While you were reading this signature, I have probably edited the post above. Twice.
#46
Posted 16 January 2012 - 02:48 PM
Fix what? We are trying to repair the effect, not to eliminate it.Doesn't replacing SPSTURNI.bam with a blank one fix this?
Howto: mage in Baldur's Gate. My lame guide.
List of issues I have encountered in BWP 10.3 tactical
Stutter-fixer for Infinity Engine
While you were reading this signature, I have probably edited the post above. Twice.
#48
Posted 16 January 2012 - 10:39 PM
Howto: mage in Baldur's Gate. My lame guide.
List of issues I have encountered in BWP 10.3 tactical
Stutter-fixer for Infinity Engine
While you were reading this signature, I have probably edited the post above. Twice.
#49
Posted 16 January 2012 - 10:56 PM
At the moment, I am having difficulties 'restoring' this disk animation because of this extra code.
As I mentioned, the existing creature's visual effect is highly effect-dependent and its vid cells are purged every time the creature is refreshed. Because the disk animation should is a one-off animation that isn't held by any effect, I cannot simply add the vid cell as a child of the visual effect. I will probably need a specific bypass of the extra code to allow this disk animation only to play to completion... unless we are all happy with the disk animation staying stationary.But if creature already has a visual effect, can't we just add our new one as its child?
Update: by looking at how the engine handles visual effects added to creatures, I've managed to work around the extra code by adding an extra condition that will skip the extra code check if the visual effect isn't flagged to be owned. After reviewing all the code that refers to visual effects, those added to creatures are mainly through CreateVisualEffect() [if added to the cre, the owned flag is set] and AddVisualEffect() [if cre already has a visual effect, a vid cell is added; if not, a visual effect is created with owned flag set]. When SPSTURNI is created, the owned flag isn't set. There doesn't seem to be any other visual effects that are created and directly added to creatures like the disk animation. Therefore, the extra code check will be skipped just for the disk animation, but not any of the other visual effects.
loc_654C61: if (pCre->GetType() == CGAMEOBJECT_TYPE_CREATURE) { if (pVisualEffect->m_dwFlags & CVISUALEFFECTFLAG_OWNED) { //added if (pCre->e == ENUM_INVALID_INDEX) { pCre->eVisualEffect = pVisualEffect->e; } else { if (pCre->eVisualEffect != pVisualEffect->e) { FreeObjectShare(pVisualEffect->eOwner, THREAD_ASYNCH, INFINITE); pVisualEffect->Purge(); } } } }
Edited by Ascension64, 17 January 2012 - 12:35 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)
#50
Posted 17 January 2012 - 12:43 AM
due to language barrier i am having really hard time understanding this sentence. Ok, but I have understood that we cannot simply add the vid cell to existing effect due to hard-coded issues which can be bypassed only by extra code.Because the disk animation should is a one-off animation that isn't held by any effect, I cannot simply add the vid cell as a child of the visual effect.
Heh, lol. I suggest you should pay attention to this problem if and only if you feel like it. Personally I like the animation very much, I am glad that we've fixed it even if it remains stationary(I am currently fighting beholders and it looks pretty awesome). Though it would be better if it moved with the caster, dont overdo it - if you find any further work(attaching the effect to creature) unreasonable, of course you should switch to something more important.unless we are all happy with the disk animation staying stationary.
Howto: mage in Baldur's Gate. My lame guide.
List of issues I have encountered in BWP 10.3 tactical
Stutter-fixer for Infinity Engine
While you were reading this signature, I have probably edited the post above. Twice.
#51
Posted 17 January 2012 - 12:51 AM
I see. Quite a weird idea to attach effect to a creature without setting flag "owned"(addressed to developers).When SPSTURNI is created, the owned flag isn't set.
I suggest that's a good fix you've made, and hope that it will affect only spsturni and no other effects. Have you added the fix to TobEx? Can we test it?
Howto: mage in Baldur's Gate. My lame guide.
List of issues I have encountered in BWP 10.3 tactical
Stutter-fixer for Infinity Engine
While you were reading this signature, I have probably edited the post above. Twice.
#52
Posted 17 January 2012 - 04:07 AM
#53
Posted 17 January 2012 - 06:25 AM
Howto: mage in Baldur's Gate. My lame guide.
List of issues I have encountered in BWP 10.3 tactical
Stutter-fixer for Infinity Engine
While you were reading this signature, I have probably edited the post above. Twice.
#54
Posted 17 January 2012 - 11:59 PM
--------------
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)
#55
Posted 18 January 2012 - 03:57 AM
TobEx: Throne of Bhaal Extender build 0.23.1.17 (Wed 18 Jan 2012 15:52:20) InitUserPatches(): unable to open . Error code 2. InitUserPatches(): FindClose() failed (error code 2)And it seems like patches are not applied.
I have tried to look at TobEx0020.tpa incremental patch, but it seems only to modify stats.ids, trigger.ids and action.ids which are most likely irrelevant. And it also externalizes something called "mage spell hiding", but I have failed to understand what this code does:
//Externalise Mage Spell Hiding COPY_EXISTING "hidespl.2da" "override/hidespl.2da" REPLACE_TEXTUALLY "VALUE" "UNUSED" COUNT_2DA_ROWS 2 nRows FOR (i = 1; i < %nRows%; i += 1) BEGIN SET_2DA_ENTRY %i% 1 2 "****" END SET_2DA_ENTRY 1 0 1 "****" BUT_ONLYhow can I reproduce it manually and is it the way to fix that "unable to open" error?
//Update: ok, my bad. It seems I have forgotten to rename default_core.ini to TobExCore.ini. Patches Are applied now. But I still get the message "unable to open", though the game starts and everything seems to work fine.
Great job, asc64!
Edited by Suslik, 18 January 2012 - 04:11 AM.
Howto: mage in Baldur's Gate. My lame guide.
List of issues I have encountered in BWP 10.3 tactical
Stutter-fixer for Infinity Engine
While you were reading this signature, I have probably edited the post above. Twice.
#56
Posted 19 January 2012 - 12:04 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)
#57
Posted 21 January 2012 - 09:49 AM
Howto: mage in Baldur's Gate. My lame guide.
List of issues I have encountered in BWP 10.3 tactical
Stutter-fixer for Infinity Engine
While you were reading this signature, I have probably edited the post above. Twice.
#58
Posted 22 January 2012 - 02:22 PM
you should liquor multiplying great deal supplment your to office apparel predicated copy may possibly be an go through check out this behave as more busy den has an interest in pc
#59
Posted 22 January 2012 - 07:48 PM
I'm interested to know if the opcode #197 (Physical Mirror) can be fixed in the same way, it will sometimes start absorbing projectiles rather than reflecting them. Of course, it's less important than the work on Spell Shield as #197 isn't supposed to deflect a fixed number of projectiles and the functionality is preserved even when this bug pops up.
#60
Posted 22 January 2012 - 08:43 PM
you should liquor multiplying great deal supplment your to office apparel predicated copy may possibly be an go through check out this behave as more busy den has an interest in pc