Anyone who has coded in ChoiceScript before knows that opposing stats is really just one variable. But what if it actually used two?
I haven’t seen anyone use something like this yet (please correct me if I’m wrong), so in my WIP, I’m trying out a stat system using a variable for each opposing side. I’m using it for both personality and relationship stats, although I still don’t know how viable it is (especially for relationship stats) long term.
Here's an overly simplified code I'm using in my WIP for the Warm/Cold Personality Stat
*create warm 0 *create cold 0 *create warm_percent 0
*choice #This choice increases the Warm personality stat. *gosub_scene stat plus 5 "warm"
This is the file named “stat”:
*label plus *params amount stat *if (stat = "warm") *set warm +amount *goto warm_cold_check *elseif (stat = "cold") *set cold +amount *goto warm_cold_check *elseif (stat = "warm_cold") *set warm +amount *set cold +amount *comment (For neutral choices if we want to increase both at once) *label warm_cold_check *if ((warm = 0) and (cold = 0)) *set warm_percent 50 *elseif ((warm = 0) and (cold > 0)) *set warm_percent 0 *elseif ((warm > 0) and (cold = 0)) *set warm_percent 100 *else *set warm_percent (round(((warm/(warm + cold))*100))) *return *else *bug
Please note that the actual stat chart uses only a single variable. This is the variable you use when checking a stat.
*stat_chart opposed_pair warm_percent Warm Cold
I have a setting where you can see the actual values of Warm and Cold, but I’ve disabled this by default because having two numbers for a stat is more confusing.
The actual code I use is more complex, but that’s not really important.
So, why use two variables?
Below are some things I have thought of for why you might want to use this system. To better explain my points, let’s say we have a generic Good vs. Evil stat.
More accurate percentage of choices picked
The Good/Evil stat would normally start out at 50/50. But even if we picked all the “Good” choices in Chapter 1, your stat bar will probably show something like 70% or 80% Good instead of 100%, which doesn’t really make sense to me.
With two variables, you will have 100% Good if you pick all the Good choices as early as Chapter 1. Of course, not all choices are equal, so you still need to vary the amount you gain with each choice.
Easier stat checking / Two methods of stat checking
This was actually the main draw for me for using two variables. But how would doubling your variable count make checking them any easier?
Well, you don’t need to track the highest points for a certain stat every time you need to check a stat. Since the Good/Evil stats can be anywhere from 0-100% as early as Chapter 1, we no longer need to check if 80% Good is the highest you can get the Good stat at Chapter 1.
At any point, 40/60% is an easy check, 20/80% is hard, and 0/100% means picking every choice up to that point.
If you ever need it, you can still check the actual Good/Evil values instead of the percentage, since 80% Good has different meanings depending on whether you are in Chapter 1 or 10.
Another thing to consider is that adding points to the Evil stat doesn’t necessarily decrease your Good stat (just the percentage), so this could be useful if you’re also checking the actual point values.
Different branches having unequal stat opportunities is less of a problem
With two variables, it doesn’t matter much if a branch has more opportunities to gain a certain stat. 0% and 100% is always achievable.
Easier way to make a stat turn neutral
If you have a neutral choice, you just need to add points to both Good and Evil equally, and no matter the value, the percentage will get closer to 50%.
Natural diminishing returns (without fairmath)
Because we’re comparing two values, diminishing returns will naturally occur, as long as you keep adding to both values instead of subtracting (though that’s an option too).
Choosing a choice opposite your highest stat can be less punishing
With fairmath, choosing to steal while you’re at 90% Good is very punishing, and it’ll be much harder to get it back to 90%.
With two variables, it will still drop, but if your actual Good stat value is high enough, it will barely move at all. This can incentivize people to choose what they actually want to do instead of being forced to min-max.
100% is not a limit / All stat gains have a permanent effect*
This is the second main draw for me. For longer games, you will probably hit the limit/soft cap for opposing stats early on.
With a single variable, increasing your Good stat beyond 100% won’t do anything (unless you deliberately make it go past 100). So we pick an evil choice, and it goes down to 80%. But we can still build it up back to 100%, like you never did anything evil (this can be resolved by using other variables, but it’s not reflected in the stat itself).
*With two variables, increasing your Good stat even if you’re at 100% still has an effect, because picking an Evil choice later on will have less of an effect. If we do this, however, we can never get back the Good stat to 100%, and that one choice will haunt you forever (unless you remove the Evil points, of course).
With that all said, why not use two variables?
It’s just more complex
Sometimes, simple is best, especially for shorter games. I wouldn’t recommend using this system for beginners.
Early game choices have a greater effect than late game
Stats will heavily fluctuate in the early game, while they will barely move in the late game, if you only keep adding points and not subtracting them.
You have less control
With two variables, you can’t set/add/subtract a stat easily. It’s possible, but it’s clunky, and depending on if you add or subtract values, it will have wildly varying results.
You also won’t be able to use fairmath. While using two variables allow for increasing/diminishing returns, it’s harder to calculate its actual effect. Fairmath is consistent, and can be used in all stages.
It doesn’t fit your needs
Different stories need their own way of doing their stats. Using two variables for opposing stats is just another way. Since I’m already using a subroutine for my notification images, this isn’t much of a hassle for me.
For the reasons above, I only recommend using this for personality stats and longer games, since by the end, the game should have a very clear idea of what kind of character you are playing as. I’m also using this for relationship stats, but having more control over those is probably a better idea.
This is mostly theorycrafting at this point, but I wanted to share this, and I’m curious to hear what others’ thoughts and opinions are!