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.