Good idea, unfortunately you need some help with the execution.
Python:
init python:
class Girl(renpy.python.RevertableObject):
def __init__(self,GFName,GLName,Age,RP,PregC,PregS):
self.GFName = GFName
self.GLName = GLName
self.Age = Age
self.RP = RP
self.PregC = PregC
self.PregS = PregS
@property
def RelStatus (self):
if self.RP >= 15:
return "Girlfriend"
elif self.RP >= 10:
return "Friend"
elif self.RP >= 3:
return "Acquaintance"
else:
return "Stranger"
def PregRes (PregC,PregS):
if self.PregS ==True:
self.Pregs = True
if random.random() < self.PregC:
self.PregS = True
else:
self.PregS = False
#def SexO():
#Girls
#How to update?
Changed the class to inherit from 'renpy.python.RevertableObject' to make sure your custom class participates in rollback correctly.
No longer in __init__ do we declare Status as an attribute, but instead going to make it a property. Although for the logic... if your not going to do a range comparison like '10 < self.RP >= 3', make sure you check the minimum highest value to change the relationship status.
If you hit a return in a function, the rest of the function does not execute.
I didn't touch the next function...
Now in the separate rpy:
Python:
define Law = Character("Anna")
define Abigail = Character("Abigail")
define CEO = Character("Tom")
# The game starts here.
default AnnaStats = Girl("Anna","Kotov",23,0,4,False)
default AbigailStats = Girl("Abigail","Hope",25,5,4,False)
default ChloeStats = Girl("Chloe","X",21,5,4,False)
default Player = Character("[FName] [LName]")
default FName = "Player"
default LName = "McGee"
label EchelonStart:
scene BG
"Welcome to Echelons V0.0.1 Alpha"
$ FName = renpy.input("What is your first name?")
$ LName = renpy.input("What is your last name")
jump LawyerOffice
# Lawyer Intro Scene
label LawyerOffice:
scene law1
Law "Hi [FName], I'm sorry that we have to meet under this circumstance [AnnaStats.RelStatus]"
Player "So am I."
$ AnnaStats.RP +=10
Law """
As you know, your Father was an extremely wealthy man.
As you're the only living family member, you get everything.
However, your Dad did leave one stipulation so you don't get everything immediately.
"""
Player "Elaborate?"
Law """
I knew your Dad for almost 30 years, every single deal he made, he had me look over the paperwork [AnnaStats.RelStatus].
His goal always was to make sure things lasted. Obsessed with it to a fault really.
"""
return
So you know if you declare/update variables in 'init python' or as a 'define' those variables do not save... well they don't reliably save. Things in init python typically reset to that state as soon as you close and relaunch the program...
So your character's stats should use 'default' so that they will be maintained when the player saves/loads.
If you need to make a change to a variable during gameplay you use '$' for a single line or just 'python:' if you want to do multiple at once without starting with '$'.
Now the Player, FName, Lname as defaults I changed because they weren't in the posted code... same with 'Law' wasn't a valid character to speak.
Hopefully this will give you enough information to continue on your own.