- Apr 3, 2021
- 24
- 15
Hey Guys and Gals,
I am using a stats library that I got from somewhere, I cannot honestly remember Anyway it creates inventory and stats using a python class. The stats look something like this(taken from my game slightly)
default Amys = ModelStats("Amy", age='27', Fashion='Y', uWare = 'Y', Toys = 'Y', Glamour = 'Y', Video = 'N', Exp = 'Low', relation = 'No', Fash_Rate = 15, uWare_Rate = 20, Glam_Rate = 25, )
now to pull from or edit the values in my renpy code I can refer to the contents like this: pov " Amy Costs [amys.uWare_Rate] for Underwear"
What i want to do is use a variable sets so that I can re use the code for multiple girls. I have setup some defaults in my script file.
mod = Models name
mod_s = Models name with s added to end
sh_Levl = the Level rate they are shooting
so our examples would be:
mod = Amy
mod_s = amys
sh_Levl = uWare_Rate
I would like to do somethig like this: pov "[mod] charges £[mod_s.sh_Levl]"
However I get an error when calling the code:
Am I not able to use Variables in this way? I'm sure I can bodge a way of making it work but I don't understand when it is not working when displaying the varibles individually they are correct.
Cheers
me
I am using a stats library that I got from somewhere, I cannot honestly remember Anyway it creates inventory and stats using a python class. The stats look something like this(taken from my game slightly)
default Amys = ModelStats("Amy", age='27', Fashion='Y', uWare = 'Y', Toys = 'Y', Glamour = 'Y', Video = 'N', Exp = 'Low', relation = 'No', Fash_Rate = 15, uWare_Rate = 20, Glam_Rate = 25, )
now to pull from or edit the values in my renpy code I can refer to the contents like this: pov " Amy Costs [amys.uWare_Rate] for Underwear"
What i want to do is use a variable sets so that I can re use the code for multiple girls. I have setup some defaults in my script file.
mod = Models name
mod_s = Models name with s added to end
sh_Levl = the Level rate they are shooting
so our examples would be:
mod = Amy
mod_s = amys
sh_Levl = uWare_Rate
I would like to do somethig like this: pov "[mod] charges £[mod_s.sh_Levl]"
However I get an error when calling the code:
Python:
in script
b_mod "[mod_s] and [sh_Levl] [mod_s.sh_Levl]"
File "renpy/common/00library.rpy", line 268, in say
who(what, interact=interact, *args, **kwargs)
AttributeError: 'unicode' object has no attribute 'sh_Levl'
Cheers
me