Problem With Mage AI

Hello,

My install has a serious problem with enemy mages' AI. They will never move or use their weapons and if they run out of spells they will just stand still doing nothing at all.

According to SCS (and my usual experience), mages should move around the battlefield and attack between castings but this current behaviour is even less sophisticated than unmodded bg.

I have tested this with Bentley mirrorshade, tarnesh, Ramazith and Oberan from the twisting with the rune mod and all have broken AI.

I don't have any other AI mods other than SCS so what on earth could be causing this?


Comments

  • edited September 12
    There is no obvious error in your log

    SUCCESSFULLY INSTALLED      Initialise AI components (required for all tactical and AI components)
    SUCCESSFULLY INSTALLED      Smarter general AI
    SUCCESSFULLY INSTALLED      Smarter Mages
    SUCCESSFULLY INSTALLED      Smarter Priests

    So SCS is there. You have the outdated CtB mega version (not updated for 2.6), which may add some spells and IDS files that interfer with but I cannot confirm that this is the reason (that version of mod is so behind that it makes no sense anymore to analyse this in an EET 2.6 content.)

    Otherwise, all mods are installed correctly.

    You would need to provide an area code where such encounters happen and then identify the cre-files and their scripts + spells as they are in your game (using Near Infinity) to see where the issue may be.
    Attaching a save from such an encounter may contain a clue.
  • Okay, thanks for this advice. I am not very experienced with NI but I will make the attempt and report back if I find anything.
  • Hi @Roxanne.
    I have tried an install with only SCS & Ascension and found that the problem persists. So it seems the issue is SCS itself.

    I have tested with a mage in BG2 and looked in NearInfinity but I didn't find anything strange though I don't have a lot of knowledge about scripts I'm afraid.

    To summarise what I'm seeing, mages in the game will cast spells but will make no attacks or movement actions, only standing in place and doing nothing when they run out of spells. IRETHF05.CRE(Assassin) in AR0603(Irenicus Dungeon Level 2) demonstrates the problem.
    I have attached a save and screenshots from the in-game debug dump.

    Do you have any advice that can help me fix this?
  • edited September 12
    The one in your example works like this, even without mods. She has no weapons or other equipment but her spells. She seems to be intended this way after the encounter she had with the vampire. Although she is hostile red, her script says she will not attack. SCS only provides her with better spellcasting abilities but does not remove her other scripts.
    So, we need another example, this one seems to have no problem.

    You can see that in waitpc2.bcs which is specifically assigned to her - this is an original game script.
  • oh I'm sorry about that, I didn't realise.

    Here's some examples with Tarnesh(save g) and Ramazith(save y) Both equipped with  STAF01 & Ramazith should create Minute Meteors too but neither will use their weapons or move around the battlefield as is usually SCS behavior.

    Tarnesh is easiest to demonstrate what I'm seeing as he soon runs out of spells then he will only stand still.


  • If you see scripts that start with dw#......then those are from SCS. The others are from the original game (if any).
    Just an observation, in my game Tarnesh has script dw#mg697 and Ramazith has dw#mg606
    In none of those they would attack the party if out of spells. That condition is left to the original game behaviour to resolve, it is not handled by those SCS scripts.
    Did you check the difficulty level you selected for the game?
  • I'm using Insane difficulty. I think the different numbers is because SCS applies random kits to mages? though I'm not sure.

    As a comparison, this is Tarnesh from an unmodded BG also on Insane difficulty. in this one he will attack when spells are finished.

    I don't know what could be causing this if it's not SCS but the difference is very prominent.

    Any ideas?
  • As an addition, I tested Ramazith in unmodded game and he also uses his weapon. Unmodded both have a script called wtasight which the mod versions lack. I have no education of Infinity Engine scripts but is it possible that this is the attack script? I am unsure how to test to confirm that, unfortunately. But if it's true then maybe the modding process is removing that script somehow?
  • 1)  The original scripts have this at the bottom as the option when all spells etc are used
    IF
    See(NearestEnemyOf(Myself))
    THEN
    RESPONSE #100
    Attack(NearestEnemyOf(Myself))
    END
    SCS has this instead
    IF
    ActionListEmpty()
    THEN
    RESPONSE #100
    NoAction()
    END
    If you replace it in the scripts you have identified then you might get the desired behaviour.

    2) An option in game would be with console - you can hit pause and apply in game as soon as you see the mage
    C:Eval('ChangeAISript("Mage2",RACE)')   Your cursor must be on the character when you hit enter.
  • Well I have tries editing the script and they will now attack as expected. Thanks for the tips. Though in my game this problem affects every mage in the game so it feels more like an issue with the github version of SCS.
  • For my final test I have attempted a manual installation of SCS alone without EET or any other mods. I still got the same problem. But since I can't find anyone else who has this issue with SCS v33 it looks like it's only happening to me.

    I'm completely stumped.
  • Green said:
    For my final test I have attempted a manual installation of SCS alone without EET or any other mods. I still got the same problem. But since I can't find anyone else who has this issue with SCS v33 it looks like it's only happening to me.

    I'm completely stumped.
    So am I. We can doctor around with the symptoms but I do not see the source of your problem. Can the enemies see/detect your character, there may be a kit that hides him?

  • I have looked at G3 forums and it looks like this is a known bug with current SCS.

    There's a hotfix explained here: http://www.gibberlings3.net/forums/topic/31468-sword-coast-stratagems-v33-now-available/page/24/?tab=comments#comment-293929

    Though it looks like it needs to be done after extraction but before installation.
  • This means to just put the desired actions (as from the linked mod version) into the (currently) empty standard_mage.ssl?

    Can be done as an interim in install tool and then let everybody complain about not using original bugs....
  • Yes, but this bug is annoying and it has been several months since I have to do this manipulation at each installation. I hope that with the return of DavidW it would be corrected but for the moment the patch has still not been made

  • I have added the proposed fix to Install tool but currently have no means to test it myself. Just from my experience it looks like it should work but I am not perfectly sure with the special coding used in SCS. At worse, hopefully my attempt is in vain but not damaging anything...

  • Roxanne said:

    I have added the proposed fix to Install tool but currently have no means to test it myself. Just from my experience it looks like it should work but I am not perfectly sure with the special coding used in SCS. At worse, hopefully my attempt is in vain but not damaging anything...

    Well I attempted an install where I manually applied the fix to the ssl and initial testing looks good. If install tool now does the same thing automatically then I imagine it should work. 
Sign In or Register to comment.