Thank you so much for that Remix! It works.
However, is there a way for it to appear before you 'run the code'".
Example of the code;
Code: Select all
label theft1:
while dayTime == 4:
scene black
"It's late. I better get some sleep."
return
$ results = [('success',1 +pc.stealth),('fail',3)]
$ place = NonUniformRandom(results)
$ prob = "{:.1%}".format( float(results[0][1]) / float(results[0][1] + results[1][1]) )
$ renpy.transition(longfade)
if place.pick() == 'success' or pc.stealth >= 20:
scene success with longfademore
"Success!"
$ missionS += 1
$ dayTime += 1
$ expEarned = renpy.random.randint (5, 15)
if pc.exp >= 750:
"You reached max experience points for this version of the game."
else:
$ pc.exp += expEarned
"You got [expEarned] exp."
$ moneyEarned = renpy.random.randint(15, 25)
$ pc.money += moneyEarned
"You earned $[moneyEarned]."
call expression 'levelUp' pass ('end') from _call_expression
return
This gets called from a screen. The % shows 0 at first (How I set it as default) and once you call the theft1 label it then shows the percent of the success rate.
However, is there a way I can see the percent before running the program? Especially since the " +pc.stealth" part change once you equip an item. So being able to see the success difference without running though it would be great.
I have other labels of this same code but I assume I can just change the prob to prob2 etc.
Also sorry MaydohMaydoh , seems like you were actually right. I just couldn't figuere out to use those index things.