Ok, I've ignored the Better Music System mod for long enough

Post » Sat May 28, 2011 6:41 pm

Come on not a big deal, anyway, for MW, and in particular when you use GetPCCell function, "Dagon FEL" is the same as "Dagon FELL", but "Dagon FELL" is different from "Dagon FEL", got it? :tongue:


I just wanted to give you crap about it :P

I used to use five of them, this comprised, now I used 4 and the game is pretty stable, quite happy with it, I mean I have more than 170 plugins checked.


That's the part I don't get... it seems like you should be getting CTD's up the yin-yang.

Hmm... none of the timers in this mod are dependent on the timescale variable, are they?

EDIT: also... where in blazes is the setlist for Ghostgate located? I can't seem to find it anywhere.
User avatar
Flash
 
Posts: 3541
Joined: Fri Oct 13, 2006 3:24 pm

Post » Sat May 28, 2011 4:52 am

That's the part I don't get... it seems like you should be getting CTD's up the yin-yang.


Instead my game is pretty stable, now. And I have also several other pluginless texture replacers, MGE with distant land... Not high fps, but stable.

Hmm... none of the timers in this mod are dependent on the timescale variable, are they?


If you mean the variable used by MW, correct. Only GameHour is present in the timer's patch plugin. Speaking of which, I suggest to use that to customize tracklists.

EDIT: also... where in blazes is the setlist for Ghostgate located? I can't seem to find it anywhere.


'Cos it doesn't exist. It was intended to be used at the beginning, but then I changed my mind. That's why you can find a Ghostgate mp3 in the pack, just forgot to delete when creating the compilation, it's useless.
User avatar
Kitana Lucas
 
Posts: 3421
Joined: Sat Aug 12, 2006 1:24 pm

Post » Sat May 28, 2011 4:24 am

Instead my game is pretty stable, now. And I have also several other pluginless texture replacers, MGE with distant land... Not high fps, but stable.


I need to find out what's going on, then.

Do you use Timeslip's .exe optimizer? I've often wondered if that thing is causing more harm than good.

If you mean the variable used by MW, correct. Only GameHour is present in the timer's patch plugin. Speaking of which, I suggest to use that to customize tracklists.


I only asked because I edit the timescale to slow down the passage of time significantly... thus, I don't do much traveling at night because it stays light out for a lot longer.

'Cos it doesn't exist. It was intended to be used at the beginning, but then I changed my mind. That's why you can find a Ghostgate mp3 in the pack, just forgot to delete when creating the compilation, it's useless.


Damn >.<

I don't suppose it would be very hard to put in, though... unless the reason you abandoned it is because there's some catch I'm not aware of.

For the record, this is how I've broken down the various regions/cities for the game's soundtrack:

Spoiler


Overworld (all regions except Solthsheim and Red Mountain)

Red Mountain

Solthsheim

Fishing Villages (Seyda Neen, Hla Oad, Gnaar Mok, Ald Velothi, and Khuul)

Hlaalu & Redoran Settlements (Balmora, Caldera, Suran, Gnisis, Ald Ruhn, and Maar Gan)

Telvanni Settlements (Sadrith Mora/Wolverine Hall, Tel Aruhn, Tel Branora, Tel Fyr, Tel Mora, Tel Vos, Vos)

Pelagiad & Molag Mar

Vivec

Ebonheart

Nordic Towns (Dagon FEL :) , Skaal, and Raven Rock)



EDIT: moving along, then... it seems that I've got it to where the overworld music doesn't interrupt the town music, and vise versa.

However, if you make it to another town with one town's music playing, it will change. I wonder how to change that...
User avatar
victoria johnstone
 
Posts: 3424
Joined: Sat Oct 14, 2006 9:56 am

Post » Sat May 28, 2011 10:35 am

I need to find out what's going on, then.

Do you use Timeslip's .exe optimizer? I've often wondered if that thing is causing more harm than good.


Yes, and no problem at all with it. Besides I also use the 4gb patch, here's a http://www.gamesas.com/index.php?/topic/1104427-4gb-patch/ I bookmarked. I think that all this makes a good difference about stability matter.


I don't suppose it would be very hard to put in, though... unless the reason you abandoned it is because there's some catch I'm not aware of.


Nothing in particular, I simply liked that way, to not make music change too many times on the road from Ashalnds to Red Mountain.


However, if you make it to another town with one town's music playing, it will change. I wonder how to change that...


Make the script check if you use silt strider or a spell to move among towns (GetPCTraveling / GetEffect sEffectRecall-sEffectDivineIntervention-sEffectAlmsiviIntervention), and block music switching when the check is positive. Hope I've understood your problem though.
User avatar
Robert Garcia
 
Posts: 3323
Joined: Thu Oct 11, 2007 5:26 pm

Post » Sat May 28, 2011 10:38 am

Yes, and no problem at all with it. Besides I also use the 4gb patch, here's a http://www.gamesas.com/index.php?/topic/1104427-4gb-patch/ I bookmarked. I think that all this makes a good difference about stability matter.


Well, I'm only running a 32-bit OS, so I don't think that will help much.

Or maybe it will. My system recognizes 3GB of RAM, so I'm not sure what effect the patch will have. I suppose there's no harm in trying it out.

Nothing in particular, I simply liked that way, to not make music change too many times on the road from Ashalnds to Red Mountain.


I see... because it would change once when entering Ghostgate, and a second time when leaving... at least if you treated it like a "dungeon" that way.

If there's no specific catch or trick to it, then, I may go and add it.

Make the script check if you use silt strider or a spell to move among towns (GetPCTraveling / GetEffect sEffectRecall-sEffectDivineIntervention-sEffectAlmsiviIntervention), and block music switching when the check is positive. Hope I've understood your problem though.


Actually, the problem is a lot more mundane than that. If I leave town, the music stays at whatever was playing in the town when I left. It's very possible that I can make it all the way to another town before that track finishes (and without getting into a fight). And when I make it to the next town, the music changes.

So, it's not so much a fast travel issue as it is, well... a regular travel issue :P
User avatar
Jessica Stokes
 
Posts: 3315
Joined: Fri Jul 28, 2006 11:01 am

Post » Sat May 28, 2011 6:25 pm

Well, I'm only running a 32-bit OS, so I don't think that will help much.

Or maybe it will. My system recognizes 3GB of RAM, so I'm not sure what effect the patch will have. I suppose there's no harm in trying it out.


Really don't know what happens if you try it in a 32 bit system.


I see... because it would change once when entering Ghostgate, and a second time when leaving... at least if you treated it like a "dungeon" that way.


Even if you treat it as an exterior cell though, I'm talking about the entire cell, not only the building to be precise.


Actually, the problem is a lot more mundane than that. If I leave town, the music stays at whatever was playing in the town when I left. It's very possible that I can make it all the way to another town before that track finishes (and without getting into a fight). And when I make it to the next town, the music changes.

So, it's not so much a fast travel issue as it is, well... a regular travel issue :P


I see, so if you leave the first town, town music will continue. And I suppose that if you make a "u-turn" going back to that town, town music should change.

Very summarily, supposing you set a variable for Hlaalu towns, if you walk between two of them and you enter the second town, the main towns' script recognizes thjat you changed place but you're still inside an Hlaalu town, setting that var to 1. Then it will try to start the "Hlaalu town music script" (the one with the playlist), and it should try to reset a global variable to tell the music script that it's time to change track (in my mod "xn_play"), but since that music script is already running (you must check it) the main script will not reset any variable (not processing that block), so the current running track will not be switched with another until is finished. It will be the music script that, when the set track lenght value will be reached by the timer, will reset the global to switch to another Hlaalu track. I hope this makes sense.
User avatar
Miss K
 
Posts: 3458
Joined: Sat Jan 20, 2007 2:33 pm

Post » Sat May 28, 2011 6:41 am

Really don't know what happens if you try it in a 32 bit system.


I guess we'll find out >.>

Even if you treat it as an exterior cell though, I'm talking about the entire cell, not only the building to be precise.


I would probably want to treat it as an interior cell, though... but the entire cell probably returns a value of Ghostgate == 1, so I'd have to specify the interior only, maybe.


I see, so if you leave the first town, town music will continue. And I suppose that if you make a "u-turn" going back to that town, town music should change.


Actually, it won't. This only happens if you make it to another town.

Very summarily, supposing you set a variable for Hlaalu towns, if you walk between two of them and you enter the second town, the main towns' script recognizes thjat you changed place but you're still inside an Hlaalu town, setting that var to 1. Then it will try to start the "Hlaalu town music script" (the one with the playlist), and it should try to reset a global variable to tell the music script that it's time to change track (in my mod "xn_play"), but since that music script is already running (you must check it) the main script will not reset any variable (not processing that block), so the current running track will not be switched with another until is finished. It will be the music script that, when the set track lenght value will be reached by the timer, will reset the global to switch to another Hlaalu track. I hope this makes sense.


This already is the case, though. Balmora to Caldera, for example, wouldn't result in a switch, since both of them share the same town ID's. Seyda Neen to Pelagiad, however, would result in a switch, since they have different music.



As for the stability issues...


Without your mod, my game is stable... ish. It'll crash after the fourth or fifth reload, but it's mostly fine otherwise. With it, I've got a 50/50 chance of crashing on *any* reload, and any reload that works won't have any music playing. At all.

I've whittled the problem down about as far as I possibly can - the *only* script set to run is the overworld music list, and it still behaves this way. Load the game initally, and there's music. On *any* subsequent reload, there's no music (if the game doesn't just crash). Now, all I have to do is find out what exactly about the music list my game doesn't seem to like... any ideas?

(At this point, I'd lay money on the xn_play variable. It doesn't respond in anything resembling a logical manner when I edit it. If I *remove* the "if" dependency to start the random tracks, then it doesn't start until I go to reload. And then it stops when the game reloads. WTF?

EDIT:

Well... let's put it this way. I have one script set to run when the game loads (everything else is disabled in the startscripts)

This doesn't work at all (as in, no music):

begin BTB_Start_Script	StreamMusic "Buffy (S2-5).mp3" end


This does work, and results in all of the crashy, no-load-game-musicy behavior I described above:

begin BTB_Start_Script	if ( xn_play == 0 ) 	StreamMusic "Buffy (S2-5).mp3" 	endifend


Words fail me. And rightfully so.

EDIT:

And now, for whatever reason, the music delay when going back into town from the wilderness doesn't work anymore. Even after putting the mod back exactly as I had it before when I had it working and trying it on a new game. All I ask is a *little* consistency when testing, but alas, I got nothing.
User avatar
Mistress trades Melissa
 
Posts: 3464
Joined: Mon Jun 19, 2006 9:28 pm

Post » Sat May 28, 2011 11:30 am

EDIT

Deleted. My browser got mad.
User avatar
Sandeep Khatkar
 
Posts: 3364
Joined: Wed Jul 18, 2007 11:02 am

Post » Sat May 28, 2011 7:13 am


This doesn't work at all (as in, no music):

begin BTB_Start_Script	StreamMusic "Buffy (S2-5).mp3" end




No no wait, THIS is the script you made execute by the game?? You are calling the StreamMusic EACh frame, it starts the track each frame, it's obvious it doesn't work. This works:

begin BTB_Start_Script    if ( doonce == 0 )	StreamMusic "Buffy (S2-5).mp3"         set doonce to 1   endifend


Here SM is called only once as it should be.

And applied to the mod, assuming the track lats 30 seconds:

begin BTB_Start_Script set timer to ( timer + getsecondspassed)    if ( doonce == 0 )	StreamMusic "Buffy (S2-5).mp3"         set doonce to 1   endif   if ( timer > 30 )        set doonce to 0        set timer to 0   endifend


Of course vars must be initialized.


This does work, and results in all of the crashy, no-load-game-musicy behavior I described above:

begin BTB_Start_Script	if ( xn_play == 0 ) 	StreamMusic "Buffy (S2-5).mp3" 	endifend


Again, it should be like this:

begin BTB_Start_Script	if ( xn_play == 0 ) 	StreamMusic "Buffy (S2-5).mp3"         set xn_play to 1	endifend


EDIT:

And now, for whatever reason, the music delay when going back into town from the wilderness doesn't work anymore. Even after putting the mod back exactly as I had it before when I had it working and trying it on a new game. All I ask is a *little* consistency when testing, but alas, I got nothing.


Cannot help too much if I don't see what you are doing.

I've whittled the problem down about as far as I possibly can - the *only* script set to run is the overworld music list, and it still behaves this way. Load the game initally, and there's music. On *any* subsequent reload, there's no music (if the game doesn't just crash).


However, to say something, problems may be several. It may simply be the StreamMusic function that, forced when you reload, it may cause a CTD. Furthermore, but it's only a supposition, when distant land is loaded and simultaneously StreamMusic is executed, there's a possibility to get a CTD. Not that I blame MGE, instead I should blame the StreamMusic function. When the game doesn't crash but music doesn't restart, surely is the global var xn_play that is not reset. When you save the timer count is saved too. Upon loading the timer will resume its count, so if you wait until the count reaches the time lenght set in the script the tracks should restart, or they may restart if you change cell, or if you use the restart button or if you type "set xn_play to 0" in the console. Or simply your comp doesn't like my mod.

You may try this to search for the problem: using the code to recognize when the game is loaded, stop ALL the scripts. To be sure, eliminate all the mod scripts from the MWEdit StartScript section. Then, when ingame, use the console to start the main scripts one by one. When (if) the game crashes, you will have found the guilty.

Another thing you may do is set a timer that delays the start of the scripts of, i.e., 10 secs.

I would probably want to treat it as an interior cell, though... but the entire cell probably returns a value of Ghostgate == 1, so I'd have to specify the interior only, maybe.


Well you could temporarely switch off the delay system when you are in that cell, blocking the delay code when you are in there.
User avatar
celebrity
 
Posts: 3522
Joined: Mon Jul 02, 2007 12:53 pm

Post » Sat May 28, 2011 7:52 am

'tis better to beg forgiveness than ask permission >.>


While I think that permission should be asked, I cant also help but agree with you. your little tweaks always seem (mostly) pretty good and needed. I mean look at the Forgottenhalls. You didnt ask permssion to make the tweak, but you tweak it to balance it and then you brought the balancing issuies to my attention (in a rond about way) and so now I have a more balanced version of the forgottenhalls (which still needs to be released :P)

Its polite to ask, but guys, please go easy on him, he has done alot of good for the community :)
User avatar
Rachyroo
 
Posts: 3415
Joined: Tue Jun 20, 2006 11:23 pm

Post » Sat May 28, 2011 9:42 am

Yes, and no problem at all with it. Besides I also use the 4gb patch, here's a http://www.gamesas.com/index.php?/topic/1104427-4gb-patch/ I bookmarked. I think that all this makes a good difference about stability matter.

now i am very glad i've been watching this thread.... i did not know such a thing existed, now i can finally get those pesky 32 bit programs to use more than a sliver of my substantial RAM
User avatar
Steve Bates
 
Posts: 3447
Joined: Sun Aug 26, 2007 2:51 pm

Post » Sat May 28, 2011 2:36 pm

...guys, please go easy on him...

Oh boy, they have gone extremely easy on him. Back in the old days folks on this forum would have ripped him a new one for this attitude. He can thank his lucky stars that some of the old-timers like redwoodtreesprite and Horatio aren't around anymore.
User avatar
zoe
 
Posts: 3298
Joined: Sun Nov 12, 2006 1:09 pm

Post » Sat May 28, 2011 3:14 pm

Oh boy, they have gone extremely easy on him. Back in the old days folks on this forum would have ripped him a new one for this attitude. He can thank his lucky stars that some of the old-timers like redwoodtreesprite and Horatio aren't around anymore.

or perhaps it shows how mature the community has grown and learnt to handle situations better and work together rather than agaisnt each other?
User avatar
Anna Watts
 
Posts: 3476
Joined: Sat Jun 17, 2006 8:31 pm

Post » Sat May 28, 2011 3:22 pm

No no wait, THIS is the script you made execute by the game?? You are calling the StreamMusic EACh frame, it starts the track each frame, it's obvious it doesn't work.


Well, that's what I finally hacked it down to in an attempt to figure out what was going wrong. But yes, that explains why it didn't work >.>

Everything else you suggested - directly copy/pasted from your codeboxes, are resulting in the same behavior (it works on first load, and crashes or just doesn't work on reload). Distant Land isn't the problem because I disable it when testing out mods. You've probably got the right idea with StreamMusic... but if that's the case, then I wonder why I'm the only one having this problem.

I had thought that maybe it was the global var xn_play, too... except that the script you suggested with the do once condition had the same problem. I could try putting "set dooonce to 0" at the bning of the script, but that would just constantly set it to 0. And if I put *another* doonce tag around it... well, you see where this is headed.

I'm guessing, then, that the global variable doesn't reset, but the floating timer *does*, and thus the music never starts again because the music is waiting for the timer to hit a certain point, which it apparently never does? This, I imagine, is the case at least when the game *does* load.

Cannot help too much if I don't see what you are doing.


Well, before I was having a problem where the overworld music would continue into towns, but town music would switch immediately to the overworld music when I left. And then I found that "one line of code" which fixed it to work how I wanted it to:

	if ( xn_tm_playing == 0 )		if ( xn_music_delay == -1 )			if ( xn_play )				if ( xn_in_interior == 0 )					set doonce1 to 0					set doonce2 to 0					set doonce3 to 0					set xn_place to 0					set xn_delay_started to 0					set xn_delay_done to 0					set varD to 0					set varE to 0					set timer_delay to 0					set timer1 to 0					set XN_Main_DaedDwemTowns.doonce3 to 1					return				endif			endif		endif	endif


Removing the if ( xn_tm_playing == 0 ) part allowed the town music to carry over into the overworld.

Not sure what I did between then and now, but I now have the exact opposite problem. Town music carries into the overworld, but not vise versa... even after I went and put the code back (which shouldn't matter, but hey).

The xn_tws_included variable is set to default to 2, and the music_delay defaults to -1. None of the scripts have been modified to alter those.

You may try this to search for the problem: using the code to recognize when the game is loaded, stop ALL the scripts.


There's a code for that? What is it?

EDIT: ok, I just went and disabled *all* of the startscripts and wrote one script that will start all of the startscripts when I manually load it.

I load the game, and then run my script. Music starts right up. Save. Reload. Reload works, but no music. Start my script (which starts *all* of your startscripts). No music. Tried manually setting xn_play to 0. Nothing. It's like something just is flat-out not working on a reload.

EDIT 2, ELECTRIC BUGALOO:

So, this is interesting... using the same setup as above (startscripts must be run manually with a script of my own), I start a game, run the scripts, music plays, and reload with no crashing. But the music won't play anywhere - at all. So, i restart the program and load a save. I *don't* manually run the script and instead just reload. And then I manually start the scripts. The music plays. So there is clearly something that's not getting reset when the game reloads, and I don't know what that something is. It has to be something like the timer or rather.

EDIT 33 1/2: THE FINAL INSULT:

Well, here we go, then... it's not the streammusic function. I changed my script to manually stream a track when it runs *before* it starts your scripts. When I first load the game, the appropriate music for the town I'm in plays. On every subsequent reload (which are becoming interestingly devoid of crashes), the track I manually specified plays.

This is what I have:

begin BTB_Scriptshort doonceif ( doonce == 0 )	streammusic "chosen.mp3"	Stopscript XN_Check_Battle	Stopscript XN_Distance_Towns	Stopscript XN_Main_DaedDwemTowns	Stopscript XN_Main_Dungeon	Stopscript XN_Main_Dunmer	Stopscript XN_Main_Other	Stopscript XN_Main_Regions	Stopscript XN_Main_Shops_Temples	Stopscript XN_Music_Werewolf	Startscript XN_Check_Battle	Startscript XN_Distance_Towns	Startscript XN_Main_DaedDwemTowns	Startscript XN_Main_Dungeon	Startscript XN_Main_Dunmer	Startscript XN_Main_Other	Startscript XN_Main_Regions	Startscript XN_Main_Shops_Temples	Startscript XN_Music_Werewolf	set doonce to 1endifend


Also interesting is that this doesn't work on interiors... all interior cells when loaded will load to total silence, even if I leave. But, again... no more crashing.
User avatar
Harry-James Payne
 
Posts: 3464
Joined: Wed May 09, 2007 6:58 am

Post » Sat May 28, 2011 4:05 pm


I'm guessing, then, that the global variable doesn't reset, but the floating timer *does*, and thus the music never starts again because the music is waiting for the timer to hit a certain point, which it apparently never does? This, I imagine, is the case at least when the game *does* load.


Try to found out if something is resetting timers before they have to. Besides, to help testing scripts is a good idea to use console. "sv" will show you local variables, so you can see their behaviour. And "show insert_global_var" well, is self-explanatory.


Well, before I was having a problem where the overworld music would continue into towns, but town music would switch immediately to the overworld music when I left. And then I found that "one line of code" which fixed it to work how I wanted it to:

snip

The xn_tws_included variable is set to default to 2, and the music_delay defaults to -1. None of the scripts have been modified to alter those.


You know, since most of the variables (and there are tons as you could notice) are linked to each other, only deleting a line (or generally changing something) maybe will fix your current problem but will very likely create others.
However, let's clear once for all what you are trying to achieve. You want region music to be carried over into a town, and town music to be carried over into a region, right? So why xn_twn_included is set to 2? That means that when you mobve from a region to a towns and vice versa, music will always switch (theorically!). When that var set to 1 though, music will not switch ("towns included" option), neither passing from a region to a town nor the opposite. Choose that option first.

EDIT: ok, I just went and disabled *all* of the startscripts and wrote one script that will start all of the startscripts when I manually load it.

I load the game, and then run my script. Music starts right up. Save. Reload. Reload works, but no music. Start my script (which starts *all* of your startscripts). No music. Tried manually setting xn_play to 0. Nothing. It's like something just is flat-out not working on a reload.

EDIT 2, ELECTRIC BUGALOO:

So, this is interesting... using the same setup as above (startscripts must be run manually with a script of my own), I start a game, run the scripts, music plays, and reload with no crashing. But the music won't play anywhere - at all. So, i restart the program and load a save. I *don't* manually run the script and instead just reload. And then I manually start the scripts. The music plays. So there is clearly something that's not getting reset when the game reloads, and I don't know what that something is. It has to be something like the timer or rather.


As for this, it may be that the xn_play var is always set to 1 from somewhere else, and even if you try to set it to 0, it will be reset to 1 soon after. Use the "show" command on the console to check that.

Well, here we go, then... it's not the streammusic function. I changed my script to manually stream a track when it runs *before* it starts your scripts.

It is a little more tricky than you think. Unfortunately, ther's no way to be sure what will be processed before and what will be processed later. The way MW handles scripts, if you write a block setting a variable and starting a script, you will not be sure if the variable will be set before starting that script or the contrary. If MW does the exact opposite you were trying to do, it will mess things up. To be sure everything work right there's nothing else than testing ingame.

begin BTB_Scriptshort doonceif ( doonce == 0 )	streammusic "chosen.mp3"	Stopscript XN_Check_Battle	Stopscript XN_Distance_Towns	Stopscript XN_Main_DaedDwemTowns	Stopscript XN_Main_Dungeon	Stopscript XN_Main_Dunmer	Stopscript XN_Main_Other	Stopscript XN_Main_Regions	Stopscript XN_Main_Shops_Temples	Stopscript XN_Music_Werewolf	Startscript XN_Check_Battle	Startscript XN_Distance_Towns	Startscript XN_Main_DaedDwemTowns	Startscript XN_Main_Dungeon	Startscript XN_Main_Dunmer	Startscript XN_Main_Other	Startscript XN_Main_Regions	Startscript XN_Main_Shops_Temples	Startscript XN_Music_Werewolf	set doonce to 1endifend

I don't think this code will stop scripts. Yor are overwriting stopscript functions with startscript ones in the same block (but I may be wrong about this*). You should check if all scripts are stopped first, then restart them, Besides, as I said above, you can't be sure that SM function is executed before the rest.

* Try to remove all those stopscript lines from your script. If you don't get a CTD, they are useless, since you already removed them from the StartScript section. Scripting (at least for MW) is mostly a matter of trial and error. You won't figure out what works and what doesn't until you try it (even if there' are rules to respect, of course).
User avatar
Miragel Ginza
 
Posts: 3502
Joined: Thu Dec 21, 2006 6:19 am

Post » Sat May 28, 2011 7:53 am

Try to found out if something is resetting timers before they have to. Besides, to help testing scripts is a good idea to use console. "sv" will show you local variables, so you can see their behaviour. And "show insert_global_var" well, is self-explanatory.


I'm not sure what I'd be looking for, though.


You know, since most of the variables (and there are tons as you could notice) are linked to each other, only deleting a line (or generally changing something) maybe will fix your current problem but will very likely create others.



However, let's clear once for all what you are trying to achieve. You want region music to be carried over into a town, and town music to be carried over into a region, right? So why xn_twn_included is set to 2? That means that when you mobve from a region to a towns and vice versa, music will always switch (theorically!). When that var set to 1 though, music will not switch ("towns included" option), neither passing from a region to a town nor the opposite. Choose that option first.


Well, my best indication of what that variable did (I wasn't sure why it had three settings instead of just two) came from reading the magic menu script, and I just made my best guess. I meant to ask, but then didn't when I thought I had it working. I'll set it back to 1 when I get home from work in the morning and see what that does.

As for this, it may be that the xn_play var is always set to 1 from somewhere else, and even if you try to set it to 0, it will be reset to 1 soon after. Use the "show" command on the console to check that.


Just "show xn_play"? I'm not horribly familiar with using the console to check up on variables (as you might have noticed).



Well, here we go, then... it's not the streammusic function. I changed my script to manually stream a track when it runs *before* it starts your scripts.

It is a little more tricky than you think. Unfortunately, ther's no way to be sure what will be processed before and what will be processed later. The way MW handles scripts, if you write a block setting a variable and starting a script, you will not be sure if the variable will be set before starting that script or the contrary. If MW does the exact opposite you were trying to do, it will mess things up. To be sure everything work right there's nothing else than testing ingame.


Couldn't I just have it set xn_play to 0 and then only load the rest of the scripts if xn_play = 0? That seems to be the most logical thing to do. Again, I can only theorize until I get home from work.

I don't think this code will stop scripts. Yor are overwriting stopscript functions with startscript ones in the same block. You should check if all scripts are stopped first, then restart them, Besides, as I said above, you can't be sure that SM function is executed before the rest.


Aye, correct. Though, if what I'm assuming is true, the stopscript commands shouldn't be necessary, since the problem appears to be due to a rogue variable rather than a rogue script.

Well, if there's one thing I have right now, it's time to mess with my one script to rule them all.

And before I forget, the help is much appreciated. When I'm all said and done with this thing, you're more than free to it. I can't imagine that I'm the only one having these stability issues, so we might end up coming up with something here that you may want to put into your next release.
User avatar
JaNnatul Naimah
 
Posts: 3455
Joined: Fri Jun 23, 2006 8:33 am

Post » Sat May 28, 2011 4:27 pm

I'm not sure what I'd be looking for, though.


Well timers you need to look fro are only in the music scripts, there are only a few things to check there.

Just "show xn_play"?


Yess.

Couldn't I just have it set xn_play to 0 and then only load the rest of the scripts if xn_play = 0? That seems to be the most logical thing to do. Again, I can only theorize until I get home from work.


The mod already sets it to 0 when you reload, IF at least that worked properly...

Aye, correct. Though, if what I'm assuming is true, the stopscript commands shouldn't be necessary, since the problem appears to be due to a rogue variable rather than a rogue script.


Yes but was a way to find out the script that crashes your game.

And before I forget, the help is much appreciated. When I'm all said and done with this thing, you're more than free to it. I can't imagine that I'm the only one having these stability issues, so we might end up coming up with something here that you may want to put into your next release.


No, you aren't the only one. Speaking of that, I may already have a precise idea of what's going on with my mod for someone. I think it's not a coincidence that these kind of reports started to come out from version 1.7. I always used MWEdit, and now I realized (a bit too late) that is too much forgiving concerning script limits. And some script have become huge. This may have raised instability that could cause no problem at all or only minir problems (the majority of people, from what I heard) or screw up everything for someone else. Very likely if you will lighten the scripts (removing features etc.) things will return to normality for you. In the next version I will handle this matter optimizing everything further. But I can't avoid computer related problems. For example when I used my crappy laptop I couldn't use mods that used the SetDelete function, when called I got almost everytime a CTD. For the most of people they worked fine, but tht wasn't my case. With the new computer now, I haven't that problem anymore.

About the crashes you have when you load with the unedited mod, you could make another test. Enter a town, turn explore music off and then on again. Save the game and exit. In the xn_music_towns script, create a new short var called DonaldDuck. Then at the beginning of the script type

if ( DonaldDuck == 0 )
return
endif

This will block the music script. Reaload and see what happens, exit and reload several times, you shouldn't get CTDs and the music shouldn't start each time if my supposition is right.

edit: little mistake
User avatar
Nienna garcia
 
Posts: 3407
Joined: Wed Apr 25, 2007 3:23 am

Post » Sat May 28, 2011 8:07 am

Well timers you need to look fro are only in the music scripts, there are only a few things to check there.


So, then, I type "show timer", but then I assume I would specify the script I'm checking the timer on, wouldn't I?

Sorry for the stupid question, but you'd be surprised at how much of all this I'm just learning as I go

The mod already sets it to 0 when you reload, IF at least that worked properly...


Well, something isn't being reset, that's for sure. I dug around and found all of the variables that you reset during a "reset_all" call and will throw those in the script if the one with just the xn_play reset doesn't work.

If *that* doesn't work, I just have no idea.


Yes but was a way to find out the script that crashes your game.


I'll have to go back and double-check, but I'm pretty sure the only difference between the test script that crashed my game and the one that didn't was the presence of the "stream music" command before the other scripts started. I did a lot of testing the other night before I went to bed in frustration, and I recall using that testscript as a startscript that started all of the other startscripts (try saying that five times fast) and my game was crashing like a Russian spacecraft on re-entry.

Then again, I'm not sure how much of my observations of this mod's behavior over the last two days I trust, since it's done (and stopped doing) a lot of things that I can't explain. Perhaps I'm going crazy.


No, you aren't the only one. Speaking of that, I may already have a precise idea of what's going on with my mod for someone. I think it's not a coincidence that these kind of reports started to come out from version 1.7. I always used MWEdit, and now I realized (a bit too late) that is too much forgiving concerning script limits. And some script have become huge. This may have raised instability that could cause no problem at all or only minir problems (the majority of people, from what I heard) or screw up everything for someone else. Very likely if you will lighten the scripts (removing features etc.) things will return to normality for you. In the next version I will handle this matter optimizing everything further. But I can't avoid computer related problems. For example when I used my crappy laptop I couldn't use mods that used the SetDelete function, when called I got almost everytime a CTD. For the most of people they worked fine, but tht wasn't my case. With the new computer now, I haven't that problem anymore.


Well, as of now, the biggest script in my edited version is the battle script at 27,000... which goes right along with the fact that it's the biggest FPS drain in the mod. I've reduced the tiers to 4 (and will probably end up hacking it down to 3, anyway), though I'm not really sure if it's had much impact.

The real question is going to be where the big drain in your battle script *is* coming from. I suspect that it might lie with how many opponents you keep track of HP-wise, though I don't know if this would also cause FPS hits in a fight with only one opponent (which it does). Either way, 10 opponents seems a bit unnecessary if (I'm assuming) the tracking is being done solely for the purpose of which music to play. Especially with consolidated tiers, this is far less important, and I could reduce that number to 5, or even 3. But again, the big question is if that's where the big drain is coming from.

I don't know if the *number* of scripts might have anything to do with it, either. I've basically consolidated all of the regional music scripts save Solstheim and Red Mountain into one basic "overworld music" script, and have done the same with most of the dungeons. Whether or not this will actually improve performance or just make sifting through the code less of an eyesore I've yet to determine.

Getting back to the main point, though, I think that script size, while contributing to overall performance, is not really the source of my main woes here. This crashing is definitely due to one little thing that isn't resetting properly, and I will find out what it is. Beyond that, I'll see what else I can do to lighten this thing up into a viable "lite" version of Better Music System.

About the crashes you have when you load with the unedited mod, you could make another test. Enter a town, turn explore music off and then on again. Save the game and exit. In the xn_music_towns script, create a new short var called DonaldDuck. Then at the beginning of the script type

if ( DonaldDuck == 0 )
return
endif

This will block the music script. Reaload and see what happens, exit and reload several times, you shouldn't get CTDs and the music shouldn't start each time if my supposition is right.


Well, I have a test save that I made before I applied this mod, and it's in a town, so the first part of that shouldn't really be neccessary. But it seems that you believe that it's the music script itself that's crashing the game rather than the main scripts.

I'll try that, but I think your earlier idea about adding a timer prior to loading would be an even more prudent idea (at least, once we identify the music script rather than the main script as the culprit).

So, basically... there's two problems I'm having to investigate here (and I say this only so that I can keep them sorted out in my head). The first is that the game continually crashes on reloading for some reason. The second is that when it doesn't, the music doesn't play.

I think the first actual progress I've made in this direction is realizing that they are two separate problems >.<

...

...

...

Oh, yeah, I also meant to ask... I'm not sure I understand how the "musicbytype" variable functions. I see that it is only really called in the battle script and the stopscript script. I assume that it's meant to, when a battle is over, run through all of the places you could possibly be and then stop all of the other music scripts as a precaution. Thus, all I need to do is match up the type in the battle script with stopping all of the other scripts in the stopscript. Except that I don't 1) understand how the different type ID's are assigned to the music types in the first place, and 2) I'm not quite sure how types 25 and 26 (apparently your failsafes) are ever actually called upon.
User avatar
Sarah MacLeod
 
Posts: 3422
Joined: Tue Nov 07, 2006 1:39 am

Post » Sat May 28, 2011 3:24 am

So, then, I type "show timer", but then I assume I would specify the script I'm checking the timer on, wouldn't I?


Yes, forgot to say that too -> show xn_music_script.timer

Sorry for the stupid question, but you'd be surprised at how much of all this I'm just learning as I go

Don't worry I had already noticed :P

Well, something isn't being reset, that's for sure.


At least very likely, but it may be the music script itself that is not started, since you said that resetyting xn_play ingame doesn't work. Or that it's continously set to 1.



Well, as of now, the biggest script in my edited version is the battle script at 27,000... which goes right along with the fact that it's the biggest FPS drain in the mod.


I should have been clearer before, script limits doen't concenrn only the size in KB. Other than chracter limit there's a line limit too. What I meant is that a few scripts have exceeded the line limit. Now, MWEdit doesn't bother at all about that, but the CS doens't like it. If I should really trust one of them, Iìd choose CS for the final word. MWEdit is a great editor, infinitely more useful than the CS but when we come to the final judgement the CS is more reliable. That makes me think that something could not work well when playing. Fortunately the mod works almost perfectly for me (well kind of obvious, if I released it!), but other people may suffer severe issue (like you). This is another supposition, but I'll see with the next version.


I've reduced the tiers to 4 (and will probably end up hacking it down to 3, anyway), though I'm not really sure if it's had much impact.


It shouldn't have, almost sure.


The real question is going to be where the big drain in your battle script *is* coming from.


Let me understand, you have a big FPS impact when battle music starts (IF starts... well from now on "IF" is always implied ok?)? Because I have almost nothing, and other people that before had to switch off bm to play the game without slowmotion, now play well.
Maybe another problem of yours. However, GetDistance and GetHealth(GetRatio), yes, have a bigger impact than others. Reducing the number of enemies taken into cosideration may help.


I
don't know if the *number* of scripts might have anything to do with it, either. I've basically consolidated all of the regional music scripts save Solstheim and Red Mountain into one basic "overworld music" script, and have done the same with most of the dungeons. Whether or not this will actually improve performance or just make sifting through the code less of an eyesore I've yet to determine.


Having less scripts running at the same time is better, yes, it's a general rule, but explore main scripts really have no impact in general. The didn't give me problem even with my crappy laptop. You can tell the difference by turning off explore music ingame and see what changes. The fps eater may be mostly the battle script. However, lowering the number can help stability.


Getting back to the main point, though, I think that script size, while contributing to overall performance, is not really the source of my main woes here. This crashing is definitely due to one little thing that isn't resetting properly, and I will find out what it is.


99% of times when a script causes a crash, the guilty is a function. Variables at most will not make the mod work properly. The case is different when we are talking about MWSE variables (strings and references). They are not "regular" vars and not resetting them may cause a CTD when loading. But I don't think it's your case (I hope).


Well, I have a test save that I made before I applied this mod, and it's in a town, so the first part of that shouldn't really be neccessary. But it seems that you believe that it's the music script itself that's crashing the game rather than the main scripts.


It's an attempt. We have to exclude any possible "menace". Like I said, it's very likely a function that causes your CTDs, and this could be the beloved SM.


I'll try that, but I think your earlier idea about adding a timer prior to loading would be an even more prudent idea (at least, once we identify the music script rather than the main script as the culprit).


Well the previous is a test, not the solution.


no more quotes allowed!

Oh, yeah, I also meant to ask... I'm not sure I understand how the "musicbytype" variable functions. I see that it is only really called in the battle script and the stopscript script. I assume that it's meant to, when a battle is over, run through all of the places you could possibly be and then stop all of the other music scripts as a precaution.

Not really, that is used when you select music manually, and it's located in the music menu script. For each value, a place is associated, so if you choose Bitter Coast music manually, after a battle it can restore Bitter Coast music.

Except that I don't 1) understand how the different type ID's are assigned to the music types in the first place, and 2) I'm not quite sure how types 25 and 26 (apparently your failsafes) are ever actually called upon.

1) When you choose a "music type" from the menu, 2) actually don't know what you mean, but they are all chosen from the menu, check the music menu script.
User avatar
*Chloe*
 
Posts: 3538
Joined: Fri Jul 07, 2006 4:34 am

Post » Sat May 28, 2011 4:25 am


*Snip*



Well, I can say that I am *definitely* making progress. The music still doesn't start when the game loads, but it will start when I move to a different type... not to mention the general lack of loading problems. From here, it's just testing out more variables (the two I'm working with right now are xn_play and xn_delay_done):

begin One_Script_To_Rule_Them_Allshort doonceif ( doonce == 0 )		streammusic "chosen.mp3"		set xn_play to 0		set xn_delay_done to 1		if ( xn_play == 0 )		if ( xn_delay_done == 1 )			Startscript XN_Check_Battle			Startscript XN_Distance_Towns			Startscript XN_Main_DaedDwemTowns			Startscript XN_Main_Dungeon			Startscript XN_Main_Dunmer			Startscript XN_Main_Other			Startscript XN_Main_Regions			Startscript XN_Main_Shops_Temples			Startscript XN_Music_Werewolf		endif		endif	set doonce to 1endifend


What's more, the music will start up again if I go to the console and hit "set xn_play to 0". Clearly, something in the startscripts is setting it to 1, but the music isn't playing.

Also, I've got the music delay working properly... with the added bonus that it also won't change if I'm moving from one town to another with different town music.

Everything else - shops, taverns, etc., are working as intended. Grottoes have been moved to the main region script and are contiguous with the overworld. Weak battle music is set to off for the overworld, and on in interiors (which seems appropriate, as well as gives me a chance to use the game's original battle music). I've worked towards consolidating the music types into four main/music scripts: overworld, towns, interiors (comprises all dungeon types, shops, taverns, etc.), and battle. I've made a considerable amount of headway there, given the excess amount of free time I have at work.

Just think of me as a surgeon... one who's a little bit too eager to amputate.

"What? It's not like you're actually using that pinky! Let me cut it off!"

I should have been clearer before, script limits doen't concenrn only the size in KB. Other than chracter limit there's a line limit too. What I meant is that a few scripts have exceeded the line limit. Now, MWEdit doesn't bother at all about that, but the CS doens't like it. If I should really trust one of them, Iìd choose CS for the final word. MWEdit is a great editor, infinitely more useful than the CS but when we come to the final judgement the CS is more reliable. That makes me think that something could not work well when playing. Fortunately the mod works almost perfectly for me (well kind of obvious, if I released it!), but other people may suffer severe issue (like you). This is another supposition, but I'll see with the next version.


I understand - I was merely using the size in KB as a rough estimate of the number of lines.

Thing is, this mod is very customizeable... and I didn't realize just how much of the code was there purely for that fact until I really started digging deeper into it.

Let me understand, you have a big FPS impact when battle music starts (IF starts... well from now on "IF" is always implied ok?)? Because I have almost nothing, and other people that before had to switch off bm to play the game without slowmotion, now play well. Maybe another problem of yours. However, GetDistance and GetHealth(GetRatio), yes, have a bigger impact than others. Reducing the number of enemies taken into cosideration may help.


Not really a *big* FPS hit, but noticeable. I've got a pretty powerful computer, and I tend to assume that most people will be playing on machines that aren't nearly as much so, so any hit I do notice I'll automatically assume the worst for in the case of other players. It's a good mindset to be in if you're creating mods (or mod lists :P)

Having less scripts running at the same time is better, yes, it's a general rule, but explore main scripts really have no impact in general. The didn't give me problem even with my crappy laptop. You can tell the difference by turning off explore music ingame and see what changes. The fps eater may be mostly the battle script. However, lowering the number can help stability.


Yeah, that's what I'm going to try. As far as how the tracking works, is it first-come-first serve? That is, it will track the average HP of the first ten creatures who got into the fight with you? That's what I'm assuming.

So, yeah, I'll try lowering it to at the very highest five. And if I see a good enough improvement, will probably go down to three.

99% of times when a script causes a crash, the guilty is a function. Variables at most will not make the mod work properly. The case is different when we are talking about MWSE variables (strings and references). They are not "regular" vars and not resetting them may cause a CTD when loading. But I don't think it's your case (I hope).


I'm going to continue investigating why it is that the music doesn't start on reload... it seems that in the course of searching for the answer to that problem, I've found the answer to this one.

Not really, that is used when you select music manually, and it's located in the music menu script. For each value, a place is associated, so if you choose Bitter Coast music manually, after a battle it can restore Bitter Coast music.


Oh. That script isn't really being used by anything then, I see.

*Delete*
User avatar
Carlos Vazquez
 
Posts: 3407
Joined: Sat Aug 25, 2007 10:19 am

Post » Sat May 28, 2011 5:38 pm

Well, I can say that I am *definitely* making progress. The music still doesn't start when the game loads, but it will start when I move to a different type...
What's more, the music will start up again if I go to the console and hit "set xn_play to 0". Clearly, something in the startscripts is setting it to 1, but the music isn't playing.

I will take a look at the scripts too to see if some other ideas may come out.

Thing is, this mod is very customizeable... and I didn't realize just how much of the code was there purely for that fact until I really started digging deeper into it.


Yes the entire structure, although it may appear huge (well when you get used to it, it actually doesn't seem so), is quite malleable. Starting from this as a base, combinations are many.

That is, it will track the average HP of the first ten creatures who got into the fight with you? That's what I'm assuming.


No, not an average, it simply calculates the max hp of the enemy (battle check script), then sees what HP range that creature/npc belongs to (max hp script), and starts the music concerning that HP level (battle script->battle music script). If there's more than one enemy, the one with the highest HP level has precedence over all the others.

Oh. That script isn't really being used by anything then, I see.


No not at all, it's used to make battle music starts (as I said above), and also to make explore music restart after a fight when manual selection is used.
User avatar
Britney Lopez
 
Posts: 3469
Joined: Fri Feb 09, 2007 5:22 pm

Post » Sat May 28, 2011 11:39 am

I will take a look at the scripts too to see if some other ideas may come out.


I'm still not sure, as I don't really have much time at the moment to do in-game testing. The good news is that - with the exception of the music not starting up immediately, I have the mod functioning exactly as I want it to and free of the much worse problems that were plaguing me earlier.

I'm getting some rather mixed results (as usual) about the town music blending thing. Here's pretty much what I've determined:

-Overworld music *will* carry over into a town, but will switch over if you visit a second town with a different playlist while the same track is still playing (this will be an issue, since some of my overworld tracks are looooooooong).

-Similarly, town music will change if you visit another town with a different playlist while the first town's music is still playing. I'm convinced the one (or possible two) time(s) I saw the opposite happen was/were a fluke. It seems that however the -1 delay is coded, it doesn't anticipate changes in the town's playlists. Perhaps the answer may lie in adding some code to the music playlist itself to recognize if a delay is going on and not to load the new list if that is the case.

-Music will *not* change if going from one town to another town with the same playlist. This makes me a happy BTB


Yes the entire structure, although it may appear huge (well when you get used to it, it actually doesn't seem so), is quite malleable. Starting from this as a base, combinations are many.


The approach I tend to take when working with code is to get the job done using as little of it as humanly possible. What I'm just about finished working on is a highly efficient version of your mod's core functionality. It makes far more sense to me streamline the "base" functionality and then add on to it from there (using an additional plugin model if at all feasible) rather than building optional features into the base itself.

But, hey, that's just my opinion. Take it for what it's worth.

No, not an average, it simply calculates the max hp of the enemy (battle check script), then sees what HP range that creature/npc belongs to (max hp script), and starts the music concerning that HP level (battle script->battle music script). If there's more than one enemy, the one with the highest HP level has precedence over all the others.


Oh, that's even better. Well, I'm about to go home and test out what it's like with the tracked creatures cut down to 5... and I expect a nice performance boost. I'll let you know how that goes.

EDIT: 'eh, I think I saw some improvements, but it wasn't enough that I'm positive. I'll try lowering the number anyways and see if it does anything.

Also, I'm not sure exactly why the subbosses and finalbosses music are in separate scripts (excepting perhaps the script length concerns). I'm assuming that the final boss music would take precedence over the subboss music, and the subboss music over the regular music, no?

No not at all, it's used to make battle music starts (as I said above), and also to make explore music restart after a fight when manual selection is used.


To clarify... it's not being used for anything *now* >.>
User avatar
Carlitos Avila
 
Posts: 3438
Joined: Fri Sep 21, 2007 3:05 pm

Post » Sat May 28, 2011 7:38 am


I'm still not sure, as I don't really have much time at the moment to do in-game testing. The good news is that - with the exception of the music not starting up immediately, I have the mod functioning exactly as I want it to and free of the much worse problems that were plaguing me earlier.


Good news indeed :)

EDIT: And another thing. By what you said, you seem to confirm my previous supposition. I will work on it asap, before anything else. If I will make my mod work fine for you I'll have probably solved major stability problems that may occur to others too (well theorically).

EDIT2: last thing, I'd appreciate if you tested this with my mod (which we were talking about erlier), I'm corious about the possible results, thanks.

About the crashes you have when you load with the unedited mod, you could make another test. Enter a town, turn explore music off and then on again. Save the game and exit. In the xn_music_towns script, create a new short var called DonaldDuck. Then at the beginning of the script type

if ( DonaldDuck == 0 )
return
endif

This will block the music script. Reaload and see what happens, exit and reload several times, you shouldn't get CTDs and the music shouldn't start each time if my supposition is right.


I'm getting some rather mixed results (as usual) about the town music blending thing. Here's pretty much what I've determined:

-Overworld music *will* carry over into a town, but will switch over if you visit a second town with a different playlist while the same track is still playing (this will be an issue, since some of my overworld tracks are looooooooong).


Insterting an additional condition to not change music should work, but it should already do it by itself. Re-check what you changed and you will find what's wrong.

-Similarly, town music will change if you visit another town with a different playlist while the first town's music is still playing. I'm convinced the one (or possible two) time(s) I saw the opposite happen was/were a fluke. It seems that however the -1 delay is coded, it doesn't anticipate changes in the town's playlists. Perhaps the answer may lie in adding some code to the music playlist itself to recognize if a delay is going on and not to load the new list if that is the case.


Yeah experimenting is the key, it's not always so easy to make the scripts do what you want, as you could see.

-Music will *not* change if going from one town to another town with the same playlist. This makes me a happy BTB


EhEh :)


Also, I'm not sure exactly why the subbosses and finalbosses music are in separate scripts (excepting perhaps the script length concerns).


For easier customization, each battle music type has its own playlist. This is what I think, my opinion.

I'm assuming that the final boss music would take precedence over the subboss music, and the subboss music over the regular music, no?


Exactly.
User avatar
Nathan Maughan
 
Posts: 3405
Joined: Sun Jun 10, 2007 11:24 pm

Post » Sat May 28, 2011 8:50 am

Good news indeed :)


Indeed, indeed. I believe I've narrowed down the problem , except I'm not sure what to do about it. I still have my one startscript. It has a doonce section to stop all of the main scripts and doonce section following that to start all of the main scripts if they're stopped.

To be clear:

begin One_Script_To_Rule_Them_All	short doonce	if ( doonce == 0 )		Stopscript BTB_Main_Buildings		Stopscript BTB_Main_Dungeons		Stopscript BTB_Main_Overworld		Stopscript BTB_Main_Towns		Stopscript XN_Check_Battle		Stopscript XN_Distance_Towns		Stopscript XN_Main_Other		Stopscript XN_Music_Werewolf		set doonce to 1	endif	if ( doonce == 1 )		if ( scriptrunning BTB_Main_Buildings == 0 )			startscript BTB_Main_Buildings		endif		if ( scriptrunning BTB_Main_Dungeons == 0 )			startscript BTB_Main_Dungeons		endif		if ( scriptrunning BTB_Main_Overworld == 0 )			startscript BTB_Main_Overworld		endif		if ( scriptrunning BTB_Main_Towns == 0 )			startscript BTB_Main_Towns		endif		if ( scriptrunning XN_Check_Battle == 0 )			startscript XN_Check_Battle		endif		if ( scriptrunning XN_Distance_Towns == 0 )			startscript XN_Distance_Towns		endif		if ( scriptrunning XN_Main_Other == 0 )			startscript XN_Main_Other		endif		if ( scriptrunning XN_Music_Werewolf == 0 )			startscript XN_Music_Werewolf		endif		set doonce to 2	endifend


Game works fine when I load initially, but complete silence when I reload, no matter where I go.

If I place a "streammusic" command in that second doonce set, that music will stream on a reload, but nothing else will work. However, if I move the command over to the music script (telling it to run only if the doonce short from my main startscript has been incremented), it will no longer play. Even more interestingly, showvars tells me that the music script is running, xn_play is set to 0, playing is set to 1, and the timer is running. I also checked to make sure that the appropriate circumstances for music to play ( xn_town == 1 in this case) was triggered. Nothing. The music script just... doesn't work on a reload.

And before you ask, I really haven't edited the music scripts at all, and this is the same behavior I get with the unedited version of your mod.

EDIT: And another thing. By what you said, you seem to confirm my previous supposition. I will work on it asap, before anything else. If I will make my mod work fine for you I'll have probably solved major stability problems that may occur to others too (well theorically).

EDIT2: last thing, I'd appreciate if you tested this with my mod (which we were talking about erlier), I'm corious about the possible results, thanks.


Oh, yeah, I forgot about that...

I'll go ahead and do it with the unedited version of your mod, but my edited version is so far chopped down from the original that running the test on it wouldn't help... mainly because at some point in my editing I managed to get rid of any and all stability problems I was having.

EDIT: yeah, no stability problems if I added the donaldduck variable to your unedited mod. Also tried it with goofy, mickey, and pluto and got the same results.

Regarding the desired behavior of the mod, with the exception of the "music not playing on reload" thing, I've got it working exactly how I want to. All of the music changing when I didn't want it to and so on was frustrating until I finally had a major breakthrough at work last night. My problems weren't because I'd taken too much of your features out - rather, I hadn't taken enough. The only timers I actually need are the ones on the music scripts and the battle script one. My "main" scripts now consist solely of collecting information about where the player is and setting the appropriate variables... and it's working like an absolute charm.

Just so we're all clear, I made a quick checklist of the various "area transition" conditions and my desired behavior for each:

No Music Switch Until Current Song Is Done Playing:

__ Town -> Overworld
__ Town -> Town (same playlist)
__ Town -> Town (different playlist)

__ Overworld -> Town
__ Overworld -> Town (multiple, with different setlists)

__ "Weak" Battle (overworld)
__ "Weak" Battle (town)

Immediate Music Switch:

__ Overworld -> Red Mountain
__ Overworld -> Solstheim
__ Solstheim -> Overworld
__ Red Mountain -> Overworld

__ Overworld -> Interior
__ Town -> Interior
__ Interior -> Overworld
__ Interior -> Town

__ "Weak" Battle (interior)
__ Normal Battle

(note: "Overworld" is all regions except Red Mountan and Solstheim plus grottoes ; "Interiors" is all dungeons, shops, forts, temples, and taverns)


The only parts left I'm not sure how I'm going to handle are Sotha Sil and the Hircine Maze, and that's just because they're towns that I want to behave like interiors. Quite minor, actually.

I forsee another few days of cleaning up the code and polishing it, but by the time I get off shift for the week (and for the year, for that matter), I should be all ready to go. Like I said before, you're free to have my version for whatever you want to do with it (package it as a "lite" version, whatever). I should also mention that I've edited your tracks (many of which I use) to be a bit more "looping"-friendly in the case of those that do, plus the normalization was a bit off on quite a few of them.

Yeah experimenting is the key, it's not always so easy to make the scripts do what you want, as you could see.


Yeah, tell me about it. The worst part is at work, I can't test anything. All I can do is just play with the code and hope it works right when I get home >.<

By the by... another random question. I'm assuming that you used the daedric and dwemer markers solely so you wouldn't have to list a pc->getcell for each one? The only part that really confuses me is the function of the xn_stop1 variable... you seem to have attached it as a condition for every main cellget in the towns and region scripts, yet it seems to serve no purpose.
User avatar
Jhenna lee Lizama
 
Posts: 3344
Joined: Wed Jun 06, 2007 5:39 am

Post » Sat May 28, 2011 5:13 pm

EDIT: I made it quicker than I thought, here a new plugin with fixed (I hope) scripts. Now I don't get errors in the CS anymore. Let's see if something will change for you.

http://www.4shared.com/file/j3ONjy67/BMS_UPDATE_v173.html

Note1: I didn't test it deeply yet. Something may have been broken but for what I could see so far it works fine (well for me at least).
Note2: Reloading a save where version 1.7.2 were loaded, and equipping the cube I got a CTD. I solved uninstalling and cleaning the save with WM. I think that it didn't like the new changes made to the music menu scripts (or perhaps was just a coicidence, but I don't think).
Note3: The GhostGate fix is already included in this plugin. Uncheck the other one before trying.





Indeed, indeed. I believe I've narrowed down the problem , except I'm not sure what to do about it. I still have my one startscript. It has a doonce section to stop all of the main scripts and doonce section following that to start all of the main scripts if they're stopped.

To be clear:

begin One_Script_To_Rule_Them_All

>your script>

Game works fine when I load initially, but complete silence when I reload, no matter where I go.


Try to add this to your startscript:

if ( doonce == 2 )
StopScript One_Script_To_Rule_Them_All
set doonce to 0
endif

Without this he could still find doonce set to 2 when you reload.

If I place a "streammusic" command in that second doonce set, that music will stream on a reload, but nothing else will work.


Strange, that block shouldn't work on a reload. Unless I'm missing something (and probably I am).

However, if I move the command over to the music script (telling it to run only if the doonce short from my main startscript has been incremented), it will no longer play. Even more interestingly, showvars tells me that the music script is running, xn_play is set to 0, playing is set to 1, and the timer is running. I also checked to make sure that the appropriate circumstances for music to play ( xn_town == 1 in this case) was triggered. Nothing. The music script just... doesn't work on a reload.


Even more strange. With these values set you should have music restarting over and over. It shouldn't be completely silent. Check the music script and you can realize that. With xn_play set to 0, a random value is chosen, "playing" is set to 1. Then StreamMusic is executed, xn_play is set to 1 and playing is set to 0 until the timer reaches its value. In this case, something is continuously setting xn_play to 0.

EDIT: yeah, no stability problems if I added the donaldduck variable to your unedited mod. Also tried it with goofy, mickey, and pluto and got the same results.


This confirmes that the StreamMusic function has actually something to do with your crashes using my mod. Uhmm..

I forsee another few days of cleaning up the code and polishing it, but by the time I get off shift for the week (and for the year, for that matter), I should be all ready to go. Like I said before, you're free to have my version for whatever you want to do with it (package it as a "lite" version, whatever). I should also mention that I've edited your tracks (many of which I use) to be a bit more "looping"-friendly in the case of those that do, plus the normalization was a bit off on quite a few of them.


I thank you for your offer, but I couldn't. First, I'd not call it a "lite" version, rather a "different" one. As you said you hadn't so many improvements regarding performance (I'm not talking about stability). And I think the reason (sorry if I sound a bit too immodest) is that the mod now is not heavy at all. Second, yours is mainly my mod with preset features, that you cannot change, and with music that will be played in different circumstances. It is only one of the possible configurations. I prefer to keep mine with configurable features. However I'd be glad to see your work when finished.

By the by... another random question. I'm assuming that you used the daedric and dwemer markers solely so you wouldn't have to list a pc->getcell for each one? The only part that really confuses me is the function of the xn_stop1 variable... you seem to have attached it as a condition for every main cellget in the towns and region scripts, yet it seems to serve no purpose.


First answer yes. Concerning the xn_stop1, it's set to 1 when you enter a Daedric Shrine (at least). Keep in mind that "xn_stop" vars are uswed to avoid/fix conflicts among cells. However, I realized that that condition is repeated too many times (xn_stop1), I think it's enough to have only one for each region block, freeing a good bit of space. Unless I was trying to do something else doing that, but I don't think.
User avatar
Liii BLATES
 
Posts: 3423
Joined: Tue Aug 22, 2006 10:41 am

PreviousNext

Return to III - Morrowind

cron