[WIP] Mystical Underwater Effects

Post » Fri May 27, 2011 10:45 am

And it was after saving and loading.
Oh, and going through an interior door fixed it.

Now that's something I may be able work off of, thanks. ;)
User avatar
Tanya Parra
 
Posts: 3435
Joined: Fri Jul 28, 2006 5:15 am

Post » Fri May 27, 2011 1:52 pm

Okay: Here's the thing. It was basically some kind of funk-up at 4shared.

I had uploaded a file with the same name in the past, and it somehow linked the download to the old one...

So I decided just to upload a new archived version, with the new ESP inside. Also updated OP download link.

http://www.4shared.com/file/102160368/4ada1292/linwebetadoom2.html
User avatar
P PoLlo
 
Posts: 3408
Joined: Wed Oct 31, 2007 10:05 am

Post » Fri May 27, 2011 11:18 pm

Okay: Here's the thing. It was basically some kind of funk-up at 4shared.

I had uploaded a file with the same name in the past, and it somehow linked the download to the old one...

So I decided just to upload a new archived version, with the new ESP inside. Also updated OP download link.

http://www.4shared.com/file/102160368/4ada1292/linwebetadoom2.html

Testing results for lin_we_beta_new.esp (04-28-2009 01:55):

'Initial configuration completed' messagebox no longer displayed after reloading a save. However, I'm still getting a crash in d3d8.dll when loading a previous save game where MUWE was active - whether it's during the same session but with a different save game than the current game, or after exiting MW and reloading any MUWE save.

Noticed that the underwater fade from black effect is not present (or not occurring) in this version.

All saves used for testing were created with this new version in order to not complicate things. :P
User avatar
W E I R D
 
Posts: 3496
Joined: Tue Mar 20, 2007 10:08 am

Post » Fri May 27, 2011 10:50 am

Heck yeah, I have an acronym now. :celebration:

Yeah, I removed the fade effect as it was impossible to make work how I wanted. And will become irrelevant once peachykeen finishes his fade-to-black shader, anyways. The effect will still be in there, just only when the water is actually darkened, and will be configured according to the setting the player uses. Morrowind's fade-functions do not except variables, so this was not possible before without a tremendously long script. Which wouldn't have been worth the effort or slowdown, imo.

As for the save-game issue, I have not yet been able to reproduce it for some reason. Could be the newer versions of MGE as I think I'm still using revision 107. :P

I'll try out the newest revision later and see if that is what is causing this to happen for you.

Thanks for testing Tetchy! :hugs:
User avatar
marie breen
 
Posts: 3388
Joined: Thu Aug 03, 2006 4:50 am

Post » Fri May 27, 2011 8:19 am

Yes, I am sadly still crashing as well, using rev 110.
User avatar
Charlie Sarson
 
Posts: 3445
Joined: Thu May 17, 2007 12:38 pm

Post » Fri May 27, 2011 1:24 pm

Okay, I can now confirm this issue. And it does it with rev 107 too, so it must be bug in my script that must squashed with my mighty daedric hammer of debugeration. :brokencomputer:

Thanks for finding this, tronvillain! Though, of course it would of been better if there was no bug to be found in the first place. :P
User avatar
Blackdrak
 
Posts: 3451
Joined: Thu May 17, 2007 11:40 pm

Post » Fri May 27, 2011 7:30 pm

This issue with crashing the game is neither MGE, nor MWSE bug. It's bug in 'LIN_Mystical_WE' script with 'lastid' variable which is used for string pointer that is used between game sessions, but is not updated.

Simply you can't build a string with xStringBuild or xFileReadString and use it after reloading game without re[building|loading] this string, because pointer stored in this variable is no longer valid (and it's not zeroed because local variables are also saved to savegame).

Lines containing following instruction cause that game crash, because 'lastid' variable is not NULL and points to invalid address after loading the game:
	pcref->xRemoveSpell lastid

You need either store strings to a file, or rebuild them from numerical variables (I saw you build your strings from numbers, so the latter solution may be preferred).


EDIT: fixed some typos
User avatar
Riky Carrasco
 
Posts: 3429
Joined: Tue Nov 06, 2007 12:17 am

Post » Fri May 27, 2011 9:57 am

This issue with crashing the game is neither MGE, nor MWSE bug. It's bug in 'LIN_Mystical_WE' script with 'lastid' variable which is used for string pointer that is used between game sessions, but is not updated.

Simply you can't build a string with xStringBuild or xFileReadString and use it after reloading game without re[building|loading] this string, because pointer stored in this variable is no longer valid (and it's not zeroed because local variables are also saved to savegame).

Lines containing following instruction cause that game crash, because 'lastid' variable is not NULL and points to invalid address after loading the game:
	pcref->xRemoveSpell lastid

You need either store strings to a file, or rebuild them from numerical variables (I saw you build your strings from numbers, so the latter solution may be preferred).

EDIT: fixed some typos

Thanks kryzmar. Gonna work on fixing this and hopefully then this will be bug free enough to start adding new features! :D ( And probably create more bugs in the process. :P )
User avatar
WYatt REed
 
Posts: 3409
Joined: Mon Jun 18, 2007 3:06 pm

Post » Fri May 27, 2011 2:11 pm

You need either store strings to a file, or rebuild them from numerical variables (I saw you build your strings from numbers, so the latter solution may be preferred).

A question for anyone that knows... are there any pros or cons to doing one over the other? :blink:

Edit: Actually I just realized that when peachy finishes the new fade-to-black shader this will become entirely irrelevant anyways. :lol: But I'm still going to fix it for the learning experience. ;)
User avatar
Thomas LEON
 
Posts: 3420
Joined: Mon Nov 26, 2007 8:01 am

Post » Fri May 27, 2011 3:22 pm

A question for anyone that knows... are there any pros or cons to doing one over the other? :blink:
(...)

file:
????pros:
????????- exact string is saved and loaded
????cons:
????????- slow
????????- every time the string is changing it must be rewritten to file
????????- if you load another savegame, saved string may be invalid

short, long (but not pointer), float variable:
????pros:
????????- fast
????????- takes only 2 or 4 bytes
????cons:
????????- only strings that are created from a dictionary or differ only in numerical part can be processed this way

EDIT:
I haven't anolyzed all the script code to know why two spells are removed, but changing for example this:
set lastid to nightidset NightDarkness to LIN_NightDarknesssetx nightid to xStringBuild "LIN_DWN_%d" NightDarkness
to that:
set prevNightDark to NightDarknessset NightDarkness to LIN_NightDarknesssetx nightid to xStringBuild "LIN_DWN_%d" NightDarknesssetx lastid to xStringBuild "LIN_DWN_%d" prevNightDark
would solve this problem.
Where prevNightDark, prevHalfDark, and prevStormDark (at other parts of script not listed here) would be new local variables.

EDIT2:
Or to optimize it a bit:
long templong lastidlong thisid...setx temp to xStringBuild "LIN_DWN_%%d"...setx thisid to xStringBuild temp NightDarknesssetx lastid to xStringBuild temp prevNightDark...setx thisid to xStringBuild temp HalfDarknesssetx lastid to xStringBuild temp prevHalfDark... setx thisid to xStringBuild temp StormDarknesssetx lastid to xStringBuild temp prevStormDark
Note that second '%' in first xStringBuild is required to get it to work properly, and you changed 'nightid', 'halfid', and 'stormid' at xAddSpell and xRemoveSpell to 'thisid'.
User avatar
sam westover
 
Posts: 3420
Joined: Sun Jun 10, 2007 2:00 pm

Post » Fri May 27, 2011 7:34 am

Thanks krzymar!

The reason for the two spells being removed is if there is a change in conditions the previous spell can still be in-effect.
I did this so that the spells wouldn't start stacking, which created.. what did tetchy call it, oh... "total perpetual darkness". :P
User avatar
neil slattery
 
Posts: 3358
Joined: Wed May 16, 2007 4:57 am

Post » Fri May 27, 2011 8:39 am

@Linora
This is to answer your question from the MGE thread regarding the error report - figured it'd be more appropriate to post here.

When you get an app error dialog, select the 'click here' hyperlink at the bottom of that window to get the 'Error signature' info, then from that window select again 'click here' to bring up the 'Error Report Contents' which will show the 'Exception Information' along with info about everything running in memory at the time of the crash.

I just manually typed the beginning info from that report into the MGE thread post, but if you're using winXP you can also find details of the report to copy & paste by searching for DrWtsn32.log - it's usually located in C:\Documents and Settings\All Users\Application Data\Microsoft\Dr Watson.

You'll notice that the DrWtsn32.log file is formatted differently than what the Error window shows. And the most recent crash info gets appended to the bottom of the log, so you'll want to look at the end of the file. ;)
User avatar
Enny Labinjo
 
Posts: 3480
Joined: Tue Aug 01, 2006 3:04 pm

Post » Fri May 27, 2011 10:08 am

Okay, I've fixed up the script with kryzmar's bug-fix and optimization, and from my quick tests it loads correctly now. ;)

http://www.4shared.com/file/102613268/f6883be3/muwebeta.html, archived with all files included. If this lives freely in the wild without bugs for a few days, I may share it as it is on PES, until peachy finishes the new shaders required to add the scalable blur, superior fade-to-black and water-dry-out effects, there's not much more to do on this right now.
( Yay, I can work on my Situational Surrender mod again! )

@ Tetchy
Thanks! Is there a doctor in the house? Say hello to Dr.Watson. :rofl:
User avatar
Minako
 
Posts: 3379
Joined: Sun Mar 18, 2007 9:50 pm

Post » Fri May 27, 2011 8:18 pm

Okay, I've fixed up the script with kryzmar's bug-fix and optimization, and from my quick tests it loads correctly now. ;)
I just downloaded it on my laptop, and looked at it with text editor. I can't test it in game right now, I will when I'm back home, but it won't work as expected.

The prevStormDark, prevHalfDark, prevNightDark aren't initialized anywhere, they should be like:
set prevNightDark to NightDarknessset NightDarkness to LIN_NightDarkness
, etc. (a line before 'set NightDarkness' is missing) for each of mentioned variables. Currently they have always got value of 0, so the darkness spells will be stacking.

Also no longer used variables can be removed or commented out from file, so the code and saves don't need to allocate additional space for them:
long stormidlong nightidlong halfid


BTW. My nick has wrong spelling in plugin - it should be krzymar, and not kryzmar. I don't care how it's written on forums, but in the published file it does matter. :)
User avatar
bonita mathews
 
Posts: 3405
Joined: Sun Aug 06, 2006 5:04 am

Post » Fri May 27, 2011 3:09 pm

:banghead: That's what I get for trying to fix something when I'm tired. :snoring:

For now on I must make sure to spell your name right on the forums too. :P
User avatar
Melis Hristina
 
Posts: 3509
Joined: Sat Jun 17, 2006 10:36 pm

Post » Fri May 27, 2011 7:57 pm

Okay, I've fixed the issues krzymar mentioned, and tested it out a for a few minutes. ( By using the console to set the gamehour while underwater. :P ) This time let's hope it works correctly! ;)

http://www.4shared.com/file/102710083/25b467c0/muwebeta2.html
User avatar
maria Dwyer
 
Posts: 3422
Joined: Sat Jan 27, 2007 11:24 am

Post » Fri May 27, 2011 7:35 pm

Okay, I've fixed the issues krzymar mentioned, and tested it out a for a few minutes. ( By using the console to set the gamehour while underwater. :P ) This time let's hope it works correctly! ;)

http://www.4shared.com/file/102710083/25b467c0/muwebeta2.html

Testing results for muwebeta2:
All tests done against mge3.8_svn-rev0111

* Confirmed - able to reload a previous save between game sessions; no more crashes and initial config messagebox does not reappear (as expected).
* Verified - also works with old MUWE beta saves, but will get a warning message on load:
Local count for script 'LIN_Mystical_WE' differs
from saved local count. Variables will be reinitialized.
Continuing to run will successfully load the save; re-saving will remove the warning message next time save is loaded.

* Confirmed - changes to underwater darkness levels properly progress during day/night/day transitions without stacking.
* Confirmed - proper underwater darkness level applied for weather types 3 - 9; 'Dark Waters' spell properly removed when surfacing in all cases.
* Confirmed - proper underwater darkness levels (night or weather) applied to and removed from interiors-as-exteriors.
* Confirmed - only underwater night darkness levels applied to and removed from true interiors (as expected - no weather effects).
* Confirmed - yurt interiors remain free of underwater effects.

I tried loading between exterior saves and interior saves (both true and acting as exteriors) where some of the saves were made while underwater and others above. Got a crash a couple times after loading a save in 'Mournhold, Temple Courtyard' and then loading a true interior save made while underwater - however it was not reproducible every time, and alternately crashed msvcrt.dll and d3d8.dll (both access violation errors). Could also be a problem with latest MGE betas that add MGE water effects to interiors and have nothing to do with MUWE (need to test this further). :shrug:

All in all, this one performs admirably Linora! :thumbsup: :thumbsup: :thumbsup:
User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am

Post » Fri May 27, 2011 8:23 pm

I tried loading between exterior saves and interior saves (both true and acting as exteriors) where some of the saves were made while underwater and others above. Got a crash a couple times after loading a save in 'Mournhold, Temple Courtyard' and then loading a true interior save made while underwater - however it was not reproducible every time, and alternately crashed msvcrt.dll and d3d8.dll (both access violation errors). Could also be a problem with latest MGE betas that add MGE water effects to interiors and have nothing to do with MUWE (need to test this further). :shrug:

All in all, this one performs admirably Linora! :thumbsup: :thumbsup: :thumbsup:

Thanks yet again Tetchy! I'm thinking the problem you mention is related to MGE, as it would likely be more consistent if it was caused by me. :lol: Once those new shaders come in from peachy, I'll be able to add some of those suggestions you made in your earlier posts. ;)
User avatar
[Bounty][Ben]
 
Posts: 3352
Joined: Mon Jul 30, 2007 2:11 pm

Post » Fri May 27, 2011 11:30 am

http://www.mediafire.com/?mtcmmyuehcy

Should do the trick. Fades out, but leaves the bars, items, and minimap. Set percent to the desired percent (0.5 for 50%).
User avatar
Epul Kedah
 
Posts: 3545
Joined: Tue Oct 09, 2007 3:35 am

Post » Fri May 27, 2011 3:12 pm

http://www.mediafire.com/?mtcmmyuehcy

Should do the trick. Fades out, but leaves the bars, items, and minimap. Set percent to the desired percent (0.5 for 50%).

YAY! Thank you peachy! ^_^

Now to I'm off script it in. :bolt:
User avatar
Vicki Blondie
 
Posts: 3408
Joined: Fri Jun 16, 2006 5:33 am

Post » Fri May 27, 2011 7:39 am

I small update...

It could be a bit longer til the next version, since I'm taking my SAT on June 6th and need to crack down on my studying. :P So on the little bit of free-time I have I'll be able to work on this and other projects, but study > fun. ;)
User avatar
tiffany Royal
 
Posts: 3340
Joined: Mon Dec 25, 2006 1:48 pm

Post » Fri May 27, 2011 4:09 pm

My final high school exams are in two weeks, so my own modding projects are pretty much on hold for now too. Good luck with your SAT and we'll see you later! :)
User avatar
Blaine
 
Posts: 3456
Joined: Wed May 16, 2007 4:24 pm

Post » Sat May 28, 2011 12:13 am

Thanks! ;) And I wish you good luck on those finals! :deal:
User avatar
Nikki Hype
 
Posts: 3429
Joined: Mon Jan 01, 2007 12:38 pm

Post » Sat May 28, 2011 12:05 am

Hi Linora: I encountered some problems using MUWE with the latest MGE SVN rev-0114, reported http://www.gamesas.com/bgsforums/index.php?s=&showtopic=985453&view=findpost&p=14300626. Not sure it crashes because of MGE or MUWE, it was working fine with the MGE SVN rev-0112, but I also had trouble with SVN rev. prior to 0111.

Apart from this, excellent mod! :thumbsup:
User avatar
Terry
 
Posts: 3368
Joined: Mon Jul 09, 2007 1:21 am

Post » Fri May 27, 2011 2:25 pm

Linora must still be busy studying. I anxious to see what else she updates to this project.
User avatar
Vickytoria Vasquez
 
Posts: 3456
Joined: Thu Aug 31, 2006 7:06 pm

PreviousNext

Return to III - Morrowind