In Cold Steel: Defiance, we want to implement a complex, lifelike AI simulation, while also doing it in a manner that is as streamlined as possible. We wanted a way to find a way for the AI to react to the player's choices and reputation, as well as giving the impression of having its own personality and life. In this article, we explain several of the methods through which we will be doing this.
The A.I. In Cold Steel Defiance must be able to react to different factors, like faction standing, wanted level and reputation. Therefore, the easiest method to do this is by using a system of
"Flags". Each NPC would have a number of Flags:
- Faction - This flag determins an NPC's faction, therefore determining its
reaction to the player's standing with that faction. Such flags
would be: Islamic Federation; SSR; ED; Neutral; Criminal; Echo 3;
Alien; Player Party
- Faction-Rank - A sub-Flag to the above, this determines whether the NPC is a
civillian or soldier. This further determines an NPC's reaction to
factors such as the player's standing, or activities such as crime.
When the player is caught committing a crime, or has a wanted level,
a civilian will typically run for cover and call the guards, while a
military NPC will call for backup and attack the player (this is one
example of what can be done with this flag)
- Personality - This ties into the reputation system. There would be four flags:
Altruistic; Greedy; Power-hungry; Boastful. This determines an NPC's
reaction during dialogues, depending on the player's reputation.
This determines which dialogue options are available. An altruistic
NPC, may not like a player who's Personal Goals rating favor Power.
Such an NPC may refuse to talk to the player, or may have fewer and
different dialogue lines. On the other hand, an altruistic NPC would
react positively and with a friendly, cooperative attitude towards a
player who's dominant Personal Goals attribute is Altruism, with
different/more dialogue options available. In some cases, this
determines whether the NPC is willing to offer his services as a
skill trainer to the player. In other cases, it may determine the
availability of side quests.
- Stats-Flag - This flag serves to pick a template of stats for NPCs. This
system shortens development time, as picking one such flag will
determine a preset configuration of stats, like hitpoints, etc. For
an NPC which is required to grow and level-up during the game, such
a flag would be set to "0", which is a non-override
setting, meaning the said NPC will have its own custom stats sheet,
unafected by templates.
- Skills-Flag - Another flag determining the NPC's skills. Same as above.
- Powers - Same as above, determines the NPC's powers
- Inventory-type - Same as above. Like the three flags above, can be set to "0",
or equivalent, in which case a custom inventory would override the
- Flag-Profession - This determines whether or not an NPC is a skill trainer.
Together with some of the above factors, this determines if the
player can request training with this teacher. This could be a list
of more than one flag, such as Trainer_AssaultRifle;
Trainer_SniperRifle and so on. Or it could be set as NoTrainer, in
which case it would mean the NPC is not a trainer.
Some dialogue options would also have flags, such as Faction, FactionStanding, Reputation. This ties in with the above system of NPC flags, enabling us to create NPCs with their own personalities and which react dynamically to the player's actions This opens up a huge amount of options, while also allowing us to create NPCs easily, thus streamlining the development process, allowing us to focus on producing a quality game without the huge budgets of AAA companies and major developers. Once every template has been completed, we can implement it easily and quickly into each NPC's script. Of course, a special focus will be given to important and quest NPCs, but this system allows us to create ambient NPCs that are just as interactive, adding more complexity and realism to the game.
This is a system directly inspired by the Gothic series. In Gothic, a 2001 game, NPCs had daily routines and activities, making for a very realistic and lifelike simulation of society that is unparalelled
even today, more than a decade after the release of that game. In Cold Steel, each NPC would have a list of these activities and a series of coordinates and timestamps. For example, an NPC could be
scripted to sleep in bed X between 11:00 PM and 7:00 AM, go to Mosque and pray between 7:00 and 8:00, go to work at object Y (triggering an animation of interaction with an object) from 8:00 to 4 PM, eat between 4 and 5 PM, go to location X at 5PM and chat with NPC X. Such a schedule would be configurable and would breathe life into the world, making for a very lifelike simulation of people going about their daily business, while also being easy to implement, through the reusing of scripts. Cold Steel: Defiance is an open world game and any open world game without such a system of NPC routines is simply, incomplete.
This is just a small example of what we can do with these systems, while also insuring that our development process is streamlined enough to allow us their implementation, without requiring an army of programmers, redoing each NPC manually, therefore exceeding the budget that we may acquire from Kickstarter.
Thus, we can create a high quality game with a small team and a limited budget, within a reasonable timeframe. By using such systems, it doesn't only streamline our development process, but also opens up a huge amount of possibilities, allowing us to create a diverse, lifelike world.