Sunday, April 6, 2008

The Beholder Is Out

Check it out

More on that later.

First thing's first, far as Subtlety of Thay is concerned. Originally I meant to have a new build up for testing by this weekend...not looking good at this point for that because I took a few days to work on the beholder (which was totally worth the time). However, by tomorrow night is looking much better. I'll have to bust my butt today and some of tomorrow (I also have to mow my football field sized yard though!) but it's definately an attainable goal.

And when you're working on a large project, little steps like that are important.

But anyway, on to the beholder. This is the part you can tune out because it's not terribly interesting.

Anyway, the AI on the beholder is really a cool system. Basically it has 12 spells, the 10 eye rays, it's antimagic eye, and an AI spell that tells it which rays to shoot and at what. So basically what happens is at the end of each combat round it runs an AI script that tells it which action is the best to take. For instance, if it's hit points are low it may decide it's best to retreat a distance back (I changed this so it will shoot it's rays THEN retreat, hopefully inflicting movement hampering statuses) or, if you're using the waypoint, to it's levitation waypoint (from HotU, I don't really know what this is all about but I left the function to do it in there), or which target to physically attack or to use it's rays. I changed a few things so it almost always uses it's ray attacks, but it will physically attack characters that have the anti-magic status because the rays won't work.

It gets interesting once it decides to use it's rays, though. It casts this AI spell on a creature. Because a beholder can only bear three rays against any single target, it also chooses two additional targets if there are any within range. Once it does that it prioritizes which target is the primary one, which the secondary, and which the tertiary based on a number of factors, with the first being the most threatening, etc. The AI could really be tweaked here to choose the absolute best target in a variety of circumstances, I added a few checks because it didn't really have much there from NWN1. In any case, then it chooses how best to attack these targets by seeing how many targets there are and then somewhat randomly which rays to use against which targets; there are several routines, but it won't dynamically choose which rays against which targets, they are predetermined. Such as the primary target gets the strongest rays like disintegrate and death, and the secondary and third targets get the charm and petrify to disable them. The trick to that was to assign how it picks targets. It has most of it's fortitude saving throw rays on it's primary attacks, and chooses classes with low fort saves first, for instance.

Anyway, once it's done that it runs it's antimagic eye script, which again goes through some checks as to whether or not it's a good idea to open the eye. I changed things there again because I thought it was set up to be at a disadvantage against a single target because it can't use it's own rays on a target that has anti-magic status, so it won't use it against a single target except if a few circumstances, but it will now use them to eliminate buff spells first and then close the anti-magic eye and use it's rays, and use it against higher level casters than it was set to originally.

Anyway, I thought it was a pretty unique AI set up. And since neither my wife, my daughter, nor my mother care, I thought I'd share it here!

Well anyway, back to work.

5 comments:

Anonymous said...

A BIG THANK YOU DW!!!!!! you did awesome!! :)

Anonymous said...

Very nice... So, we gonna see one?

dirtywick said...

Thanks liso!

I think I'll probably squeeze one in, it's hard not to haha

Wyrin said...

grear job on bringing this beast to life ;)

Jclef said...

I love it, man - fought this guy in game last night.

You did a phenomenal job, bud - the rays, sounds, AI...greatness!