I know I have probably asked something similar before, but … here goes … is there a way to do a check if the effect is already on the PC, which is more specific than saying the PC has any VFX. i.e. Is there a specific VFX test?
But if you want a general test for the VFX_HIT_SPELLFIRE effect, you could try with something like this:
int GetHasSpecificVFX(object oPC, int nVFX)
{
effect eFX = GetFirstEffect(oPC);
while (GetIsEffectValid(eFX) == TRUE)
{
if (GetEffectType(eFX) == EFFECT_TYPE_VISUALEFFECT)
{
if (GetEffectInteger(eFX, 0) == nVFX) return TRUE;
}
eFX = GetNextEffect(oPC);
}
return FALSE;
}
and then call it with:
GetHasSpecificVFX(oPC, VFX_HIT_SPELL_FIRE);
If it doesn’t work, try changing the value of GetEffectInteger from 0 to 1. If that doesn’t work try with 2 and 3. If those don’t work either than I’m afraid we’re out of luck.
For some reason I have a mental block when it comes to GetEffectInteger and when to use it. KevL has often shown me, and now you bring it to my mind again, I am able to search my own code for it again.
Hopefully, this will stick with me this time … and I will try using your script as you explained.
I think it’s because we don’t have a specific list of integers recorded to compare against by which to then request a certain integer check. It feels too nebulous to me.
OK, I tested the VFX with your code (using check values 0-4), but nothing was ever detected.
HOWEVER, I now think that the effect I was checking for (VFX_HIT_SPELL_FIRE) is NOT the culprit, as that effect literally only lasts about 1 second before dissipating, even though the script implies it could last for a few seconds. I even upped the duration manually and it still only “blasts” and then dissipates quickly. Therefore, it is kind of obvious that the VFX would not be detected.
BUT, and here is the problem better explained … There is a combat the party can have where a lot of fire damage is involved, including Shroud of Flame and Fireball spells. The problem is (as it appears to me) is that if too many of these flame effects go off at once, then the game can crash/freeze. (It’s totally random and may or may not happen, but appears to be based upon the number of flames and sound effects going off at once.)
Also, I noticed that a PC could be left “burning” it a pillar of flames for a number of seconds even after the combat had ended (and not frozen), and so I had wondered if the issue had been due to too many effects trying to run at once and compounding on the PCs. The flame eventually dies out, but not until about ten seconds or so have passed. (If I can get a screenshot showing the flames around the PC I will post it.)
So, my question now is, does anybody know of any spell or effect that can leave a PC enshrouded in flames for a few seconds?
I will keep searching to try to find out if there is an effect that is doing this, but you may have some ideas that may help me get to the bottom of this issues anyway.
EDIT: I also note that the Shroud of Flame does not stack anyway. So that should not be the problem.
But i sorta think you should be looking somewhere else. My old comp used to crash with too many FX (it was pretty pathetic w/ Nwn2). On my current pc, I bumped up these settings in ‘nwn2.ini’ (as travus recently noticed) ->
EDIT: I CAN confirm that a value of “0” does confirm the duration VFX on the PC. So thanks for that!
Yes, I see that makes sense … I was just thrown by the fact that the official campaign script had those lines I added in my first post where it is trying to apply a duration to an instant effect??? I had done a quick scan and found a duration applied at that point, missing the VFX_DUR_FIRE in another place. Doh!
I could try out those settings I suppose, but I am concerned that players of the mod will not be prepared (or perhaps know) to do this just to play the mod … ? Furthermore, my setup is not a bad spec as it stands (NVidia 1070 8GB i7 etc.), and I had hoped it would not require such … but maybe it is?
However, I still notice that certain sound files will cause problems. E.g. the flame Strike sef will drop the toolset to desktop if I try to play it in the VFX editor. I have found if I edit the sound file using a util like Audacity, to a slightly different format, it becomes stable. So, I am wondering if that may help?
Just some ideas … and thank you all for helping with this.
By the way, my last test had flames everywhere and it did NOT crash at all. ? but
EDIT: Just to be sure, I added an edited version of the Flame Strike sound file to my campaign folder. The VFX editor no longer crashes, and so I hope if that spell had been cast by the demi-lich (which may have been possible I at some point I suppose), then if the sound is having any bearing, that may help as well. I may also keep an ear/eye open to see which other sound files appear to trigger a freeze … It my experience to date, I have seen two fire sound files cause issues and another I cannot currently recall, something to do with water I believe. My point is, I am beginning to suspect some of the sound file formats as much as the VFX itself. And while they do NOT appear to always crash game while playing, perhaps they do so when firing more than once … and somehow the VFX editor is giving some sort of heads up on these vulnerable sound files? Again, just thinking allowed.
PLEASE TRY THIS: Please can somebody try opening the Flame Strike SEF (sp_flamestrike.sef) within the VFX editor and play it on a PC. Does your toolset drop to desktop?
Thanks for testing this … and that was definitely via the VFX editor in the toolset and NOT ingame?
I just want to be sure, as the effect works fine in-game (as far as general usage appears to go), but playing the sef in the VFX editor always crashes my toolset unless I alter the sound file as I have done.
So … with respect to the VFX editor crashing when I try to play the sp_flamestrike.sef
This is what it does … it “plays” the visual, without any sound at all, but crashes to desktop with no error message at all before reaching the end of the visual.
I changed my nwn2.ini settings as you suggested … no difference.
I tried upping my MaxCachedSounds=100 … no difference.
Changed Number 2D Voices=32 (and 3d) … no difference.
2d/3d bias to 0.00 … no difference.
Replaced with an ORIGINAL COPY of nwn2.ini … no difference.
Ran DxDiag - No problems found!
So, to date, only changing the sound file actually fixes it to date. Weird!
Thanks for looking at this for me. Tomorrow, I will check my other computer, but I think I already did that when I first encountered the issue.
i.e. I have this same issue on both computers. I will double check though.
UPDATE: Well, it does NOT happen on both computers. So this means I have a sound issue somewhere on my main PC. At least you helped push me to test further my end, so I now need to start looking at sound drivers. I’ll report back if I sort it.
SOUND DRIVERS: Reinstalled - No difference.
NWN2 REINSTALL: Done to first stage (no patches) and still crashes!
2a) FINISHED NWN2 INSTALL: MAIN CORE INCLUDE FILE DOES NOT COMPILE ANYMORE!
…
Note to self … Just because NWN2 says it’s saving my save game folders, it does not mean it is saving my mod/campaign folders!
Another reinstall … - RECOVERED BACKUP!
Reinstated BACKUP and now compiles fine.
WINDOWS RESET: Pending … Abandoned this path …
Decided to just put up with the fact that my NWN2 toolset has a sound anomaly for now. The scary loss of mod and campaign directory put me off.
It got worse after this. Shortly after testing some more, the module started to crash on area transitions … Even after the second installment. In the end, I even had to restore my computer to a position prior my reinstalls.
Thankfully, I believe this has placed me back into a position I was at the start of the day. Furthermore, it’s made me nervous about any future changes.
I hope I don’t find myself in that position any time soon.
OK, I did some digging around on my theory that there was an issue with my sound somehow, and eventually managed to find this program that fixes codecs:-
This “temporarily” fixes my sound problem and crashing from toolset - but I am unable to confirm game crash fix as that is random. Basically, if I run this program to “fix” my codecs, then the toolset works again until I shut the toolset down and restart it, at which point the sounds appear broken again. I then have to rerun the utility to “fix” my codecs again to enable the toolset to work on a fresh opening.
Now that I have shown this to “fix” the problem, maybe somebody with more programming / sound codec knowledge will be able to provide a permanent fix.
I suspect that there may be many players who may have this potential problem, as it is not an obvious one to track down.
I finally got to the bottom of what was causing my sound issues after months of searching … It was the direct filters for sound related to some old programs I have on my computer that came with the CDROM I have on the computer: Nero and Cyberlink software. The software must be past its register date or something (or just corrupted) for as soon as I disabled all these filters my toolset now works as it should!
HOORAH!
Bear in mind that I was also having the occasional sound issue in game (causing me to crash), so this might have some bearing anyway.
EDIT: I used the tool I link to above to disable these direct filters. (I will probably uninstall the software too, as I hardly use it nowadays.)