Stat Dependant Text

"I can’t find it right this moment, but someone also built a tool that essentially goes through and plays your game a bunch of times and logs the variable outputs from the playthroughs, so you can get a sense of what your stat thresholds are likely to be.

1 Like

You do this:

  1. Make a file called gower_rulez* and add it to the end of your scene list in *startup.
  2. In that gower_rulez file put this block for the first stat you wish to measure, adjusted so that the range of numbers matches what you wish to measure. I have it measuring every 5, on a scale of 0 to 100. You can set it to be more or less granular if you like. Be sure to change the name of the stat to the one you are measuring.
*if (persuade <= 5)
	persuade between 0 and 5
*if ((persuade > 5) and (persuade <= 10))
	persuade between 5 and 10
*if ((persuade > 10) and (persuade <= 15))
	persuade between 10 and 15
*if ((persuade > 15) and (persuade <= 20))
	persuade between 15 and 20
*if ((persuade > 20) and (persuade <= 25))
	persuade between 20 and 25
*if ((persuade > 25) and (persuade <= 30))
	persuade between 25 and 30
*if ((persuade > 30) and (persuade <= 35))
	persuade between 30 and 35
*if ((persuade > 35) and (persuade <= 40))
	persuade between 35 and 40
*if ((persuade > 40) and (persuade <= 45))
	persuade between 40 and 45
*if ((persuade > 45) and (persuade <= 50))
	persuade between 45 and 50
*if ((persuade > 50) and (persuade <= 55))
	persuade between 50 and 55
*if ((persuade > 55) and (persuade <= 60))
	persuade between 55 and 60
*if ((persuade > 60) and (persuade <= 65))
	persuade between 60 and 65
*if ((persuade > 65) and (persuade <= 70))
	persuade between 65 and 70
*if ((persuade > 70) and (persuade <= 75))
	persuade between 70 and 75
*if ((persuade > 75) and (persuade <= 80))
	persuade between 75 and 80
*if ((persuade > 80) and (persuade <= 85))
	persuade between 80 and 85
*if ((persuade > 85) and (persuade <= 90))
	persuade between 85 and 90
*if ((persuade > 90) and (persuade <= 95))
	persuade between 90 and 95
*if ((persuade > 95) and (persuade <= 100))
	persuade between 95 and 100
  1. Then, repeat that code block again for the next variable you want to test, changing the name of the variable in all of the lines, and repeat until you have all of the variables you want to test in that file.

  2. Then run randomtest and tell it to spit out the number of times each line is hit in the output. Then, when you examine the output, you can see exactly how what the range of stats looks like.

*technically you can name the file whatever you want, but I feel this name works best

8 Likes

This is news to me! So I make the file, throw it in startup, I assume it has to come as the next screen to load up after finishing the previous file, and put “bold” instead of “persuade” and… do it multiple times for each of my stats like charisma or introverted, etc. The do a randomtest- alrighty! How do I make it tell me the number?

Fix your indents! They’re lopsided. It’ll create errors.

Also I’ve noticed in at least one example given in this thread a sneaky issue:

*if (variable = 1)
  *goto first_label
*if (variable = 2)
  *goto second_label

*first_label
  Variable is 1!
*second_label
  Variable is 2!

If variable is 1, the code will output:

Variable is 1! Variable is 2!

You need to instead do this:

*if (variable = 1)
  *goto first_label
*if (variable = 2)
  *goto second_label

*first_label
  Variable is 1!
  *goto next

*second_label
  Variable is 2!
  *goto next

*label next

Don’t worry, what I typed was purely for example and not actual code from my game.

1 Like

That’s because you need to enable implicit control flow: Implicit Control Flow | ChoiceScript Wiki | Fandom

Though as Gower points out, it’s safer to stick with the more verbose method to start with.

Ah yes, that… thing. :joy: I don’t mind having to use *goto and such often but it will be kept in mind.

Thank you for all the answers! Although I still don’t know how to use randomtest to tell me the range of stats.

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the @moderators.