This post started out as a request for help, but as I helped myself and eliminated possibilities, new knowledge came out. I have a block on top of BALDUR that inserts the scripts for the engine creature, OnCreation. These scripts run parallel to BALDUR and do many different things. While the inserting and the scripts themselves work, what follows in BALDUR behaves differently, and really not properly, with this addition. This was the reason I got wrong results while testing for spell states. This is the top of the file:
IF
OnCreation()
THEN
RESPONSE #1
ChangeAIScript("BOVERRID",OVERRIDE)
ChangeAIScript("BCLASS",CLASS)
ChangeAIScript("BRACE",RACE)
ChangeAIScript("BGENERAL",GENERAL)
ChangeAIScript("BDEFAULT",DEFAULT)
ChangeAIScript("BSPECIFI",SPECIFICS)
SG("COLOR_TAGS",1)
Continue()
END
IF
True()
THEN
RESPONSE #1
DisplayStringHeadOwner("DAGG01",16499) // Coo-coo
END
The second block is there for testing. It is supposed to display a string over the head of party members with a dagger. With the above block in place, the displaying only happens once. Without it it's continuous, as should be with the True() trigger. This skewing even happens if I move the insertion block to the bottom of BALDUR. Other blocks, in the middle of the script, do trigger, if (in the arrangement above) I put Continue() after the display action. Otherwise they do not trigger, as they should not with this True()-starting block. The True() block should replay forever and keep the engine from getting to those lower lines. And that is how it seems to be, except True() only triggers once.
I've removed the ChangeAIScript lines, and then True() started cycling normally. With them, it does not repeat even when there is Continue(). Apparently the insertion for the engine creature prevented the True() block from working normally. But I realized that not all of the insertions stopped the actions below. Elimination showed that insertion at every level except DEFAULT (ChangeAIScript("BDEFAULT",DEFAULT)) was harmless, but this one blocked the rest of the script. This means that what we know as BALDUR.BCS is the DEFAULT-level script of the engine creature. Naturally, if I was sticking in a new script, the remainder of the old BALDUR would not trigger. It's a wonder it triggered once, probably due to the speed of all this. In light of this everyone should not insert scripts at the DEFAULT level and be aware that all the other scripts are higher in the hierarchy and will take precedence over regular BALDUR content.
BALDUR itself, with all of the regular content from previous mods and your mod, could be inserted at the OVERRIDE level and moved out of DEFAULT; I don't see why not. I would like to know whether these changes to the engine creature would be properly uninstalled? Yes, the version of BALDUR used is going to revert, but the engine creature, after all, is some real guy without an avatar sitting outside the map and dreaming this world like Carroll's Red King - running all of these scripts, of which BALDUR is really on the lowest rung and the higher rungs are yet empty. And if this demiurge gets recorded in the GAM together with his world, will the old script arrangement be restored when the King wakes, that is, when the mod is uninstalled?
Edited by temnix, 02 March 2018 - 10:03 AM.