Feature Specification: Reputation, Quest, & Rumor System

Scripted ALFA systems & related tech discussions (ACR)

Moderators: ALFA Administrators, Staff - Technical

Locked
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Feature Specification: Reputation, Quest, & Rumor System

Post by ç i p h é r »

Reputation, Quest, & Rumor System
The reputation, quest, and rumor system requirements are detailed below. I expect Baalster's system to serve as our foundation for NWN2, depending on what is introduced with Obsidian's "influence" system.

For a short explanation of the feature specification format, visit:
http://www.alandfaraway.org/phpbbforum/ ... hp?t=27229

Functional Requirements

Reputation
Reputation is defined over a 100 point scale, where 0 is hostile and 100 is helpful. When a player logs into a server, they have a set of default reputation values against different custom factions on the server as defined by the builder. This will serve as the PCs starting reputation. A new adventurer will not necessarily be trusted right away, but as they interact with faction members, that reputation may move up and down according to their decisions.

Using the starting reputation values, it's up to the player to define his place among the factions. Factions can be neutral towards each other, enemies, or allies. A player can choose to stay out of the affairs of factions, but then they won't be trusted by any faction. A player can choose to side with one faction, but then the opposing faction will not like them.

Quests
The quest system consists of the following types:
  • Bring me item X
    Bring me item X and item Y
    Bring me X number of item Y, reward per item delivered
    Bring me X number of item Y, reward upon delivery of all
Quests may support alternate solutions. Players can attempt to convince the questgiver into believing that an alternate solution satisfies the quest.

The quest system consists of the following checks:
  • Class
    Level
    Reputation value for questgiver's own NPC (must be of a certain value or higher)
    Reputation value for an enemy faction of the NPC (must be of a certain value or less)
As players accept and complete quests, their faction reputations will adjust accordingly.

Quests will be stored in a persistent journal.

Rumors
Rumors are influenced by reputations. The higher the reputation of a player in the eyes of a faction, the more accurate the rumors will be. Any NPC can be a source of rumor. Rumors can vary in quality to account for the prominence or notoriety of an NPC. A player's words heard by an NPC or their actions observed by an NPC can become the subject of a rumor.

NWN Object Dependencies
TBD

Local Variables and External Configs
TBD

Logging and Debugging (global LOG & DEBUG (on/off) constants)
Rumors Given

Persistence Requirements
Faction Reputation, Quest Completion Status

Event Dependencies
OnConversation
Last edited by ç i p h é r on Sun Feb 17, 2008 9:18 pm, edited 9 times in total.
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

Again, a rough sketch for us to work with..

Baalster, please jump in and elaborate as needed. I just recycled some of your posts on the matter in the forums but it needs more clarity and specifics if we're to document how it all currently works.

Everyone else, feel free to expand on what's up there ATM.

Most of my thoughts on this subject are documented here:
http://geocities.com/hbcipher/interactive.htm
Last edited by ç i p h é r on Mon Mar 13, 2006 11:42 pm, edited 1 time in total.
User avatar
Baalster
Brown Bear
Posts: 272
Joined: Sun Jan 04, 2004 9:56 pm
Contact:

Post by Baalster »

Pretty accurate so far.

What I want to add are the different types of quests which is in the system today, which can easily be transferred:

1. Bring me item X
2. Bring me item X and item Y
3. Bring me X number of item Y, reward per item delivered
4. Bring me X number of item Y, reward upon delivery of all

These can of course be tokens of jobs done or otherwise proof that the quest has been done. There is also a special case 2A which uses the second item returned for an alternate solution to the quest.

Example: You are asked to kill an escaped slave, and return his head or other proof of death. Rather than kill it, you return with a head of something else, and can try to convince the questgiver that this really is his escaped slave. It's all in the design, and the system allows for this today.

These 4+1 instances should cover alot of the basic type static quests we would need for the reputation system. Implementing these quests should be very simple, and using the NWN1 implementation is very simple.

Baalster
Castles in the air - they are so easy to take refuge in. And so easy to build, too.
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

Updated.

Are there any specific object dependencies for the rumor, quest, or reputation system to work? IIRC, these are simply variables configurable per NPC and defined by the builder.
User avatar
Baalster
Brown Bear
Posts: 272
Joined: Sun Jan 04, 2004 9:56 pm
Contact:

Post by Baalster »

The three components are only tied together in the faction reputation system. So there will be ready made scripts that builders can use in their conversations. (checks, increase/decrease reputation etc)

The rumor system only uses one variable on the NPC, region (integer) to tell the system which rumors to pull. Based on the PCs reputation we can filter and make selections in the database.

The quest system uses journals, variables on the questgiver NPC and possible some items (to collect or to hand out as reward).

So these are tools meant to be used by the builder.

Baalster
Castles in the air - they are so easy to take refuge in. And so easy to build, too.
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

I didn't think to ask you before Baalster, but is there currently a "reputation" panel where a player can view their current faction reputations? If not, having one might be useful.
User avatar
Baalster
Brown Bear
Posts: 272
Joined: Sun Jan 04, 2004 9:56 pm
Contact:

Post by Baalster »

That would be metainformation the player really doesn't have to know. The DM can of course get this using the RAW (Reputation Adjustment Wand) which is working nicely today.

I can't really see any reason why a player should be able to his or her reputation values. It's fairly easy to make, but I would like to see compelling reasons for disclosing this to the players.

Baalster
HDM 081 Whitehorn
Castles in the air - they are so easy to take refuge in. And so easy to build, too.
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

The only reason would be to relieve players of mundane note-taking and help them remember who they've upset or who they're friendly with (especially useful for when you're absent from the world at length), limited to factions they have interacted with. If there are lots of servers and lots of factions, then it becomes even more practical to make available so players don't simply forget and get their character killed as a result. No need to display numbers, just the rating like hostile, neutral, etc.

"Meta" would suggest the player knows something the character wouldn't. I don't think that really applies here as their reputation would be earned directly through character interaction. Does that make sense?
User avatar
Mulu
Mental Welfare Queen
Posts: 2065
Joined: Mon Dec 13, 2004 8:25 am

Re: Feature Specification: Reputation, Quest, & Rumor Sy

Post by Mulu »

ç i p h é r wrote:A player can choose to stay out of the affairs of factions, but then they won't be trusted by any faction. A player can choose to side with one faction, but then the opposing faction will not like them.
I think a PC with a high charisma and/or persuade type skills should be able to become friendly with multiple factions. It's the skill of a diplomat (or salesman) to be liked by many. In fact, those are the people who tend to mediate disputes IRL. It also encourages a non-combat skill set.
Neverwinter Connections Dungeon Master since 2002! :D
Click for the best roleplaying!

On NWVault by me:
X-INV, X-COM, War of the Worlds, Lantan University.
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

Mulu from another thread wrote:What would be even better would be a random quest system, similar to those used on Endless Nights V (a low magic SP mod based on random quests), so that no two quests are likely to be the same. This would allow for multiplayer questing without repetition. Even if a quest source only gave out one quest to any given PC, it would be a different one each time, thus allowing for more immersion. They could also be scaled by level this way. "Go kill the (X monster) in (X location)" could be anything from a rat in the basement to an umberhulk in a cistern. Or deliver X item to X NPC, for that matter. Just keep the rewards low, and it could replace spawn killing as an IC way to adventure when no DM's are about.
Is randomization already supported in the quest system Baalster? If not, sounds like it could be a good addition.
User avatar
Baalster
Brown Bear
Posts: 272
Joined: Sun Jan 04, 2004 9:56 pm
Contact:

Post by Baalster »

No, there is just one quest per NPC, due to the variables set on the NPC. The problem here is if multiple parties are taking to the same NPC we cannot change the variables to cater a different quest.

I have been toying with the idea of pulling the quests out of a database, to give it a random feel, but still ended up with the problem with the NPCs. One thing that we can do, is to make the conversation non-disturbable so only one can talk at the same time, and then in the first node of the conversation change the variables depending on the PCs quest status flag. I guess it could be done that way...

Baalster
HDM 081 Whitehorn
Castles in the air - they are so easy to take refuge in. And so easy to build, too.
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

More food for thought.
HDB wrote:A few short-formed randomized variables in notes, perhaps keyed to a dice roll would do. If a program was went for then have a look at TSR's Dungeon Master's Design Kit, product number 9234. well developed and user friendly.

Just a few of the 35 or more facets it covers; featured villian, traps and dilemmas, empty rooms, RP encounters, cruel tricks and complications, chases, featured creature, hazards, themes, settings, allies and neutrals, red herrings, moral quandaries, or secret weaknesses.
Its set up a like a great reverse read your own adventure. In PnP I'd prefer to spend hours pre-game, weaving a massive tapestry relative to IG factors, but in LIVE ALFA it may be a large facet to have something like this for the director/producer/playwrite in all of us.
User avatar
Baalster
Brown Bear
Posts: 272
Joined: Sun Jan 04, 2004 9:56 pm
Contact:

Post by Baalster »

Influence in NWN2

Digging into the scripts.zip file, I tried to locate anything that had "influence" in it and came up with the following files:

Code: Select all

---------- GINC_COMPANION.NSS
const string INFLUENCE_PREFIX	= "00_nInfluence";
const int INFLUENCE_MIN = -100; // Companion Influence cap
const int INFLUENCE_MAX = 100;

int GetInfluence(object oCompanion)
{
	string sVarInfluence = INFLUENCE_PREFIX + GetTag(oCompanion);
	int iInfluence = GetGlobalInt(sVarInfluence);
	return (iInfluence);
}

void SetInfluence(object oCompanion, int nInfluence)
{
	string sVarInfluence = INFLUENCE_PREFIX + GetTag(oCompanion);
	if ( nInfluence < INFLUENCE_MIN )
		nInfluence = INFLUENCE_MIN;
	else if ( nInfluence > INFLUENCE_MAX )
		nInfluence = INFLUENCE_MAX;
		
	SetGlobalInt( sVarInfluence, nInfluence);
}

// apply an AttackIncrease or Decrease effect to henchman of a companion based on the influence 
// the PC has with the companion
void ApplyHenchmanModifier(object oHenchman = OBJECT_SELF)
{
	object oCompanionMaster = GetMaster(oHenchman);
	int iInfluence = GetInfluence(oCompanionMaster);
	int iModifier = iInfluence/10;
	effect eAttack;

	if (iModifier > 0)
		eAttack = EffectAttackIncrease(iModifier);
	else if (iModifier < 0)
		eAttack = EffectAttackDecrease(abs(iModifier));

	if (iModifier != 0)
		ApplyEffectToObject(DURATION_TYPE_PERMANENT, eAttack, oHenchman);
}

Code: Select all

// ---------- GINC_PARAM_CONST.NSS
Commented out, but has references to 
// 5/04/05 ChazM - added GetInfluenceVarName()
// 5/05/05 BMA - moved GetInfluenceVarName() to ginc_companions.nss
Interestingly encough those functions are not available in ginc_companions.nss

Code: Select all

---------- GINC_VAR_OPS.NSS
Comment:
// ChazM 8/24/06 CompareInts() no longer able to reference a companion's influence to remove dependency on kinc_companion
Nothing else in there.



Based on this it appears that the influenece system just stores a variable per NPC, and it's up to the logic in the conversation to use this. Examples are not available from what I can see.

Conclusion so far: Influence is not related to the reputation at all. Influence as implemented is not persistent. Currently the only benefit looks to be related to the henchman attack bonus.

Suggestion: We make a persistent wrapper around this, to allow a -100 to 100 value for any NPC. This can be used for a number of ways. It will not be related to the AI (combat) or other game engine purposes, only for how this one NPC reacts towards you.
Castles in the air - they are so easy to take refuge in. And so easy to build, too.
Thangorn
Haste Bear
Posts: 2081
Joined: Fri Oct 01, 2004 1:00 pm
Location: Queenstown, New Zealand

Post by Thangorn »

I'm very keen to assist with the development of this part of the ACR. Largely due to the fact that factions have a HUGE part to play in the Moonsea and I am a fan of doing things once only. I'd hate to have to reverse engineer the mod with something like this when I can start implementation from scratch.

Has anyone ever used this?

http://nwvault.ign.com/View.php?view=Sc ... il&id=2400

documentation follows..

Code: Select all

I. Introduction

The Personal Reputation and Reaction (PRR) system is a set of scripts designed to enhance the sense of depth and consequence in your Neverwinter Nights module by adding the following optional capabilities:
- Allows Charm spells that will make NPCs friendlier.
- Allows NPCs to react dynamically to players actions, factoring in one-on-one interactions, faction standing, differences in alignment and charisma adjustments.
- Allows these reactions to affect other NPCs reactions, creating a true sense that player choices affect the world. This means that over the course of an adventure, player actions can push faction standings over the edge, causing open violence.
- Allows NPCs to own doors, chests and other containers, confronting players when they unlock, disarm, open or disturb these doors and placeables. 
- Allows for these infringements on property to cause a shift in how that NPC feels about the player with continued offenses eventually resulting in hatred or violence.
- Allows for security creatures to be assigned to come and watch over a door or container if an owner calls for help, so that guards can deal with mischievous players instead of having poor unarmed farmers trying to single-handedly stop that beefy warrior who carries a huge axe.
- Allows personal reactions to affect skill checks on a creature, providing a situational penalty or bonus along with the d20 roll.
- Allows bards to attempt Perform checks to increase reactions on NPCs.
- Allows NPCs to provide the players with rumors, where better reactions mean better rumors.
- Allows module builders to flush all PRR variables to a standard Bioware Database for use in sequels or for use in a persistent world context.
Because this is all done with a collection of scripts, this system can easily be modified for custom uses. All of it is optional, and once installed, requires only basic scripting modifications to be used. The PRR system is not for every module, and not every module will use all of its features, but if you are looking for a way to increase the importance of role playing in your work, these scripts may be the answer.
This document will walk you through playing with and implementing the Personal Reputation and Reaction system in your module. It also contains appendices for working with the system. 


II. Advantages of PRR

The key advantage of the PRR system over traditional scripting is that it is based on a matrix style of play. In a typical module, in order to get to the next plot point a series of if-then statements have to be satisfied. For instance, in a module that consists of two plot lines, or acts, the party must complete quest A, then quest B, then quest C in act I in order to get to act II of the module. Another example is that in order for the NPC to give the PC an important clue, a certain set of dialogue choices have to be correctly chosen. If there is an attempt by the module author to give a sense of free will, it usually comes in the form of a binary choice. For instance, you can take the pass or the plains; you can choose to be selfish or to be kind, etc.
This is usually a result of the module’s author only being able to provide a set number of options due to time and resource considerations. As a result, a macro-level set of choices is offered to the player. The problem is that due to the nature of standard if-then scripting techniques, players sometimes feel like their choices don’t actually matter that much, because the way has already been mapped out ahead of time by the module author. 

The PRR system is an attempt to make decisions important on a micro-scale, where individual dialogue choices and quest completions adjust how an NPC reacts to you. This reaction is based on a number, where the higher the number the better the reaction. In an attempt to make the module seem more fluid and open, this numerical representation allows the order of these adjustments to become less relevant by allowing more options to base the if-then structure on. The PRR system is a set of tools to help module authors turn decision-making into a more cumulative effect on the story of their modules.
For example, an alternative to the A, B, and C quests can be offered so that the movement into act II happens when a certain other conditions have been met, be these faction standings, personal reactions, etc. Quests A, B, and C each becomes a means to and end, instead of the only way to propel the story. Additionally, choices such as whether to take the mountain pass or the plains, to act selfish or kind, etc., all become vehicles for meeting these conditions.

As a caveat, it is also important to note that a module cannot hinge completely on these reactions. The implementation of the charm line of spells provides a quick way to force these reactions to happen, and some characters may find it much more difficult to make these reaction changes happen than other characters.

In order to complete this sense of decision-making, these reactions must be able to get worse as well as get better. This lends itself to a certain style of module where there are multiple factions that the party can align themselves with and work for. Character creation choices, dialogue choices and quest choices will close some options to the party, meaning they must look elsewhere for support, but it will also open other options. There must also be a way to play the lone wolf who aligns with no faction or the diplomat who attempts to make all factions’ reactions remain at least neutral. As a result, the standard dungeon crawl will probably not use the entire PRR system. 


III. Playing with the PRR system

There are several things to keep in mind when playing a module with the PRR system.

First, remember that every conversation choice could potentially be very important. Take your time with conversations and don't rush through them. You can tell how an NPC feels about you by paying attention to how they greet you and how they react during conversations. When the standard greetings and NPC gives you starts changing, he or she has probably shifted how they feel about you.
Second, remember to check for rumors from the NPCs you meet. There are three kinds of rumors, normal, good and excellent. NPCs with nuetral reactions to you will give you 2 normal rumors. NPCs who are warming up to you will give you up to 4 rumors of either normal or good quality, depending on the roll of the dice. NPCs who are friendly with you will give you up to 6 rumors of any type. NPCs who don't like you are usually not inclined to give you any information. As your reaction improves check to see if the NPC is willing to share more information.

Third, remember that chests other placeables may be owned by important people. If someone sees you damaging their property they will be more wary of you. By default, this will result in a -10 adjustment to your reaction with that person. If they think they caught you actually taking something of theirs, the default adjustment is a -20. Clearly, you can quickly ruin your relationship with the NPCs in a module if you run through looting every chest you see.

Additionally, security forces that get called in will not be happy with you. Word will start to spread that you are a causing them problems. In game terms, this results in a -2 reaction with the entire faction that the security forces belong to.

Getting spotted messing with someone else's property is dependent on a number of factors. The owner has to be in the area and has to actually perceive what you are doing. Even if they can see or hear you, if you take something out of a chest, a pick pockets check will be rolled against their spot check to see if you can get at the contents without being caught. Be warned, even if you don't get caught, stealing and destruction of others' property is an inherently chaotic act and will carry a minor alignment shift for you and your party.

Fourth, remember that the charm spells are a powerful way to manipulate NPCs. Casting charm on a friendly NPC results in a bonus of 100 to the PRR historical value. You will get the full +2 on all PRR skill checks, the maximum number of rumors (6), a possibility of getting the best grade of rumors, and any other rewards for having a friendly reaction with the NPC that the module author has put in the conversation file. The effect lasts as defined in the PHB, meaning that a 15th level enchanter with an extended Charm Monster spell could ensnare an NPC into his or her service for roughly a full month in game time. There is a risk in using the charm spells, however. Every time your target NPC makes a saving throw against the spell, that NPC will notice what you were trying to do and become a little more suspicious of you. This translates into a -5 PRR adjustment with each failure. Low-level casters should be careful how they use this spell. When casting on a hostile creature, charm spells use the standard Bioware code.

Finally, remember that your reactions with an NPC will affect skill checks. Try chatting up NPCs before rushing in to try a persuade. Be careful though, some NPCs are not what they seem. A duplicitous rogue may be agreeing with everything you are saying, all the while becoming more and more certain that he wants to burry his knife deep in your self-righteous back.


V. Conclusion and Contact Information

There are a lot of scripts in this package and a lot of functionality. Most of these scripts are meant to be placed in conversations and there are only a handful of core scripts. Even though you may not use all of it, I hope that there is something in here that will help your module. If so, please send me an email and let me know so that I can feel like the two years of playing with this on Saturday afternoons was worth it to someone besides myself. Also, if you have any suggestions, concerns or questions, don’t be afraid to email me and ask. I know how daunting it can be jumping in to a new system, and I want to make it as easy as possible for everyone.

Vendalus
sbf5000us@yahoo.com
Vendalus is working on a v3.0 for NWN2.
I was just wondering whether anyone has experienced it? It looks really good but I havent seen it in action in a module yet.

A couple of thoughts I had re: faction, reputation and rumours:
* A system like this would work well with an implementation of the knowledge(factions) and disguise skill. Consider Harpers or Purple Dragon Highknights on a mission to infiltrate or gather information on the Zhentarim (or vise-versa).
  • Higher echelon members of a faction might be recognisable by other high echelon members of the opposing faction. A status within the hierarchy of a faction can be reflected in a faction reputation integer.
  • Higher echelon members would have a greater knowledge of opposing faction operatives and activities. This can be reflected by the number of skill points placed in a knowledge(factions) skill.
  • Lower echelon or rookie faction members would be more difficult to recognise by other lower echelon members of an opposing faction.
  • Disguise skill could be used by higher echelon members to a faction to conceal their identities from other faction members. Disguise objects IG might include Disguise kits and Faction Uniforms for example. Disguise spells which could easily be implemented include change self, alter self, veil and polymorph, obviously trueseeing could ruin a magical disguise.
Anyways, these are just some thoughts I was having that would make life in 006 Moonsea, Zhentil Keep for example.. very interesting.
Imagine if you are outed as a known Harper, Highknight or escaped slave in Zhentil Keep. I'd love to have it scripted that there is a chance the guards recognise you and attack you, even if a DM isnt on :).
Last edited by Thangorn on Tue Aug 14, 2007 7:44 am, edited 1 time in total.
On indefinite real life hiatus

[22:52] <Veilan> obviously something sinister must be afoot if a DM does not have his social security number in his avatar name!
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Well, it's fiddly. I've used t in 2 mods, but always found the conversations just overly laborious to set up. That said, it offers some rare surprises, and it's well designed. Too sticky for me.
Image
Locked