Depends on how you want to do it.... you can either just create a variable for each stat, or you create a character class which holds all the stats a player character has in one place....
The later is "more advanced" and a little different to use. The first is simply defining variables like this:
Code:
default playerName = "Palanto"
default playerHealth = 100
default playerBallStatus = "Blue"
default MP = 120
and so on and so forth....
Of course, the "playerName" could/should be replaced in a renpy.input() just make sure you've set at least a default name
Or in the class way:
Code:
init -100 python:
# define the Character's class
class Player(store.object):
def __init__ (self, firstName = "", lastName = ""):
# Name of the Player #
self.name = firstName
self.surname = lastName
# Other Variables #
self.hp = 100
self.mp = 0
self.inhib = 0
self.exhib = 0
self.lust = 0
self.corruption = 0
self.confidence = 0
self.purity = 100
This would be a small "Player" class.
It stores a first name, a surname and a lot of "other variables" like the players health(hitpoints/hp), magic points(mp), inhibition, exhibition, lust, corruption, confidence and purity. You can add/remove whichever you need and rename them as much as you want, as long as you keep the variable names you use in the init the same as you use below.
i.e. changing self.name = firstName to self.name = whatEverYouWant means you have to change firstname to whatEverYouWant in the def __init__(self, whatEverYouWant = "", lastName = ""):
too.
Alright, and this is how you'd use the class:
Code:
default pl = Player("Phil", "Johnson") # would create an object of class player called "pl" with the first name "Phil" and the surname "Johnson"
label start:
python:
name = renpy.input("What is your FIRST name?")
name = name.strip()
if not name:
pass
else:
pl.name = name
surname = renpy.input("What is your LAST name?")
surname = surname.strip()
if not surname:
pass
else:
pl.surname = surname
"This is a fascinating crap game... enjoy the shit!"
$ pl.hp += 100
"Your maximum health was raised by 100HP and you now have [pl.hp]!"
and so on and so forth.... try to google python classes, ren'py screens and ren'py screen actions.