EFUPW Forums

Main Forums => Suggestions => Topic started by: Letsplayforfun on October 22, 2008, 01:55:40 PM

Title: AI attacking the most hurt PC?
Post by: Letsplayforfun on October 22, 2008, 01:55:40 PM
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);
    }
Title:
Post by: dragonfire9000 on October 22, 2008, 02:03:18 PM
Aw Hell no!

Are you bloomin' kidding me? What about mages! We have three hp a level if we're lucky!
Title:
Post by: Letsplayforfun on October 22, 2008, 02:07:03 PM
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!
Title:
Post by: tooh on October 22, 2008, 02:13:40 PM
Only make sense if the use of rule is random else will be a trap and a exploit.
Title:
Post by: Cruzel on October 22, 2008, 02:26:58 PM
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!
Title:
Post by: Letsplayforfun on October 22, 2008, 06:21:49 PM
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.
Title:
Post by: p00d33m on October 22, 2008, 06:24:45 PM
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.
Title:
Post by: Jayde Moon on October 22, 2008, 06:38:55 PM
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.
Title:
Post by: Gullible Righteousness on October 22, 2008, 10:17:06 PM
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?
Title:
Post by: Ommadawn on October 22, 2008, 10:58:04 PM
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.
Title:
Post by: Denko on October 22, 2008, 11:27:44 PM
I suggest the dms implement a script that will make the npcs gang only on Lets' characters. :P
Title:
Post by: Ommadawn on October 22, 2008, 11:37:23 PM
That works for me   :mrgreen:
Title:
Post by: JackOfSwords on October 23, 2008, 03:26:12 AM
Quote from: Jayde Moon;94124Because the way PCs attack mobs is random?

If you've ever seen me in battle, you would say "Yes."
Title:
Post by: Pup on October 23, 2008, 06:51:03 AM
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.
Title:
Post by: Letsplayforfun on October 23, 2008, 11:11:05 AM
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.
Title:
Post by: tooh on October 23, 2008, 01:28:54 PM
I dont said the AI must or is random, I said the use of any "fixed deterministic action" must be.
Any fuzzy logic, simulating any 'inteligent condicional reason' criterions to choice 'what to do now' will demand more cpu cycles than a 'pick one by' random weight rules, and any if-else-then nested will be a pain of bugs and exploits.
Title:
Post by: iBard on October 23, 2008, 02:44:08 PM
Letsplayforfun obviously enjoys suffering.

And to Gullible: They seem to do that to me, anyway.

>_>