Jump to content

Faster Script Updating


Recommended Posts

I am going to make an update of my Golden Perch Inn mod to fix a few errors and bugs that were brought to my attention. But one potential issue that I encountered was the necessity for my in game scripts to take a few seconds to update their values. Most of my script updates come from dialogue result scripts, and they work just fine, but I noticed that if I make two or more value updates in the same dialogue session (or when the game runs the quest script and the player's action moves quicker than the script) the game sometimes does not register the updates properly. Either it skips the value or updates it when the value should be something else. I know that this is caused by not giving the game enough time to process the values, and I myself have no issue with it since I know where to allow the game more time to process the value, but for other players of the mod this may be problematic for them.

 

Is there a way to make these dialogue and quest scripts update faster so it will register the proper values at the proper time, or is it just a game limitation that I have to make other players aware of while they're playing the mod?

Link to comment
Share on other sites

  • 4 weeks later...

Just avoid keeping the questscript accelerated all the time, mainly if it is big and consuming. Consider putting the triggers on the objects, actors or activators in general. Another way to refine control is setting flags instead the proper trigger, this can make easier to force the trigger only when a set of events/conditions occurs. BTW, try reducing the quest script to the role of controlling events and processing the actual event there only if absolutely necessary.

 

Gamemode blocks should be kept as small and quick as possible, mainly in a quest script.

 

If the quest script tend to be complex, careful with the variables. Different from local variables they are stored in the save game and not by specific identifier but by their position. Lets say var1, var2 and var3 were stored in the save game in that order... later, for some reason the order is changed. When the savegame is loaded the engine becomes confused and takes the wrong values, making the script unpredictable and maybe even crashing the game (for example if a ref is mistaken by a word variable).

Edited by nosisab
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...