Using options in stat screens

I’m having a hard time coming up with a way to add a return button to the Power gauntlet screen shown there.

In the above screen. I added a return button but I’m having a hard time trying to add another button under the Power Gauntlet screen. Any ideas

1 Like

Could you explain exactly what you’re trying to achieve? Like, run us through what the player would do on this screen. Right now, I’m a bit confused as to why you’re using two separate choice trees to create a stat screen and then add a return button.

1 Like

If I understand it right, then you just need to add more options:

      # return
            *goto gauntlet
      # do something else
            *goto something_else

Et cetera.

But, yeah, I don’t get why you’re using multiple choice trees.


Are you trying to have a navigation menu with bits that only show up on certain pages?


Because if that’s the case, you can do this on the stats page:

Add the following at the top:

*temp stat_page 0
*temp x_page 0
*label main

and this at the bottom:

*label navigation_menu
   *if ((stat_page = 1) and (x_page !=0)) #Power Gauntlet: Mind Manipulation
      *set x_page 0
      *goto glove1
   *if ((stat_page = 6) and (x_page !=1)) #Power Gauntlet: Other stuff
      *set x_page 1
      *goto glove2
   *if (stat_page != 0) #View Main Stats.
      *set stat_page 0
      *goto main
   *if (stat_page != 1) #View Powers
      *set stat_page 1
      *goto powers
   *if (stat_page != 2) #View Relationships.
      *set stat_page 2
      *goto relationships

and have a:

*goto navigation_menu

or similar to end the respective labels



@cup_half_empty @MeltingPenguins @trevers17
I’m trying to get the return choice to show up on just one page

posted a bit of code that might be helpful.

Though may I ask why you want the stat to show on an individual page? Will there be more text? Or just the statbar?

1 Like

So, if I understand this correctly, you want each power under the power gauntlet to show up on its own page, and you want each page to have a return button. In that case, you could use a variation of MeltingPenguin’s code.

*label beginning
    #Mind Manipulation.
            percent mind Mind Manipulation
        *goto return
    #Freeze Ray.
            percent freeze Freeze Ray
        *goto return
    #Lightning Bolt.
            percent bolt Lightning Bolt
        *goto return

*label return
        *goto beginning
1 Like

Thanks guys. It worked. We appreciate it :raised_hands:t6:

It’s just a test. My plan for the book will be that the mc will select an ability from said Power Gauntlet menu and it will reflect in the options in the passage

I was trying my hand at some game mechanics I taught of and I hit a road block

My plan was to create a set of options in the stats screen that could change the character’s power set, thereby influencing the set of options from the stats screen


The essence of the thread is for me to get some help from you guys anytime I encounter an issue I can’t solve. I was hoping to use this idea in the book I and my partner are working on.

I’d say if you only have one power at a time (first screen) having an extra single choice there is superfluous until you add more options per power.

As for the stats screen: Am I understanding it right that you want an option to switch the power focus on the gauntlet?

It’s just a test. If it works I’ll use it.

Yeah. I was working on that but I got an error

This might not work through the stat screen, if I understand this comment correctly. You can’t set variables through the stat screen. Try to create a separate file for setting gauntlet powers and use *gosub_scene when changing is needed.
Edit: Added an example how that might work:

*label this_action
	#Before I do anything, I'll change my superpower.
		*gosub_scene power_gauntlet select_powers
		*goto this_action
	*if (power = "Super strength") #Attack the enemy with your super strength!
		You punch the enemy!
		*goto next_action
	*if (power = "Super speed") #Dodge the enemy!
		*if speed >= 60
			You dodge successfully!
			*goto next_action
			You can't dodge completely!
			*goto next_action

If you choose the 1st option, you are taken to label select_powers in the power_gauntlet file you hypothetically created.

*label select_powers
Do you want to change your power?
	*selectable_if (power != "Super speed") #Use super speed.
		*set power "Super speed"
		*goto select_powers
	*selectable_if (power != "Super strength") #Use super strength.
		*set power "Super strength"
		*goto select_powers
	#Return to the game.

You can try this.
I’ve also taken a look at your label beginning. It won’t work for what you are trying to do.

The problem

You are using *input_text command for numerical variables. If you input 100, the game won’t treat it as a number 100 which can pass *if speed >= 60 condition, if will treat it as a text which reads “100” and can’t pass.
Use *input_number instead. And, unless you want to allow players to play on god mode, set up a limit of points you can allocate to your stats. I’ve written an example code for you:

*temp max_points 100
*temp points 0
*label beginning
You have ${max_points} power points left. Allocate them wisely!
	#How strong are you?
		*input_number points 0 max_points
		*set physical +points
		*set max_points -points
		*set points 0
		*goto beginning
	#How fast are you?
		*input_number points 0 max_points
		*set speed +points
		*set max_points -points
		*set points 0
		*goto beginning
	#I changed my mind! Let's re-allocate the points!
		*set max_points 100
		*set points 0
		*set physical 0
		*set speed 0
		*goto beginning
	#I've finished!
		*goto next_label
*label next_label

You can set variables from the stats page, but it will only take effect on the main game after you refresh the page, that means, after you turn the page or if you close and open the game again, both of which are impractical to do in the middle of a fight.

But a system like this, to select active powers for example, should be fine as long as you don’t expect the change to take effect immediately. Alternatively, you can force the page to refresh by using *redirect_scene, clever reference variables and well-placed labels, but it also means losing any temporary variables.

1 Like

Oh. I guess I was mistaken.

You guys are geniuses. I’ll take my time reading cause I’m confused right now :joy:. I’ll get back to y’all if I have any other issues

1.Will the sub-scene be used in tandem with the stats menu?
2. I’m doubting it is, but is it possible for the player to change powers on the getgo

No. Even if you use a different file, the changes will take effect only after refreshing the page if you access it from the stats page.

You could add a label at the top of every page of a fighting scene and add an option during the fight to access the gosub and then goto the label at the top of the page. This would force the refresh and is relatively simpler.

1 Like

I suggest you using a subroutine in a separate file for setting your power, while leaving the stat screen only for showing information, not setting it. What other users are suggesting you requires subroutines anyway, so I think my way is slightly easier.