How to make customizable stats?

I’m having trouble with designing customizable stats. I want there to be a few presets that people can choose from, but I also want it to be possible for players to design their own stats for a more diverse gameplay. If you’re having trouble understanding what I’m asking, think something along the lines of Zombie Exodus: Safe Haven when the players are able to either choose their skills or let it be defined by what job they pick. What would the code look like for something like this?

edit: If anyone is curious, I did some tweaking and found a way to do it.

The code

First, you’ll want to create a points system in the startup file. You can do this by typing “*create points 120”. It can be however many points you want, I’m just using 120. Next, we’re going to a label where the customization takes place. I’ll show you my setup.

*label customize_stats
*if (points = 0)
 *goto next_scene
You don't fit into any typical roles that usually come within groups of friends, and you're a little more unique than that. 

What are your skills? You have ${points} points left
*choice
 *selectable_if (points > 49) #+50 to a skill
  *goto +50
 *selectable_if (points > 39) #+40 to a skill
  *goto +40
 *selectable_if (points > 29) #+30 to a skill
  *goto +30
 *selectable_if (points > 19) #+20 to a skill
  *goto +20
 *selectable_if (points > 9) #+10 to a skill
  *goto +10

*label +50
What skill would you like to add 50 points to?
*choice 
 *selectable_if (charisma < 50) #Charisma
  *set charisma +50
  *set points -50
  *goto customize_stats
 *selectable_if (perception < 50) #Perception
  *set perception +50
  *set points -50
  *goto customize_stats
 *selectable_if (athleticism < 50) #Athleticism
  *set athleticism +50
  *set points -50
  *goto customize_stats
 *selectable_if (educated < 50) #Educated
  *set educated +50
  *set points +50
  *goto customize_stats

*label +40
What skill would you like to add 40 points to?
*choice 
 *selectable_if (charisma < 60) #Charisma
  *set charisma +40
  *set points -40
  *goto customize_stats
 *selectable_if (perception < 60) #Perception
  *set perception +40
  *set points -40
  *goto customize_stats
 *selectable_if (athleticism < 60) #Athleticism
  *set athleticism +40
  *set points -40
  *goto customize_stats
 *selectable_if (educated < 60) #Educated
  *set educated +40
  *set points +40
  *goto customize_stats

*label +30
What skill would you like to add 30 points to?
*choice 
 *selectable_if (charisma < 70) #Charisma
  *set charisma +30
  *set points -30
  *goto customize_stats
 *selectable_if (perception < 70) #Perception
  *set perception +30
  *set points -30
  *goto customize_stats
 *selectable_if (athleticism < 70) #Athleticism
  *set athleticism +30
  *set points -30
  *goto customize_stats
 *selectable_if (educated < 70) #Educated
  *set educated +30
  *set points +30
  *goto customize_stats

*label +20
What skill would you like to add 20 points to?
*choice 
 *selectable_if (charisma < 80) #Charisma
  *set charisma +20
  *set points -20
  *goto customize_stats
 *selectable_if (perception < 80) #Perception
  *set perception +20
  *set points -20
  *goto customize_stats
 *selectable_if (athleticism < 80) #Athleticism
  *set athleticism +20
  *set points -20
  *goto customize_stats
 *selectable_if (educated < 80) #Educated
  *set educated +20
  *set points +20
  *goto customize_stats

*label +10
What skill would you like to add 10 points to?
*choice 
 *selectable_if (charisma < 90) #Charisma
  *set charisma +10
  *set points -10
  *goto customize_stats
 *selectable_if (perception < 90) #Perception
  *set perception +10
  *set points -10
  *goto customize_stats
 *selectable_if (athleticism < 90) #Athleticism
  *set athleticism +10
  *set points -10
  *goto customize_stats
 *selectable_if (educated < 90) #Educated
  *set educated +10
  *set points +10
  *goto customize_stats
1 Like

I have no idea tbh.

That being said, you can look directly at the code he used in the link below. That’ll probably give you a fair idea of what tricks he used.

https://dashingdon.com/play/jimd/zombie-exodus-safe-haven-part-3-public-beta/mygame/scenes/startup

3 Likes

@ConfusedTissue I would do one of two things.

  1. Choose options that effect stats, e.g.:
    I changed my major twice in college before I finally decided what I wanted to do.
    *choice
    #I studied engineering.
    *set ingenuity %+10
    #I studied sociology.
    *set empathy %+10
    Etcetera.

  2. Bundle things.
    After graduation, I had a lot of options as far as internships.
    *choice
    #I went with T. Rowe price on Wallstreet where I learned the ins and outs of stocks.
    *set finance +1
    *set superiority %+5
    *set retirement_savings 100
    #I studied acting at the Globe Theater.
    *set performance +1
    *set likes_coffee -2
    *set british_accent %+15

Hope this helps.

4 Likes

Thanks! I’ll take a look at it

1 Like

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