To help me balance my stats in my work-in-progress, I modified randomtest to take snapshots of my stats and put them in a .csv file, which Excel and other spreadsheet programs can open. I put the changed code on Github for anyone who wants to give it a try. You should be able to use it just like you would ChoiceScript from the main repository.
To try this out, in your
startup.txt file, put a special comment that sets up what variables to save:
*comment savestatsetup [stat1] [stat2] [stat3]
[stat1] and the rest with a list of the variables you want to save. Put a space between each variable’s name.
Then, wherever you want to take a snapshot of the variables’ values, put the following comment:
If you run randomtest from a terminal window, the program will ask you if you want to save stats to a file. Say “yes” to save the variables’ values to
I included an example of how to use it in the sample game that comes with ChoiceScript.
Once you’ve got your variables saved to a .csv file, you can open that file in Excel and get an idea of how much your stats are varying by over a bunch of runs. For example, I ran randomtest a thousand times to see what the stats looked like after the first chapter of my work-in-progress. Then I made histograms to see how the stat varies. Here’s one skill’s value:
From this I can see that the most common set of values is around 31, but that a really determined player could push it all the way up to nearly 50. If that’s too high for me, then I need to make changes to the code to make that high value less possible.
I also looked at an opposed stat value that starts at 50.
This tells me that it’s easier to push the stat in one direction than in the other. That may be okay! Or I may want to tweak things to give a more even distribution so that there’s a peak around 50 and it falls off more-or-less equally to either side.
Finally, if you really want to get fancy, you can see how different stats influence each other by looking at their correlation.
A positive value means that when one stat goes up, in general so does the other. A negative value means that when one stat goes up, in general the other goes down. A value near zero means they don’t influence each other at all. From this, I can see that emphasizing any one skill comes at the expense of another, except (weirdly) for labwork and political insight. I can also see that, since the value for rhetoric and reasoning is almost zero (-0.447), they don’t influence each other much.