Author Topic: Current state of faction based NPC behaviour  (Read 1126 times)

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Current state of faction based NPC behaviour
« on: February 12, 2015, 01:13:25 pm »
I wondered about a better place than "General discussion" for a rather developer related topic, but it wouldn't have fit better anywhere else... Either I can't make a post at all, or it is too specifically intended for a different purpose.

Reading Tua's blog about the Shikdrok's Crater project, I remembered that factions were planned to alter some attributes of NPCs, like whether they would offer a quest or not. I am curious now how far such dependencies would go. Would you ... trying to imagine an extreme ... have to expect NPCs being hostile, attacking you on approach, unless you have a specific minimum reputation in their faction? Like rogues guarding their home if you don't have, maybe, +20 in Evil or Chaos, whatever faction may exist which shall be related to a gang of rogues?

How much of that is planned at all, and maybe even already implemented in code, just lacking a sample dataset?

This feature might lead to different experiences when passing NPCs in a company, like one char being ignored, another greeted, a third attacked. If chars are organized in a game technical "Group", would NPCs have to make a decision based on something like the average of the group?
« Last Edit: February 12, 2015, 01:17:22 pm by LigH »

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Eonwind

  • Developers
  • Hydlaa Notable
  • *
  • Posts: 815
    • View Profile
Re: Current state of faction based NPC behaviour
« Reply #1 on: February 12, 2015, 04:14:30 pm »
Good question LigH! As of now the state of the faction feature is the following:
  • Quests: the faction assignment (score) in the related quest chain is being worked on to make it overall consistent and to assign a score between 0 and 200. This is a middle to long term project carried on by the settings team as it involves almost every quest in game.
  • Faction as prerequisites: factions can be used as quest prerequisites, so in the future (once the avove point has been fixed) they may be used for quests or KAs (= NPC answers, like the smiths greeting you as you pass by them, offering more advice as you ask, etc.). As far as I know nothing has been planned in this area yet, but may eventually come and anyway it's low priority and something to make the game look more "finished".
  • NPCs: it's a working features, code wise the NPC client is able to confront the NPC and the character faction and start reactions based on them. Actually it's this part of the code which is used whenever you approach a monster and he decides to turn to you, attack, greet or flee. There is even a working example released in the production server: you may have not noticed but the Rogues may not decide to chase and attack you if you scored high enough in a particular faction, you may call it professional courtesy  ;). However we haven't done a widespread use of this feature due to the fact faction scores are not yet consistent/solid enough (see the first point) and second because a few NPCs behaviours maybe a bit OOC or give away too much if it doesn't make sense for them to know about your belonging to their factions.
To answer your last question when NPCs fight grouped characters they don't make decision based on the group average, but they can fill in their hate list with all the group's chars. Think of the hate list like Santa's list of bad boys: who is on top don't get cookies but get some pain (or at least the NPC tries to give him some as he becomes the focus of its attack); the list is updated based on various parameter decided by the NPC script, the most common is the damage dealt by the player to the NPC (the higher the damage the higher the hate score) but can be a lot of different things like type of spell cast by the player (e.g. the NPC may especially hate the healing spellcasters) including the faction score.
Albeit the work on NPC's AI is never really over for me as of now I'm pretty happy for the current state of actions and reaction they use to do, but I'm really happy to hear from you all ay suggestion on how to improve them.  :)