Monday, November 7, 2011

Coding Quandary for Brawler Scores

One of the principal challenges in establishing this new brawler scoreboard was establishing the framework for it.  The scoreboard, in the simplest sense, made of a string of individual brawlers and their scores.  As such, it would make sense to attach this information to each brawler's pfile (which is where their stats, equipment, description, et cetera are stored) since brawler scores are just another stat.  At the same time though, pfiles are loaded into the game dynamically--if a character isn't logged in, all of the information stored in his pfile (stats, equipment, description, et cetera) are totally unknown to the game.

Think about it.  Are there any commands that let you get information from another character who isn't logged in?  The only example of this that comes to mind reading notes posted by characters who aren't logged in; this is possible because notes are stored in a fashion similar to areas--they are saved to their own special file that is read in when the game starts up, and then the list of notes just floats in the game's permanent memory forever.  As new notes are posted, they also go into permanent memory, and they are saved to the special note file so that they can be reloaded after the next reboot.

Notes are static though;  once they're up, they really never need to be changed.  Brawler stats, on the other hand, will constantly be changing as people claim victory over each other.  Although these changes will only happen when brawlers are logged in to fight each other, what do we do with their scores when those brawlers log out?  They still need to be accessible by everyone on the scoreboard, and they need to be able to be reloaded after reboots.

This question highlights one of the principal design decisions I had to make in deciding how to actually implement this brawler scoreboard.  On the one hand, brawler scores need to be stored permanently like notes are, but on the other hand, they are fundamentally a stat that is attached to one and only one character.  Furthermore, we may need to be able to modify brawler scores even if the brawlers aren't logged in (e.g., in case of wimpouts or losses that need to be verified by imms).  How can these conflicting ideas be reconciled?  Here are the two options that I first considered:

  1. Store brawler scores in permanent memory, but have players "download" them to their character when they log in and "upload" their new scores when they log out
  2. Store brawler scores in permanent memory AND on the pfile, then keep track of which set of scores (the ones in permanent memory or the ones on the pfile) were updated most recently and use those
Unfortunately, both of these options raise problems with consistency.  Because information gets stored in two places in both cases, it becomes easy to envision a scenario where the information in one place doesn't get updated in the other place and suddenly one brawler has two different sets of scores.  This isn't an issue in 100% bug-free code, but the fact is that the system is not robust; if I (or a future coder) needs to modify the brawler code a few years down the road, we have to remember to make sure that both sets of scores need to be manually synced up or else problems arise.

A better option (and what I wound up doing) is to store brawler stats in permanent memory, and instead of worry about uploading/downloading/syncing those numbers against a pfile when it is loaded, just "attach" each player's brawler score info (still in permanent memory) to the pfile when the character logs in.  When the character logs out, the attachment breaks, but the brawler record is still floating in the permanent memory.

While we still have to make sure that brawler scores are properly attached to characters when they're logged in, this is far less flaky of a process than ensuring data is consistent across two places since it's trivial to perform the attachment.  So, in addition to checking for attachment when a character logs in, we can check for attachment at other critical points in the code such as when a brawler gets thrown out of brawler or scores another kill.

Speaking of getting thrown out of brawler, the reason why I bring this all up is because Stage 2 will include a new "leavebrawler" command that players can use to voluntarily quit.  However, quitting Brawler will also ban you from re-joining it for thirty real-life days.  Because we store brawler scores in permanent memory rather than on the pfile, this ban has the unintentional (but fortuitous) effect of persisting across recreates.  Even though a player may have deleted and re-created his character, that character's brawler record is stored in permanent memory and cannot be deleted by the player.

This might sound a bit trivial ("It'll take 30 days to level back up to 50 anyway!"), but a more powerful result of this is that immortals will have the ability to ban characters from brawler for life (such as may be necessary if they are caught abusing brawler perks).  Recreating won't circumvent that ban, which imposes an interesting incentive for players to not try to get cheap healing in a real fight by cheating the system.  A ban from brawler will truly be a ban for life.

Friday, November 4, 2011

Brawler Scoreboard Stage 2

We're moving forward with implementing the next stage of our new Brawler system, and based on our original ideas and some suggestions and observations from Stage 1, I think we're looking at rolling out features some fun new features.

A major component that we're currently lacking is the ability for the game to know that a particular fight is a brawl as it's happening; right now, brawls only become brawls when the victory command is used. To address this best, we're planning to add a command that will act as an "opening move" to initiate a brawl called "clobber."

We envision this clobber command functioning like backstab, where one Brawler uses it to tag another Brawler, and thereafter, both combatants are identified as brawling each other.  This establishes a nice framework where we can implement some features exclusive to brawls to make it easier, safer, and cheaper to learn PK as a brawler.

One of the significant (and controversial) features we'd like to include immediately is ultra-low-cost healing for brawls.  This has the benefit of letting people get up and running in PK without having to grind for gold, and really turns brawling into its own minigame within Dark Risings.  However, there are a lot of potential issues here:

PROS:
  1. no grinding for gold if you just want to pk for fun
  2. potentially attracts new players who may start out just looking for a good PK mud (but get sucked into RP in search for a vamp, etc)
  3. cements in PK as a distinct minigame within Dark Risings
CONS:
  1. less of a need for pure-PK players to actually play the game since they don't need to worry about collecting gold
  2. LOTS of potential for abuse if not coded properly
I think the pros are self-evident, but let's look at the cons a little more closely.

1. Less of a Need for Pure-PK Players to Actually Play the Game

"and stay IC" should be tacked on to the end of this con, and it's one of the bigger reservations I have.  Catering to PK-only players draws in a bigger pbase, and as long as they aren't disruptive to the rest of the game, I don't really mind.   However, I like to think that the process of getting money can often involve RP (e.g., collecting people to go kill mobs for equipment), and if we obviate the need for pure-PK players to get gold, it's easy to envision them having no reason to bother trying to roleplay at all.

Realistically though, gold farming has become the norm these days, and there's really no RP involved in that process anyway.  So I guess the damage has already been done, and giving Brawlers cheap healing won't cause too much more trouble.  It's just that the nightmare scenario for me is having a game full of players used to pure-PK MUDs who log in and are totally OOC in says, tells, over the brawler channel, etc, and generally degrade the quality of the game.  I absolutely do not want this, and I hope catering to PKers in this way won't effect that.

2. LOTS of Potential for Abuse

Of course, this is the most immediately problematic, because there are a number of ways this healing discount can be abused.  Here are a few scenarios.

  1. An Inferno named Jane jumps Bob the Brawler who has a contract on his head.  The Bob the Brawler just initiates a brawl against Jane so that Brawler rules (and cheap healing) are in effect and Jane can no longer loot on KO, etc.
  2. In a real PK, player Bob is getting attacked by player Jane.  He has a buddy, Harry, initiate a brawl against him so that Bob gets discounted healing since the game thinks he's brawling Harry when in fact he's fighting for his life against Jane.
  3. The opposite happens, and Bob initiates a brawl to get discounted healing, then jumps Jane.
Unfortunately, I really only see two solutions to these sorts of abuses.  The first one, which perhaps is what many players would immediately think, is to have an immortal arbitrate cases of abuse like this, and have stiff punishments for people who do this sort of thing.  This is a possibility, but we don't really have the staffing manpower to be micromanaging brawls and this is not really a good solution.

The second solution is to make it so that this "clobber" command to start a brawl can only be used when both participants are not in PK fightlag.  This solves the issues of people initiating brawls mid-fight to abuse the perks of brawling, but it also means that if you forget to make your initial tag with clobber, you have to flee safe before you can correct the issue and re-tag to initiate the brawl.  In practice, I suspect this might get annoying.

Another idea would be to create the opposite command of "clobber" and have it be something like "nobrawl."  If Jane wants to jump Bob for real, she can issue the "nobrawl" command on him after tagging him to lock Bob (and Jane) out of initiating brawls until they leave fightlag.  This is getting a bit complicated though, as Jane would have to remember to keep issuing nobrawl throughout the fight in case Bob momentarily got out of fightlag.  It also all operates under the assumption that Bob is definitely going to cheat to get out of getting KO'ed by Jane, which should be a pretty remote possibility to begin with.  Throwing a ton of complicated code at such a narrow problem is not something I like doing.

At any rate, for stage 2, the only brawler perk we're looking to put in would be this discounted healing. However, we might also consider features such as...
  • people flagged as being in brawls never leave fightlag (this was suggested a few times)
  • people flagged as being in brawls cannot be looted (by either anyone, or their brawling opponent) once they are KO'ed
  • announcements over the Brawler channel that Bob and Jane have begun brawling
For right now though, just figuring out how to prevent people from spuriously declaring brawls mid-fight to get out of a real PK is challenging enough.  Tying it to fight lag is tricky because there may be times when brawlers get out of fightlag but aren't actually done fighting (running to heal, running for a trap, etc), but we're not quite ready to force brawlers to remain in fightlag until someone gets KO'ed.

Comments, ideas, or suggestions are welcome.  Since this post won't fit into a note in the game, it's probably best to leave replies (anonymously or otherwise) as comments to the blog here.

Thursday, November 3, 2011

Taking a step back

Just a forewarning:  this post is long and rambling.  You might want to save it for bathroom reading.

There has been a lot more of a stir surrounding Sidonie's idea post about changing the way sleep/poison/pinch works than I expected, and an interesting discussion came up on OOC yesterday which was suggestive of an ongoing clash of perception.  For the sake of just delineating where I (and I think the other admins) are coming from, I think I'll ramble about it.

The issue that came up yesterday was centered around sleep's duration of 50 ticks at level 50.  There were essentially two camps here:

  1. sleep's long duration is good way to force people to cool off; if a BR is pestering you, or if someone is freaking out and going kamikaze after getting KO'ed, the 37 minute timeout is very useful
  2. sleep's long duration is unreasonable since it doesn't let a player actually play.
Oogon then mentioned something that really sheds light on this rift of perceptions that splits our current playerbase:

[OOC] Oogon: 'But really, how often is sleep used in that regard?'
[OOC] Oogon: 'To just let someone 'cool off'.'

And you know, it's the truth.  I've the benefit of remembering when sleeping pester characters (BRs, naked rogues, etc), was relatively normal, and during those days, slapping a player-mandated time-out was really the only recourse available.  However, something that a lot of older players seem not to realize is that Dark Risings really isn't the same game as it was five years ago; sure, it has the same name and the same backstory, but take a look around.  The areas are no longer static: Lilith has the power to corrupt the entire town of Three Firs, gypsy mobs remember their enemies, and the game is dotted with mini-quests that offer 5000-10000 experience for completing them.  The races are different:  avariels are no longer vuln to all fire, and ogre weres aren't vuln to all magic.  The classes are different: there are now templars, which offer a wildly different approach to PK.  Pick any aspect of the game, really.  I'll bet it's not the same now as it was five years ago.

More importantly, though, is that the whole process of implementation has wildly changed.  This point may not be as evident to players, but I think it's really the single largest change that separates "old Dark Risings" from "new Dark Risings."  Take, for example, the aforementioned avariel vuln to fire.

When avariels were made vuln to fire (this happened in around 2001), there was no discussion or player input.  There was a reboot and a terse note saying "avariels are now vuln to fire."  Since my main character was an avariel, this was a pretty devastating change; I went from having no vulnerabilities to being vulnerable to a spell that almost every class can cast (fireball).  I immediately protested since avariels really weren't very good to begin with, but my notes fell on deaf ears.  I wound up leaving the game a few months later, and while I was gone, flashfire was changed to no longer do fire damage since it was deemed to crippling against avariels.  This mitigated the problem to a degree, but it also left one of the "elemental" spells doing unintuitively and decidedly non-elemental damage.

I think these sorts of changes were very telling of the "old Dark Risings" approach to implementation; imps did what they thought was best for the game with a sort of players-be-damned attitude, and if the change proved to be unpopular or unbalancing, another change would be rolled out to mitigate.  This sort of implementation practice also meant a lot of decidedly reactionary changes went in; old players are rife with stories of how some skill got changed because an imp got beaten by someone gimping that skill in PK.  I'm not sure if these stories hold water, but it doesn't really matter now.

Fast forwarding to the "new Dark Risings," we really don't operate this way at all, and I think this is clearly evidenced by the fact that we solicited player input regarding this poison/sleep/pinch issue.  We also solicited (and continue to solicit) feedback on the brawler scoreboard idea.  The new spells that Arcaenum has are 100% player conceived and designed.  In fact, I don't think there's a single change that we've posted in the last year (except a few exploit fixes) that were done without player involvement.

So what has been the driving force behind this transition from "old Dark Risings" to "new Dark Risings?"

At the "old Dark Risings," the imps had always been people who were at Dark Risings from the very beginning.  All of them had always been imms or admins, and they all had a hand in creating Dark Risings out of nothing and making changes before there were even players to upset.  In many ways, they had every entitlement to do as they saw fit, because everything that Dark Risings had become was a result of their design.

However, this also created a rift between the players and the staff at times, and in many cases, set the stage for an "us against them" mentality at many levels.  The people making the decisions had always been the boss and never enjoyed the "player experience" of not being in control and having changes go in without their approval (or knowledge!).

The "new Dark Risings" really began when Sidonie and I took over the active implementation of the game.  When Mark relinquished his position as active imp, Dark Risings was, for the first time, being run by people who had started DR as regular old players.  We remember what it was like to be a nobody, and to be a player, and to be the victim of sometimes-heavy-handed changes forced down through the ranks.  We also weren't operating under the assumption that we always know what's best for the game, because much of the game was designed and played without us.  Dark Risings is "ours" in the sense that our names are on the paperwork, and we do have the benefit of being long-time players with some amount of wisdom, but I think the defining characteristic of the "new Dark Risings" is that its implementation is far more player-inclusive.

I'd like to think that Dark Risings is less dictatorial and more communal now.  Of course, that's not to say that us admins still aren't the boss.  We are the boss, and we make no bones about letting people know that from time to time.  But this new Dark Risings has become a product of player-driven efforts and RP, so we have nothing to gain by excluding players.