Can I make the choicescript_stats a "Leveling Page"?

I’m not having trouble or anything, I’m just curious about it and very willing to try.
Is it possible to make the player choose which status they want to update? And use the choicescript_stats to do that? :thinking:

My startup.txt var section looks like this:

*comment --> Points = starts with 30 points
*create point 30

*comment --> Each status only can reach a max of 30
*create strength 5
*create dexterity 5
*create constitution  5
*create intelligence 5
*create wisdom 5
*create charisma 5

I just want to know if that is possible and if woudn’t cause any problems to compile or to publish the game.

I don’t recommend using the stats page as your level-up page (or any event that requires the “update” of the game’s state). All changes made in the stats page are not applied until players progress in the actual story, meaning they have to leave the stats screen and then pressing next button on the main page. If they return again to the stats screen after they leave it, all changes are undone (it never took place to begin with) and that can be confusing for the non tech savvy.

4 Likes

I’d suggest just creating a separate file called level_up and then use *gosub_scene level_up and *return

Thats how I would handle it.

4 Likes

It’s completely possible.

Stories like the Zombie Exodus series and Vampire the Masquerade - Night Road have leveling up systems where you will go to a hub screen to pick which skills you want to put points into to upgrade.

1 Like

Yeah, it is very possible - but as Szaal says I would definitely not want to write it inside the stat screen code personally - too much opportunity to go wrong. As Nocturnal_stillness says, you can write it in a separate scene file then just call it via *gosub_scene

heres an example of going to a level up screen in a scene file

and heres what it ends up looking like in code and in play

4 Likes

@Alice-chan, I really like your idea, looks elegant.

But what I had in mind was giving the player the opportunity to upgrade his stats at any moment (except in battle).

In this method that you proposed the player can only status upgrade when leveling up.

When you say not applied until pressing Next button, even If I *set a global var ?
The next button that you are referring could be a *page_break? our I would have to do a *finish?

Thanks, I’ll search for info here on the forum.
Never played those games. :frowning_face:

The *page_break (although any buttons do, such as *finish or *choice). The truth is, in iPad, both the main screen and stats screen are always displayed. This setup is carried over to all platforms, so it’s impossible to refresh on only one side of the screen. CS refreshes the game state only on the progression of the main screen.

1 Like

Using *gosub_scene would allow you to do that.

All you do is put *gosub_scene whenever you want the player to be able to to that and as long as *return is at the end of the level_up file you’ll be sent back to where you were.

3 Likes

Hi @Nocturnal_Stillness.

Thanks. This is exactly what I needed.

As soon as I finish writing the code, I’ll update it here to set it as an example in case anyone in the future needs help with this.

I use *gosub_scene for scenes that you can/will hit multiple times. (in Unnatural the partner choice, the weapon choice and also the rapport and soul behind the scenes checks are all done using *gosub_scene).

Apart from keeping the code clean it’s also helpful because if there is a bug with that code you only have one place to look.

1 Like

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