Stat checks help?

Something odd is happening with my stats system. I’ve found that in my latest chapter, with every choice the MC makes (regardless of whether or not it has anything to do with stats), all of their stat levels increase. To the point where multiple stats levels are 40+ when the typical stat is only supposed to sit at around 20.

Even so, with high stats, some of my players have reported being unable to pass some stats checks that according to the code they should be able to pass. The code here, for example, says:

Summary

And you fall.
*if (Power < 27)
*goto deathscene

    *elseif (Power > 26)
        *page_break
        Your knees are the first to make painful impact with the sharp, warped edge of what [i]was[/i] the floor, and then as you're scrambling to right yourself, the whole floor tips downward, and your body rolls along with it. One second, you were straining to keep yourself sandwiched between the walls, and now your elbows are knocking against your knees and you can't breathe, can't scream, can't think—
        
        And then two strong hands grab hold of your elbows. For a moment, you're suspended like that— legs dangling into a mysterious chasm, arms pulled up over your head. 
        
        Then, for better or for worse, you feel yourself being tugged upwards.

But some players with high power stats are still getting the death scene. :T

Is the game hosted on dashingdon? And if so, can you put a link here and tell us in which scene this code appears? The error may be somewhere else.

From my end, it looks like an issue with the spacing. If I put the code into mine like this, it works:

And you fall.

*if (Power < 27)
	*goto deathscene
*elseif (Power > 26)
	*page_break
	Your knees are the first to make painful impact with the sharp, warped edge of what [i]was[/i] the floor, and then as you're scrambling to right yourself, the whole floor tips downward, and your body rolls along with it. One second, you were straining to keep yourself sandwiched between the walls, and now your elbows are knocking against your knees and you can't breathe, can't scream, can't think—
	
	And then two strong hands grab hold of your elbows. For a moment, you're suspended like that— legs dangling into a mysterious chasm, arms pulled up over your head.
	
	Then, for better or for worse, you feel yourself being tugged upwards.

As an ending note, I put the Power stat at 50 to get the non-death scene. Which worked for me.

Another thing I can think of is how things, maybe, the 27 and 26 might be in the wrong place.

The way I would word this, personally, would be something like:

And you fall.

*if ((Power = 26) or (Power < 26))
	*goto deathscene
*elseif (Power > 26)
	*page_break
	Your knees are the first to make painful impact with the sharp, warped edge...

If Power = 26 or is lower, the Death Scene is triggered.

If Power is greater than 26, the other scene triggers.

2 Likes

Invicto (dashingdon.com)

It happens in scene file 22, aka Chapter 5… and I’m not quite sure which block of code is causing the MC’s stats to increase at every choice.

From a first pass, it looks fine. The player’s power might be reduced unexpectadly somewhere else.

Also, you can simplify

*if ((Power = 26) or (Power < 26))
...
*elseif (Power > 26)

to

*if (Power <= 26)
...
*else
...
1 Like