More Blades of Avernum Script Samples. Fun!

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).

Pages

AuthorTopic: More Blades of Avernum Script Samples. Fun!
Warrior
Member # 20
Profile #25
Looks cool.. I'm looking very forward to BoA.. I almost started tinkering with BoE after I finished the Avernum series but I really wanted to wait for this to come out.. and this scripting interface looks VERY promising.
Posts: 191 | Registered: Monday, October 1 2001 07:00
Infiltrator
Member # 2940
Profile Homepage #26
Thumbs up to the new scripting sistem!!

What is wrong with monsters targeting the weaker PC? I think its the best thing to do for an intresting RP action, maybe Jeff could set default AI inteligence to select from in the monster editor window.

AI-lvl1 = monsters just attacks the closest PC.
AI-lvl2 = monster prefer attacks on weaker PC.
AI-lvl3 = monster prefer weaker PC, makes caster, non-caster distinction. Prefers casters.
AI-lvl4 = prepare yourself for a worthy oponent. Monster attack does not only do all the above, but learns from mistakes. example:

spell_02=fire bolt
(selected PC, considers a series of factors mentioned above, health, caster,non-caster, etc..)

If Monster cast_(spell_02) on_selected PC_1_ = damage = 0
then
disable cast_(spell_02) on_selected PC_1 for next random combat turns<6*
(...or something like that)
if false
continues as usual...
*the reason for not doing damage may be because the PC had a special shielding, thus the AI would try again sometime in the next five turns. Or maybe it would pick another valid target...

There could also be a default AI depending on the monster tipe, example. If the monster is a golem it will never flee from battle, if it is a goblin it will flee when bearly harmed...etc..

--------------------
"I don't want to achieve immortality through my work, I want to achieve it through not dying."
Posts: 469 | Registered: Thursday, May 1 2003 07:00
Shock Trooper
Member # 751
Profile Homepage #27
Nice! :)

Those scripts are in C++ as well, which adds to the overall niceness.
I dislike scripting languages that look like Basic.

UPON CLOSER INSPECTION:

I think Jeff can simplify it more via functions and classes.

IE:
if(pcGod)
{
ai_creature.flee();
}
else
{
do
{
ai_creature.attack();
}
while(ai_creature.maxHp > (ai_creature.baseHp*0.25));
}
See the do loop's condition?

(ai_creature.baseHp*0.25)

could also be thrown into a function:

ai_creature.hp_bfore_flee();

It might not be worth it for such a trivial calculation but it is easy to rewrite Jeff's example scripts into a couple of lines assuming the functions are there.

You just have to balance out the use of inline functions and the non-inline functions.

[ Monday, October 27, 2003 03:29: Message edited by: K.I.L.E.R ]

--------------------
Windows XP
P4 1.84gig
768MB RAM
Radeon 9700 Pro
Posts: 202 | Registered: Thursday, March 14 2002 08:00
Shock Trooper
Member # 461
Profile #28
I really like this! Combat will be so much more in-depth.

--------------------
"If you held a weapon to Fwiffo's head, he would say anything you wanted him to. In fact, if you held a vegetable to Fwiffo's head, he'd say whatever you wanted him to." - Spathi high council, Star Control 2.
Posts: 346 | Registered: Sunday, December 30 2001 08:00
Agent
Member # 2820
Profile #29
PLEASE tell me that the monsters will be able to check the target's stats before attacking. It's so stupid when a fire lizard breathes fire on another fire lizard and then that just keeps going on and on and on. That's also one of the many reasons why summoning isn't helpful.

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
Infiltrator
Member # 164
Profile Homepage #30
Great to see what's coming up for BoA. The BoE was terribly constricting for me. Things I wanted to pull off had to be faked most of the time--but this looks much better. Since I know a few programming languages, I'll finally be able to make some of the things I wanted to. I can't wait for this to actually come out.

[ Saturday, November 01, 2003 13:04: Message edited by: Jenkins ]

--------------------
Awesome BoA Graphics

MSN: bleusoulilcercatore@hotmail.com
AIM: Byzantine Jones
Posts: 635 | Registered: Monday, October 15 2001 07:00
Warrior
Member # 246
Profile #31
quote:
Originally written by Jenkins:

Since I know a few programming languages, I'll finally be able to make some of the things I wanted to. I can't wait for this to actually come out.
If you know programming, how come you don't put your skills to work developing your own system? BoE's graphics engine is easy to mimic. All you do is blit sections of bitmaps to the screen according to an array. :)
Posts: 117 | Registered: Friday, November 2 2001 08:00
Shock Trooper
Member # 751
Profile Homepage #32
quote:
Originally written by Keep:

PLEASE tell me that the monsters will be able to check the target's stats before attacking. It's so stupid when a fire lizard breathes fire on another fire lizard and then that just keeps going on and on and on. That's also one of the many reasons why summoning isn't helpful.
That would be very easy to do. Just check if the creature that is being attacked isn't strong(absorb,etc) vs the attack method.

You could first cycle through various attacks and use the best ones.

I've been dying to fiddle around with Jeff's work. :D

--------------------
Windows XP
P4 1.84gig
768MB RAM
Radeon 9700 Pro
Posts: 202 | Registered: Thursday, March 14 2002 08:00
Warrior
Member # 1016
Profile #33
Well, firelizards are kind of dumb, so they probably wouldn't know any better than to target that efreet with thier fire breath. but something like a mage should have the brains to know that fire is useless against efreets but they are vulnerable to cold so they would blast it with an ice spell. However the ability of a monster to be "all knowing" and automicly know which character is weakest and what each of the characters stats are would be very annoying and somewhat unrealistic. This is something that an intelegent monster should have to figure out, for example if attacks on your fighter do low damage but attacks on your mage do higher damage then the monster should figure out that the mage is the better target choice.
Posts: 141 | Registered: Saturday, April 20 2002 07:00
Warrior
Member # 246
Profile #34
quote:
Originally written by Kennedy:

This is something that an intelegent monster should have to figure out, for example if attacks on your fighter do low damage but attacks on your mage do higher damage then the monster should figure out that the mage is the better target choice.
Sounds like you're saying that monsters should be developed to have their own memory so they have to learn individually. Sounds like an interesting task. Can somebody say "neural net"?
Posts: 117 | Registered: Friday, November 2 2001 08:00
Shock Trooper
Member # 751
Profile Homepage #35
What he's saying isn't difficult to do.
You can have the monster randomly target your PC/s and if the monsters damage is low on average than it can target another PC.

Or

Monster can target everyone once and can go in for the kill on the weakest PC.

The targeted PC could be placed under a string variable called "weakestPcName" or something and then every monster part of it's faction/area would know which to target first.

Making the AI smart isn't a hard thing to do in a turn based game.

quote:
Originally written by Frobozz:

quote:
Originally written by Kennedy:

This is something that an intelegent monster should have to figure out, for example if attacks on your fighter do low damage but attacks on your mage do higher damage then the monster should figure out that the mage is the better target choice.
Sounds like you're saying that monsters should be developed to have their own memory so they have to learn individually. Sounds like an interesting task. Can somebody say "neural net"?



--------------------
Windows XP
P4 1.84gig
768MB RAM
Radeon 9700 Pro
Posts: 202 | Registered: Thursday, March 14 2002 08:00

Pages