Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethinking XP and skill comprehension #613

Closed
FunnyMan3595 opened this issue Apr 23, 2013 · 11 comments

Comments

Projects
None yet
5 participants
@FunnyMan3595
Copy link
Contributor

commented Apr 23, 2013

I went digging a bit ago to figure out what skill comprehension actually did, and was rather annoyed to discover that it is utterly useless past 100%. After a prod from DarklingWolf, I found issue #416 and the forum thread it references. I got the kernel of a solution as I was reading that, and needed to take a few minutes to hammer out the details, so I figured I'd do it in public. All specific numbers given should be taken with a grain of salt; they'll probably need balance work.

The basic problem is that while the XP pool is a good idea, it has some rather ugly side-effects in its current implementation:

  • Running out of XP puts a major damper on the game, because you go from learning perfectly to not learning at all as soon as you run out. While in theory this would be a good time for the character to relax and do fun things for a while, in practice it's easier to wait, sleep, or read a skill book to pass the time.
  • Speaking of skill books, they don't consume XP at all, which rather undermines the intent of the XP pool as being something like the character's ability to concentrate or mental energy.
  • Skill comprehension doesn't help matters any, because it's just the chance for you to spend XP on a skill when you perform an action with it. Below 100%, you train proportionately slower, but once it hits 100% there's no additional effect.
  • Morale also ties into this, as it determines the rate you gain XP at. There, though, we seem to have a severe imbalance, with most morale effects being borderline useless, because they wear off so quickly, but a few able to give you an effectively-infinite XP pool if managed properly.
  • As a result, the permanent morale boost from Optimist (2 points) is a better trait for learning than the 50% skill comprehension from Fast Learner (3 points), which is basically useless. That doesn't make very much sense.

Soron's initial changes were, at best, a quick fix. As the thread discovered, in attempting to fix surface issues, simple approaches just uncover the more fundamental problems with the system. Instead, I've taken several of the ideas in the thread, mixed them together with some of my own, and come up with what is (I hope) a consistent, sane, and fun system.

  1. Since the XP pool is basically a standin for the ability to concentrate, let's make it exactly that: Mental Focus, a direct modifier on learning speed. MF 0% (which should never be reachable) means you can't learn at all, MF 100% is standard skill growth (equivalent to having sufficient XP in the pool), and everything else applies the obvious multiplier.
  2. Drop skill comprehension completely. Quick Learner becomes a flat bonus of 15 to MF. For anything else that worked similarly to skill comprehension, like Savant, we translate the fail percentage directly into a learning penalty.
  3. Just as morale affects XP gain now, it would affect MF gain, but with a smoother progression. I'm thinking something like:
    // Factor in pain, since it's harder to rest your mind while your body hurts.
    int eff_morale = morale - pain;
    int focus_gain_rate = 100;
    if (eff_morale < -99) {
        // At very low morale, focus goes up at 1% of the normal rate.
        focus_gain_rate = 1;
    } else if (eff_morale <= 50) {
        // At -99 to +50 morale, each point of morale gives 1% of the normal rate.
        focus_gain_rate += eff_morale;
    } else {
        /* Above 50 morale, we apply strong diminishing returns.
         * Each block of 50% takes twice as many morale points as the previous one:
         * 150% focus gain at 50 morale (as before)
         * 200% focus gain at 150 morale (100 more morale)
         * 250% focus gain at 350 morale (200 more morale)
         * ...
         * Cap out at 400% focus gain with 3,150+ morale, mostly as a sanity check.
         */

        int block_multiplier = 1;
        int morale_left = eff_morale;
        while (focus_gain_rate < 400) {
            if (morale_left > 50 * block_multiplier) {
                // We can afford the entire block.  Get it and continue.
                morale_left -= 50 * block_multiplier;
                focus_gain_rate += 50;
                block_multiplier++;
            } else {
                // We can't afford the entire block.  Each block_multiplier morale
                // points give 1% focus gain, and then we're done.
                focus_gain_rate += morale_left / block_multiplier;
                break;
            }
        }
    }
  1. Whenever a skill is improved, there's a MF% chance that the MF drops by 1. So at 50% MF, you've got a 50% chance to drop to 49% MF. If you somehow manage to reach 350% MF, you're guaranteed to drop to 347%, and you've got a 50% chance of dropping to 346%. (Quick Learner is not counted here; it's an MF bonus, not part of the base MF.)
  2. Similarly, once every minute, there's a (focus_gain_rate - mental_focus)% chance that MF increases by 1. So if you've got 50 morale, 0 pain, and 97% MF, you've got a (150 - 97)=53% chance every minute to go up to 98% MF. This can go negative, and decrease MF passively, or above 100% and give more than 1 point per minute. (Again, the Quick Learner bonus is not counted here.)
  3. Skill books are mentally-taxing by default. While reading a skill-improving book, your MF regen will have a 100% penalty, and your MF will have a chance to drop every minute. As a result, reading a skill book while unhappy or in severe pain will cause your MF to drop rapidly.
  4. In place of the skill comprehension bonus, each point of intelligence above 8 gives you +10 morale while reading. This mitigates the MF regen penalty for skill books and makes leisure books far more effective for smart characters. The bonus also applies to the "too depressed to read" check.
  5. For transparency, the current focus_gain_rate should be described on the morale screen. Something like "Mental Focus +1.3 per minute."

Again, the numbers probably need balance work, but once it's tuned right, it should hit all of the major problems with the existing system:

  • You can't "run out" of MF, because it drops much slower and increases much faster as it gets closer to 0. You will, however, be training very slowly.
  • Your MF will recover much faster if you spend time doing recreational activities. It's not that hard to hit 50 morale, and that provides a big boost to MF recovery, especially as your MF nears its max. Waiting around will get you to 100% MF... eventually... but a bit of music or reading can boost you to 120% or better much faster than waiting gets you to 100%.
  • Skill books are still useful for bootstrapping and learning without wasting materials, but are definitely harder overall than actually practicing the skill.
  • With skill comprehension removed, high intelligence no longer makes Fast Learner obsolete. Fast Learner just means your MF is always 15 higher than it would otherwise be, making 115% your natural focus.
  • Morale bonuses still need fixing, but I'll have a look at that as part of the overall balancing work, so they should also be resolved when it's ready to pull.
@ethankaminski

This comment has been minimized.

Copy link
Contributor

commented Apr 24, 2013

Other than mechanic (7), this sounds pretty awesome. Can't wait to see it coded :).

EDIT: And to clarify, I meant that I'm not sure whether (7) is quite the right approach, thematically and gameplay-wise. It might be, but I think I'd need to play with it in order to judge.

ethankaminski added a commit to ethankaminski/Cataclysm-DDA that referenced this issue May 19, 2013

@GlyphGryph

This comment has been minimized.

Copy link
Contributor

commented May 22, 2013

My proposal for an alternative for skill books and skill rust follows, at would dovetail decently with the proposed system:

First off, we will need to track a few more values than 'current skill'. Instead, we'll need to track the following:
Base Skill - This represents the players REAL skill - before skill rust or skill bonuses are applied.
Current Skill - This represents the players EFFECTIVE skill, and includes the penalties from skill rust. The further from base skill this gets, the slower it degrades. The recovery of Current Skill occurs much more quickly than skill is gained, and doesn't actually slow the rate at which Base Skill is improved.
Skill Potential - This value is usually equal to Base Skill, but can be boosted by various activities such as reading books or receiving bursts of inspiration from the Inspired trait. Level-based Recipes are unlocked by Skill Potential, rather than base skill. In addition, where your Skill Potential is higher than your Base Skill, experience gain is increased significantly. Skill Potential degrades over time back to the level of Base Skill.

This means that:
Skill rust will never make you forget recipes, it just reduces your effectiveness.
It is easier to recover from skill rust - it's just about refreshing your memory, not relearning the skill.
Books provide a boost to Skill Potential as a status effect, up to a level dependent on the book. This will allow you access more advanced recipes and improve your rate of learning, but the boost should only last a couple days. As you practice the skill, the effect of the boost becomes less important (it does not increase as Base Skill increases, it simply boosts you TO a given level).

@ethankaminski

This comment has been minimized.

Copy link
Contributor

commented May 22, 2013

Seems like it would make sense for skill rust to not use up XP/focus/whatever? That would make the rust penalty a lot less painful. Also, should we allow skill gain to continue (perhaps at a reduced rate) when the skill is rusted?

For books: that does seem like it would be a bit more effective than the current mainline system, or the current system as implemented in my testing branch. Fine-tuning the numbers will be interesting, of course.

@GlyphGryph

This comment has been minimized.

Copy link
Contributor

commented May 22, 2013

Yeah, I was imagining skill rust recovery as it's own thing on the side, that is affected by Focus but doesn't really effect focus (or anything else) in return.

Also, I really want to add an "Inspired" ability that grants random, short term Boosts to various skills, in case you didn't notice.

@i2amroy

This comment has been minimized.

Copy link
Member

commented May 22, 2013

It sounds like a pretty sweet system. I do agree that base skill gain rates should be slowed down while you are working off rust (since if you are just reviewing you usually aren't learning too much new information).

@kevingranade

This comment has been minimized.

Copy link
Member

commented May 22, 2013

I like the rust as a penalty as opposed to degrading actual skill level,
and recovering from rust being greatly accelerated.

What are you trying to depict with the book thing? I have trouble wrapping
my head around it as it doesn't seem to mesh with the ways books are
actually used, either to learn specific knowledge about something, or as a
reference manual, or even a literal instructional book. For example, why
does the bonus go away over time? You read a book about something, gain
some insight, but then if you don't practice, you not only don't gain any
practical benefit (effective skill gain), but you lose the insight over
time as well?
On May 21, 2013 10:04 PM, "GlyphGryph" notifications@github.com wrote:

Yeah, I was imagining skill rust recovery as it's own thing on the side,
that is affected by Focus but doesn't really effect focus (or anything
else) in return.

Also, I really want to add an "Inspired" ability that grants random, short
term Boosts to various skills, in case you didn't notice.


Reply to this email directly or view it on GitHubhttps://github.com/TheDarklingWolf/Cataclysm-DDA/issues/613#issuecomment-18253351
.

@ethankaminski

This comment has been minimized.

Copy link
Contributor

commented May 22, 2013

Alright, I'm going to implement GlyphGryph's rust system, then. I'll do that as a separate pull request, since skill rust being OP and annoying is a separate issue from the learning system needing work.

@GlyphGryph

This comment has been minimized.

Copy link
Contributor

commented May 22, 2013

@kevingranade I'm trying to depict a slightly abstracted and game-applicable version of what I assumed was the general real-life virtue of skill books (text books, manuals, technical literature), but maybe I'm over generalizing if it doesn't seem familiar to you. But "You read a book about something, gain some insight, but then if you don't practice, you not only don't gain any practical benefit (effective skill gain), but you lose the insight over time as well?" effectively describes my experience in real life, yes. I (and I assume others) use books primarily in this manner, with the book it's serving as a guide "this is what you should practice and how" and primer "this is what you should be thinking about as you approach the problems". Think of school - you read a chapter or three from the textbook, and then you /stop/ reading to do some practical application. Otherwise, it doesn't stick, because there's no real learning until you've figured out how to apply it. This is how I've approached skill books practically my whole life - if I fail to apply it within a reasonable time period (weeks in real life, but that equates to days in game) it is very much effectively lost. And yes, the books also act as a reference here, or at least a temporary source of innovation and ideas with the temporary crafting boost.

I do think having additional recipe books (rather than skillbooks) is a good idea, and we've already started that in game, but in addition to being a mechanically sound approach to handling them, I think it my proposal accurately mirrors my own real-life experience with educational material as well.

And when we do give the player the ability to simply "practice" at the cost of resources, the most efficient way to learn will be alternating stints between reading and reviewing sections of the book, punctuated by periods of "practicing" the new material, which I assume you would agree effectively mirrors most people's real life education experience, right?

If you want to encourage this more, what we could do is put a 1-3 level cap on how far "potential" can surpass actual skill level. I don't think that would help gameplay-wise, though.

@i2amroy

This comment has been minimized.

Copy link
Member

commented May 22, 2013

I think I understand what you are saying, and from what I understand I like the sounds of it. It's basically splitting the book system off into a separate system from skill levels, but that effects how quickly you can gain skills and what recipes you have access to. Something like:

Actual Skill level - This is raised by doing "whatever", doesn't decrease through rust. Determines basic crafting recipes available

Rust level - This slowly increases over time, and can be worked off very quickly by performing the skill. While you have "rust" on your skill any gains to your Actual Skill levels are reduced. This does not make you forget recipes, but affects all applications of the skill (so your chance of successfully performing said recipes/tasks drops)

"Potential" level - This is bottom capped at your Actual Skill level. When you read a book this will increase your level for purposes of unlocking recipes. (But not for actual skill checks, so your % of success remains the same!). This degrades over time until it reaches your Actual Skill level, and any recipes that you unlocked with it are forgotten (unless you have increased your Actual Skill level to unlock them!). If Potential level > Actual Skill level then any gains to your Actual Skill level through practicing the skill are greatly increased.

This could also lead to a few potential traits:
Practical Learner - Reduces any gains to your "Potential" level from reading; (Potential increase to all normal gains?)
Book Learner - Gains "Potential" levels much faster (Maybe with a small increase to Actual Skill level on book reading as well?)
And as Glyph has already mentioned:
Inspired - Rarely gives a large bonus to the "Potential" level of a random skill, allowing access to upper level crafting and fast skill gain temporarily (Maybe with an sudden drop in "Potential" level after the inspiration "wears off"?)

@GlyphGryph

This comment has been minimized.

Copy link
Contributor

commented May 22, 2013

I think you've got a pretty accurate understanding of it. I was actually debating whether to classify the rust as a lower "effective level" or a positive "rust level" applied on top. Functionally identical either way. I like the ideas for traits as wells.

@ethankaminski

This comment has been minimized.

Copy link
Contributor

commented May 30, 2013

I'm gonna close this (since the bulk of the original proposal has been added), and open a new issue referencing this one re: the book discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.