Advertisement

That gossip engine got me thinking...

Started by January 30, 2001 03:23 PM
23 comments, last by morfe 23 years, 7 months ago
quote: Original post by Mikey_Flies

Right along with the decay factor could be the telephone game syndrome, whereby the mutation of information happens more and more often the more people it passes through This could easily mean that by the time the gossip has made the rounds back to the originating NPC it might be entirely different gossip.

Chinese Whispers?

"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
quote: Original post by Mikey_Flies

Right along with the decay factor could be the telephone game syndrome, whereby the mutation of information happens more and more often the more people it passes through This could easily mean that by the time the gossip has made the rounds back to the originating NPC it might be entirely different gossip.


That might get really tough for the player though. The degree of truth is stronger the closer to the source you hear it from. However, if the mutation goes rampant, you might get lies all over the place. The player wouldn''t know who to trust, since most of us are use to RPGs where the NPC always tells the truth.

However, it would be a cool idea though. Rumors start to fly, and eventually, you might get rumors of giants that are 10 ft throwing people around, when in fact, a fat guy got drunk. Hehe.

Wil

Advertisement
I love the idea of mutation as the information gets passed around. Each NPC knows a piece of information with a level of accuracy based on the level of accuracy known by the person telling them the information. Accuracy degrades with each telling and soon facts get stretched out of all proportion. Have each piece of information stored in a numeric way (i.e. the height of some drunk fat man) and the pointer to (or copy of) this information is associated with an accuracy multiplier i.e. 1.3 or 0.4 or 8.7 where 1.0 is perfect accuracy and anything smaller or larger is inaccurate. Then when information is passed around, the accuracy multiplier is adjusted for each retelling based on random factors (chinese whispers) or character traits (some guy likes beefing up stories about fights or whatever). The player gets to hear the multiplied version of the truth whenever he talks to the character in question.

I love it.

Mike
The idea of mutations is interesting. I was actually thinking about something similar before I ran into that. I was thinking that NPCs might lie to each other intentionally based on their dislike for another NPC. Trust would be a really cool thing to try to implement. If a NPC found out that another player lied to them, their trust would be wounded with that person, and depending on the importance of the information, they might even start to dislike the other player. There would have to be some built in balance to make players build trust as well as destroy it. Maybe when an NPC has been told something and that gossip is verified by another trustworthy player, the original NPC's trustworthiness would go up. Mutations of information become extremely complex to implement, though. That's one downside to all of this mutation stuff. One would probably have to hard code all the possible mutations, lies and truths, then give each "gossip subject" some kind of ID to make sure NPCs knew that the original gossip and the mutation was about the same subject. Anyway, just some thoughts.

-Derek

Edited by - DerekDay on February 7, 2001 1:43:11 AM
One possibility you have is to timestamp a few things. You''ve already mentioned the idea of decaying information over time. To me, that means you''d have to know when you actually learnt something (timestamp), and when time has elapsed, you remove it. Be useful to sort from oldest to newest as well.

My idea is that rather than store a pointer straight into the near memory of the NPC, you store a unique identifier for that NPC (serial for MMORPG type stuff), and a timestamp as to when you last got information. When you want to look at their near info, you do a lookup to get a pointer to the NPC from the serial. Get a pointer to the near memory, and iterate through that list and only examining information older than the time stamp. Something kinda like

struct FarMemoryEntry
{
SERIAL npcID;
long timestamp;
};

struct Information
{
string info;
long timeLearnt;
};

class NPC
{
private:
vector< Information > nearMemory;
vector< FarMemoryEntry > farMemory;
SERIAL myID;
public:
(vector< Information > *)GetMemory( void );
void CompareMemory( void );
SERIAL GetID( void );
};

then something like:

void NPC::CompareMemory( void )
{
for( long iNPC = 0; iNPC < farMemory.size(); iNPC++ )
{
NPC *targNPC = SomeFuncToGetPointer( farMemory[iNPC].npcID );
(vector< Information > *)otherMemory = targNPC->GetMemory();
for( long iCounter = 0; iCounter < otherMemory->size(); iCounter++ )
{
if( (*otherMemory)[iCounter].timeLearnt < farMemory[iNPC].timestamp ) // Facts we knew from prior contact
{
DoSomething();
}
else
{
cout << "New info, ignoring" << endl;
}
}
}
}

Something kinda like that. Sorry for the sheer amount of code but I find it easier to express my ideas that way. And I''m not sure about the (*otherMemory)[iCounter] syntax, but it looks good .

Anyway, this only allows access to info they knew since last contact. So it''s no longer a global memory of sorts. And it gets around storing pointers to potentially dead objects, as you''re only storing a serial. You''ll have to put some safety in of course, but that''s the general idea.

You''ll already be using timestamps most likely if you support idea decay. And you can optimize this by having sorted from oldest->newest. Once you hit an entry more recent than prior contact, you can return, knowing anything that follows is newer than you should know.
@DerekDay: It''s an interesting idea that NPCs should tell lies to people they dislike. However, do you lie to somebody just because you don''t like them? In the end, this will only backfire on you, because people will hear that you lied, and begin to dislike you.
On the other hand, if the NPC expects some kind of indirect "reward" for the lie, (s)he would lie to an enemy, but not to a friend. For example, let''s say NPC #1 hates #2, and knows that #2 gets involved in lots of adventures etc... Now #1 might''ve heard of a cave with a huge dragon in it. She might tell #2 about the cave and loads of treasure, but leave out the dragon part, in the hope of getting #2 killed by the dragon. However, why would #1 lie to #2 about some neutral event (like there''s a famous person coming into town or whatever). #1 might want to keep information to his/herself though.
Intentional lies could be a great feature, but they''re probably very hard to implement so that it looks realistic.

cu,
Prefect

---
Sanity is the trademark of a weak mind.
Widelands - laid back, free software strategy
Advertisement
another thing to remember with the decay of memory is that not every memory decays like every other one. there are things that you remember for ever, and things you have a hard time remembering even if you hear it every day. you could find a way to rank memories in order of importance to that character and decay them accordingly, although this too is not an accurate model of human memory. then there''s stuff like snapshot memory, where a certain event or image or memory is flash-freezed into the mind by some odd circumstance... but this is all moot, i''mm sure, because this level of detail is way too complicated to replicate for the purposes of a game... for now, anyways ;-)


_________________Gecko___
Gecko Design

_________________Gecko___Gecko Design
Hi yall,

I haven''t read all the posts (3/4 of them tho and skimmed the rest) so correct me if I''m out of it.

Two things I thought of whilst reading through all of this were:

First Representation. Basically, how all this info would be stored and linked together. I think that only one copy of this information should logically be stored otherwise you are looking at massive storage issues in a game with potentially hundreds or thousands of NPCs (serious Database needed if you are thinking MMORPG). Basically each character would link to this and their link (an individual factor) would decay over time, or may not decay at all.

This decay would obviously depend on the event or information being first hand or second (or even third, fourth) hand. Skills and personal info are not generally going to decay (although you might forget who your family is in your old age for instance... that is a different topic though).

The second thing I thought of is actually quite important and that is of Interpretation by the character. Here''s the thing:

Assume two people view an event, depending on their alignment they will interpret it differently. For instance, a PC goes to a villiage and takes a local artifact from the church.

An NPC in the PCs party views it as the undoing of a cult that has been killing many people from his town. An NPC who is the priest of the local church sees it as the desecration of his religion....

The problem here is how to represent this interpretive step. Maybe over time the NPC priest becomes less angry as he saw his wrong.... maybe he creates a personal revenge goal to kill the PC??

Some more things to think about in what is otherwise an amazing idea to model information flow in a large or small world.

-- No matter what they do, how hard they are or cold they want to be, their mind will always give them away. That is the moment to strike and leverage their weakness --
The birth of Psychic Treason
-- That's my $0.02 worth --
Hang on, where I come from, $0.02 is rounded down. Does that mean my opinion is worthless or priceless?
CHROM
Prefect -
I see your point... There would have to be some logic behind when and why an NPC would lie. Seems like a better idea would be, like you said, to withhold good information from those the player doesn''t like, sharing it with friends. But would the NPCs be able to use the knowledge they receive from what others tell them? Hmm... then it gets really hard. Anyway... just a thought. I agree with you.

-Derek
All good ideas.
I was thinking... to complicate things more... Say one NPC heard something about someone they liked, depending on what this pice of information is, they may or may not tell them.

Another idea would be to for an NPC to gossip about someone when that someone isn''t arround, but act as if they are friends when that someone is around... like talking about someone behind their back and acting like ''best buds''.

If the someone being talked about learned of this, then they would immediately dislike them.

But also all this would depend on the personality of the NPC... evil, good, trustworthy, gossipper, non-gossipper. All things which could be randomly set.

All in all, this sounds like a very complicated programming task, but if anyone succeeds in doing something so complicated, it would be well worth the effort.

This topic is closed to new replies.

Advertisement