- Part 1: Playing “My First ChoiceScript Game”
- Part 2: Choice, Finish, and Ending
- Part 3: Scenes
- Part 4: Using Variables
- Part 5: Text Formatting and Images
- Part 6: Fairmath
- Part 7: Inputs
- Part 8: Labels and Subrountines
- Part 9: Meta Commands
- Part 10: Customizing the Stat Screen
ChoiceScript is a scripting language from Choice of Games LLC for creating choose-you-own-adventure games.
Along with the ability to add or subtract from values, ChoiceScript also includes functionality for preforming “fairmath”: percentage-based arithmetic.
Instead of increasing or decreasing a fixed number, the fairmath system changes a value by a percentage of the change as a ratio to the original number. In other words, major changes will shift a value up to a point while smaller, consistent changes can shift a value over time (or across multiple choices).
It is often easier to think of fairmath as a default of 50%. Changing by 50% would be significant, but so would small changes of 10% in regard to making choices in regard to, for example, a reputation system or as part of changing character statistics.
Using the fairmath system, the percentage symbol, %, goes in front of the operation.
Like with the 50% change example, adding or subtracting 20% using the fairmath system would adjust the value proportionally.
GitHub Gist Version: