How to make NPC's "gossip"

Started by
66 comments, last by Gollum 21 years, 2 months ago
WTF?!? This thread is ancient... I remember seeing it in my earlier days here (before registering this account). Anyway I''ll write a more detailed post as soon as I reread it all...
Advertisement
OK... I agree with Puzzler183''s approach, largely because I have already implemented that, and I am currently implemented save/load features for it. I also plan to make an inference engine with it: for example:

if x is y and y is z, then x is z
if x ix y and y (any link) z, then x (any link) z

Then when that link is put in place between the two, you calculate the new truth values as follows (psuedo code):

f1 = xtoylinktruth / 256;
f2 = ytozlinktruth / 256;
xtozlinktruth = f1 * f2;

So that is one is thought to be 90% true, and the other is 100% true, then the new link will be 90% sure that it''s true. On the other hand, if computer is only 90% sure about the second link, it will only be 81% sure about the new one. If you want falseness, you can just have very low values for sureness of truth...
k... silly question... everyone seems to be using unsigned chars for the truth value... anyone thought of implementing it so that positive values are true and negative values are false?? I know its not really that big a deal, just seems to me that it would be a little more intuitive than 0 being false and 255 being absolutely true.

nother silly thought I had....(what can I say... I get alot of them ) would it make sense to implement one global network, assign each link an ID, then just store the link IDs a TTL and a truth for each link in a NPC''s "memory". then with reference counting and such you can discard links that aren''t used anymore, and you only need the one network. nother thought on this idea is to then add a flag to each link, you then have some NPC''s (Wizards, librarians, Historians...)going around collecting information(links) then they go somewhere library or what ever, and you set an archived flag, then if everyone forgets the knowledge it still exists in the library and the player could find it there. I dunno if that makes any sense. just thought that might be more realistic than having to maintain one character with a particular piece of knowledge, bit of an extension on that, the historians etc could also collect links of (player "interested in" item) then when they return to the library they also look that up then if they see the player again they can pass on what they found.. I dunno.... just ideas I had...
First, you can''t do what I said above... It just makes inference more difficult... Second, the idea is a good one until you get into special cases. For example, links shooting off of links, etc. If that doens''t apply then maybe this does: is it really worth it? My link struct is 6 bytes (without age), and it would be 4 for every pointer. I habve 768MB of RAM. Somehow I don''t think an extra couple K will matter.Good idea though for folk swith bulky structs.
I dunno... I think that using a signed char would make inference easier....

just for instance.. using negative values to represent false and positive for truth and your method posted above.

ball is round 127
round is square -127

infering that the "ball is square" we get

f1=1
f2=-1
multiply them... we get -1 or fully false which makes perfect sense... I dunno... maybe I''m missing something really obvious here. only problem I can see is infering from two false values when that should give a false.

cow is dog -127
dog is cat -127

cow is cat works out to 127 then, I guess... we don''t know that its not true. I''m gonna hafta think on this for a bit, the three way false might be a specail case you''d have to handle this way.

also, I''m curious, you mentioned links shooting off links, can you give me a particular instance?? I just can''t think of any off hand.
You can''t really combine false conditions anyways. Knowing that A is not B and B is not C does not mean A is not C. In fact, it might actually be more likely that A is C because you''ve eliminated the same value for both of them.

Using numbers, you can easily see that. Say you are using an unsigned char A, B, C. if A = 1 and B = 2 and C = 1, A is not B, B is not C, but A is C. Without the two rules, there is a 1/256 chance that A and C are equal, but knowing that neither is equal to B makes the chance 1/255.

I think.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
OK, let''s see if I can remember where I thought about doing this... I just remember doing it at one point... Hmm...

Let''s see, perhaps to answer the 5 W''s a link... Well anyway, it was basically to give each link three pointers to links... Eventually I left it because it was too memory hogging.
Just wanted to jump in here now. I wanted to add something to the whole decay/way info is passed between people. Everyone at one time or another is told something by someone that they really couldn''t care any less about. For example, let''s say someone steals a loaf of bread from Joe the baker. Joe goes on to tell a person traveling through the town about the incident. The traveler most likely wouldn''t care about something so insignificant, and probably wont be able to tell you what the Baker said an hour after he heard it, let alone go and repeat it to someone he meets at the local tavern. Or maybe he wasn''t really paying attention at all. Just kind of feining interest while preoccupied with finding an Inn to stay the night.
The point I''m trying to make is that not everything that is said between characters needs to be carried on any further than the initial conversation. This can help the whole knowledge equilibrium problem where everybody knows everything. Everyone wont know everything because even if they''ve been told everything they wont necessarily retain it all. Example:
Let''s say the local shop keeper tells something to the town drunk that you''d really like to know in order to finish some type of quest. But, the shopkeeper doesnt like you all that much, and refuses to tell you. But you find out that he shared the information with the town drunk. You find the drunk, and begin asking him. Because the drunk didn''t give a damn about what the shop keeper was saying in the first place, he''d have no idea as to what you were asking him about. Not because he forgot, but because the information wasn''t important enough to retain in the first place.
Now this would take a lot of extra variables for your NPCs and is obviously more work than most people are whilling to put in, but I thought I''d throw it in.
I''m on the side of the skeptics.
I believe the idea of NPC''s gossipping is great and probably essential for the development of RPG''s and MMORPG''s. However I disagree with the idea that an NPC has to wander about witnessing and exchanging information for it to work out smoothly. I''ll give my thoughts on the subject:

1- One of the major reasons gossip works in real life is because there are so MANY of us. even the most ambitious RPG wouldn''t (and probably shouldn''t) dream of activating so many bots all at once.

2- Consider how other problems of this sort were tackled. Economy for example: Games can create living economical systems by using networks and not by sending single NPC''s buying and selling stuff to activate the economy because it''s easier and cheaper and because bots would be too stupid to act in a way that will create this kind of dynamism. Your world will probably very slowly starve to death if you attempted that.

3- We''re talking RPG here. it''s all based on unrealistic approximations that work. I mean how many hit points do YOU have? What''s your AC with and without your baseball cap. Yet all these concepts are very useful and they tend to work out much better than some systems which try to become more realistic by actually imitating reality.

4- When Garod the Terrible falls upon a band of goblins, none is left to tell the tale. Does this mean he''s Garod the Meek? Simply because no one saw him massacring all these goblins. Or should we wait for a 1/1000000 chance that some NPC passes by and witnesses one of these incidents and live to tell about?

I believe you should allow this kind of information to take a life of its own. You cannot keep track of everything going on in your world but you can probably make a good estimation of how to work it.

Peace Out!
quote:Original post by SecondBest
4- When Garod the Terrible falls upon a band of goblins, none is left to tell the tale. Does this mean he''s Garod the Meek? Simply because no one saw him massacring all these goblins. Or should we wait for a 1/1000000 chance that some NPC passes by and witnesses one of these incidents and live to tell about?


I think that would make it all the more interesting ... if no one noticed Garod doing terrible things, no one would know when he came into town that he was about to kill everyone. However, once he does do that, chances are someone will escape and tales of his ... terribleness will spread.

Not that I have anything else to add to this, just wanted to voice that small opinion :-)

Joel Martinez
http://www.codecube.net/
Joel Martinez
http://codecube.net
[twitter]joelmartinez[/twitter]

This topic is closed to new replies.

Advertisement