I dunno if it helps in this situation, but it's pretty simple to reload the "\Location\Your Basement\MissingGirlIsYourSlave.ve.xml" event in the debugger, which would spare
@Abracine from having to foray into the VEE. However, I don't fully understand the context of variables inside events, which is why I'm unsure if this would be helpful. Does reloading an event necessarily reset variables that the event tracks? I don't have a save to try this out with, otherwise I'd just give it a shot myself.
Doing this would probably mung up the entire kidnapped student event chain, but that's better than losing the whole game. If this did work, there're probably only a few other events that would need reloaded to start the event chain over, but I don't know enough about the quest to be able to guess which those would be.
Yes, reloading the event code does reset the context variables. However, the 1st step of the TRY block of the event (and nearly all the events in the game) starts with a check whether this event is scheduled. This complicates things.
All the codes in the Events folder are loaded within it's own container. These containers have their own internal IDs. The game scheduler uses these IDs to track which container to run and when.
When you reload an event code, the game creates a new container and assign new ID to it. However, the game scheduler won't recognize this new ID, hence the check whether this container (hence this event) is scheduled, will always fail, and the event won't run. The old version won't run either, cos it already clobbered by the new reloaded code.
The way to resolve this problem you can either:
- Remove the "if scheduled" check from the TRY block, but you now have to deal with the event always running, even when it's not supposed to. Hence you must add in new code to ensure this doesn't happen.
- Leave the code as it is, but write a new code to make the game scheduler to recognize the new ID. This is the safest way, but you now have to decide how to trigger your new code in the game. One method is creating a new button which you can click somewhere, or make a "smartphone app", which framework already there for you to extend.
Right now, what I did is approach #2, but I made a new button in the lower left corner, right beside the Map button, so I can access my hacks anywhere I please. For that I'm mucking around with NativeEvents, a special kind of event called directly from the game engine, which actually a risky business. I still assessing the impact of it to the normal operation of the game.
BTW, while I'm reviewing the event codes, I kept notes of what code doing what. I have such notes for at least nearly all the teacher's quest and nearly all of the PTA quests. It's for v1.9.4. I'm in the middle of updating it to v1.9.5. I've posted a few of them here if you're interested. Just search for my posts in this thread.
The gist is, nearly all quests uses a bitfield/flag variable to track progress. If you want to reset a quest, you don't have to reload all the codes related to the quest, just reset the flags and you're done. The beauty is, you don't have to deal with the scheduler problem, and it can be done with minimal code. The problem is knowing what flags pertain to what and where it is stored.