Article - Karma, Dharma and Somesuch

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Article - Karma, Dharma and Somesuch
BANNED
Member # 4
Profile Homepage #0
Article - Karma, Dharma and Somesuch

This article, apologies beforehand, will borrow heavily off of The Responsive World by Drakefyre and Player vs. Party by The Creator. Assume that you want a responsive world in "Quest for the Sword" that will have major or minor consequences based upon the actions of the party. This is a Good Thing- having people get irritated at the party for being rude or annoying is realistic and will add a new dimention to your scenario. The most-often used device in Blades to do this is Karma.

What is Karma? Apologies to Hindus, but the Karma you may be familiar with is not the karma used here, even if the principles are similar. Karma is usually a two-ended spectrum with one end being "Good" and one end being "Bad" (or some variants thereof). When the party says or does a "Good" thing, the karma is raised, and vice-versa. Telling the mayor that her dress doesn't make her looks fat, of course, will not have as much of an impact as killing a dangerous group of bandits. On the flip-side, kicking a beggar will not be as consequential as murdering children.

How does one use Karma? Imagine a flag- one you will know instantly. I use 99,9, you may use whatever pleases your fancy. In the beginning of the scenario, set that flag to the "middle" ground. Assuming that 0 is totally evil and 100 is good, set your flag to 50. Whenever the party does something minorly good, raise their flag by 1. Whenever the party does something bad, lower their flag by 1. This will usually entail dialogue responses.

Why does Karma matter? Suppose a party encounters a group of wandering guards outside. If the party's karma is high, the guards will welcome the party with open arms and invite them into the nearby city of Heidenburg. If the party's karma is around the center, the guards will point the party to the city, but will not be as friendly. If the party's karma is relatively low, the guards will tell the party not to visit Heidenburg. And of course, if the party's karma is insanely low, the guards will attack. Suppose a party speaks to an innkeeper. They can buy a room for 5 gold if they're neutral or 10 gold if they're disliked. They can get the room for free if they're adored, or not get it at all if they're hated. Karma can and should be used for everything under the sun.

Which calls should one use in dialogue for karma? That's tricky. Dialogue with karma can be made by following a few basic templates, however:

Action based on Karma
---------------------

begintalknode 18;
state = 4;
nextstate = 5;
condition = get_flag(99,9) >= 40;
//This is to check if the party has been good, or at least not overly evil
question = "What kind of town is this?";
text1 = "_Oh, it's nothing much. A nice, decent place for hard-working stiffs like myself._";

begintalknode 19;
state = 4;
nextstate = -1;
condition = get_flag(99,9) < 40;
//This is to check if the party has been overtly evil
question = "What kind of town is this?";
text1 = "He glares at you.";
text2 = "_We're a hard-working town, and we don't like your kind of rogues around here._";
text3 = "_So git, you mangey mongrel!_";
action = END_TALK;
In this example, the party has the same question, but can receive two different responses, depending on their reputation. Obviously, you don't need to do this all of the time. Simple text-hiding calls in the "code = " portion of your script can work just as well. Also, you can set your dialogue to call different codes depending on whaty the party is. You can up inn prices, you can end conversations before they begin, you can even have variable shop prices! A whole slew of things become possible.
(Oh yeah- checking karma in scripts is merely checking for values of the (99,9) flag.)

And of course, the list goes on. You can have the road to a rich, trading town with quality goods be guarded by a guardpost that the party cannot cross if they have a reputation as a group of rogues. You can have the servants of evil ask you to join them if you're evil enough. And perhaps, if you are an ambitious enough designer, you'll allow the party to do so! Use karma/reputation wisely in your scenario, and you will create a far more dynamic world for your players to prance around in. Do you understand the basic tenets? Good- then I'll outline a few hints.

Do Not Favor Good.

"Good" behavior need not be rewarded moreso than evil behavior, and probably should not. Being good should be an altruistic thing, and the rewards should be no greater than the evil actions that the party should have taken instead. Forcing the party to be good makes, quite honestly, a boring scenario that offers no real conflict- the players in real life are good, and automatically rewarding them for being good will start to make them feel like they're back in the office. That's bad. Now here's an interesting twist- if you want, make evil MORE rewarding than good. An interesting conflict is getting wealth versus doing the right thing- Sure, the party can prove their wealth to the evil cult to steal the great weapon Uberblade, but whenever the party whacks someone with the blade, they have to remember the crying, motherless children who they had to kill to enchant the blade. The greater the reward, the greater the moral price. And of course, the party should face a terrible ending for the things that they do- "You kill the Haakai, but you also saved nobody because of the innocents you had to kill to sanctify the Haakai-slaying sword" makes for a pretty melancholy finish, and it's one that the party brings on itself. But if good is favored, then it simply becomes, "You dip the sword in holy water and the demons die and happily ever after." Bo-ring!

Real vs. Nominal Karma.

Okay, so maybe the party's karma goes up when they complement the mayor on her dress- doesn't mean that Joe Schmoe will like the party any more because of it. So yeah, while the schmoozing does improve the party's karma in the long run, nobody cares if the party's a nobody. So karma should only be updated when a party does something big- like kill a demon or attack a defenseless city. At that point, you should set your real karma flag to your nominal karma flag, so that when people hear about the adventurers who killed women and children, the communities will remember how rude the party was to the mayor, adding insult to the injury.

Different Strokes for Different Folks.

Conversely, you can have different "modifiers" for karma based on how the party acts. For instance, complementing an unpopular mayor on her dress will make upper-class people like you, but the workers of the town will dislike you more for it. If you say that rogues should be killed, people sympathetic to rogues will be hella-pissed, but hardass military types will dig you more. And of course, if you tell the military folks that rogues should be put to the death and then attack a nearby hamlet, the military folks will feel even more insulted for being lied to- so the military rep modifier would take a nosedive and negatively affect those people instead. The rogues too might be peeved with you, since now they are being actively hunted- so your previously negative reputation with them would be the same. On the other hand, the evil cultists who murder children will LIKE what you did very much, so all of the altruistic things you've done in the past will reverse themselves and make them work in your favor- seducing goodie-goodie people is what that type is into. And of course, when you start to flip sides regularly, EVERYONE will learn to hate you since nobody will be able to trust you.
(An easy way to do this is to make each modifier its own flag- with 0 at 50, so that 49 and lower is negative. Then, each "faction" can have its own karma flag with all of the modifiers included.)

JUST REMEMBER that karma can dictate your adventure, dictate sympathies, dictate costs and dictate destinies- but only if you are a powerful enough designer to let it be so. And obviously, accounting for differences like these is not easy. On the other hand, it can be infinitely rewarding.

--------------------
*
Posts: 6936 | Registered: Tuesday, September 18 2001 07:00
Shaper
Member # 73
Profile #1
Um... Didn't I see this article before? I distinctly remember seeing this article before.

--------------------
My Myspace, with some of my audial and visual art
The Lyceum - The Headquarters of the Blades designing community
The Louvre - The Blades of Avernum graphics database
Alexandria - The Blades of Exile Scenario database
BoE Webring - Self explanatory
Polaris - Free porn here
Odd Todd - Fun for the unemployed (and everyone else too)
They Might Be Giants - Four websites for one of the greatest bands in existance
--------------------
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Posts: 2957 | Registered: Thursday, October 4 2001 07:00
Agent
Member # 2210
Profile #2
It seems that the karma flag could be used for something else entirely. It would be useful for a mercenary scenario based on actions to create opportunities. Your party is hired to do various missions-- certain actions increase your available missions.

This is neither good nor bad-- just there. The actions would have to be searched out. Thus the more side quests done, the more that is available in the main quest. You could eliminate the negative side of the equation entirely.

An example-- Knights Quest-- you are going to a tourney-- there are side quests for archer, mage, cleric, fighter, etc. Each side quest determines the events you are able to compete in in the the final tournmanet.

--------------------
Wasting your time and mine looking for a good laugh.

Star Bright, Star Light, Oh I Wish I May, I Wish Might, Wish For One Star Tonight.
Posts: 1084 | Registered: Thursday, November 7 2002 08:00
Cartographer
Member # 995
Profile #3
minor programmer's quibble: a variable has a range of values (0-100), but a "flag" is a bit. 0 or 1. of course, it's possible the BoA editor is misuing the term, in which case the article should for consistency as well. but that would be sad.

[ Thursday, February 24, 2005 10:59: Message edited by: silver harloe ]
Posts: 206 | Registered: Thursday, April 18 2002 07:00
Off With Their Heads
Member # 4045
Profile Homepage #4
He's using the proper Blades terminology.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Shock Trooper
Member # 4557
Profile #5
quote:
Originally written by silver harloe:

but a "flag" is a bit. 0 or 1.
Only in computer engineering. In computer programming, "flag" means any variable that relates to a boolean value (although most programmers extend the meaning of the variable). This variable may be a bit, or even a 64 bit integer (though this would be stupid).
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Cartographer
Member # 995
Profile #6
quote:
Originally written by KernelKnowledge12:

quote:
Originally written by silver harloe:

but a "flag" is a bit. 0 or 1.
Only in computer engineering. In computer programming, "flag" means any variable that relates to a boolean value (although most programmers extend the meaning of the variable). This variable may be a bit, or even a 64 bit integer (though this would be stupid).

I'm aware you can waste space storing flags. I meant in terms of range of value, not in terms of how it is stored. a long long to store a flag might not be such a bad thing if you have, say, 64 flags. but for compiler/cross-platform compatibility I'd stick with 32 flags per int.

too bad BoA Editor is misusing the term, though. more and more bad knowledge being spread around :(
Posts: 206 | Registered: Thursday, April 18 2002 07:00
Shock Trooper
Member # 4557
Profile #7
Hmmm, I should really start reading a whole topic before I reply.

I believe I misinterpreted what you were pointing out. If your talking about BoA's usage of the term Stuff Done Flag, and what they are actually used as, then you're right. Although its been years since I've played BoE, I believe this program was truer to the flag term, but in migrating to the use of Avernum Script, the SDFs turned into an array of global variables.
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
...b10010b...
Member # 869
Profile Homepage #8
Nope, BoE SDFs could have any value from 0 to 255 as well.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Shock Trooper
Member # 4557
Profile #9
Oh well. Bad programming makes the world go 'round :P .
Posts: 264 | Registered: Wednesday, June 16 2004 07:00
Triad Mage
Member # 7
Profile Homepage #10
You can condense that example dialogue by using the action DEP_ON_SDF.

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Cartographer
Member # 995
Profile #11
At least now I understand the engine a LOT better. I actually thought the only persistent memory I had to deal with a bunch of flags (because they were named, uh, flags) and was wondering how 30 bits was enough for scenario design :)
Posts: 206 | Registered: Thursday, April 18 2002 07:00
Off With Their Heads
Member # 4045
Profile Homepage #12
There are also 9000 flags, not just 30.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Law Bringer
Member # 6785
Profile #13
*bump* To preserve material
Posts: 4643 | Registered: Friday, February 10 2006 08:00