Jump to content

Need some help with the Advanced AI in bg2ee

Recommended Posts

I'm using a character that I started in bg1ee, there I started with the advanced AI and it worked perfectly (my character is Fighter/Mage/Thief) in the sense that after every rest the char-name would cast the available defensive spells on herself and use the available offensive spells when needed. Then I changed the script to some other (not 100% sure but I think it was to BPFT-MGT) script, when I changed back to the advanced script everything is working EXCEPT spell related settings, I have "Use Offensive Spells" and "Use Defensive Spells" enabled but the char-name never uses them, it was so in bg1ee and it transferred so to bg2ee, the spell setting although enabled does not work (on this character only, they work perfectly on characters created in bg2ee as opposed to my imported character). Please help me reset the Advanced AI so everything will work as it should.



Link to comment

Are you sure the AI is active ? Aka the lantern light up/active in the right lower corner... Also the AI's are very spell dependant, and the Big Picture mods AI's action buttons only work when you have that AI set, and active... aka you can only have one at a time. The import export has not much to do with this, except perhaps that the AI is set to a non existing .bs file, which will then make it inactive.

Link to comment

The AI is definitely active, I don't have the Big Picture mods (or if I do, I have no idea that this is their name), I am referring to the smart AI (Advanced AI) from Sword Coast Stratagems. As I've explained my char-name is a fighter/mage/thief and the AI is set to detect traps, use melee weapons, cast offensive and defensive spells. She detects traps just fine and if I set the AI to "hide in shadows" she stops detecting traps and does just that (hide) but she is NOT casting any spells, offensive or defensive, particularly she's not casting the stone skin spell on herself (unless I do it manually of course).

This is the list of the scripts I have (and I don't know how to check to what script the AI is set):


Link to comment

I'm just guessing here, but could be that the "detecting trap" is preventing the spellcasting from happening? As far as I can tell, they only cast spells if they are idle. If the character is already detecting trap, casting spells would cancel that, so they won't do it.


Or you could try reactivating the spellcasting with hotkey. In my installation the key is S. Try hitting S a few times and see what happens.

Link to comment

The S key does nothing, as to the "detect traps" interfering with the spell casting, I had the same char-name in the BG1ee and there before I changed it she would cast spells AND detect traps, the inability to cast spells came only after I changed the script to something else and then returned to the "Advanced AI". Just to be sure I have created a new char-name fighter/mage/thief with the same Advanced AI options enabled and sure enough the first thing this new character did was cast stone skin on himself.

Link to comment

That's strange, cause if it's really SCS script, there's gotta be a hotkey to switch between several options, unless it's different now, with new SCS versions and the enhanced edition and such.


This might sound pointless, but you could try different keys, on both your old char and a newly created char, see if there really is a hotkey. Also, changing to a different script then back again has worked for some, afaIk.

Link to comment

Thanks to all that tried to help, I'm sure it's something to do with the script and it's a pity that no one knows of a way to reset the script (or that it's not possible to do it), everything that you suggested, I tried but nothing helps, I even tried to change the script, play some and then change back to the Advanced AI, it doesn't help, my char-name will not auto cast spells!

Link to comment

I don't think this is something that is "hard to fix" per se, it's just that we can't tell what *exactly* is the problem here to begin with, just by listening to your description. And guessing is not all that effective.


If you want to handle this yourself, grab NearInfinity from here, https://github.com/Argent77/NearInfinity/releases, drop it in your baldur.exe folder, run it, and open up the "Save" section. Open any save with your old char, open BALDUR.GAM, then open up party member CHARBASE - that is your character. Then you can see what script he/she is using. If you look into the script, you can probably tell what is going on in there.


OR, if you throw me your save file, I could take a look at it for you.

Edited by ABlake
Link to comment

So it looks like this: your char in that save is running two scripts called BDPLAYER and BDDEFAI - the first one on top (so it takes precedence) then the second one. Normally, when you change your char AI, that AI file will be placed in the second level (which means in place of BDDEFAI), and nothing goes to the top level. It could be that the reason you have 2 scripts on 2 different levels is because the game is trying to handle both the "rogue" part and the "mage" part of your char at the same time. Or it could be some entirely different reason.


I don't have those scripts and don't know which mod they come from, so I have no idea what's with them. Maybe the one on top is getting in the way of the second one? Maybe not.

So, if you send me your most recent save (the save you're going to continue with), and another save with a newly created char with all AI properly set up, I could take a look at both and compare them, then I'll change the AI of your current char for you so that it looks like the new char.


All the scripts that start with "BP" come from Big Picture Series Party AI, btw.

Link to comment

Here's your new save: http://www.mediafire.com/file/5ee642yz6prue9d/000000001-Lorelai+Lee-Quick-Save-2.rar


The one you have in TOB has only one script which is BDDEFAI, as I mentioned above. There is nothing above it. So I would say that it was the file BDPLAYER that was getting in the way of the other one. I thought this was a rather far-fetched possibility.


So I simply removed the top level script from your char in your last save. I still don't know what this BDDEFAI script does, exactly, but at least it is the same one your new TOB char has. I zipped the entire save folder, but what you really need is only the BALDUR.GAM file, cause everything else is the same. So you can just copy the new BALDUR.GAM into your last save folder (the one you sent me) and overwrite the old one and that should do it.


EDIT: Of course, as per safety guideline, backup your old BALDUR.GAM before overwriting. But I don't believe there would be any problem.

EDIT2: that character level is insane. How is that XP amount even possible...

Edited by ABlake
Link to comment

LOL, thanks, as for the level, I removed the level cap and I played all the way until spellhold solo then added Imoen and did everything afterwards that did not absolutely required a new NPC (Rasheed and Neera) , also I used all my gold to buy freedom scrolls for 370GP each from adventure's mart (I had only Imoen as NPC) and then I opened my save in EEKeeper, multiplied number of freedom scrolls I had by 9000, divided by 2 and added the result each to my char-name and to Imoen and deleted the scrolls from my inventory and that's it :)

Edit: sorry to say that it did not solve the problem, she is NOT casting spells (I deleted my save and used yours).


2nd Edit: I checked with NearInfinity your save and the save of the new character in TOB, as far as I can see (and understand)

the new TOB character is listed as having "Default script DPLAYER3.BCS" and the char-name from your save is listed as having

"Class script BDDEFAI.BCS" and also Default script DPLAYER3.BCS
can you please tell me how to remove a script with NearInfinity? maybe if I remove BDDEFAI.BCS the problem will be solved since the TOB character does cast spell with only the Default script.

Edited by c1a1
Link to comment

The default level script DPLAYER3 is always there. It is for your main char. It handles certain global stuff, like when you're poisoned by Marek and Lothander in the first game, when the timer runs out and you haven't cured it, your entire party will be killed. Or when you have been infected with lycanthropy and fail to kill Mendas within a couple days, your entire party will change to werewolf. But the first game didn't make use of a global script like BALDUR.BCS like BG2 does, so all that stuff was necessary. In BG2 we have the global script BALDUR.BCS that handles anything global, so in vanilla BG2 DPLAYER3 does *almost* nothing. Either way, it has nothing to do with the AI of your char, afaIk.


I opened up both of the saves you sent me, and I saw the BDDEFAI show up in both of them. The only difference was that the one you currently play has an additional override level script called BDPLAYER. So I assumed that the TOB one was working fine, which means BDDEFAI was the one you wanted, and that BDPLAYER was getting in the way of it. That's why all I did was removed BDPLAYER from your char. As I said, I still have no idea what either of them does (since I don't have them in my install), so I can't really confirm it.


But since you asked, here's how you change the AI of your char.


- Now that you know where to find your saves in NearInfinity, select BALDUR.GAM inside your save folder.

- In the top right corner, it lists "Player Character". Your char is *ORL. Double click that, it opens up a new window called Party Member 0.

- Go to the Edit tab, scroll down to the bottom, then double click the CRE Resource line. It will open up all the data for your char.

- Scroll down to about 1/3 of the way, where you find Level first class, 2nd class, 3rd class, and all the ability scores. Below those you will find the script levels Override, Class, Race, General, Default. The Default one will be DPLAYER3.

- You can change the Class script to whatever you want. Having nothing is the same as selecting NONE for script in the game.

- Once you're done, go back to BALDUR.GAM. Select the Edit tab so you can hit that Save button in the bottom. If you try to exit NearInfinity or navigate to something else before saving, it will ask if you want to save the changes - click Save Changes, then Overwrite.


I suggest you set up a char which you know the script is working exactly as you want. Save that game, then check that save to see what script they are using, exactly. Then assign that script to your char in your main save.


Or, an easier way to do it is to just clear the script from your main char. Then go back in game and set up script for her again. There's no reason for that not to work.

Edited by ABlake
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...