Please note that new user registrations disabled at this time.

gSeries - New PC AI Scripts released - Feedback Wanted!

This forum is to be used for all discussions pertaining to BioWare's Baldur's Gate II: Shadows of Amn.
User avatar
Sarkyn
Posts: 33
Joined: Sun Aug 12, 2001 10:00 pm
Location: Scotland, UK
Contact:

gSeries - New PC AI Scripts released - Feedback Wanted!

Post by Sarkyn »

Hi All,

I've recently uploaded a completely new version of the gSeries of PC AI scripts. The gSeries is a set of advanced scripts designed to be used by the Player Characters in SoA to replace the clumsy and inadequate in-game scripts, and assist the player in making the party and PC's more effective.

Already compiled and ready to run, if you drop these scripts into your SoA games "/Scripts" folder, you can select them for individual characters.

Weeks of work has gone into this latest version (v2.0s) and I'd be very interested in hearing from anybody who uses them in the game. I want all the feedback I can get so I'm posting here in the hope you'll all give them a try and come back and tell me what you think.

Features include:
  • Xyx's Cast-n-Attack Routines to make use of every second of every round effectively
  • 90% of all Wizard and Priest Spells, scripted individually to ensure every spell is made the most use of and not wasted
  • Threat-Level Assessment so the PC's response is always appropriate to the opponents faced, and slowly scales down as the party wins the battle
  • Advanced Targeting routines - skip disabled, held and sleeping targets to concentrate on the enemies that matter
  • Improved Anti-Invisibility Routines
  • Cooperative Healing - never waste a healing spell again due to two healers healing the same person. New version includes Beige-Tangerines better algorithms for Mass-Cure!
  • AI On/Off Switch - simply hit the D key and the AI will turn for an individual character.
  • Auto Un-hide GUI - unhides the GUI (if hidden) when a character needs your attention, and even Auto-pauses the game when the character reaches a certain HP threshold.
  • Potion and Antidote use - including swapping antidote potions between party members to whoever needs them most!
  • Special Anti-Mage routines to selectively use your BREACH and ANTI-SHIELD spells where they're needed most
  • Wand, Rod and Potion use.
  • Hide-n-detect - a tricky timing routine that allows a thief class character to remain hidden while detecting traps!
  • Druid and Polymorph shapeshifting
  • Amusing GoodBerry usage :)
  • Innate Bhaal Powers
  • HotKey(S) - press "S" before a Fight and your spellcasters will summon as many creatures as they can to prepare for the upcoming combat
  • HotKey(B) - Press "B" before a Fight and your spellcasters will cast any Buff Spells they can on themselves and the party (without overlaps!) to make sure you're at your fittest for the upcoming fight
  • Performance Enhancer - saves your CPU when theres not much happenning
  • Turn Undead, but not when theres Party Summoned Skeletons.
Scripts are available from the Files area of the [url="http://groups.yahoo.com/group/bwscript"]Bioware Scripting Mailing List[/url] along with many other goodies for the SoA, IWD, or TOB player.

Links direct to the Scripts Directory:
[url="http://groups.yahoo.com/group/bwscript/files/COMPILED/gSeries/"]gSeries v2.0s[/url]

Note - to peruse and download the files of [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url] you don't have to be a member, and you won't get SPAM from us.

Cheers,


PS. Also to be found at BWScript -
[url="http://groups.yahoo.com/group/bwscript/files/COMPILED/gMinion_v1.5s.zip"]gMinion Series v1.5s[/url] - Better AI for the little people of SoA.
[url="http://groups.yahoo.com/group/bwscript/files/COMPILED/Smart%20Enemies/"]Xyx's Smarter Beholders[/url]
- much, much more.
Cheers,


Sarkyn
Moderator, [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url] - A list Dedicated to Scripting the Bioware Games

Home of:
* the Smartest Beholders on the Net!
* gSeries, better PC AI
* gMinion, better, stronger, faster Summons
User avatar
Laurelei
Posts: 230
Joined: Fri Jun 15, 2001 10:00 pm
Location: Florida
Contact:

Post by Laurelei »

Sounds very impressive, in fact it sounds like your scripts can probably play my characters better than I can :eek:

I'm almost afraid that my pc will begin playing the game when I'm gone and fall in love with Jaheira and move to Jamaica ;)

[ 08-28-2001: Message edited by: Laurelei ]
User avatar
Izgoth
Posts: 238
Joined: Fri Jun 15, 2001 10:00 pm
Contact:

Post by Izgoth »

The scripts are great but there is one problem. the gMage is too agressive. My Mages keep engaging in melee combat all the time. Even with long range weapons they switch to melee and charge in.
User avatar
Craig
Posts: 4996
Joined: Fri Dec 29, 2000 11:00 pm
Location: England
Contact:

Post by Craig »

All it comes up with is like this:
SC
CR
CO
TR
16521 2 0 0 0 "" "" OB
0 0 0 0 0 0 0 0 0 0 0 0 ""OB
TR
TR
16427 0 0 0 0 "" "" OB
0 0 0 0 0 0 0 0 0 0 0 0 ""OB
TR
TR
16449 0 0 0 0 "gh_ActionIsInterruptable" "LOCALS" OB
0 0 0 0 0 0 0 0 0 0 0 0 ""OB
TR
TR
16521 2 0 0 0 "" "" OB
0 0 0 0 0 0 0 0 0 0 0 0 ""OB
TR
Now im no expert but shouldn't there be an IF somewhere at least
I'm Devious

This is my Gift. This is my Curse. Who am I? I'm SpiderCraig
User avatar
Sarkyn
Posts: 33
Joined: Sun Aug 12, 2001 10:00 pm
Location: Scotland, UK
Contact:

Post by Sarkyn »

Craig,

The link I posted was to the *compiled* BS file. That snippet you copy-pasted into the message is perfectly valid for *compiled* code, but I can understand your confusion if you were expecting to see source code :)

If you want to see the source, (which has lots and lots of IF's, and lots of THEN's and all the syntax you're expecting) then you're more than welcome - we work on a vaguely open-source policy at [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url] because it helps everybody to be able to see working code snippets that others have slaved on.

At BWScript, I've made the entire source of the gSeries available, (changing as I develop it, of course) its just in a different folder in the Files area. I didn't want people who don't know (or want to know) about scripting to get confused, so we've separated our file area out into sections, with [url="http://groups.yahoo.com/group/bwscript/files/COMPILED/"]Ready to Use BS Files[/url] in a different area to the source snippets.

To find all the source files:
[url="http://groups.yahoo.com/group/bwscript/files/COMPLETE/"]BWScript Source Directory[/url]


Or direct to the gSeries source:
[url="http://groups.yahoo.com/group/bwscript/files/COMPLETE/gSeries/"]gSeries Source Sub-directory[/url]

Hope this makes more sense!

Cheers,

[ 08-29-2001: Message edited by: Sarkyn ]
Cheers,


Sarkyn
Moderator, [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url] - A list Dedicated to Scripting the Bioware Games

Home of:
* the Smartest Beholders on the Net!
* gSeries, better PC AI
* gMinion, better, stronger, faster Summons
User avatar
Craig
Posts: 4996
Joined: Fri Dec 29, 2000 11:00 pm
Location: England
Contact:

Post by Craig »

Thanks
I'm Devious

This is my Gift. This is my Curse. Who am I? I'm SpiderCraig
User avatar
Craig
Posts: 4996
Joined: Fri Dec 29, 2000 11:00 pm
Location: England
Contact:

Post by Craig »

Um i don't think it works :(
I'm Devious

This is my Gift. This is my Curse. Who am I? I'm SpiderCraig
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

@ Craig: You certainly have a way with words. ;)

What isn't working? Or, what do you want to do? Maybe I can help.
[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
Craig
Posts: 4996
Joined: Fri Dec 29, 2000 11:00 pm
Location: England
Contact:

Post by Craig »

Well i press b and no buffing i press s and no sumons
I'm Devious

This is my Gift. This is my Curse. Who am I? I'm SpiderCraig
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

I am going to ask a few very "DUH" questions now...

You do have the AI turned on?

You do have buff spells and summons memorized?
[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
Craig
Posts: 4996
Joined: Fri Dec 29, 2000 11:00 pm
Location: England
Contact:

Post by Craig »

Yes i tried it in and out of battle(encass it was only on then)
I'm Devious

This is my Gift. This is my Curse. Who am I? I'm SpiderCraig
User avatar
Quitch
Posts: 806
Joined: Thu Jan 18, 2001 11:00 pm
Location: Surrey, England
Contact:

Post by Quitch »

I am just grabbing these scripts now.

My only suggestion would be a slightly modified Mage script for Imoen and Jan, that allows them to look for Traps when there's nothing else happening.

I must say the main reason I never use AI scripts is because they always kept changing my tanks targets.

[ 09-02-2001: Message edited by: Quitch ]
Past: Ascension
Present: The Broken Hourglass
Future: Return to Windspear, Imoen Relationship
"Perfection has no deadline"
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

If I'm not mistaken, the gMulti script should look for traps in its spare time.
[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
humanflyz
Posts: 614
Joined: Wed Feb 07, 2001 11:00 pm
Location: I am omnipresent
Contact:

Post by humanflyz »

Somehow the scripts are making my game lag. When I turn the AI on, and I am trying to scroll around the map, the scroll movements would get really choppy. Like when you see the scrolling arrow, it freezes for 10 seconds and then move again. The same thing happens with movements.
"I find your lack faith of disturbing" -Darth Vader

The Church could use someone like that.
User avatar
Sarkyn
Posts: 33
Joined: Sun Aug 12, 2001 10:00 pm
Location: Scotland, UK
Contact:

Post by Sarkyn »

I think its clear that a "How-To" is necessary, so here goes:

1. Download the ZIP File from here: [url="http://groups.yahoo.com/group/bwscript/files/COMPILED/gSeries_v2.0s.zip"]gSeries v2.0s[/url]

2. Unzip the Contents of that ZIP File into your games SCRIPTS Folder. This is usually located somewhere like:

C:\Program Files\BGII - SoA\Scripts

3. Load the Game.

4. Select the Character whose AI you wish to change and Open their Character Record Screen (the one with their Stats and HP, etc).

5. Select the Customise Option, and then from the following menu (the one that allows you to choose Colors, Sounds, Portrait, etc), choose SCRIPT.

6. A list of the Scripts in your SCRIPTS directory will come up on the left hand side. All of the built-in ones have long descriptions, so you usually have to scroll down to the bottom to see Custom Scripts.

7. Select the gSeries script you wish to use, this will usually be by class - there are 5 gSeries scripts:

gFighter - contains Fighter, Paladin and Ranger abilities, including Priest Spells up to 4th level.

gThief - for straight-class thieves, uses no spells and few items, but has the Hide-N-Detect and Backstab routiens.

gPriest - for Priests and Druids. Has shapechanging, all Priest spells, Turning and cooperative Healing.

gMage - for Mages, Sorcorers and Specialists. Has up to 8th level mage spells (9th & TOB coming soon!), Mage specific items.

gMulti - a much *larger* script, this has combined all the facets of *all* of the scripts above. This should be used only by characters who have more than one class, such as Imoen, Aerie and any dualled, or Multi-classed Protagonists. Because of its size, it can cause some slow-down of the game on older machines, and thats why you should only use it if you need to.

8. Pick the Script for this Character, and press OKAY. There should be a perceivable delay (1-2seconds) as the game loads the script and reads it into memory for that character.

9. Return to the Game, and ensure that the Artificial Intelligence (AI) is turned on by clicking the lantern in the bottom right hand corner of the GUI until its "lit up".

10. To test that the AI is on, select the character in question and press the "D" key on the keyboard. The word "On" or "Off" will hover above the characters head. This is the first hotkey, it turns AI On and Off for that one character.

Press it again to make sure that the last thing it said is "On".

11. Play! The next time you see a monster, if you followed all these steps, your characters will (hopefully) use their spells, powers and abilities in a fast and efficient manner!

Cheers,
Cheers,


Sarkyn
Moderator, [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url] - A list Dedicated to Scripting the Bioware Games

Home of:
* the Smartest Beholders on the Net!
* gSeries, better PC AI
* gMinion, better, stronger, faster Summons
User avatar
Sarkyn
Posts: 33
Joined: Sun Aug 12, 2001 10:00 pm
Location: Scotland, UK
Contact:

Post by Sarkyn »

OOps, I forgot to add:

HOTKEYS
=======

This version of gSeries uses only three hotkeys. After much discussion on [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url], the next gSeries will have a few more. The list has come up with some suggestions for standardising HotKeys across all developed AI scripts, but thats another story.

The Keys are:

HotKey(D) - Disable/Enable AI
-----------------------------
This turns AI on and off for that individual character. The word "On" and "Off" will float above the characters head briefly when you press this key to indicate the current status.

HotKey(S) - Summon
------------------
This will cause a Spellcaster to use Summon Spells that he has memorised to increase the number of Summoned creatures in the party up to the game-imposed limit of FIVE. Obviously, a spell caster won't use spells that they don't have memorised, so if you press S and nothing happens, it could be that you either have none of the spells in memory, or your party already has 5 summons.

The spells used, in order, are:
// * WIZARD_MORDENKAINENS_SWORD
// * WIZARD_SUMMON_EFREET
// * WIZARD_SUMMON_DJINNI
// * WIZARD_MONSTER_SUMMONING_3
// * WIZARD_INVISIBLE_STALKER

// * CLERIC_ANIMATE_DEAD (>14th level)
// * CLERIC_AERIAL_SERVANT
// * CLERIC_CONJURE_FIRE_ELEMENTAL
// * CLERIC_CONJURE_EARTH_ELEMENTAL
// * CLERIC_CONJURE_ANIMALS
// * CLERIC_ANIMAL_SUMMONING_3

// * WIZARD_WYVERN_CALL
// * WIZARD_CONJURE_FIRE_ELEMENTAL
// * WIZARD_CONJURE_AIR_ELEMENTAL
// * WIZARD_CONJURE_EARTH_ELEMENTAL
// * WIZARD_CARRION
// * WIZARD_MONSTER_SUMMONING_2
// * WIZARD_CONJURE_LESSER_FIRE_ELEMENTAL
// * WIZARD_CONJURE_LESSER_AIR_ELEMENTAL
// * IZARD_CONJURE_LESSER_EARTH_ELEMENTAL
// * WIZARD_ANIMATE_DEAD
// * WIZARD_SPIDER_SPAWN
// * WIZARD_MONSTER_SUMMONING_1

// * CLERIC_CALL_WOODLAND_BEINGS
// * CLERIC_ANIMAL_SUMMONING_2
// * CLERIC_ANIMATE_DEAD (<15th level)
// * CLERIC_ANIMAL_SUMMONING_1

HotKey(B) - Be Prepared
-----------------------
The final HotKey makes spellcasters cast spells that defend or protect them in general ways, or buff or enhance the party in some way. I chose not to include *specific* protections because you never know what sort of combat you're going into, and it would be a waste to cast say "Globe of Invulnerability" if you were about to fight Trolls. This way, only guaranteed to be useful spells are cast...

Note - the order might seem strange, but I was juggling various priorities here, such as durations (which spells wear off fastest) and repition (wouldn't cast Invisibility if you had Improved Inv., etc) and this order seems to work fairly reliably to ensure that as many protections as possible are on.

Also Note - You press (B) once, and the Spellcaster will cast the first defensive spell they come to. Then you press it again and they cast the next one, and so on until you think your party is "prepped".

The Spells used, in order are:

// * WIZARD_SIMULACRUM
// * WIZARD_PROJECT_IMAGE
// * WIZARD_MISLEAD
// * STONESKIN
// * WIZARD_MELF_METEOR
// * WIZARD_HASTE
// * WIZARD_IMPROVED_HASTE
// * WIZARD_STRENGTH
// * WIZARD_BLUR
// * WIZARD_MIRROR_IMAGE
// * WIZARD_SPIRIT_ARMOR
// * WIZARD_GHOST_ARMOR
// * WIZARD_ARMOR
// * WIZARD_REFLECTED_IMAGE
// * WIZARD_MASS_INVISIBILITY
// * WIZARD_INVISIBILITY_10_FOOT
// * WIZARD_IMPROVED_INVISIBILITY
// * WIZARD_INVISIBILITY

// * CLERIC_IRONSKIN
// * CLERIC_BARKSKIN
// * CLERIC_CHANT
// * CLERIC_BLESS
// * CLERIC_DEFENSIVE_HARMONY
// * CLERIC_ARMOR_OF_FAITH

Again, I hope this helps... Please *PLEASE* post me some feedback, either here or at [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url] where we're all regularly discussing the effectiveness of PC AI...
Cheers,


Sarkyn
Moderator, [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url] - A list Dedicated to Scripting the Bioware Games

Home of:
* the Smartest Beholders on the Net!
* gSeries, better PC AI
* gMinion, better, stronger, faster Summons
User avatar
Quitch
Posts: 806
Joined: Thu Jan 18, 2001 11:00 pm
Location: Surrey, England
Contact:

Post by Quitch »

Sounds pretty sweet. Always wanted to let my party strike out on their own a bit. Should be interesting :)

Is there a gSeries for BG 1?
Past: Ascension
Present: The Broken Hourglass
Future: Return to Windspear, Imoen Relationship
"Perfection has no deadline"
User avatar
Sarkyn
Posts: 33
Joined: Sun Aug 12, 2001 10:00 pm
Location: Scotland, UK
Contact:

Post by Sarkyn »

Unfortunately, I only started developing AI scripts after BG2 came out, and the gSeries uses dozens of the new functions and triggers which aren't available to BG1, so it won't work in the older games (or IWD either, actually).

There are quite a few alternative BG1 scripts available at [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url] though, so I invite you to have a browse through our files area and see if you can find something that suits your need.
Cheers,


Sarkyn
Moderator, [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url] - A list Dedicated to Scripting the Bioware Games

Home of:
* the Smartest Beholders on the Net!
* gSeries, better PC AI
* gMinion, better, stronger, faster Summons
User avatar
Quitch
Posts: 806
Joined: Thu Jan 18, 2001 11:00 pm
Location: Surrey, England
Contact:

Post by Quitch »

Slightly off topic, I believe the Minions section would benefit from an overview of (some?) of the changes made? One of the reasons I didn't download these scripts in the first place is because there was no way to measure them against the current scripts.

Why are the changes only for summons? Do their scripts differ from their "wild" counter-parts that much?

One more thing, how does gSeries compare to uScript?

[ 09-04-2001: Message edited by: Quitch ]

[ 09-04-2001: Message edited by: Quitch ]
Past: Ascension
Present: The Broken Hourglass
Future: Return to Windspear, Imoen Relationship
"Perfection has no deadline"
User avatar
Sarkyn
Posts: 33
Joined: Sun Aug 12, 2001 10:00 pm
Location: Scotland, UK
Contact:

Post by Sarkyn »

Second question first:

gSeries vs uScript ?

Don't know! I haven't had time to properly test my own scripts yet, and while I've downloaded uScript with the intention of having a good look at the way he does things, I have to admit I haven't even found the time to do that :/

How about you try 'em out, and let us know at [url="http://groups.yahoo.com/group/bwscript"]BWScript?[/url] The one thing we script writers can never have too much of, is feedback! :)
Cheers,


Sarkyn
Moderator, [url="http://groups.yahoo.com/group/bwscript"]BWScript[/url] - A list Dedicated to Scripting the Bioware Games

Home of:
* the Smartest Beholders on the Net!
* gSeries, better PC AI
* gMinion, better, stronger, faster Summons
Post Reply