Please note that new user registrations disabled at this time.

Smart Beholders now available!

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

Smart Beholders now available!

Post by Xyx »

Think Beholders are stupid? I do, so I made [url="http://groups.yahoo.com/group/bwscript/files/COMPILED/Smart%20Enemies/"]Smart Beholder[/url] scripts. :) No longer will a single character with the Shield of Balduran have an easy time at clearing out the Underdark (these things have Int 16, you know ;) ). In fact, they now act very much like "real" Beholders are supposed to.

Here's the whole deal:
How do I install/use them?
Simply go to the link above, download the zip, unzip and copy all the .BCS files (creature scripts) into your Override folder.
Can I use them with ToB?
I am 99% sure. :D I don't have ToB to test, but placing a couple of creature scripts in your Override should be harmless.
What does "smart" mean?
Well, just that. ;) The Beholders make better use of existing abilities. I have not given them any new powers, just more brains.
Are they cheesy?
Not at all. :D In fact, I have taken great care not to give them extraordinary powers of perception. They will recognize the Shield of Balduran and the Cloak of Mirroring, but not after bouncing a couple of rays on them. They also do not detect resistances, immunities and low saves until after several rounds. This is a much bigger handicap than players have, since players can spot Spell Turning on sight (the circle beneath a creature's feet) and can tell if an enemy is immune or resistant after one round or so by reading the message window.
So, what's up for offer then?
  • Rays and spells are used with much more intelligence. Beholders do not simply target the nearest foe anymore, but try to go after the most dangerous ones. They will try to kill or disable quickly, and use their Anti-Magic ray to disable enemy spellcasting and dispel combat enchantments.
  • The eyestalks now deplete and recharge after one round. Beholders switch to secondary choice rays while their favorite eyestalks recharge.
  • Beholders will seek out the party after off-screen Cloudkilling or hit & run tactics. They respond to shouts for reinforcements more fervently.
  • The scripts may be much larger than the originals, but run only a limited portion if the party hasn't encountered the Beholder yet, making them more CPU-efficient.
  • Beholders will recognize the Shield of Balduran, Cloak of Mirroring and Spell Turning after about one round (which is rather merciful, since *players* can spot these things on sight), and will stop bouncing their rays and spells on the owner.
  • Beholders will recognize high magic resistance, very low saves and immunities to effects after a couple of rounds (again rather merciful, since players can spot these things pretty quickly as well), and will stop using ineffective rays and spells on the owner.
  • All contingencies, triggers and sequencers now display in the message window. All have been adapted to conform to the limitations players also face.
  • Beholders now finish off charmed or dominated creatures instead of waiting for the mind control to wear off.
    I think that's cheesy!
    By all means, post what you would like to see changed, and I'll see what I can do. :)
    I have a suggestion!
    Post away!
[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
fable
Posts: 30676
Joined: Wed Mar 14, 2001 12:00 pm
Location: The sun, the moon, and the stars.
Contact:

Post by fable »

Great idea. :) I'm only concerned about compatilibity issues with ToB. Even the slightest chance of breakage is enough to make me hold off a bit.
To the Righteous belong the fruits of violent victory. The rest of us will have to settle for warm friends, warm lovers, and a wink from a quietly supportive universe.
User avatar
Pebz
Posts: 591
Joined: Tue Jun 26, 2001 10:00 pm
Location: Norway
Contact:

Post by Pebz »

Awwwwwwwwww.... but stupid enemies are so much more fun :D :p

Very nice script tho' (if it works correctly that is :D )
"The measure of our hearts is taken by the kindness we show to the least of our brethren."
- Keldorn, Paladin of Torm

"Alea iacta est"
"The die is cast"
User avatar
THE JAKER
Posts: 1211
Joined: Tue Jul 17, 2001 10:00 pm
Location: commuting between Morrowind and Neverwinter
Contact:

Post by THE JAKER »

Xyx, I have downloaded your improved Beholder scripts and have sampled them a little so far (in the Beholder dungeon in the Underdark). So far I am very pleased with the results. They killed my PC three times! I have Throne of Bhaal installed and have not noticed any problems so far (I will notify you if I notice anything).

The Improved Beholders are awesome, everyone!

I think that improved magic user script is also a great idea, and I really hope you do it. I know it would add a lot to the game if Lichs and others wouldn't just waste their spells on summoned creatures that can't even touch them. Another possibility would be smarter Goblin, Orc, and bandit scripts - they see your party and just start running ;)
May you walk on warrrrm sannd....
User avatar
GEorGE
Posts: 74
Joined: Tue Jul 17, 2001 10:00 pm
Location: hehe... TURN AROUND :)
Contact:

Post by GEorGE »

Hmmmm...

The Beholders are indeed smarter, but since their melee attack sucks, they still can't do much. My level 15 cavalier with carsomyr, Ring of Gaxx, Helm of Balduran, Cloak of mirroring, red dragon scale and ring of protection +2, was still able to clean up the whole beholder lair. The only things that caused me problems there were the Drows and the Elder Orbs (because of their imprisonment spells), but it was still an easy fight. So you did make them smarter, but it still won't help them. They're still gonna DIE. :)

[ 07-26-2001: Message edited by: GEorGE ]
SH|T happens every time you eat...
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

Originally posted by GEorGE:
<STRONG>My level 15 cavalier with carsomyr, Ring of Gaxx, Helm of Balduran, Cloak of mirroring, red dragon scale and ring of protection +2</STRONG>
Well... what would you have a Beholder do against that, except for running away? ;) Would you expect PnP Beholders to be able to deal with an uber-equipped character like that?

I noticed they are not too effective versus characters with high magic resistance, the Shield of Balduran or the Cloak of Mirroring. Sad enough, melee attacks are usually their best options in those cases (it sure beats the hell out of killing themselves by bouncing their rays).

There are still plenty of ways to beat 'em. Making any enemy near-invincible means using cheesy cheats.
[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 »

Cool
I'm Devious

This is my Gift. This is my Curse. Who am I? I'm SpiderCraig
User avatar
Armadin of Clan Geddin
Posts: 510
Joined: Fri Jun 08, 2001 10:00 pm
Location: Me Caves
Contact:

Post by Armadin of Clan Geddin »

Originally posted by GEorGE:
<STRONG>red dragon scale and ring of protection +2</STRONG>
Ye won't be able to do that nay more in ToB. :p
Armadin Alebane, True Neutral Dwarven Ranger/Bard.
User avatar
cheesemage
Posts: 1044
Joined: Tue Mar 27, 2001 11:00 pm
Location: Inside a water proof fish tank
Contact:

Post by cheesemage »

yes all the uber players will go what!!???!?!?! :D
He is back and in 3-d!
User avatar
spork
Posts: 78
Joined: Sun Jul 08, 2001 10:00 pm
Location: New York, USA
Contact:

Post by spork »

More please!

Really, this is work that Bioware people should have done themselves. They did improve dragon AI for TOB. I wish I knew how to script! Now I want ALL the creatures to get smarter! There was another post about an improved Balthasar script coming out... are there others? If so, I want them ALL! (What needs fixing most urgently is everybody's tendency to chase after the closest enemy. Even if that enemy runs around in circles the creature blindly follows, while getting pelted with ranged weapons from the other 5 members of the party.)

PS--I don't beleive in such a thing as a cheesy script for a bad guy. Bad guys should use ALL their powers to kill me/defend themselves, and I should be smart enough to not let them.

Would it be possible to add a script that tells enemy fighters to concentrate their attack on the people that are actually doing damage? (Say, the archer behind the front lines?)
User avatar
Armadin of Clan Geddin
Posts: 510
Joined: Fri Jun 08, 2001 10:00 pm
Location: Me Caves
Contact:

Post by Armadin of Clan Geddin »

Originally posted by spork:
<STRONG>There was another post about an improved Balthasar script coming out... are there others? If so, I want them ALL! </STRONG>
The folks at BioWare be really attentive to their fans. Check out me Challenge post. :)
Armadin Alebane, True Neutral Dwarven Ranger/Bard.
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

Originally posted by spork:
<STRONG>More please!</STRONG>
I'll try my best. :)

I was thinking about doing Liches and high level Mages next. They really got ****ed in the AI department...
Originally posted by spork:
<STRONG>What needs fixing most urgently is everybody's tendency to chase after the closest enemy. Even if that enemy runs around in circles the creature blindly follows, while getting pelted with ranged weapons from the other 5 members of the party.</STRONG>
That's an interesting idea. I'll have to think on that one.

The game uses a small number of scripts as "default" scripts. These scripts make sure the creature at least does something if its regular scripts didn't come up with anything. Usually, that "something" is attacking the nearest enemy. Perhaps I could modify those scripts, which would instantly give over half of your enemies slightly improved AI.

The problem with these "default" scripts is that they are used by all different kinds of enemies, and so should not contain specific abilities (just picking a target and bashing it on the head). Any suggestions as to what the "default" script should or should not do?
[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
Sargon
Posts: 51
Joined: Wed Jul 18, 2001 10:00 pm
Contact:

Post by Sargon »

Mmm...I'll have to give this a try. Sounds good (although I went through the Unseeing Eye and the Underdark without the Cloak of Mirroring OR the Shield of Balduran the first time around...heh).

If the general AI scripts would go after LastPersonWhoWackedMeOverTheHead or LastPersonWhoHitMeHardest instead of TheBardRunningAroundLikeAManiac the normal, everyday opponents would be a little bit less "stupid" so to speak.

Nice work, I'll have to poke around with some scripting....
Sargon the Blade
"So let me get this straight, you walked up to a dragon, totally naked, and challenged it to a duel??"
[url="http://www.attcanada.ca/~rebel_hq"]Writer's Block[/url]
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

Originally posted by Sargon the Blade:
<STRONG>If the general AI scripts would go after LastPersonWhoWackedMeOverTheHead...</STRONG>
They sort of do already. This is how the most basic Default script works:

If I see the nearest enemy; attack them. Else if I am attacked, retaliate.

Problem here is that the first option is always chosen, since there is no way around it.

If we reverse that, it would prevent the "run around" cheese, but would create other cheese opportunities, such as a shield wall preventing the creature from getting to the archer... The beauty of the simple "bash nearest" system is that it cannot be abused that way.

I'd have to fool around with this. Keep them suggestions coming!
[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
Sargon
Posts: 51
Joined: Wed Jul 18, 2001 10:00 pm
Contact:

Post by Sargon »

Take this for what its worth, a suggestion from someone who hasn't written code in a while (*cough*6502assembler*cough*) ;)

Of course, if scripts all face the "first act over any other", it means you'll be faced with a nasty decision tree.

Can time be handled in an AI script so that if a MOB (Mobile Object/Mobile/Monster, MOB is easier to type) is unable to reach PreferredTarget1 in a certain amount of time, to switch to PreferredTarget2 (or 3 or 4)? The beholder scripts do this, but its reactionary (cloak of mirroring/shield of balduran) from what I gather.

Arguably, the "shield wall" defense for archers isn't a particularly "cheesy" tactic IMO since ranged attackers ARE vulnerable to close range attacks, you should be defending them with melee/shield wall type stuff. Maybe some AI "Strategic Running Away" or "Falling back behind a corner" if under a barrage of ranged attacks. I mean, why does everything stand and fight until they're almost dead, then maybe run away?

Doable? :D
Sargon the Blade
"So let me get this straight, you walked up to a dragon, totally naked, and challenged it to a duel??"
[url="http://www.attcanada.ca/~rebel_hq"]Writer's Block[/url]
User avatar
Xyx
Posts: 3104
Joined: Mon Jun 04, 2001 10:00 pm
Location: The Netherlands
Contact:

Post by Xyx »

OK, good suggestions. :)

The decision tree is indeed "first act over any other", but can include a bit of randomization. That would mean the "best" response (from the script's point of view) is usually not chosen, but at least it's harder to adapt to and less vulnerable to exploits. The Beholders have slight randomization in their scripts. If they did not vary their rays, they'd be even more vulnerable to exploits with the Cloak or the Shield.

The scripts can measure time. The biggest problems are decision making and getting the damn things to do what you want them to. The "language" is extremely limited (can't even multiply variables, or determine if the closest enemy is the main character, for example).

The "shield wall" is cheesy if the enemy tries to attack the archer but cannot get to him, thus endlessly and ineffectually bumping into the wall. Another drawback of the "attack last attacker" would be that the last attacker continually changes. A creature could switch targets endlessly if caught in a double Cloudkill from two different Mages, or if attacked with missile weapons from two different sides.

Still, I'm positive that something could easily be changed for the better here. :)
[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 »

Could you do somthing like
AttackLastAttacker
Wait(20)
END
That should work (from my miniture knowlege of scripting)
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 »

Wait(20) means "do nothing for 20 seconds" ;)

...but I know what you mean, and I think it's a good idea. Something along those lines would probably be best.
[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
Sargon
Posts: 51
Joined: Wed Jul 18, 2001 10:00 pm
Contact:

Post by Sargon »

I'm busily working on [url="http://64.59.139.21/"]this[/url] so I'm not about to dive head first into scripting, but I see what you're getting at. My problem is I get soaked up into a problem then start taking it apart piece by piece, bit by bit and I can't think of much else aside from it. Nasty character flaw I admit...

How about some fight or flight AI? Let's face it, Kobolds attack you because they're as smart as a rock on a good day, and I could see them running back and forth between a stacked cloud spell and the two casters. They're kobolds, not quatum physicists. Silly and obvious, but people really do tend to forget the obvious things sometime ;)

More potent foes on the other hand it would be unbecoming. Basic animals rely on simple "Fight or Flight" reactions (catch a friend on a bad day and you'll see we humans do the same thing!), so is it possible to have an intelligent foe run towards a group of "friendlies" - like a lone Mind Flayer running from the group of 6 well armored and equipped adventurers into a room with 6 of his buddies to "even up the odds". How well does the default AI script interact with the environment (does it know how to run from A to B, knowing that B = MyFriendsHome) or does that have to be coded into place (escape paths so to speak)?

Of course, they would have to learn how to open FREAKIN' DOORS. Sheesh. Sure, its funny and playable to "gas" a pack of Flayers like they were a bunch of ****roaches - after all 6 strong adventurer's holding the door closed, but...it doesn't seem right.

Using terrain (like narrow corridors, doorways) to "block" monsters behind frontline fighters can't be seen as an exploit. Using terrain in a manner that prevents a non-ranged foe from reaching you (like the kobolds on the pillars in the first test in the Asylum) is an exploit.

The catch is the mob can't recognize the difference if I get your drift, and ends up "playing stupid".

Bear in mind, that's a really acceptable reaction for a bunch of Kobolds, just not for a Drow ambush party.

Any way to lock a script into a logical loop so that "AttackLastAttacker" remains the active target for a round or two instead of ping-ponging while the LastAttacker variable changes between X and Y?

Gah...better stop now. Little doses work better...

[ 07-27-2001: Message edited by: Sargon the Blade ]
Sargon the Blade
"So let me get this straight, you walked up to a dragon, totally naked, and challenged it to a duel??"
[url="http://www.attcanada.ca/~rebel_hq"]Writer's Block[/url]
User avatar
Craig
Posts: 4996
Joined: Fri Dec 29, 2000 11:00 pm
Location: England
Contact:

Post by Craig »

How about:
AttackLastAtacker
Continue(20)
I'm Devious

This is my Gift. This is my Curse. Who am I? I'm SpiderCraig
Post Reply