AI attacking the most hurt PC?

Started by Letsplayforfun, October 22, 2008, 01:55:40 PM

Previous topic - Next topic

Letsplayforfun

I'm browsing the "LEXICON", and found this, which could make AI pretty tough on parties.

Since we gang up on creatures, so should they, and for that matter target the most bleeding PC. It might make them move around too much and get caught by AoO though.

For those who enjoy the "survival feel".


// Get the least health PC and attack them. For all it matters, this
// could be the On Heartbeat script of a NPC.

void main()
{
    // Get nearest PC
    object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);

    // Get least damaged
    object oMostDamaged = GetFactionMostDamagedMember(oFactionMember, TRUE);

    // Attack them
    if(GetIsObjectValid(oMostDamaged))
    {
        ClearAllActions();
        ActionAttack(oMostDamaged);
    }

dragonfire9000

Aw Hell no!

Are you bloomin' kidding me? What about mages! We have three hp a level if we're lucky!

Letsplayforfun

Mages survive pretty well.

Besides, i'm not sure, but i'd reckon this is about damage sustained, not about base HP...

But i'm just having fun with the lexicon, really. So much to do!

tooh

Only make sense if the use of rule is random else will be a trap and a exploit.

Cruzel

It's good to see you're taking up scripting! :D


However I'd like to point out that while that would work, The script would target them no matter if they were invisible or stealth, afaik. Unless you add a

if (GetObjectSeen(oMostDamaged, OBJECT_SELF))
{

}

That said, near as i can tell EFU already uses a custom AI, and as noted above if they always targetted the party member with teh least HP, it woulld not be very balanced nor fun, and also possibly exploitable!

Letsplayforfun

Quote from: Cruzel;94103It's good to see you're taking up scripting! :D

Actually, i only copy-pasted that one. But i'm working hard!

Any hints, advices, whatever, is more than welcome.

p00d33m

Poor beings. Do you think this sort of script have not been applied already?

Cruz is the master of scripting, he plays, eats, sleep and scripts.

Second tooh I don't like this kind of "AI", battles should be randomic.

Jayde Moon

Because the way PCs attack mobs is random?

While I don't know about tracking on targets by HP (perhaps a bit too meta for my tastes), a good AI that simulates strategic thinking by thinking beings (even if their average int is7 or 8 ) only adds to the experience.

I think EfU:A has that.

Gullible Righteousness

This would be extremely annoying (imo), because if I get what you're asking, wouldn't the monsters be trying to attack a bleeding PC on the floor? :/
 
That wouldn't be very fun for most, would it?

Ommadawn

I think the AI is fine as it is. Want a greater challenge? Increase the number or power of the spawns, more traps, etc.Something like this would seriously impact on the fun of questing for just about everyone, in my opinion.

Denko

I suggest the dms implement a script that will make the npcs gang only on Lets' characters. :P

Ommadawn

That works for me   :mrgreen:

JackOfSwords

Quote from: Jayde Moon;94124Because the way PCs attack mobs is random?

If you've ever seen me in battle, you would say "Yes."

Pup

You can't assume every enemy you run into will be tactically sound.  I would be for SOME of them being smart like that, though.
"So what else is on your mind besides 100 proof women, 90 proof whisky, and 14 karat gold?"
"Amigo, you just wrote my epitaph."

"Maybe there's just one revolution.  The good guys against the bad guys.  The question is, who are the good guys?"

~The Professionals

Letsplayforfun

Quote from: Denko;94179I suggest the dms implement a script that will make the npcs gang only on Lets' characters. :P

They only need to put more dispels and see invisibility, that'll do the trick.