View Full Version : NPCs AI and its role on a living breathing, dynamic, organic world for Drox Operative

12-07-2011, 10:29 PM
Artificial Inteligence on NPCs having their own agendas/goals/progression.

I played a game called Space Rangers 2, in that game npcs would have a set of programmed behavior....

-They would interact with the world like the player.

Traders would go from place to place buying and reselling goods, searching for best prices, avoiding pirates, doing quests related to trading, hiring other npcs to scout them, paying out pirate bribes...

Pirates would go around attacking and demmanding money/cargo from everyone who they think its slower/weaker/less armed than them. They would resort to cheap tactics. Flee, escape authorities. Attack cargo npcs.

Mercenaries would offer themselfs for hire, attack pirates, sometimes attack trades, or help with the military.

There would be lots of freelancers, doing all activities the player can do. Going from station to station and planets, sometimes trading, upgrading their equipment, selling stuff, getting quests to kill people, escort people, take items from place to place.

The world felt alive, every npc had their own agenda. Depending on the "class" the AI would be slightly different. "Traders wouldnt attack unless in more number, or attacked before or when they have a decent equipment", while some pirates would have a more aggressive AI, with a wider set of actions/behaviors, wich include interacting with other npcs in their piracy activities.

Its not hard to do. Just need to think of a diagram of behavior/relationship between all activities/classes and define how each type of npc should relate to these.

Then add a margin of randomization/variety to each individial npc, as in "personality", so some traders would be extra cautious, while others would take bigger risks.

Things like "willingness to leave planet", "minimum distance to keep from others", "avoid areas where attacks/piracy was reported", "higher willingness to pay off bribes or hire escorts".

Create a few behaviour stats that are individual to each npc, then randomize each, while still applying a wider set of behavior/activities/goals depending on type of "class"/"profession".

Back in Space Rangers 2, there was this After Action Report that became famous within the people who played Space Rangers 2.
It was a guy that made his goal, to hunt down the top rangers in the galaxy, one by one, following the list.

He actually managed to roleplay immersivelly in a competitive way, within the environment and the AI the game had. Why? Because the whole world was dinamic, the npcs would evolve, upgrade their equipment, do missions, attack each other, help fend of invasions from the dominators and such.

Depths of Peril and Dins Cursed main thing, is the feeling of the organic world, how dynamic the world and quests and events work.

For Drox Operative, it has to go to the next level, to the AI of the NPCs.
We should have a real simulator of npcs akin to the player behavior and possibilities in the game. How?

If the player can do a mission. Make it so the mission is available to other npcs as well. Some exclusivelly by whoever takes the quest first, others concurrently (but not together), others concomitantly (and together).

Players should be able to interact with all npcs in a different ways.
Requesting and or Offering assistance, information, resources. Being able to ask what the npc is doing, and offer help or try to hinder that npc from completing that mission. Or not being allowed such knowledge at all, depending on the player charisma and npc individual willingness to socialize.
Trading, Extortion.
Whenever something deemed significant happen with that NPC, the npc should remember the other party involved, either someone who attacked him before, or someone who assisted him or traded with him, or someone who attempted to be its friend or offered an opportunity or something. So a method of having NPCs record specific previous interactions and access these previous interactions to define the current interactions in a way that NPCs recognize each other.

So there must also a "standing reputation" between npcs. A pirate that lived long enough should have enemies. At the same time it must have some allies. It must have a few people with bounty hunt him. And it must have people that fear him.

You see? People must have different kinds of standing between each other, whenever they have a previously relationship.
Also, depending on each individual npc random personality traits (think of a set of stats that affect their willingness to interact/behave on all possible options available in the game)

Also, you must think and define generic mid/long term objective for NPCs. More than one and be able to change those or add new ones randomly or based of previous events (completing an objective might generate a new one, failure in completing an objective, or taking too long, and so on).

What could be these random/different objectives?
At start, simple things.
A few npcs will want to get rich, a few npcs will want to be the most feared, few npcs will want to own a station or control a territory, a few npcs will want to be the strongest, another will want to be the best trader, the best bounty hunter, the most helpfull, some wants to wreck havoc, some will want to keep order, some will want to promote the progression, others will seek to destroy specific targets, either stations, or npcs, or have specific negative relations towards a race.

Have a few dozen objectives and determine wich ones can be given randomly to some npcs and that will end up being their main behavior guidance. Defining how they will interact with the world and other npcs.

Some will be willing to work with others to achieve their goals. Some will want to make some sort of "guild/group/corporation/association" of similar goals. Some will want to hire mercenary/bounty hunters/escorts. Some will work alone. That can all be defined by specific individual traits randomly assigned to individual npcs. Like a hidden "socialization" stat. Some will be willing to follow, others will have a tendency to lead.

Everything will be checked in regards to their current objectives, to see if the objectives dont antagonize each other.

The whole idea is that it has to be an engrossing experience.
To watch the world and npcs go around interacting and doing their stuff, maybe even tracking one of them and watching how his destiny fullfills.

One pirate kills a trader. Then the game spawns the son of that trader with a main objective of seeking vegeance of the pirate who killed his father and a tendency of hating all pirates and seeking order to the galaxy or something. The npc could have the same surname. The npc might be weaker than the pirate at first, depending on his "inteligence" stat, he might make a bad judgement on his own strenght compared to the pirate, or he might wait a bit longer and set his short term goal as to "acquire resources/power" before he actually goes there to attempt to kill the pirate.

That kind of thing. Then he could have a "charisma" stat that might make him attempt to recruit others to help him on his cause. Or He might be willing to work for others expecting help in return, or money to further helps him in his cause.

At the same time, all npcs should have some sort of "survival instinct" hidden stat, that would define how they behave when all hell breaks lose around them. "Shit is going down, leave system, port on nearest planet, run away" and so on. A set of specific basic stats that determine simple behavior patterns.

What they have to do. What they want to do in the future. What they can do now. The idea is to make their behavior a little bit organic, dynamic, believable.

There is danger and there is opportunities. There should be some npcs willing to side with danger, gambling high, lusting for more, while some would be more cautious, having a routinely somewhat safe life, without much expectations or dreams.

This doesnt mean the player should be the only one who goes out doing missions, getting contracts to hunt criminals, upgrading their weaponry with the latest technology before the player get his chance to buy them, or getting the best trading opportunities buying items when their prices are low and things like that. Not that all npcs should have an inclination to do all things. But some of the npcs should atleast have one inclination, towards piracy, or trading, or bounty hunting, or doing quests, some could have more, and some could be even almost rival the player in their attempts to swallow everything in their path. Some could be evil, some could be good, some could be crazy.

So to not KILL THE WHOLE GAME by the common flaw of being player centered, static, meaningless in a big empty shallow galaxy.

Radiant, Procedurally generated content/AI, in a way that creates the illusion of breathing living world, so it creates interesting/unexpected situations through the complex web of relations/intereactions and remains fresh and unscripted/unrepetitive.

Based on my prior experience with Depths of Peril and Dins Curse, I believe Shadow can do it. Im just pointing out how the AI is paramount on this kind of games. His new endeavour. I know he can pull it off. Just making sure to mention, just in case.

12-11-2011, 03:11 PM
Sorry for the badly organized and prolix expressed ideas.

The main point is that AI has to be a Feature.