Found an easy way to do stats for script testing


I’m new to this forum and might be repeating something really obvious. But I wasted a good bit of time renaming character_creation_test files and rewriting lists of stats in order to test various combinations before figuring out a much easier way.

EDIT: Hey everyone! The following is one way to do it, but @Zanity pointed out a much simpler one - setting everything for testing at *create and just editing them back to the defaults after testing is done. Cheers!

Former workaround:
I have a character_creation scene listed in my startup.txt file, which I leave in no matter what else I’m testing. (I do have a separate scene list to paste back in once I’m done testing whatever specific scenes I’m working on.)

At the beginning of character_creation (which is the actual code for that scene) I copy-pasted all of my “create” variables and used find-and-replace to change them to “set”. This means that I start the character_creation chapter with all the defaults I put in during “create” (usually 0 for skills and 50 for opposed pair stats.) I can then edit the stats right there instead of pasting them into the beginning of whatever scene I’m testing.

In order to prevent playing through the whole first scene, I have a *label right_before_end, and a *goto right_before_end command. To make the character creation scene work properly after I’m done with all of my testing, I just have to delete all of the *set commands (no need to re-set them to the defaults) and the *goto line.

Tada. Testing stats.


You don’t even need to delete them, just add in a label and a goto that skips them. Or even better, add it all to a separate scene, then add in a gosub_scene. When you don’t want to use it, write *comment in front of the gosub command. Like so;

*gosub_scene setting_stats

*comment *gosub_scene setting_stats

Or you could use a boolean.

*if (set_stats)
  *gosub_scene setting_stats


*gosub_scene is not a bad idea to isolate all those *set functions… but yes, I would still need to delete them after testing. :fearful: I’m too much of a perfectionist to leave unnecessary code sitting around.


i still prefer the easiest no brainer way lol, just set the variables to what i want as they are being created at the beginning and jump to the scene where i want to test. afterwards, change it all back to 0 or default values and its done ^^


At first I was horrified by the thought of messing around with my hardcore coding (all the stuff in the startup.txt) and had visions of missing a couple and everyone being a goblindemon, or a vampire with pack status, or whatever.

Then I realized how much sense you were making and have switched to doing it your way. Thank you. :smile:


haha, you’re welcome. Glad I could help =)