DoujinStars
rinari
rinari

patreon


Gameplay Poll: Fairmath

Hi everybody, November is going to be a crazy month for you guys, because I am STACKED with polls to unleash on you! There's the music commission poll, art commission poll, merch polls, and so much more... So buckle in and get those voting thumbs (?? idk why I said it like that but I'm leaving it) ready: there's lots of things I'd like your feedback on this month!

First things first: how do you guys feel about fairmath? This is probably more relevant to the code-divers, min-maxers, and stat-chasers among you, but I'll do my best to explain what it is and what a difference it makes in your game!

Right now, the alpha build of Shepherds of Haven employs fairmath. In ChoiceScript, fairmath is used to ensure a stat never goes over 100, and it's also designed to make stat increases smaller the closer you get to 100. Example below:

Say you have 20 magic, and each time you choose to train in magic, you get a 10% increase to this stat. 
In fairmath, the system calculates the difference between your current value (20) and the maximum achievable value (100) and takes 10% of that. So the difference between your current value and max value is 80: (100-20=80). And 10% of that difference (80) is 8. 
So when you train in magic starting at 20, the game adds a +8 increase, leaving you at 28 magic after training. 
But, the higher your stat gets, the difference between it and 100 grows smaller, so that stat boosts accordingly get smaller. 
So say you have 60 magic now. 100-60=40, and 10% of that difference is 4, so now you only get +4 to your magic instead of +8. The stronger in magic you get, the less your stat increases are. And at 90 magic, those β€œ10%” increases now only result in +1.

Fairmath makes it impossible for you to go over 100 (which would break the game), but it also makes it much harder to predict exactly what your numbers will be when you choose certain stat-boosting options. If Bob has a 68% approval with Blade, and Tina has a 33% approval, choosing a decision that nets "10% increase to Blade's approval" will result in drastically different increases for them. 

But this is what we've been doing all this time, so I don't know if people prefer this method or not!

The alternative to fairmath is just doing straight numbers. Instead of percentages, every choice nets a flat (+1 to magic) or (+1 to charisma) or (+5 to Blade) each time. This means that keeping track of your stats is much more straightforward, but it also means much slower stat increases: to keep you from becoming overpowered too fast and too early (say, maxing out Blade's relationship in the first chapter), the stat boosts would have to be uniformly very small, usually at 1-point integers for each choice (with bigger boosts at 5 or 10); and the 'maximum' for the stat might grow from 100 to something larger, like 500. 

Does... that make any sense?! I was never very good at explaining things like this! πŸ˜… If you know sort of what I'm talking about, feel free to vote below if you have a preference on how stats are handled in the game! If not, it's okay, it's my fault! πŸ₯²

Which do you prefer?

Comments

I actually really like your suggestion of mixing the two methods too! It wouldn't really be possible in ChoiceScript (not without requiring insane consistency on my part) but is for Twine; I do like the idea of not relying on fairmath for things like relationships but maybe using it for stats and skills! Thank you so much for your suggestion!

Lena Nguyen

Oh my gosh, thank you SO much for pointing me towards this, it is such a huge help! I was vaguely aware of the Math.clamp function, but the way you outlined it in ShoH terms really helped me understand its usefulness--thank you so much for taking the time!!! <3 I'm definitely going to employ everything you said moving forward! <3

Lena Nguyen

Oh, I wanted to ask if it wasn’t possible to use both methods (like, fairmath for stats and straight numbers for relationships or special events), but infinite analemma’s suggestions sounds more straightforward! (I _think_ something similar is also possible on ChoiseScript, btw! At least the code from the WIP β€œMind Blind” sounds a lot like that. But I’m not familiar with coding so please take my word with a grain of salt-)

Hime

Coding post ahead! (Edited because it ate my code. I'll put {{ in for the double less than and }} for the double greater than) For what it's worth, since you're thinking about Twine: in Twine you can use the Math.clamp function, which allows you to set a maximum stat that won't go over. You can also re-set the maximum whenever. So, for example, say you want Blade's maximum approval points to be no higher than 20 in chapter 1. You'd put something like {{set $BladeApproval to Math.clamp(0,0,20)}} in your passage. That equates to 0 points to start, minimum 0, maximum 20. When you put in approval gains, you'd change it to something like {{set $BladeApproval to Math.clamp($BladeApproval + 5, 0, 20)}} Later, in Chapter 2, you can re-set the maximum, say 40. You'd put {{set $BladeApproval to Math.clamp($BladeApproval, 0, 40)}} That would set $BladeApproval to the already clamped number it was in Chapter 1, with a minimum of 0 and a new maximum of 40. P.S. - this would be with Twine's SugarCube coding, not Harlowe, which would look more like (set: $BladeApproval to Math.clamp(0, 0, 20)) Also, you can still create a fairmath type system by doing something like {{set $BladeApproval to Math.clamp($BladeApproval + (100-$BladeApproval)*0.1, 0, 100)}} So if Blade's approval is at 20, it would be 20 + 8. There's also a plugin you can download to do it automatically, if you search for Twine fairmath. Hope that helps!

infinite analemma


More Creators