Explain Fairmath to Me

@MaraJade

you need to make sure the stat is between 1-99 it can’t start at 0 then as @Havenstone says its just a case of putting something like this…


Mara studies the titles of the three books on her table...
*fake_choice
  #and picks up exotic poisons.
    *set poisons %+25

  #and picks up how to charm people.
    *set charm %+25

  #and picks up how to summon Lucifer,
    *set demonology %+25

each of these choices will increase the relevant stat by 25%.

I’m under the impression now that simply adding the % in front of the addition or subtraction makes it fairmath. If thats true, then it seems I’ve been doing it this hole time…

@Yamamato: you’ve been doing it this whole time. :slight_smile:

Ohh Mara understands now good examples @Nocturnal_Stillness because all is easier to understand with poison =))

Its so simple, but the explanation makes it sound so complex. Are the Wiki admins sadistic math geniouses or something?

The best thing about fairmath, is you are always certain that the stat in question will never go over 100% or below 0%. You don’t need to add extra checks (eg, *set strength +10. *If strength >100, set strength 100).
You can simply have the line *set strength %+10.

The maths explanation is so that you can work out exactly what it would do to your score. Depending on the complexity of your stats, if you are adding and subtracting a lot and can’t check possible stat scores easily, use fairmath. If you have a simple system and want to know the max score a player can have, just use simple addition.

Got another quick fairmath question.

Say you get a fairmath stat up to 98, where a further %+10 would boost the stat by 0.2. I’ve been assuming that the 0.2 does in fact get invisibly added to your stat, so that after multiple %+10s your stat would finally flip to 99.

But it occurred to me that there might be rounding to the nearest integer in the code, not just the way it’s displayed. In which case the decimals wouldn’t accrue and you’d need a stat boost of %+50 or more to get you to 99.

Anyone with actual programming nous (or @dfabulich, of course) know the answer? I wouldn’t even know which file to go looking in for the relevant code.

@Havenstone My own testing would suggest that you are correct. I can’t for the life of me get the stat to 99% unless I increase by 50%, and that is as high as it goes.

I can’t think of a situation where you would need to differentiate a stat between 98 and 99, unless you plan for 100 situations, one for each stat. In that case, use simple addition as the player will find it almost impossible to reach the higher numbers (90+)

In general, the player is unlikely to get beyond 80 when using fairmath - treat anything over 80 as expert.

The 0.2 is rounded off.

Thanks, all. The 98 to 99 example was a mathematically convenient but extreme way to explain the question. My real, more relevant concern was whether it makes any sense to bump fairmath stats in %+5 increments, which will start yielding decimal increases as soon as you get past 80. Knowing that %+5 or %-5 has no impact at all on a reasonably high/low stat is useful in actual game design. (80 is high, but consistent play should be able to get you higher).