Too Many Flames? Or Maybe Sounds? (With VIDEO of dropout.)

Hi All,

During a fight where a lot of flames are produced, I have noticed the NWN2 game can crash / freeze.

One spell that appears to up the fire on screen is nw_s0_shrdoflm … and here …

effect eVisual  = EffectVisualEffect(VFX_HIT_SPELL_FIRE);
		float fDuration = 0.75 + (nDamage*0.25);
        ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eVisual, oOther, fDuration );   

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?

Cheers, Lance.

There is a specific test for shroud of flame.

GetHasSpellEffect(SPELL_SHROUD_OF_FLAME, oPC);

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.

2 Likes

Ah, that looks familiar. Thank you Clangeddin!

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. :wink:

I’ll let you know how it goes.

Thanks, Lance.

1 Like

Hi Again,

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.

Thanks in advance.
Lance.

Shroud of Flame applies a burning VFX on the target that lasts for rounds equal to casterlevel.

The target makes a save each round and if successful, the flames are removed. If not successful, the flames persist for another round, and another save is checked, etc … until either (a) the target is slain, (b) the spell wears off, © target makes the save.

this could continue long after the battle ends,

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

[Graphics Options]
;SEFCacheTimeout=500
;SEFCacheSize=20
SEFCacheTimeout=750
SEFCacheSize=40

i wonder if it might help things,

I think that the problem is that you were looking for the wrong VFX.

The VFX that lasts over time is VFX_DUR_FIRE
the one mentioned at the OP is an instant duration effect, no wonder you couldn’t detect it.

So retry with

GetHasSpecificVFX(oPC, VFX_DUR_FIRE);

(retrying with the effect integer from 0 of course)

Hi Again,

EDIT: I CAN confirm that a value of “0” does confirm the duration VFX on the PC. So thanks for that! :slight_smile:

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 … ? :frowning: 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. ? :woozy_face: but :slight_smile:

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?

Then try downloading this sound file to test with the VFX instead … https://www.dropbox.com/s/1z6m4bg0c5pg9z5/sfx_hitarea_Fire.WAV?dl=0 (Simply replace the existing after backing up.)

Thanks, Lance.

the stock sp_flamestrike.sef plays fine here.

test2: closed toolset, put your sfx_hit_area_Fire.WAV in /override and restarted toolset … sef still plays fine also.

1 Like

Hi KevL,

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.

Again, thanks, Lance.

yep

Oh dear … So I wonder what is messing some of my sounds up then … :frowning:

I may try altering those ini settings to see if they have any impact anyway then.

Unless you have any other possible ideas as to what may cause that?

Thanks for confirming. Lance.

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.

  1. I changed my nwn2.ini settings as you suggested … no difference.
  2. I tried upping my MaxCachedSounds=100 … no difference.
  3. Changed Number 2D Voices=32 (and 3d) … no difference.
  4. 2d/3d bias to 0.00 … no difference.
  5. Replaced with an ORIGINAL COPY of nwn2.ini … no difference.
  6. Ran DxDiag - No problems found!

So, to date, only changing the sound file actually fixes it to date. Weird!

Am I the only one then?

VIDEO LINK

Thanks, Lance.

if the original wavefile is copied out of /data/Sounds.zip
MediaInfo can analyze it and show details about its format

then MediaInfo can check your modified wavefile also … /just a suggestion tho.

Bitrate and Bitrate mode are different (not sure what the significance of that is… but atm we’re kinda grasping at straws)

perhaps your /data (installed data file) got corrupt ?

Hi KevL,

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. :frowning: 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.

  1. SOUND DRIVERS: Reinstalled - No difference.
  2. 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! :blush:

Another reinstall … - RECOVERED BACKUP!

Reinstated BACKUP and now compiles fine.

  1. 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.

Lance

welcome to Neverwinter Nights 2, Lance

/coffe

2 Likes

Hi KevL,

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.

Cheers, Lance.

1 Like

Hi again,

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

http://www.codecguide.com/download_other.htm#codectweaktool

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.

Cheers, Lance.

Continued in this post: Game crashes

Hi All,

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

Cheers, Lance.

Source links …

http://forum.doom9.org/showthread.php?t=151002