Timer variables not reset on character import, affects CHARNAME’s AI
|Status:||Closed - Fixed||Start date:||10/13/2018|
|Classification:||Public Item||Due date:|
|Target version:||Public Bug Reports - Next Update|
|Found In Version:||Public Bug Reports - 126.96.36.199|
When importing a previously played character into the start of a new game, certain timer variables aren’t reset, spoiling the AI’s use of certain character abilities until enough in-game time has passed. I noticed it first trying to get the AI to use Hide in Shadows on a level 10 thief I imported. I found a detailed explanation for the symptoms on the Beamdog Forums.
Internal report #39009
The Advanced AI script is BDDEFAI, and the problem is caused by a timer called BD_CAST. I don't fully understand how timers work, but it seems exporting to a new game resets the game's current tick. It looks as if the timer stores an absolute tick in the LOCALS of the creature, not a relative one. Thus, when you export a character, the timer is now set to a very large, very far in the future time.
The BD_CAST timer is not the only timer that goes haywire when a character is exported. In the Advanced AI script alone, there are 15 timers which can become stuck upon export.
BD_Cast; Controls one-round casting delay
BD_CLTM; Zone Of Sweet Air
BD_Dharm; Defensive Harmony
BD_DInv; Detect Invisibility
BD_HIDE; Hide in Shadows ability
BD_RParal; Remove Paralysis
BD_SCLAR; Spiritual Clarity
BD_Support; Controls delay between buffing-spells
BD_Wand; Controls delay between wand usages
If your character has done ANY of these things, at ANY point before exporting, you will have to reset the corresponding timer to zero in order for that function to work again.
There are workarounds and fixes posted in the forum thread, but all of them require access to the console command bar. I play on iOS, so can’t use them. According to the thread, this may affect BG2 and ToB as well, I’m not sure.
#1 Updated by Richard Hilton about 1 year ago
- Status changed from New to Needs More Info
You can export a save via long-tap of quicksave if you want to fix it for your game or require assistance doing so.
Presumably you are playing through BG:EE multiple times with exported and re-imported characters. It may be the case that only SoD and BGII:EE check these as that would be the expectation of where imported characters will be used, but we should allow for replays of the first game so if you can confirm we'll get this reported.