How can I track fairmath stats without railroading the player?

There’s only a handful of topics that will send us into mad rage around here, and they all have something to do with gender selection. Simple game design question are generally answered quickly and politely enough, usually by Havenstone over there.

Will I have? I tried the code out and though the method seemingly worked (in that nothing crashed and the randomtest informed me that it saved the stats at each iteration) I cannot find the output file anywhere. Is the path specified somewhere?

2 Likes

It is a modified version of the original tool to do quickest / randomtest on your game. Assuming you used the commands correctly It should create a file (if I remember correctly) in the same directory you’re executing randomtest.

The same user that made the modified tool also made a VSCode extension with the choicescript language with which you can also run quiqktest and randomtest and generate the output to a csv file. Super useful if you use VSCode or VSCodium or some alternative to write. It’s like a all in 1 tool.

1 Like

Can confirm, the VSCode Choicescript extention is a lifesaver, I don’t know how people manage with anything else. Set it up with a GitHub codespace and you’re totally set, it’s just perfect.

1 Like

I’d indeed suggest adhering to KISS principle and to ditch the fairmath for such purpose altogether (because if you find yourself in a situation where you’re trying to guesstimate fairmath values needed to get the changes you actually want, you’re just adding unnecessary work for yourself with little to no gain in return) Just make adjusting the stat a subroutine which clamps altered value to appropriate range, and call it when needed.

The wiki page on the gosub command is probably a good start, since it conveniently happens to use stats caps as example of application. Note that it is a simplified version of the approach; a more advanced technique would be to use params to allow both stat adjustment and subsequent clamp in a single call.

2 Likes

Interesting! I’m not familiar with this technique, where can I learn more about this?

Do you have to use fairmath? I usually avoid it because it makes it harder for me to judge where to put thresholds. By its nature you tend to get big swings in the middle, and tiny ones towards the ends. If you use normal math, you can always put a check on any stat bars to set them within the 0-100 range so they look right. It’s still a bit annoying to track (some good suggestions above, I’ve done it manually in the past or by printing the values at points in the game that will come out in random test) but still easier to guestimate where readers are likely to fall in a stat than with fairmath.

1 Like

Do you mean creating separate variables to represent the actual stats, and then putting those variables on the stat bars instead of the real values? Because actually changing the stats whenever the player looks at the bars incentivises some blind gameplay shenanigans, where actually knowing your stats prevents you from maxing them out.

I think he means a subroutine that cap the variable so it doesn’t go beyond the max/min usually 0-100

*if var_1 > 100
  *set var_1 100

something like that.

So every time you change a variable you call the subroutine to cap it off.

4 Likes

^This
Can do the same for 0 as well.
All it does is prevent the stat bars from going wonky and trying to show over/under their range or prevent a player from going so far over or under 0/100% that their stats changes cease to matter for checks. Although you can micromanage, this tactic can also work well if you want to give your players a bit of grace and give them some extra chances to get up to 100% since if they go over it doesn’t matter.

But yeah, the main reason why I tend to dislike fairmath personally is the wild up and down swings in the middle. You can have a player make a minor decision that when close to 50% moves the dial far more than a more major one when they’re already sitting close to 90%. It has its pros and cons but can feel a bit weird in its application especially if you’ve got a player that doesn’t understand what fair math is. (Ie they may be wondering whacking a sword randomly at a practice dummy half an hour initially increased their skill by a large amount, where as training under a sword master for hours later only increases it a little.)

2 Likes

I actually don’t mind the diminishing returns aspect of fairmath when it comes to training and skills, that makes sense to me.

1 Like

Yeah, I think it’s all in how you use it.

2 Likes