Jump to content
The Dark Mod Forums

What's next for AI?


grayman

Recommended Posts

Grayman = The Man!

 

:D

 

(Yeah, it goes without saying that Greebo and Angua setup all the foundations. :) )

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Yeah, I think it goes without saying that the AI is already pretty fun and sometimes scarily unpredicatable, awesome job, otherwise there wouldnt be any fans here, like me. :) TO Springheel and Grayman, really nice to hear about those modifications, can't wait to play the new version.

Link to comment
Share on other sites

  • 2 weeks later...

Just for the record, as in this topic: http://forums.thedar...post__p__272122

 

AI should be able to eventualy detect he was successfuly pickpocketted when he tries to access his "should be closed" locked door and is unable to open it due to not having the keys with him anymore. This raises several problems though (expressed in the topic above), but is still a realistic/common sense feature that is lacking right now. AI could then either fall back to the remaining path corners after a light suspecious reaction (problem: wouldnt make much sense in missions like Tears of Saint Lucia where the AI in question only has two path corners, one inside and one outside the locked door, effectively breaking his route); or go to full alert mode, raise the alarm and go into active searching behaviour (but would eventually have to get back to the route again, thus going back to the previous problem? I dont know enough about it to really give an good opinion here).

Edited by RPGista
Link to comment
Share on other sites

Just remembered this while writting another post:

 

+ I have observed that AI sometimes naively react to companions getting killed in front of them - basicly they seem to disregard the act of the murder per se and react as if they had just discovered a body - kneeling down and investigating. This is perfect behaviour for when the murder happens out of their sights, but I would suggest a much more urgent reaction to witnessing murder (even though the source (player) is unknown (when killing by arrows is a clear example)) - full alert with possible tendency to fall back and call for support/raise the alarm might be more appropriate.

Edited by RPGista
Link to comment
Share on other sites

  • 1 month later...

+ Awereness:

  • You can exploit the AI sensitivity to sounds but blindness to moving objects by throwing any moveable accross the room when someone is investigating in your direction - the sound will call his attention and they will go there instead, every time. This doesnt work very well, as sound alone should only be the main factor when in complete darkness/the AI is turned away from the object's trajectory; if you throw an object in full view of the AI (or that gets in his field of vision midway), he should be able to infer the direction it came from and ignore the sound in this situation as the suspicious point.

Link to comment
Share on other sites

  • 2 months later...

Not sure where to put this, so I thought about this AI thread.

 

There seems to be a problem with one AI alerting another nearby AI with help screams. There's a scene in my mission where a lady comes out of a room where a lord is seated. If I alert her by stepping into the light before she closes the door behind her, she'll scream for help every second or so (she refuses to go to the flee point by the way, but thats another question); the other AI who is 3 meters away will continously raise his alert level, only VERY slightly, saying things like "what was that?" and "huh?"; after hearing him say that like 8 times in a row, I thought I should report it. He should be able to get to investigate level at least, instantly. The other AI is asking for help half a room away.

 

Oh, and I just remembered: it is still possible to cause the AI to assume weapon drawn animation without actually drawing their weapon (I believe they even try to block as if holding one, though I havent seen them attacking without it); it seems to happen if you hit them right before or while they are trying to draw their swords.

Edited by RPGista
Link to comment
Share on other sites

Yep, seems to be it... There are 3 flee points in my map, one I know to be accessible and working (seen it happening), one never really seemed to work (both same team), and one is untested (for thieves, but never got any of them to flee from combat so havent tested it).

Edited by RPGista
Link to comment
Share on other sites

  • 3 months later...

+ Melee combat:

  • AI tends to be passive and robotic in melee fights, throwing a single blow and then clearly waiting for you to fire yours. This is to be expected in light of the mechanism used in TDM for combat (multi-directional duel), but maybe some randomness could be inserted in there, so there could be occasions where they would swing two or three times in rapid sequence, and then wait (a breather) for your counter attack - exactly like the zombie character, with the difference you can actually block the blows instead of dodging them. This could be, if deemed as a desirable feature, another "skill set" type for enemy AIs (could see potential for violent villains or masterful swordsmen one might face in missions).

PS: In fact, has anyone tried to give an armed character the zombie's melee routine? My guess is that it would be an interesting experiment, as the zombie is capable of timing your aproach and swinging in antecipation, swinging blows of different speeds and reaches in fast sequence and is overall quite agressive in nature (can't block though). I would be more than willing to beta test any experiments on this front, if needed.

Edited by RPGista
Link to comment
Share on other sites

The zombie does not have a special melee routine. The only difference is that he has several different melee animations, some of which are longer than others. Most are single swings but at least one is a double, I believe.

 

There's no particular reason the same thing couldn't be done for armed AI. We could add a variant animation that involves some special move, like a double attack or something, but there is the issue of matching the combat collision boxes to the animation. Not sure exactly how that is done.

Link to comment
Share on other sites

  • 3 weeks later...

+ Sounds:

  • There should be no long death cries ("oh, curse you...") when AI is killed instantly (by headshot or surprise stab); only small pain/death screams. Its often possible to hear AI still talking or screaming long after its dead and limp.

 

+ Behaviour:

  • Morale level - it should be possible to set a morale level for any given AI, that would determine how it reacts to alerts and the player; very low: the character flees as soon as he spots the player, or as soon as scared by sounds or clues; low: can flee as soon as player is spotted, but mostly after taking a bit of damage; normal; and elite: will eagerly run towards any sound or visual clue, actively and agressively looking for the player, and engage immediately when spotted. All these classes should be able to alert nearby AI better with vocal alerts, there seems to be some issues with calls for help, as stated earlier.

 

EDIT:

 

+ Consistency:

  • The revenant/skeleton enemy bleeds when hit, when it shouldnt.

Edited by RPGista
Link to comment
Share on other sites

I planned out a system for "security levels" (on AI & on locations), where AI will have different responses depending on if the AI/location is high security (run after the player on sight) vs low security (only run after the player if they see a crime). And then you can specify the crimes that will put them on alert. And then there's still the general distinction between civilians or seriously injured guards (run from player) and normal guards (attack player if alerted). I think that would be the way you want to handle what you're talking about. (I think you can switch a guard's team from guard to civilian by script, to get them to run.)

 

But there might be an easier way to have morale like security levels. You can have an AI switch from high security to low security, so they'd attack on sight in the first but attack only if see a crime in the second. But you're example is a case where an AI might switch from civilian to guard behavior, from running away from the player to running towards the player. That's not a "security level" issue but a morale issue. But I think it's something I could also add as a further related feature, like a spawnarg "morale", with answers "low" and "high" (default) for guards, so if you triggered it to low, the guard would run from the player on scripted cue (like when they're injured), or vice versa. It's a good idea. But may be unnecessary if it's already easily accomplished just switching their "team" spawnarg on the fly.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Such a system would be extremely welcomed - neutral/forbidden areas coupled with a new system of NPC interactivity (a talking system with multiple choice trees, access to the inventory and ability to trigger events in the world or to be given objectives) would open up a huge realm of possibilities for mappers to come up with a much more complex interactive world, and different storylines.

 

I dont see however why both your area system and the AI morale couldnt complement each other - if you assign a distinction between neutral (-1), protected (0) and high security (+1) areas, you would:

 

- In neutral areas the Player is ignored by all guards as another civillian, but reacted to in different degrees when a crime is witnessed (low morale AI will run and warn others, normal AI will attack, elite AI also, more agressively);

 

- In protected areas the Player is seen as an enemy by default, but the same difference in reaction applies (low morale AI will run and warn others, normal AI will attack, elite AI also, more agressively);

 

- In high secutiry areas, the same as a protected ones, but there could even be a "bonus" for AI when inside those areas, in terms of morale (very low becomes low, normal becomes elite, for example) - which could mean AI will see invasions there in a graver manner.

 

Im just insisting on this added complexity because I remember cases in missions where inside protected headquarters, you still get to see different attitudes in gaurds' behaviour, most will face you, but sometimes one will run immediately to sound the alarm, instead of engaging you. This variation is very desirable, no matter what "area" that might be.

Link to comment
Share on other sites

Is it possible to have the flee on health reaching X spawnarg changed on an NPC by area? Example, if a guard is supposed to flee to get help upon spotting you in a certain area, could his "flee when health reaches X (normally 10 hp and they start with 100)" be set to 100, so the full health guard flees as if he was damaged? It would prevent accidental consequences from team swapping (accidentally becoming hostile to other teams)

Intel Sandy Bridge i7 2600K @ 3.4ghz stock clocks
8gb Kingston 1600mhz CL8 XMP RAM stock frequency
Sapphire Radeon HD7870 2GB FLeX GHz Edition @ stock @ 1920x1080

Link to comment
Share on other sites

@RPGista, they can complement each other, but security-level and morale are & should be separate systems.

 

With a security-level system, a guard AI needs to ignore seeing the player in low security area, because the whole point is we're on a public street and you're just another pedestrian. A guard AI would not run from what is not a threat; he just keeps walking on his patrol. (Or for no-security, you're in a bad neighborhood full of thugs where everybody walks around with their sword drawn and public brawls are not uncommon; other thugs are not going to get involved; they just keep walking on their patrol unless you directly attack them or get on "their turf").

 

A morale system is just a completely different system where they will not want to fight but would run to get help if they see a threat, but it could be sensitive to security level too in the sense they might run from a threat in a high-security area, but not a low-security level. That's something one might want to add to a moral system too. But the general point here is, even then it's still a separate system from a security-level system. Security-level is about ignoring the player because he's not a threat (that I'm responsible for). Morale is about running away from the player because he's a threat & I don't want to fight.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Great to hear you are working on that security level system, that has a lot of potential, will be looking foward to it.

 

Sorry to keep flooding the thread:

 

+ Behaviour:

 

• Terrified AI behaviour could use more support - they seem to freeze on a spot when cornered, play the cowering animation randomly (with no sounds; there should be sounds associated with this, like in my previous example, AvP 1), and they simply ignore the player (they should, if not turn to face the player, at least follow him with their heads/eyes, and try to get away on touch).

Edited by RPGista
Link to comment
Share on other sites

  • 3 weeks later...

+ Behaviour:

  • Pickup weapon: there could be a spawnarg that would allow specific unarmed AI to be able to pick up a weapon (any suitable moveable weapon entity) within his reach (and sight) once alerted; this would create more unpredicatable situations when you get discovered by civilians.

  • Mortally wounded AI (future request only, as it would require new animations and sounds): if an AI gets "killed" by a final blow or arrow on a leg, arm, or sometimes, belly, they would not instantly die but would fall and remain moaning in pain. This would bring a new problem for violent actions - the AI is now a liability (could attract someone by sound, even if you got him in a isolated area) and you would be faced with the moral choice or letting him be or "silencing" him (could also be KOed instead of executed). Something like Stalker:

Edited by RPGista
Link to comment
Share on other sites

Haha that was a cool feature in STALKER :)

But I think it's not worth the effort here in this game since most players will use their black jack and ghosting instead of killing.

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

+ Behaviour:

  • Pickup weapon: there could be a spawnarg that would allow specific unarmed AI to be able to pick up a weapon (any suitable moveable weapon entity) within his reach (and sight) once alerted; this would create more unpredicatable situations when you get discovered by civilians.

  • Mortally wounded AI (future request only, as it would require new animations and sounds): if an AI gets "killed" by a final blow or arrow on a leg, arm, or sometimes, belly, they would not instantly die but would fall and remain moaning in pain. This would bring a new problem for violent actions - the AI is now a liability (could attract someone by sound, even if you got him in a isolated area) and you would be faced with the moral choice or letting him be or "silencing" him (could also be KOed instead of executed). Something like Stalker:

 

 

 

These both sound like real good ideas to me. The latter is more work, I guess, tho. A generic pickup animation and some code like "go toX,play pickup animation" would care for the first idea (oversimplifying here :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Could the first one already be done now with the same code that allows AI to pick up food? That would switch the AI to start using armed animations, but I don't know whether the code would treat the AI as armed for the purposes of behaviour or not.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...