high pop AI
by William Finlayson · in Technical Issues · 04/29/2001 (7:29 pm) · 23 replies
Bit of a cryptic title, but a start.
In a game going to be based on my parseg idea, I want to have LOADS! of NPC's running around. In most games with a lot of NPC's, only a few are ever of any interest, others are just scenery. I want to be able to fill villages with NPC's and to be able to interact with them all.
The first major thing I was thinking of doing was not to get rid of the distinction between 'important characters' and 'background characters', but instead, allow dynamic promotion/demotion. The game is content is produced on the fly depending on the palyer's actions, so you don't know what NPC's are going to be used and when. So if a player leaves an area for a long time. Important NPC's should be demoted to save on CPU usage.
The important NPC's should have personal knowledge and social bonds and their own personality. So that they can convey their knowledge of the game-world as they see it. Obviously if you have a lot of NPC's and they all have individual personalities and knowledge, it's going to take it's toll on your system. BUT I want all NPC's to act realistically in view of the player.
The system I have devised for this, is a 'social group structure'. All the 'backdrop' NPC's will belong to one or more of these social groupings. Knowledge is an important feature in the game, but background NPC's can't have individual knowledge. Instead, the knowledge that a social group has is stored. Diferent groups would be families, all the workers at a certain place could be a group, a guild of fighters could be a group etc. The groups have simple rules of what knowledge is of interest for that group, and how well it is shared amongst that group. So a band of fighters will be interested in battles accross the land, but not that interested in the new houses built in town X. In tightly knit groups, information will flow freely between all in the group, but members of looser groups may not know the full knowledge set of the group.
An NPC can be in as many groups as possible. By only tracking knowledge for a group, and only some knowledge at that, it greatly reduces processing time to work out who knows what. Only when an NPC is interacted with, does the knowledge from groups come into play. This way the player can interact with background NPC's, and they will have a fairly realistic base of knowledge for who thay are/what they do. Active NPC's will also have social groups, but they will also be abl;e to gather knowledge of their own accord.
If a backdrop NPC is interacted with several times, the world-govenor AI may decide that it wants to use that NPC in an event as the player is obviously interested in them (events are what the story of the game is built on). Incase of that happening, the NPC would be promoted to an active NPC. When doing this, you want the NPC to gain more personality, but you want to do it so that it coincides with theit life as part of the background. As a start, group knowlege would be given to them, but then a personality needs to be created.
In creating personalities, I propose personality templates, and modifiers.
Templates, would be a standard personality set, based upon whatever job that NPC has. But not all farmers are going to be alike. Modifiers will be imposed upon personality values also be each social group they were part of, and the place thay lived, as well as a certain ammount of randomness. This will hopefully produce an NPC with a unique character of their own, while still being realistically based on their circumstances.
Next, how to make NPC's WANT to abide by a society. I was thinking of using a wants/needs system, where the NPC will get urges food/sleep etc, and then try and fufill them. Obviously some of them would be affected by personality, like aquire wealth - get a job or steal? Maybe that would be dictated by lawfulness. Anyway, I have found it hard thinking of a way to implement rules imposed by society into this. ie - don't steal, don't murder, and que in an orderly fashion. These could be hardcoded, but then I though that maybe a 'society' structure could be used, setting regulations and rules upon that character's actions. By having that in a society object, nothing is hard-coded, and diferent NPC's can live in diferent societies. The society models would try to impose those rules and regulations, but depending on the character's personality, they may wish to break a rule. If they are very unlawful, they are not likely to follow rules, and if a lawful character has been starving, then their hunger may override their want to abide by society, and they might steal food. An improvement on that would be adding a 'local society' structure which would modify the weighting of 'society' rules. So in a town where there are constant raids, there could be a modifier to the societies rules in that town - for example, it may be more acceptable to walk around armed. Another things that would modify the character's behavior is a 'job' structure. This would allow for more artificial actions like bake bread. Ordinarily, it would be hard using a want/need system to get a character to make more food then they need, but if it is a requirement of their job then it is not a problem.
Obviously this is just a high level view of the NPC AI in parseg, there is a lot more AI in the game, but I thoughtI'd limit this thread to the NPC AI.
So, what does everybody think? Feel free to comment, but realize that this is just an overview, and is not a full implementation. It is still very much at the design stage. If anyone else has any ideas pertaining to this then please let me know.
In a game going to be based on my parseg idea, I want to have LOADS! of NPC's running around. In most games with a lot of NPC's, only a few are ever of any interest, others are just scenery. I want to be able to fill villages with NPC's and to be able to interact with them all.
The first major thing I was thinking of doing was not to get rid of the distinction between 'important characters' and 'background characters', but instead, allow dynamic promotion/demotion. The game is content is produced on the fly depending on the palyer's actions, so you don't know what NPC's are going to be used and when. So if a player leaves an area for a long time. Important NPC's should be demoted to save on CPU usage.
The important NPC's should have personal knowledge and social bonds and their own personality. So that they can convey their knowledge of the game-world as they see it. Obviously if you have a lot of NPC's and they all have individual personalities and knowledge, it's going to take it's toll on your system. BUT I want all NPC's to act realistically in view of the player.
The system I have devised for this, is a 'social group structure'. All the 'backdrop' NPC's will belong to one or more of these social groupings. Knowledge is an important feature in the game, but background NPC's can't have individual knowledge. Instead, the knowledge that a social group has is stored. Diferent groups would be families, all the workers at a certain place could be a group, a guild of fighters could be a group etc. The groups have simple rules of what knowledge is of interest for that group, and how well it is shared amongst that group. So a band of fighters will be interested in battles accross the land, but not that interested in the new houses built in town X. In tightly knit groups, information will flow freely between all in the group, but members of looser groups may not know the full knowledge set of the group.
An NPC can be in as many groups as possible. By only tracking knowledge for a group, and only some knowledge at that, it greatly reduces processing time to work out who knows what. Only when an NPC is interacted with, does the knowledge from groups come into play. This way the player can interact with background NPC's, and they will have a fairly realistic base of knowledge for who thay are/what they do. Active NPC's will also have social groups, but they will also be abl;e to gather knowledge of their own accord.
If a backdrop NPC is interacted with several times, the world-govenor AI may decide that it wants to use that NPC in an event as the player is obviously interested in them (events are what the story of the game is built on). Incase of that happening, the NPC would be promoted to an active NPC. When doing this, you want the NPC to gain more personality, but you want to do it so that it coincides with theit life as part of the background. As a start, group knowlege would be given to them, but then a personality needs to be created.
In creating personalities, I propose personality templates, and modifiers.
Templates, would be a standard personality set, based upon whatever job that NPC has. But not all farmers are going to be alike. Modifiers will be imposed upon personality values also be each social group they were part of, and the place thay lived, as well as a certain ammount of randomness. This will hopefully produce an NPC with a unique character of their own, while still being realistically based on their circumstances.
Next, how to make NPC's WANT to abide by a society. I was thinking of using a wants/needs system, where the NPC will get urges food/sleep etc, and then try and fufill them. Obviously some of them would be affected by personality, like aquire wealth - get a job or steal? Maybe that would be dictated by lawfulness. Anyway, I have found it hard thinking of a way to implement rules imposed by society into this. ie - don't steal, don't murder, and que in an orderly fashion. These could be hardcoded, but then I though that maybe a 'society' structure could be used, setting regulations and rules upon that character's actions. By having that in a society object, nothing is hard-coded, and diferent NPC's can live in diferent societies. The society models would try to impose those rules and regulations, but depending on the character's personality, they may wish to break a rule. If they are very unlawful, they are not likely to follow rules, and if a lawful character has been starving, then their hunger may override their want to abide by society, and they might steal food. An improvement on that would be adding a 'local society' structure which would modify the weighting of 'society' rules. So in a town where there are constant raids, there could be a modifier to the societies rules in that town - for example, it may be more acceptable to walk around armed. Another things that would modify the character's behavior is a 'job' structure. This would allow for more artificial actions like bake bread. Ordinarily, it would be hard using a want/need system to get a character to make more food then they need, but if it is a requirement of their job then it is not a problem.
Obviously this is just a high level view of the NPC AI in parseg, there is a lot more AI in the game, but I thoughtI'd limit this thread to the NPC AI.
So, what does everybody think? Feel free to comment, but realize that this is just an overview, and is not a full implementation. It is still very much at the design stage. If anyone else has any ideas pertaining to this then please let me know.
About the author
#2
I know what you mean about NPC behavior depending on the group, but the idea of this system is that the group had nothing to do with the NPC until the player interacts with the NPC. I suppose I should really add another catagory of NPC - the walking doll. The idea is that depending on events in the world, different groups become aware of knowledge, depending on where they are and, if the knowledge is interesting to that group. You should really think of the group as being an entity in itself. When I say that the group gains knowledge, then it does not affect the NPC in any way at all. However when a player talks to an NPC and says "what do you know about X" then, and only then, does the NPC become aware of anything. It is at this point that knowlege from the groups that the NPC is in is shunted accross to the NPC itself. I understand what you are saying about conflicts of intrests, but it is resolved just the once when the player interacts with the player. As soon as the player goes away, either you could record information the player parted with in that NPC, so that when it is promoted to an Active NPC status, it will 'remember' it. Or you could ignore the conversation. Either way, after the player stops talking to the NPC, then all the knowlege it gained from the groups is lost to save memory. This basically means that the NPC's inherit the knowlege from the groups they belong to when it is needed. I think the Key is to think of a social group, as a higher level NPC, so that NPC's can be affected, but through the group to make it quicker.
I think that when the NPC is upgraded to Active, then it should be their job composing most of their personality, but with their cocial groups modifying it. I think that should resolve any problems. But either way. processing for the NPC only happens when they come intop contact with the player.
Giving an illusion of life to the NPC's is important though even when not speaking to the player. I think for this, an NPC should be given a routine to follow each day, made up from their job, home etc. It would only have to be created once, and then again if their circumstances change, but until then, they could just follow it. Having an entire Village moving around to their work, the pup etx would seem realistic to the player, even more so because of the fact that they can upgrade status to interact with the player.
One situation that could be different, is if the NPC is attacked. I think there would have to be an intermidiate mode between backdrop to active, because in a combat their might not be time to fully flesh out a character. I suppose that just their basic characteristics could be generated just from a few factors. And then when the battle is over and there is processing time, the NPC could be promoted fully to active, or just demoted again.
About helping. I am in the progress of creating a dynamic web-site where all the material for the game(parseg) could be stored and worked on. SO I'll inform you when I get it finished, any extra opinions are of great help.
I'll probably post som emore about parseg later on.
04/29/2001 (8:27 pm)
Hi Scott, glad to see someones interested :)I know what you mean about NPC behavior depending on the group, but the idea of this system is that the group had nothing to do with the NPC until the player interacts with the NPC. I suppose I should really add another catagory of NPC - the walking doll. The idea is that depending on events in the world, different groups become aware of knowledge, depending on where they are and, if the knowledge is interesting to that group. You should really think of the group as being an entity in itself. When I say that the group gains knowledge, then it does not affect the NPC in any way at all. However when a player talks to an NPC and says "what do you know about X" then, and only then, does the NPC become aware of anything. It is at this point that knowlege from the groups that the NPC is in is shunted accross to the NPC itself. I understand what you are saying about conflicts of intrests, but it is resolved just the once when the player interacts with the player. As soon as the player goes away, either you could record information the player parted with in that NPC, so that when it is promoted to an Active NPC status, it will 'remember' it. Or you could ignore the conversation. Either way, after the player stops talking to the NPC, then all the knowlege it gained from the groups is lost to save memory. This basically means that the NPC's inherit the knowlege from the groups they belong to when it is needed. I think the Key is to think of a social group, as a higher level NPC, so that NPC's can be affected, but through the group to make it quicker.
I think that when the NPC is upgraded to Active, then it should be their job composing most of their personality, but with their cocial groups modifying it. I think that should resolve any problems. But either way. processing for the NPC only happens when they come intop contact with the player.
Giving an illusion of life to the NPC's is important though even when not speaking to the player. I think for this, an NPC should be given a routine to follow each day, made up from their job, home etc. It would only have to be created once, and then again if their circumstances change, but until then, they could just follow it. Having an entire Village moving around to their work, the pup etx would seem realistic to the player, even more so because of the fact that they can upgrade status to interact with the player.
One situation that could be different, is if the NPC is attacked. I think there would have to be an intermidiate mode between backdrop to active, because in a combat their might not be time to fully flesh out a character. I suppose that just their basic characteristics could be generated just from a few factors. And then when the battle is over and there is processing time, the NPC could be promoted fully to active, or just demoted again.
About helping. I am in the progress of creating a dynamic web-site where all the material for the game(parseg) could be stored and worked on. SO I'll inform you when I get it finished, any extra opinions are of great help.
I'll probably post som emore about parseg later on.
#3
Something you have probably already thought of is the situation where a player talks to an NPC which is promoted, then goes away and the NPC is demoted, and then comes back to talk some more. The player then talks to the NPC and it becomes apparent that it doesn't remember the previous encounter just 5 minutes ago because although the knowledge has gone into the groups knowledge base, chance has determined that this particular NPC doesn't have that knowledge.
Same goes for characteristics, like last time they met the NPC was a master whatever, next time they are't.
Two ways to manage this. Either wait a while before demoting an NPC to group level or store a random number seed for initialising him. The second method is good for personal characteristics but I don't know how it would work for knowledge. A recently contacted NPC should remember some basic things like their name, your name, the fact that you stabbed them 5 minutes ago and these don't necessarily need to go into group knowledge at all.
Maybe you hinted at this problem when you talked about the governing AI promoting a character even further?
I look forward to hearing more about your project/game.
04/29/2001 (9:10 pm)
I think you have some great ideas.Something you have probably already thought of is the situation where a player talks to an NPC which is promoted, then goes away and the NPC is demoted, and then comes back to talk some more. The player then talks to the NPC and it becomes apparent that it doesn't remember the previous encounter just 5 minutes ago because although the knowledge has gone into the groups knowledge base, chance has determined that this particular NPC doesn't have that knowledge.
Same goes for characteristics, like last time they met the NPC was a master whatever, next time they are't.
Two ways to manage this. Either wait a while before demoting an NPC to group level or store a random number seed for initialising him. The second method is good for personal characteristics but I don't know how it would work for knowledge. A recently contacted NPC should remember some basic things like their name, your name, the fact that you stabbed them 5 minutes ago and these don't necessarily need to go into group knowledge at all.
Maybe you hinted at this problem when you talked about the governing AI promoting a character even further?
I look forward to hearing more about your project/game.
#4
I was thinking of the group as a seperate entity as well. Sort of an abstract npc. It's basically a central storage unit for information various npcs might know. So when an NPC needs to do something, it looks up what it's group knows, and acts accordingly. This saves each npc having to figure everything out for itself, thus saving precious clock cycles. However, the data going to the npc from the group still has to be filtered for relevancy. Hence we have the general (group) and specific (npc) knowledge. The specific knowledge being determined on demand.
What I was thinking, is this same mechanism could be used for the general, background behaviour. Just as we have general and specific knowledge, we can have general and specific behaviour. A background npc can have it's behaviour dictated by the groups it belongs to, but when it comes to the foreground it's own personality can come into play. This would save having to come up with 'jobs' for every npc to do when in the background, as it would be determined by what groups they belong to.
This would lead to npcs having a group mentatlity when viewed from a distance, but their personality would show through when close up. Just like graphical LOD, and even real life. It also makes for a nice, orthogonal system: general and specific knowledge, and general and specific behaviour, all detmerined through abstract groups. The general taking less processor time, applicable to large groups of npcs, and used for background AI. The specific applying to specific nps, taking more processor time, but only used when that npc is more relevant.
Would be interesting to see, anyway.
Edit: You slid under my post there, Robert :) I think each npc could still have specific knowledge about itself, and not just generated randomly. This knowledge would only be loaded when the npc is 'active', though. Otherwise, it just relies on the general group knowledge. Although you do bring up a good point, that you'd have to be careful how how promote/demote an npc. Probably would be a good idea to have some hysteresis on the trigger, as well as being able to bias that trigger to make important npcs stand out more.
04/29/2001 (9:14 pm)
Yes, I'm bored tonight so I'm checking the forums every 15 minutes. In between Tribes2 games :)I was thinking of the group as a seperate entity as well. Sort of an abstract npc. It's basically a central storage unit for information various npcs might know. So when an NPC needs to do something, it looks up what it's group knows, and acts accordingly. This saves each npc having to figure everything out for itself, thus saving precious clock cycles. However, the data going to the npc from the group still has to be filtered for relevancy. Hence we have the general (group) and specific (npc) knowledge. The specific knowledge being determined on demand.
What I was thinking, is this same mechanism could be used for the general, background behaviour. Just as we have general and specific knowledge, we can have general and specific behaviour. A background npc can have it's behaviour dictated by the groups it belongs to, but when it comes to the foreground it's own personality can come into play. This would save having to come up with 'jobs' for every npc to do when in the background, as it would be determined by what groups they belong to.
This would lead to npcs having a group mentatlity when viewed from a distance, but their personality would show through when close up. Just like graphical LOD, and even real life. It also makes for a nice, orthogonal system: general and specific knowledge, and general and specific behaviour, all detmerined through abstract groups. The general taking less processor time, applicable to large groups of npcs, and used for background AI. The specific applying to specific nps, taking more processor time, but only used when that npc is more relevant.
Would be interesting to see, anyway.
Edit: You slid under my post there, Robert :) I think each npc could still have specific knowledge about itself, and not just generated randomly. This knowledge would only be loaded when the npc is 'active', though. Otherwise, it just relies on the general group knowledge. Although you do bring up a good point, that you'd have to be careful how how promote/demote an npc. Probably would be a good idea to have some hysteresis on the trigger, as well as being able to bias that trigger to make important npcs stand out more.
#5
04/30/2001 (5:21 am)
The villager AI in Black & White is based on a group mind.
#6
Robert: What you describe (NPC being promoted, demoted, and then promoted again shortly after) would be a problem, but I think I have a way round it, tell me what you think of it. Onviously this is'nt an exact impementation, and would need tweeking in the game but here goes. When an NPC is promoted, it would be kept in that state for a while even after the player stops talking to it. The world-AI would asign a probability of an NPC being kept in an Active state. This probability would drop over time, but if the player goes back to speak to them in a short period of time, the world-AI would consider a permanent promotion. If the player attacked an NPC, there would be a much higher probability of it staying active.
The world-AI would only demote NPC's if it believes that the player would not remember it, eg. the player speaks to it once, and then leaves the town without interacting with the NPC again. But if an NPC has been interacted with a lot by the player, then it would probably be promoted to a story NPC, meaning it would stay active unless the player doesn't see it for weeks or something. But a story NPC would be considered for use by parseg in an event. Leading to further bonds between that NPC and the player so that it becomes part of the story. - If the world-AI considers an NPC to be important to a player, then it might considr generating an event where the NPC is captured and held-hostage by enemies of the player. A story NPC could also be an enemie of the player, i fit is interacted with by the player lots, but in a negative way.
Scott:You've caught my way of thinking right on :) I like your idea of an AI LOD for the NPC's. The whole point of the game is to make the whole world and everything that happens in it realistic. But instead of mapping the actions of every NPC hopefully create interesting events, the worl-AI takes care of that.
When a player moves form one area to the next, the world-AI would weigh up the chances of an event happening, this would be decided first of all by who would likely be there. If there is an enemie camp nearby, there is an X% chance of there being a party of an enemy faction there. Same for every faction - sort of an influence provided by the locations of factions. If the world-AI knows that there is party of enemies going from A to B, and the player ends up between A and B, there is a chance that they will meet. Instead of mapping the enemies position, ther would be a probability of meeting them.
So in a way it is random, but if is based on what could happen, what has happened, and what the player would like. If the player likes killing thinks lits. Then if an event is generated, it is quite likely to be an encounter of some sort. The idea is that the events are what the story of the game consists of, and that they are randomly generated, in a way that doesn't look random to the player. If they know there is an enemy camp nearby, then they would expenct to encounter an enemy patrol. They just don't know that it is probabilities, instead of mapping each NPC's location, personality, and actions. Realism with less CPU time.
04/30/2001 (10:20 am)
Hi everyone, great to see all this activity on this thread.Robert: What you describe (NPC being promoted, demoted, and then promoted again shortly after) would be a problem, but I think I have a way round it, tell me what you think of it. Onviously this is'nt an exact impementation, and would need tweeking in the game but here goes. When an NPC is promoted, it would be kept in that state for a while even after the player stops talking to it. The world-AI would asign a probability of an NPC being kept in an Active state. This probability would drop over time, but if the player goes back to speak to them in a short period of time, the world-AI would consider a permanent promotion. If the player attacked an NPC, there would be a much higher probability of it staying active.
The world-AI would only demote NPC's if it believes that the player would not remember it, eg. the player speaks to it once, and then leaves the town without interacting with the NPC again. But if an NPC has been interacted with a lot by the player, then it would probably be promoted to a story NPC, meaning it would stay active unless the player doesn't see it for weeks or something. But a story NPC would be considered for use by parseg in an event. Leading to further bonds between that NPC and the player so that it becomes part of the story. - If the world-AI considers an NPC to be important to a player, then it might considr generating an event where the NPC is captured and held-hostage by enemies of the player. A story NPC could also be an enemie of the player, i fit is interacted with by the player lots, but in a negative way.
Scott:You've caught my way of thinking right on :) I like your idea of an AI LOD for the NPC's. The whole point of the game is to make the whole world and everything that happens in it realistic. But instead of mapping the actions of every NPC hopefully create interesting events, the worl-AI takes care of that.
When a player moves form one area to the next, the world-AI would weigh up the chances of an event happening, this would be decided first of all by who would likely be there. If there is an enemie camp nearby, there is an X% chance of there being a party of an enemy faction there. Same for every faction - sort of an influence provided by the locations of factions. If the world-AI knows that there is party of enemies going from A to B, and the player ends up between A and B, there is a chance that they will meet. Instead of mapping the enemies position, ther would be a probability of meeting them.
So in a way it is random, but if is based on what could happen, what has happened, and what the player would like. If the player likes killing thinks lits. Then if an event is generated, it is quite likely to be an encounter of some sort. The idea is that the events are what the story of the game consists of, and that they are randomly generated, in a way that doesn't look random to the player. If they know there is an enemy camp nearby, then they would expenct to encounter an enemy patrol. They just don't know that it is probabilities, instead of mapping each NPC's location, personality, and actions. Realism with less CPU time.
#7
I think that with careful management of the possible pitfalls, and so far you seem to be on top of it, your ideas will work very well. I think your society ideas are good too.
04/30/2001 (4:58 pm)
All these ideas sound good. This is all similar to an idea for a stategy game idea (probably not original) where armies would be represented by divisions or whatever until *your* division was attacked, when it and the opposing division would be broken up into units (for want of a better word). When your unit enterd the battle it would be boken into smaller squads, and so on until (if you were brave or unlucky) you end up fighting individual combat. The representation of these is a simular idea to your AI but with a different emphasis and more layers.I think that with careful management of the possible pitfalls, and so far you seem to be on top of it, your ideas will work very well. I think your society ideas are good too.
#8
I'm glad you like my society ideas. I was struggling with how to implement a society for ages. The society structure would have weightings attached to the rules in it, and the 'local' society structure would affect the over-all society. Using this system, when an NPC lives in a town with a different local society, and moves to another place. The local society there would rub off onto the NPC. So the longer an NPC stays in a place, the closer the weightings get to THAT location's society. In a way it's like the longer they stay there, the more accustomed to that society they become.
04/30/2001 (5:23 pm)
thanx for the encouragement. I get what you mean about the strategy game, just using a LOD for the AI. Except for this, the center of the universe is the player character. NPC's near the character will get a lot more attention then ones they can't see. In fact because the game is base on probabilities of things happening, it means that NPC's miles away from the user would get no CPU cycles at all. They would be just stored and ignored until they play a part in the game again. Where depending what has happened since their last update and other factors, they would be put back into memory in an updated state. Don't do any calculation unless it's going to affect the player - ignore everything appart from what the player can see/interact with. And yet by using an intelligent random generator, it can look to the player like the whole world is active and responsive.I'm glad you like my society ideas. I was struggling with how to implement a society for ages. The society structure would have weightings attached to the rules in it, and the 'local' society structure would affect the over-all society. Using this system, when an NPC lives in a town with a different local society, and moves to another place. The local society there would rub off onto the NPC. So the longer an NPC stays in a place, the closer the weightings get to THAT location's society. In a way it's like the longer they stay there, the more accustomed to that society they become.
#9
Of course there would be less extreme and opposite examples too.
04/30/2001 (5:40 pm)
Of couse characters would have an integrity level or something so that some characters would take longer to take up the customs of others. For example a charcter with strong integrity who is kidnapped and kept in a crime gang (bad example but you get my meaning) will take a long time to become a criminal themselves, right?Of course there would be less extreme and opposite examples too.
#10
I suppose it could be integrated with the other society models as well. It could get quite complex in a good way. Having group societies would definatly add more scope and most importantly realism to the game.
Keep these ideas coming, because as soon as I have my site up, I'm going to sort out the stuff in this thread and post it all there. I have a log-in mechanism now... and I'm sure I'll get it to work soon :)
Seriously though, my site will be dynamic where it would be possible to work on ideas online without editing HTML. I'll have a forum for each sub-section, and a chat room. I think I'll have a sort of free-flowing ideas segment where you can post individual segments about the game under different headings. Right now I'm still incubating the idea until there is enough content to make a proper design doc. I't will probably take some time though which is the reason for the site.
04/30/2001 (5:51 pm)
Yeah, that's pretty cool. Didn't think of that one. I never thought of the situation where criminals capture NPC's. Mind you I never thought of criminals as people who habitually break the law... hmm might have to introduce a 'grup society' allowing for people to live in a country, in a town, but still being free from that place's society - living by their own rules. Yeah, thats good.I suppose it could be integrated with the other society models as well. It could get quite complex in a good way. Having group societies would definatly add more scope and most importantly realism to the game.
Keep these ideas coming, because as soon as I have my site up, I'm going to sort out the stuff in this thread and post it all there. I have a log-in mechanism now... and I'm sure I'll get it to work soon :)
Seriously though, my site will be dynamic where it would be possible to work on ideas online without editing HTML. I'll have a forum for each sub-section, and a chat room. I think I'll have a sort of free-flowing ideas segment where you can post individual segments about the game under different headings. Right now I'm still incubating the idea until there is enough content to make a proper design doc. I't will probably take some time though which is the reason for the site.
#11
heres an simplified example
farmer Joe
Groups: Farmer, Family
Primary Group: Farmer
farmers wife Jane
Groups: Family, Local Church
Primary Group: Family
Priest Joseph
Groups: Local Church, preisthood(national)
Primary Group: Local Church
Pope John
Groups: Preisthood
Primary: Preisthood
so Farmer Joe knows that Farmer Bobs fields arent doing to well this season
Jane will know what joe knows
Joseph will know what the members of his church know
and the pope will know what his preists know
so Pope John knows that Farmer Bobs fields aint doin so hot this season.
The question is would Pope John care a bit?
this line of reasoning assumes that the person knows most of the information in his primary group.
I hope that made sense.
of course im not just a naysayer i have a possible workable solution. The information is weighted by group and location. with group determining interest and location determining probability
so since the priest is in the same location he has a high probability of knowing the info but since its not a group he's a member of his interest is low. If the pope is on the other side of the continent then both his prob and interest is low making it very unlikely that he knows about the incident or will mention it if he does. But say he does know about it by chance. Then using the same weighing system you can delete some key information if specifically asked
Player: "anything happening in Sometown"
Pope: "Heard their were some problems with the crops"
that would add some of the "rumormill" effect since the information is sketchy farther from the source.
hehe and it could also send your characters on a wild goose chase since they will have to interpret the importance of the statements.
im sure their are some flaws in my logic it is 4a.m. :)
05/09/2001 (1:44 am)
another pitfall to look out for is the fact that with a system like yours a npc can end up knowing everything.heres an simplified example
farmer Joe
Groups: Farmer, Family
Primary Group: Farmer
farmers wife Jane
Groups: Family, Local Church
Primary Group: Family
Priest Joseph
Groups: Local Church, preisthood(national)
Primary Group: Local Church
Pope John
Groups: Preisthood
Primary: Preisthood
so Farmer Joe knows that Farmer Bobs fields arent doing to well this season
Jane will know what joe knows
Joseph will know what the members of his church know
and the pope will know what his preists know
so Pope John knows that Farmer Bobs fields aint doin so hot this season.
The question is would Pope John care a bit?
this line of reasoning assumes that the person knows most of the information in his primary group.
I hope that made sense.
of course im not just a naysayer i have a possible workable solution. The information is weighted by group and location. with group determining interest and location determining probability
so since the priest is in the same location he has a high probability of knowing the info but since its not a group he's a member of his interest is low. If the pope is on the other side of the continent then both his prob and interest is low making it very unlikely that he knows about the incident or will mention it if he does. But say he does know about it by chance. Then using the same weighing system you can delete some key information if specifically asked
Player: "anything happening in Sometown"
Pope: "Heard their were some problems with the crops"
that would add some of the "rumormill" effect since the information is sketchy farther from the source.
hehe and it could also send your characters on a wild goose chase since they will have to interpret the importance of the statements.
im sure their are some flaws in my logic it is 4a.m. :)
#12
NPC's don't share knowledge between groups just because they are part of them. It is the groups that share knowledge not the NPC's. A group will only gain knowledge if there is a way that they could have found out about the event (close proximity, general news) and even then, they will only gain the knowledge if it is of relevance to the group. Even then, when the individual NPC's knowledge is processed, they may not know everything that the group does. Groups will have simple rules as to sharing knowledge to NPC's. Knowledge could be spread freely through the group, or the leader of the group could keep the important knowledge to themselves. It shouldn't be too hard to implement, as the world-AI will decide whats relevant to it's story and whats not.
Basically, sharing of knowledge between groups with common members, would only happen if that knowledge is deemed relevant by the group. Again that will be decided by simple rules governing what knowledge the group is interested in, applying a weighting to different types of knowledge. It allows flexibility as well - if processing speed gets short, then only the knowledge that is most relevant will be processed, trying to keep things relevant to the story, but not bothering with info that won't really matter. One of the main things I am trying to do with the AI, is make it very scalable. A slow PC will just keep track of vital information, but a faster one would be able process more events, and add more realism.
05/09/2001 (4:51 am)
I think I know what you mean, but I wasn't planning on just spreading knowledge between groups.NPC's don't share knowledge between groups just because they are part of them. It is the groups that share knowledge not the NPC's. A group will only gain knowledge if there is a way that they could have found out about the event (close proximity, general news) and even then, they will only gain the knowledge if it is of relevance to the group. Even then, when the individual NPC's knowledge is processed, they may not know everything that the group does. Groups will have simple rules as to sharing knowledge to NPC's. Knowledge could be spread freely through the group, or the leader of the group could keep the important knowledge to themselves. It shouldn't be too hard to implement, as the world-AI will decide whats relevant to it's story and whats not.
Basically, sharing of knowledge between groups with common members, would only happen if that knowledge is deemed relevant by the group. Again that will be decided by simple rules governing what knowledge the group is interested in, applying a weighting to different types of knowledge. It allows flexibility as well - if processing speed gets short, then only the knowledge that is most relevant will be processed, trying to keep things relevant to the story, but not bothering with info that won't really matter. One of the main things I am trying to do with the AI, is make it very scalable. A slow PC will just keep track of vital information, but a faster one would be able process more events, and add more realism.
#13
first person: "I have nothing to say"
last person: "John has penguin ears"
for what reason? i dont know it just sounds fun. It could also work well for rpgs, and edutainment. since it could teach kids about rumors and how they get twisted. I dunno
05/09/2001 (9:22 pm)
The more i think about your idea the more i like it. I wanted to ask you if you would mind if i "borrowed"(allright stole) some of your ideas. I'm thinking of creating a "rumormill engine" that combines your idea with routines to generalize/specify/reverse/exagerate.. the information like what i was saying before. Kinda like that game where you whisper a phrase around the group to see what the end result isfirst person: "I have nothing to say"
last person: "John has penguin ears"
for what reason? i dont know it just sounds fun. It could also work well for rpgs, and edutainment. since it could teach kids about rumors and how they get twisted. I dunno
#14
The story, I take it, would just be fixed events sitting on top of the random ones. So the two thoughts are: we need a way to make sure the story events happen properly, without conflicting with the random event, and a way to make sure other random events don't interfere with the story ones.
Examples (if I can come up with some this late...so tired):
If the player just completed some huge quest, as should be welcomed with fanfare back at the city, it wouldn't be good for a random 'raid city' event to unfold. Can't have much fanfare with the place burning down. How can we make sure random events don't interfere with the main plot?
What if the army that raided the city was meant to be used later in the story (say the player has to scare them off or something), and they get killed by the town soldiers during the raid. Now the player has no army to scare off.
One way would be to make sure random events are very small scale. But this would be boring. I want to see wars going on in the background :) Maybe certain key npcs and groups could be marked as 'hands off' to the random event generator. Of course then we still have to make sure they aren't indirectly affected. Need to think about this more in the morning, after sleep.
The coolest thing, if we could get this working, would be that the world would be different each time the player went through it. Story would be the same, but different events would unfold around him.
More later. Sleep now.
05/09/2001 (11:20 pm)
After reading the thread through for the tenth time or so, I've finally figured out what you meant about the random event stuff. That's definately cool. Two thoughts, that are really just one, but different sides of it.The story, I take it, would just be fixed events sitting on top of the random ones. So the two thoughts are: we need a way to make sure the story events happen properly, without conflicting with the random event, and a way to make sure other random events don't interfere with the story ones.
Examples (if I can come up with some this late...so tired):
If the player just completed some huge quest, as should be welcomed with fanfare back at the city, it wouldn't be good for a random 'raid city' event to unfold. Can't have much fanfare with the place burning down. How can we make sure random events don't interfere with the main plot?
What if the army that raided the city was meant to be used later in the story (say the player has to scare them off or something), and they get killed by the town soldiers during the raid. Now the player has no army to scare off.
One way would be to make sure random events are very small scale. But this would be boring. I want to see wars going on in the background :) Maybe certain key npcs and groups could be marked as 'hands off' to the random event generator. Of course then we still have to make sure they aren't indirectly affected. Need to think about this more in the morning, after sleep.
The coolest thing, if we could get this working, would be that the world would be different each time the player went through it. Story would be the same, but different events would unfold around him.
More later. Sleep now.
#15
@Scott: Although I am sure that the system could be implemented in the way that you describe, it was not what I had in mind myself.
There would be two modes of play, open-ended and story.
In the open-ended style, there would be no fixed story whatsoever. Every event in the game would be inteligently generated. The idea behind that even though the events are semi-random, they will be realistic in light of what has already happened in the game, as the positions of factions are kept, story NPC's are handled, and the previous events are taken into account. Therefore the events should all be things thatr could likely happen in the player's eyes. This means that hopefully, the player will see the continuity, and it wioll be like a story, but it is one that is responsive to the player's acftions in an intelligent way.
All through the game, the player's actions are recorded to try and get a feel for the player. The world-AI will attempt to subtly alter things to the player's taste, to try and create a fun game, as well as a realistic one. If the player seeks combat often, then events are more likely to be combat driven, and they may involve things like 'storm the enemy castle to try and rescue your friend (who just happens to be a story NPC)'. A player who enjoys walking into NPC's homes to try and steal items, and who attempt to kill through poisoning and traps, would be more likely to encounter an eventwhere there are rare items in display, which might be of value to the player.
The event generator, doesn't always provide a confrontation, but its main purpose, is to set the scene for the player ion a realistic manner. When the player walks in to the crap village of Stow, the event generator will position everyone and everything. If there happen to be story-NPC's around, there there might be a sort of goal. A story-NPC could be brought to story status, because the player killed their family in a fight, and the world-AI has decided that it could be used to add interest to further events (just some basic rules). That NPC could be unknown to the player, and yet the NPC wishes to hunt down the player and harm them, hunting them accross the land (performed by the event generator, the NPC's travel isn't recorded, but it could be a likely event). Now, the event generator may well bring the avil NPC together with the player's best friend, as it knows it will make an interesting event. The player doesn't know that evil NPC kidnapped their friend, but the event generator shoul dengineer the game so that the player finds out. This could be accomplished in many manners. Word could get to another one of the player's companions, or maybe when the player comes to town Y, a messenger is there from evil NPC. Either way, the event generator tries to initiate these scenes\events, and then it is left to the player to do as they wish in response. In fact they may just ignore it, getting their friend killed. Or they could hire some thugs to recover their friend for them, or they could march up and fall into the evil NPC's trap. The point is, that even thought there is no story as such, there will always be interesting events happening. Instead of simulating things, it makes sure the player is often in the right place at the right time.
Whew, the story mode next. Starts off like free play, but once the game has got on as bit, and knows of the players likes/dislikes, then it generates a goal for the player, based on the current state of the world, and what the player is like. Along with the goal, the story-NPC's needed for it are generated, as well as the location if one is needed. These goals are quite big though. Once the end-condition has been generated, then the game plays just like free-mode, except the events will be tailored to fit in with the goal, either trying to stop the player, or helping them when it gets too hard.
Just because every NPC's actions aren't activly trakced, doesn't mean that events can't happen in the background. But thewy will only be high level events, like encounters, and it would be nice to track the story NPC's to some extent, as it would add realism to the event generator.
The advantage of this right-time, right-place system, is that the dificullty can bve tailored dynamically. The event generator will never generate an impossible event. It will never throw the player into a deep river, unless that character can swim, or has a dinghy. If things really aren't going the players way (they aren't very good/they keep mucking up) then events can be generated to help the player. If a player is storming around the world without a challenge, then the event generator can cook up something difficult based on the player's abilities. The game should keep learning about the player, and should be tailored in a realistic way. I think that will mean that you would be able to create a really good playing experience for the player, with movie style rescues to impossible situations. And true freedom to forge the story yourself.
Anyway. It's a lot to implement, and I was thinking to start out with a small world. Something like 2 castles, and opposing factions, with maybe a village or 2, not many NPC's. It would allow trying out some of the ideas, but in a small scale.
05/10/2001 (5:15 pm)
@Brad: I am glad that you are interested in trying to implement something along these lines. One of the reasons that I posted it here, was not only to try and advance the idea, but I had hoped that some people would be interested, and try and implement something like it. I had originally thought it up when wondering how to improve RPG's and I think I've came up with something pretty unique, but ideas are for sharing above all else. SO, go ahead and use what you can, I would be glad to think that someone has found it useful. Although I do plan to implement it into an RPG, it is the implementation that counts, not the idea. This idea, is mainly just for a game system, not the actual game itself, so two games using this idea would doubtlessly be different.@Scott: Although I am sure that the system could be implemented in the way that you describe, it was not what I had in mind myself.
There would be two modes of play, open-ended and story.
In the open-ended style, there would be no fixed story whatsoever. Every event in the game would be inteligently generated. The idea behind that even though the events are semi-random, they will be realistic in light of what has already happened in the game, as the positions of factions are kept, story NPC's are handled, and the previous events are taken into account. Therefore the events should all be things thatr could likely happen in the player's eyes. This means that hopefully, the player will see the continuity, and it wioll be like a story, but it is one that is responsive to the player's acftions in an intelligent way.
All through the game, the player's actions are recorded to try and get a feel for the player. The world-AI will attempt to subtly alter things to the player's taste, to try and create a fun game, as well as a realistic one. If the player seeks combat often, then events are more likely to be combat driven, and they may involve things like 'storm the enemy castle to try and rescue your friend (who just happens to be a story NPC)'. A player who enjoys walking into NPC's homes to try and steal items, and who attempt to kill through poisoning and traps, would be more likely to encounter an eventwhere there are rare items in display, which might be of value to the player.
The event generator, doesn't always provide a confrontation, but its main purpose, is to set the scene for the player ion a realistic manner. When the player walks in to the crap village of Stow, the event generator will position everyone and everything. If there happen to be story-NPC's around, there there might be a sort of goal. A story-NPC could be brought to story status, because the player killed their family in a fight, and the world-AI has decided that it could be used to add interest to further events (just some basic rules). That NPC could be unknown to the player, and yet the NPC wishes to hunt down the player and harm them, hunting them accross the land (performed by the event generator, the NPC's travel isn't recorded, but it could be a likely event). Now, the event generator may well bring the avil NPC together with the player's best friend, as it knows it will make an interesting event. The player doesn't know that evil NPC kidnapped their friend, but the event generator shoul dengineer the game so that the player finds out. This could be accomplished in many manners. Word could get to another one of the player's companions, or maybe when the player comes to town Y, a messenger is there from evil NPC. Either way, the event generator tries to initiate these scenes\events, and then it is left to the player to do as they wish in response. In fact they may just ignore it, getting their friend killed. Or they could hire some thugs to recover their friend for them, or they could march up and fall into the evil NPC's trap. The point is, that even thought there is no story as such, there will always be interesting events happening. Instead of simulating things, it makes sure the player is often in the right place at the right time.
Whew, the story mode next. Starts off like free play, but once the game has got on as bit, and knows of the players likes/dislikes, then it generates a goal for the player, based on the current state of the world, and what the player is like. Along with the goal, the story-NPC's needed for it are generated, as well as the location if one is needed. These goals are quite big though. Once the end-condition has been generated, then the game plays just like free-mode, except the events will be tailored to fit in with the goal, either trying to stop the player, or helping them when it gets too hard.
Just because every NPC's actions aren't activly trakced, doesn't mean that events can't happen in the background. But thewy will only be high level events, like encounters, and it would be nice to track the story NPC's to some extent, as it would add realism to the event generator.
The advantage of this right-time, right-place system, is that the dificullty can bve tailored dynamically. The event generator will never generate an impossible event. It will never throw the player into a deep river, unless that character can swim, or has a dinghy. If things really aren't going the players way (they aren't very good/they keep mucking up) then events can be generated to help the player. If a player is storming around the world without a challenge, then the event generator can cook up something difficult based on the player's abilities. The game should keep learning about the player, and should be tailored in a realistic way. I think that will mean that you would be able to create a really good playing experience for the player, with movie style rescues to impossible situations. And true freedom to forge the story yourself.
Anyway. It's a lot to implement, and I was thinking to start out with a small world. Something like 2 castles, and opposing factions, with maybe a village or 2, not many NPC's. It would allow trying out some of the ideas, but in a small scale.
#16
I still think my idea would be cool, though :) If I can just figure out how to make it work.
Scott Rutledge
05/10/2001 (6:29 pm)
Ah ha, I do see now :) Thanks for the very comprehensive explanation. There's definately a lot of work ahead. I'm still more than willing to help work on the design, at least. I have some ideas to throw at you, and some concepts in mind for how to deal with some aspects. Be sure to let me know when you get the website up.I still think my idea would be cool, though :) If I can just figure out how to make it work.
Scott Rutledge
#17
On the surface at least, it looks like the AI for the event generator will have to be at the cutting edge in this field. If you track through all the descisions that the AI needs to make for just one of your examples and then work out how the AI comes to those decisions and then generates dialogue/actions for NPCs (no easy task in itself if you want dialogue to be original) you soon realise the enormity of the task.
I'm fairly sure each aspect of the AI involved has been done before, but bringing it all together... I'm not saying that it cant be done I just hope you are aware of the problems you face.
I suppose I should offer some suggestions instead of just pointing out the hurdles so heres a few:
- limit the dialogue. This may mean a slight shift in genre towards a more action oriented game
- make the AI even more heirarchical so that the top level AI doesn't have such a big load and the lowest level AI doesn't have much left to do at all. This is fairly obvious but its not clear if thats what you're doing now.
- think about the society model and possibly integrate it with the story AI. This is just a vague suggestion, I'm not really sure what I mean myself, except that I think it should fit into the overall AI heirarchy somewhere
- try to avoid bringing the action to the player (the world should go on with or without them) and instead inform the player what and where the action is (subtly) and let them choose where to go. This takes the onus off the world AI to decide what the player likes, no matter how good the AI is the player is the best judge of this.
Maybe you've thought this through already, if so great if not I hope it helps a bit.
05/10/2001 (10:02 pm)
I don't want to be discouraging but you are sweeping an awful lot under the carpet by saying "the event generator will handle it". The event generator is the key to making it work, have you any thoughts on how to code this? Will there be a finite number of possible events? I can't see a way out of a finite number of event types at least. The event generator needs to be large and complicated enough that a moderately experienced player can't say to themselves "If I keep doing this an XXX type event is bound to happen".On the surface at least, it looks like the AI for the event generator will have to be at the cutting edge in this field. If you track through all the descisions that the AI needs to make for just one of your examples and then work out how the AI comes to those decisions and then generates dialogue/actions for NPCs (no easy task in itself if you want dialogue to be original) you soon realise the enormity of the task.
I'm fairly sure each aspect of the AI involved has been done before, but bringing it all together... I'm not saying that it cant be done I just hope you are aware of the problems you face.
I suppose I should offer some suggestions instead of just pointing out the hurdles so heres a few:
- limit the dialogue. This may mean a slight shift in genre towards a more action oriented game
- make the AI even more heirarchical so that the top level AI doesn't have such a big load and the lowest level AI doesn't have much left to do at all. This is fairly obvious but its not clear if thats what you're doing now.
- think about the society model and possibly integrate it with the story AI. This is just a vague suggestion, I'm not really sure what I mean myself, except that I think it should fit into the overall AI heirarchy somewhere
- try to avoid bringing the action to the player (the world should go on with or without them) and instead inform the player what and where the action is (subtly) and let them choose where to go. This takes the onus off the world AI to decide what the player likes, no matter how good the AI is the player is the best judge of this.
Maybe you've thought this through already, if so great if not I hope it helps a bit.
#18
The system is indeed hierarchical. The 'group' npcs act as high-level, central processors, handling general information that can be used by all members of that group. Each individual npc then takes any general information available to it and applies it's own specific knowledge to determine it's behaviour. This is mentioned somewhere...up...there. K, this thread is getting long.
I know William had an idea of how to deal with the society structure. Again, it's up there somewhere. My interpretation was each society would have a group npc, which would include acceptable/not acceptable behaviour, and each member of the society would adhear to those rules by however lawful they are.
You bring up a good point about not always bringing the action right to the player. I had in mind some kind of rumour or news system which the player could consult to determine where the action was. Of course, brining the action to the player can be useful too: it provides a good scenario for the 'unwilling hero'. Depends what you want, really.
More to think about...always more. Anyone for starting out really really small?
05/11/2001 (8:15 am)
Hi Robert, thanks for the input. Indeed I've thought about the some of the issues you bring up. The mystical event generator certainly does need some more thought put into it. Right now, for example, I'm trying to figure out how to define an 'event' rigidly enough for a computer to be able to handle it. Harder than it sounds! :) I'm trying to use frames to do it currently. More on that when I have some.The system is indeed hierarchical. The 'group' npcs act as high-level, central processors, handling general information that can be used by all members of that group. Each individual npc then takes any general information available to it and applies it's own specific knowledge to determine it's behaviour. This is mentioned somewhere...up...there. K, this thread is getting long.
I know William had an idea of how to deal with the society structure. Again, it's up there somewhere. My interpretation was each society would have a group npc, which would include acceptable/not acceptable behaviour, and each member of the society would adhear to those rules by however lawful they are.
You bring up a good point about not always bringing the action right to the player. I had in mind some kind of rumour or news system which the player could consult to determine where the action was. Of course, brining the action to the player can be useful too: it provides a good scenario for the 'unwilling hero'. Depends what you want, really.
More to think about...always more. Anyone for starting out really really small?
#19
As you have realised, there is a mountain of work to do, as in this thread I was just posting the original idea. I've not thought of code for anything as more then a passing thought at the moment, as this is just the design I am working on right now. This thread was intended to just be a limited discusion on the NPC AI - NPC levels, group structures, job structures, and social structures, but I've kept posting more and more of the game here (unintentionally, but it all really ties in).
It might be an idea to start a new thread for the event generator.
Anyway, I know what you're on about with the event generator, most of the game system is supposed to be simple, but give the illusion of reality. Point being, I would not make the event generator sentient (as it probably sounds) but it would be a set of rules (a lot mind) to make situations out of template situations, but add modifiers, and maybe mix several events. But it wouldn't just be used for direct encounters with the player, my last post wasn't too clear, but the event handler carries out other high level events in the world, and one of the examples I had of the event generator, was your mate being captured at the enemy camp, and a messenger is sent to you. Also, you would idealy find out about large events from NPC gossip.
Anyway, the event generator should be simple to use, but easily modified so that it will seem realistic to the player. Just simple reasoning - the player is traveling accross the country side, and is nearing camp. The event generator knows that the inhabitors of the camp are enemies of the player, and as the player is near the camp, there is a chance that there is an encounter between a patrol and the player. If the player was friendly to the camp, then would be able to chat with the patrol, and find out information. Anyway, that's just the over-view. Other tings like battles between two factions can occur, so if there is a war on, and the player is traveling between waring sides, there is a chance that the player stumbles onto a fresh battleground.
I have a pretty cool idea for dynamic NPC dialog, but it's long so I won't go into it here.
@Scott: You seem to have grasped the idea soundly, getting the event generator to work under many situations realistically is the key.
I was wanting to try a sort of prototype, to try out the new idea, but on a very small scale, unfortunatly, I don't have the time just now, so I'm just designing. I know that a lot more work needs to go into the event generator, as to be truthful, I have never thought hard about how to implement it.
Either way, the goal is to present realism to the player, not to code it. Simple code for feigned realism is what I'm after. Sure everyone wants a living, breathing, reactive world, but I am trying to be realistic, and create something that simply gives the illusion of a living, reactive world. Thats why I would love to try it even on a small scale, but I need to sort other projects out first.
Anyway, I'll leave this post here before the load time for the page goes into days.
05/11/2001 (2:42 pm)
@Robert: :) yeah, the event generator does seem to get a lot of the blame.As you have realised, there is a mountain of work to do, as in this thread I was just posting the original idea. I've not thought of code for anything as more then a passing thought at the moment, as this is just the design I am working on right now. This thread was intended to just be a limited discusion on the NPC AI - NPC levels, group structures, job structures, and social structures, but I've kept posting more and more of the game here (unintentionally, but it all really ties in).
It might be an idea to start a new thread for the event generator.
Anyway, I know what you're on about with the event generator, most of the game system is supposed to be simple, but give the illusion of reality. Point being, I would not make the event generator sentient (as it probably sounds) but it would be a set of rules (a lot mind) to make situations out of template situations, but add modifiers, and maybe mix several events. But it wouldn't just be used for direct encounters with the player, my last post wasn't too clear, but the event handler carries out other high level events in the world, and one of the examples I had of the event generator, was your mate being captured at the enemy camp, and a messenger is sent to you. Also, you would idealy find out about large events from NPC gossip.
Anyway, the event generator should be simple to use, but easily modified so that it will seem realistic to the player. Just simple reasoning - the player is traveling accross the country side, and is nearing camp. The event generator knows that the inhabitors of the camp are enemies of the player, and as the player is near the camp, there is a chance that there is an encounter between a patrol and the player. If the player was friendly to the camp, then would be able to chat with the patrol, and find out information. Anyway, that's just the over-view. Other tings like battles between two factions can occur, so if there is a war on, and the player is traveling between waring sides, there is a chance that the player stumbles onto a fresh battleground.
I have a pretty cool idea for dynamic NPC dialog, but it's long so I won't go into it here.
@Scott: You seem to have grasped the idea soundly, getting the event generator to work under many situations realistically is the key.
I was wanting to try a sort of prototype, to try out the new idea, but on a very small scale, unfortunatly, I don't have the time just now, so I'm just designing. I know that a lot more work needs to go into the event generator, as to be truthful, I have never thought hard about how to implement it.
Either way, the goal is to present realism to the player, not to code it. Simple code for feigned realism is what I'm after. Sure everyone wants a living, breathing, reactive world, but I am trying to be realistic, and create something that simply gives the illusion of a living, reactive world. Thats why I would love to try it even on a small scale, but I need to sort other projects out first.
Anyway, I'll leave this post here before the load time for the page goes into days.
#20
Here are some thoughts that I have:
You have each NPC being part of one or more particular groups, in actuality Each NPC has several groups they are going to be part of. They have
a Family
a Profession
a City/town where they live
and maybe a "Personality" group.
This will give an automatic Randomness to certain NPC reactions. For instance, the town gets raided by barbarians, family A has a Baker, a BlackSmith, and a Soldier in it. All would react differently according to their Profession (and Personality).
On the other hand, the Player kills the Soldier in the Family, now the Family group has Vendetta against the Player. In effect, the Family Group gets Promoted in importance and all the NPC's that are part of it.
There could be different Groups and more or less, but the key is to give the appearance of reality so you only need as many that are neccesary to give that Appearance.
The City/Town or Location Group is somewhat different also. All Knowledge would originate somewhere and Propogate from there. Each piece of Knowledge in the Game should be a single Item (Object) that could be attached to any of the Groups or even a individual NPC. People in the local vicinity of an Event would hear about it pretty quickly and in more Detail, the further out you go the less detail is available and, if you want, the longer it takes the Knowledge to Travel.
I also think that any Promoted NPC should become a Group in and of themselves, this will make it easier to coordinate the Major NPC's with the Event Manager. Most of the Groups in the Game would be of no interest to the Event Manager durign normal Play, only those that are promoted and a few others like Location Groups so they can recieve Knowledge.
I think your concept of the Event Manager should be broken up. I have a system for a DX Mod where there is a Game Manager which controls the information flow, the players interaction with the major Factions in the game, Time of Day, and other Global State Information. I also have a Mission Generator that generates Random, Semi-Random, and Non-random Missions for the Player based on Faction Allignment, the Players History, Plot Requirements, etc at a Global Level also.
However, when the Player actually enters a Map, the Map Mission Manager (MMM) takes over and sets up whatever Missions are needed for the location and the level of police, whether their are any Gang Wars going on, the lighting level, what stores are open, etc. (The MMMs are hard coded Map Specific.) Everything is handled by the MMM until the Player leaves the Map at which time information is sent to the Mission Manager and Game Manager to update the Global Situation.
The system I have set up is for a FPS/RPG so is oriented more towards combat than yours and is a lot more complex than I have mentioned, but I think the same concept applies to your Event Manager. Break it down into the component tasks that are needed and create a Component for each Task.
Your High Level Event Manager could handle creating Scenarios, for instance in area A it Randomly Generates a Barbarian Raid that will occur in so much time. If the Player is on the Map when the Raid Occurs, then they will participate. Otherwise the Raid becomes a Piece of Knowledge that is Propogated throughout the World. If the Player enters are A shrotly after the Raid, the MMM system can generate Corpses, Destruction, etc and set up a lot of conversations. Meanwhile, the Knowledge of the Raid might reach the local Lord or Law Enforcement and they decide to put a Bounty on the Barbarians which will create a Mission for the Player. Etc, etc.
I look foward to seeing how you progress with this.
06/17/2001 (9:18 am)
This is a real interesting thread, I have thought about doing some similar stuff but nothing exactly on point.Here are some thoughts that I have:
You have each NPC being part of one or more particular groups, in actuality Each NPC has several groups they are going to be part of. They have
a Family
a Profession
a City/town where they live
and maybe a "Personality" group.
This will give an automatic Randomness to certain NPC reactions. For instance, the town gets raided by barbarians, family A has a Baker, a BlackSmith, and a Soldier in it. All would react differently according to their Profession (and Personality).
On the other hand, the Player kills the Soldier in the Family, now the Family group has Vendetta against the Player. In effect, the Family Group gets Promoted in importance and all the NPC's that are part of it.
There could be different Groups and more or less, but the key is to give the appearance of reality so you only need as many that are neccesary to give that Appearance.
The City/Town or Location Group is somewhat different also. All Knowledge would originate somewhere and Propogate from there. Each piece of Knowledge in the Game should be a single Item (Object) that could be attached to any of the Groups or even a individual NPC. People in the local vicinity of an Event would hear about it pretty quickly and in more Detail, the further out you go the less detail is available and, if you want, the longer it takes the Knowledge to Travel.
I also think that any Promoted NPC should become a Group in and of themselves, this will make it easier to coordinate the Major NPC's with the Event Manager. Most of the Groups in the Game would be of no interest to the Event Manager durign normal Play, only those that are promoted and a few others like Location Groups so they can recieve Knowledge.
I think your concept of the Event Manager should be broken up. I have a system for a DX Mod where there is a Game Manager which controls the information flow, the players interaction with the major Factions in the game, Time of Day, and other Global State Information. I also have a Mission Generator that generates Random, Semi-Random, and Non-random Missions for the Player based on Faction Allignment, the Players History, Plot Requirements, etc at a Global Level also.
However, when the Player actually enters a Map, the Map Mission Manager (MMM) takes over and sets up whatever Missions are needed for the location and the level of police, whether their are any Gang Wars going on, the lighting level, what stores are open, etc. (The MMMs are hard coded Map Specific.) Everything is handled by the MMM until the Player leaves the Map at which time information is sent to the Mission Manager and Game Manager to update the Global Situation.
The system I have set up is for a FPS/RPG so is oriented more towards combat than yours and is a lot more complex than I have mentioned, but I think the same concept applies to your Event Manager. Break it down into the component tasks that are needed and create a Component for each Task.
Your High Level Event Manager could handle creating Scenarios, for instance in area A it Randomly Generates a Barbarian Raid that will occur in so much time. If the Player is on the Map when the Raid Occurs, then they will participate. Otherwise the Raid becomes a Piece of Knowledge that is Propogated throughout the World. If the Player enters are A shrotly after the Raid, the MMM system can generate Corpses, Destruction, etc and set up a lot of conversations. Meanwhile, the Knowledge of the Raid might reach the local Lord or Law Enforcement and they decide to put a Bounty on the Barbarians which will create a Mission for the Player. Etc, etc.
I look foward to seeing how you progress with this.
Torque Owner SR
First, because each NPC can belong to multiple groups, it would make sense to use fuzzy logic on them. If each NPC tracks 'how much' it belongs to a given group, then it can weigh all the data coming from the groups to decide which is more important to it. For example, a farmer might belong to his 'family', the 'town', a 'militia', and 'farmers'. Different farmers would be more loyal to different groups, which would change how and when they act according to that group. A devout father might be more prone to go to his families aid during an attack, than to rush off to the front lines with the militia. Fuzzy logic would allow you to keep all NPCs from acting the same way if they belong to the same groups.
Second, you might run into 'common sense' problems. Some members of a group might know something, but not others. How do you determine what makes sense for the entire group to know? This problem is probably lessened because such broad group knowledge would only be used when an NPC is less significant, and thus gets less processor time. As an NPC becomes more important, it would be able to figure things out on it's own. They would still be prone to a form of 'LOD popping', when they become more significant yet still rely on data from the group they wouldn't normally know. Maybe for each piece of knowledge, you could attach a rule for determining how likely an NPC is to know it, such as proximity to where the knowledge came from. Example: a town is invaded by a warlord, knowledge of the invasion would spread to members of the army slowly, based on their distance from that town. So a soldier close to the town learns of it quickly, while others across the country don't learn of it for a long time.
I think this has posibilities. I'd be willing to help you out furthering the design, if you'd like.