Please note that new user registrations disabled at this time.

xSeries AI script 1.1 beta release

This forum is to be used for all discussions pertaining to BioWare's Baldur's Gate II: Throne of Bhaal expansion pack.
Post Reply
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

xSeries AI script 1.1 beta release

Post by Xyx »

I wrote an AI script for the entire party, and I need beta testers!

Excerpt from the ReadMe:
I wrote these scripts for personal convenience. These highly sophisticated scripts automate tedious parts of the game, leaving the cool stuff to the player. Highlights include healing the party at the press of a key, configurable fighting styles, smart use of Stoneskin, Iron Skins and Melf's Minute Meteors, stealth mode, turn undead mode, and automatic trap finding. The AI of several summoned creatures has been rewritten to make better use of their abilities.
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.
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
User avatar
galraen
Posts: 3727
Joined: Sat Nov 25, 2006 3:03 am
Location: Kernow (Cornwall), UK
Contact:

Post by galraen »

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,
If you order a character to do something, the script will generally not interrupt.
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.
[QUOTE=Darth Gavinius;1096098]Distrbution of games, is becoming a little like Democracy (all about money and control) - in the end choice is an illusion and you have to choose your lesser evil.

And everything is hidden in the fine print.[/QUOTE]
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

galraen wrote: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!
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?

galraen wrote: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!

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.
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
User avatar
galraen
Posts: 3727
Joined: Sat Nov 25, 2006 3:03 am
Location: Kernow (Cornwall), UK
Contact:

Post by galraen »

It worries me that he used his staff.
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.
Are you absolutely sure this is what happened?
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.
[QUOTE=Darth Gavinius;1096098]Distrbution of games, is becoming a little like Democracy (all about money and control) - in the end choice is an illusion and you have to choose your lesser evil.

And everything is hidden in the fine print.[/QUOTE]
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

galraen wrote:he didn't have a missile weapon equipped as he had no skill in any t that point.
You could set his style to Guard so that he won't rush into melee.
galraen wrote:Definitely.
That's seriously weird. I'm 99% positive that scripts do not interrupt spellcasting. I gave Viconia this uberbasic script:

Code: Select all

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?
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
User avatar
galraen
Posts: 3727
Joined: Sat Nov 25, 2006 3:03 am
Location: Kernow (Cornwall), UK
Contact:

Post by galraen »

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?
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.
[QUOTE=Darth Gavinius;1096098]Distrbution of games, is becoming a little like Democracy (all about money and control) - in the end choice is an illusion and you have to choose your lesser evil.

And everything is hidden in the fine print.[/QUOTE]
User avatar
Stworca
Posts: 1223
Joined: Tue Aug 11, 2009 8:20 am
Location: D, NL & PL
Contact:

Post by Stworca »

Xyx wrote:That's seriously weird. I'm 99% positive that scripts do not interrupt spellcasting.
They do. But only ones with certain prefixes.
[url="http://www.gamebanshee.com/forums/baldurs-gate-ii-shadows-of-amn-9/guide-to-tactical-mods-spoilers-116063.html#post1068546"]BG2 tactical mods guide[/url]
What? You're still here? Go write a review![url="http://www.gamebanshee.com/forums/rpg-user-reviews-118/"]Here[/url]
Insane Ironman BG2 let's play! [url="http://www.bay12forums.com/smf/index.php?topic=81201.msg2140894#msg2140894"]Here[/url]
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

galraen wrote:he kept switching back to fists (being in close combat), so I had to disable the AI.
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.
Stworca wrote:They do. But only ones with certain prefixes.
Could you expand on that?
[url="http://www.sorcerers.net/Games/BG2/SpellsReference/Main.htm"]Baldur's Gate 2 Spells Reference[/url]: Strategy, tips, tricks, bugs, cheese and corrections to the manual.
Post Reply