Script change persistence, Player1 script changes persist |
The Black Wyrm's Lair Terms of Use | Help Search Members Calendar |
Script change persistence, Player1 script changes persist |
Jun 9 2016, 05:22 PM
Post
#1
|
|
Master of Paradox Forum Member Posts: 248 Joined: 7-April 15 From: Canada |
I have tested this, and ChangeAIScript("...",OVERRIDE) for Player1 persists across savegame, area transitions, and chapter transitions. I have yet to check what happens at shift from SoA to ToB, but I believe that will also work. It is probably due to Player1 not having a pdialog.2da entry to be reset to. The OVERRIDE script behaves as usual whether party AI is on or off, which was the problem with trying to use the default script. I am planning to use this instead of appending scripts to baldur.bcs and baldur25.bcs, which I have seen warnings against doing.
Now, this is really a resource that should be shared with all modders, which means adherence to some standard protocol. What I propose is Player1.bcs for SoA and Player1T.bcs for ToB. To that end, I have introduced the scripts in: 1) AR0602.baf - IF G("RjaliGen",0) THEN RESPONSE #100 ActionOverride(Player1,ChangeAIScript("Player1",OVERRIDE)) SetGlobal("RjaliGen","GLOBAL",1) Continue() END 2) AR4000.baf - IF G("RjaliGenToB",0) THEN RESPONSE #100 ActionOverride(Player1,ChangeAIScript("Player1T",OVERRIDE)) SetGlobal("RjaliGenTob","GLOBAL",1) Continue() END In setting up the scripts themselves, I have used the following WeiDU code to avoid conflict with prior usage: // Establish Player1.bcs and Player1T.bcs ACTION_IF FILE_EXISTS_IN_GAME ~Player1.bcs~ THEN BEGIN EXTEND_TOP ~Player1.bcs~ ~Rjali/Scripts/SOA/Player1.baf~ END ELSE BEGIN COMPILE ~Rjali/Scripts/SOA/Player1.baf~ // Create Player1.bcs END ACTION_IF FILE_EXISTS_IN_GAME ~Player1T.bcs~ THEN BEGIN EXTEND_TOP ~Player1T.bcs~ ~Rjali/Scripts/TOB/Player1T.baf~ END ELSE BEGIN COMPILE ~Rjali/Scripts/TOB/Player1T.baf~ // Create Player1T.bcs END Some consensus should be reached for naming of the GLOBAL triggers, but I am hanging out here all on my own for the moment. -------------------- nullset
|
|
|
Lo-Fi Version | Time is now: 12th November 2024 - 01:52 PM |