xSeries AI script 1.1 beta release

Discussion in 'Baldur's Gate II: Throne of Bhaal' started by Xyx, Mar 11, 2012.

  1. Xyx Initiate

    Message Count:
    3,104
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    The Netherlands
    I wrote an AI script for the entire party, and I need beta testers!

    Excerpt from the ReadMe:
    Installation instructions, a Quick start section and extensive documentation of the many features have been included in the ReadMe.

    If you try it, please let me know what you think! I would love to hear suggestions, though I will not add support for anything beyond the vanilla game and the fixpack.

    Note that this is a beta version, tested by me alone (though quite extensively.) Features and file hosting are still subject to change.

    Attached Files:

  2. galraen Alchemist

    Message Count:
    3,558
    Likes Received:
    9
    Trophy Points:
    2,215
    Gender:
    Male
    Location:
    Kernow (Cornwall), UK
    I've just started another game (had too many problems with mods, the principal culprit being Check the Bodies, again) so downloaded your script.

    So far nearly everything is as advertised and working very well.

    However,
    isn't working as advertised. Upon entering the back room of the Copper Coronet, where you get attacked by two mages and three fighters, I instructed my mage to fire a magic missile at the nearest mage, but instead he ran off to hit one of the fighters who was if anything further away, with his stick, resulting in him being zapped by the mage he was supposed to be suppressing!

    Generally though, very impressive so far.
  3. Xyx Initiate

    Message Count:
    3,104
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    The Netherlands
    I am sorry to hear that. This underlines that I need beta testing feedback. Thank you for providing me such feedback!

    There is a corner case where the script will indeed interrupt orders. The script has the characters call for help whenever they attack. If a character does not see any enemies but can hear someone calling for help (hearing radius is the same as sight radius for this purpose), he'll rush over to help out. Since you were fighting in narrow corridors, this could have been the case. There will be a 6-second period in which the character will interrupt orders to attack.

    As with most issues, this was a choice between evils. The character needs to be allowed to interrupt this move order. Otherwise, he'll move all the way up to the person crying for help before responding to the situation. This is especially bad when your archer runs up to your tank. This left me with three alternatives:
    1. Just standing there while party members get beaten up around the corner. This would be very annoying. It usually takes a while before you realize this is happening, meaning you couldn't rely on the script to handle even simple fights in cramped conditions.
    2. Moving all the way up to the person calling for help before responding to any threats. This may cause your archers and mages to run into melee if they respond to one of your melee fighters.
    3. Moving up but allowing the script to interrupt the move order for a short time. Unfortunately, this also allows the script to interrupt any orders the player might give during that time.
    What I'll try is canceling the "may interrupt" timer when an enemy is sighted. There is no need for the timer to run past that moment anyway. This should prevent most such interruptions.

    Good catch! Thanks!

    By the way, did your mage have a ranged weapon available? It worries me that he used his staff. Did you set his combat style to Archer? Press to change the style until he says "Archer". That should keep him from trying to whack people with his staff.

    EDIT: Now that I think about it some more... scripts don't run while casting spells, so I really don't see how casting could have been interrupted. Are you absolutely sure this is what happened?

    I squashed a targeting bug in the 1.1 version that occasionally caused people to skip the nearest enemy for no apparent reason. This could have been it. It's very hard to say.

    Targeting is one of the most difficult aspects of scripting. The 1.0 version used really basic targeting for that exact reason. However, I then got tired of seeing my characters pass up chances to finish off Near Death enemies, and I went for something fancy. Slightly too fancy, as it turns out, though the 1.2 version still has 99% of the targeting that I wanted.

    I'll upload the 1.2 version soon. It contains mostly convenience tweaks, such as Spell Sequencer reminders and being able to specify the type of healing potion that the script may use.
  4. galraen Alchemist

    Message Count:
    3,558
    Likes Received:
    9
    Trophy Points:
    2,215
    Gender:
    Male
    Location:
    Kernow (Cornwall), UK
    It was all he had at the time, he didn't have a missile weapon equipped as he had no skill in any t that point. He was a fighter I was dualling to mage and hadn't at that point re-activated his fighting skills, so I wasn't paying too much attention to that aspect. As a mage I'd only spent skill pooints on two-handed weapon style.

    Definitely. I haven' been using the script, or any script recently. For some reason I'm having lag problems when scripts are enabled, so only have scripts enabled briefly after resting.
  5. Xyx Initiate

    Message Count:
    3,104
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    The Netherlands
    You could set his style to Guard so that he won't rush into melee.

    That's seriously weird. I'm 99% positive that scripts do not interrupt spellcasting. I gave Viconia this uberbasic script:

    Code:
    IF
    	True()
    THEN
    	RESPONSE #100
    		Attack(Player1)
    END
    I then had her cast Animate Dead, which takes a full turn. She cast it just fine, then resumed trying to bash my brains in.

    Are you sure the Magic Missile was actually interrupted? Did your mage begin to cast it and then abort it, causing you to lose the spell? Or did he never even begin to cast it?
  6. galraen Alchemist

    Message Count:
    3,558
    Likes Received:
    9
    Trophy Points:
    2,215
    Gender:
    Male
    Location:
    Kernow (Cornwall), UK
    Probably the latter.

    I ran into another slight annoyance, which is probably unavoidable this morning. I was fighting a greater troll in D'Arnise keep with a solo Monk I was experimenting with. He took the troll down with his fists and I then switched weapons to the darts I'd equipped to finish it off. Unfortunately he kept switching back to fists (being in close combat), so I had to disable the AI. As I've said I doubt that this is avoidable, I'm sure any script would have behaved the same way. So this isn't so much a glitch report as a heads up for anyone using any script.
  7. Stworca Scholar

    Message Count:
    1,226
    Likes Received:
    2
    Trophy Points:
    565
    Location:
    D, NL & PL
    They do. But only ones with certain prefixes.
  8. Xyx Initiate

    Message Count:
    3,104
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    The Netherlands
    That is quite unavoidable, and to do otherwise would be suicidal in most situations. Using a ranged weapon in melee gets you -8 to hit and gives your opponents +4 to hit and +4 damage. To avoid this, the script will always switch to a melee weapon at a range of 4 feet (melee range).

    If you set your Monk to the Soldier style he'll prefer to use his fists on enemies within 10 feet (1/3 sight radius), so if you make him back off a bit he should switch to the darts automatically.

    Could you expand on that?

Share This Page