The easiest thing might be to look at the code of an existing game and see how they do it. If you download Lab Rats, Vren keeps all the code accessible so anyone can see how to make the game (very cool of him). I think previous versions of Katie's Corruption did too (I assume the current version does too), if you're just looking to see how they do a heart showing love points. The rpy files in the /game directory should show you everything you need.Hij, how do you create a stat meter like lovepoints etcetera. In ren'py? I know how to add the point but not how to display them. I could also not find a turorial that explains this.
Bear with me as I haven't used ren'py, but the way I've gone about it has always been to draw a rectangle and then manipulate that accordingly.Hij, how do you create a stat meter like lovepoints etcetera. In ren'py? I know how to add the point but not how to display them. I could also not find a turorial that explains this.
Warning, the cookbook is really out dated. The script you linked work, but it's not the better way to do it now. So :You must be registered to see the links
Thanks, i am curently gathering my assets and setting up the first two chapters. Then i Will start setting up the basics in ren'py. Hopefully tonight i Will have some renders of the mother to show and get feedback on. She Will be the focus of the story. Later i Will focus on the MC. Hopefully i did something unique(ish) designing the mother.
I actually got this working. But life keeps kicking me in the but so i never ended up making the VN.Assuming you have worked this out by now, could you post an "idiot's guide" with how you ended up doing it - with sample pics of screens would be great? thanks
#--------------------------------------------------------------------#
# * Configuration variables
#--------------------------------------------------------------------#
default friendship = 0
default love = 0
default lust = 0
#---------------------------------------------------------------------
# * GUI
#---------------------------------------------------------------------
screen gui_screen():
add "gui/lust.png" xalign 0.975 yalign 0.005
add "gui/flstats.png" xalign 0.95 yalign 0.20
text "{b}[friendship]{/b}" xalign 0.905 yalign 0.265 color "#000000"
text "{b}[love]{/b}" xalign 0.927 yalign 0.210 color "#000000"
text "{b}[lust]{/b}" xalign 0.930 yalign 0.090 color "#000000"
init python:
def ch_friendship(amount):
global friendship
friendship += amount
def ch_love(amount):
global love
love += amount
def ch_lust(amount):
global lust
lust += amount
menu:
"Yes!":
$ friendship += 1
jump yvacm
"No":
jump nvacm
#--------------------------------------------------------------------#
# * Configuration variables
#--------------------------------------------------------------------#
default friendship = 0
default love = 0
default lust = 0
#---------------------------------------------------------------------
# * GUI
#---------------------------------------------------------------------
screen gui_screen():
add "gui/lust.png" xalign 0.975 yalign 0.005
add "gui/flstats.png" xalign 0.95 yalign 0.20
text "{b}[friendship]{/b}" xalign 0.905 yalign 0.265 color "#000000"
text "{b}[love]{/b}" xalign 0.927 yalign 0.210 color "#000000"
text "{b}[lust]{/b}" xalign 0.930 yalign 0.090 color "#000000"
init python:
def ch_friendship(amount):
store.friendship += amount
def ch_love(amount):
store.love += amount
def ch_lust(amount):
store.lust += amount
default lust = 0
screen lust_screen(lu_amount):
timer 1.0 action Hide("lust_screen")
$ store.lust += lu_amount
add Text ("[lu_amount] {image=lust.png}", style="mystyle"):
at mytransform
call screen lust_screen(5)
label start:
"Hold"
call screen lust_screen(5)
"Current Lust: [lust]"
default lust = 0
screen lust_screen(lu_amount):
timer 1.0 action [Hide("lust_screen"),Return()]
$ store.lust += lu_amount
text "+ [lu_amount]" xalign 0.5 yalign 0.5
return
Hu? That's interesting, I didn't know that.The problem with that is that screens "loop" while they are displayed
menu:
"Yes!":
$ friendship += 1
jump yvacm
"No":
jump nvacm
label start:
"Current Lust: [lust]"
if choice <= 4:
jump menu_Lust
else:
"Game Over Man"
return
menu menu_Lust:
"Boobs?"
"Yes":
$ lust+= 1
$ choice += 1
jump start
"No":
$ choice += 1
jump start
default lust = 0
default choice = 0
return
yeah this seems to work. Good to know, thx!It doesn't seem to, not to say that it couldn't.
It may have been an error in an earlier version, because I felt like when I released the demo/prototype version of my project people seemed to be unable to rollback before they even hit the label that would cause it to be blocked.
It could have totally been my fault though, I was really new to Ren'py at the time.
I ended up removing it anyway, as much as I sort of though it was silly to rollback through a fight.
I used the following code to test:
Python:label start: "Current Lust: [lust]" if choice <= 4: jump menu_Lust else: "Game Over Man" return menu menu_Lust: "Boobs?" "Yes": $ lust+= 1 $ choice += 1 jump start "No": $ choice += 1 jump start default lust = 0 default choice = 0 return
Here's a demonstration of the problem pointed by @Epadder .Or am I wrong here?
init python:
AuFile = renpy.os.path.join( config.basedir, 'AONlogFile.txt' )
def logDebug( msg ):
FH = open( AuFile, "a" )
FH.write( "{}\n".format( msg ) )
FH.close()
default simpleState = "predicted"
default increaseState = "predicted"
default counter = 0
screen simple():
$ logDebug( "SCREEN 'simple' have been {}".format( simpleState ) )
screen increase(b):
$ counter += b
$ logDebug( "SCREEN 'increase' have been {}".format( increaseState ) )
text "[counter]" xalign 0.5 yalign 0.5
screen pause:
default timeLeft = 10
timer 1.0 repeat True action If( timeLeft > 0, SetScreenVariable( "timeLeft", timeLeft - 1 ), Hide( "pause" ) )
text "{b}[timeLeft]{/b}" xpos 0 ypos 0
label start:
$ logDebug( "Started" )
"Ready ?"
$ logDebug( "Interaction 1" )
"It's just filling line."
$ logDebug( "Interaction 2" )
"So take all your time, to ensure that Ren'py will do its own stuff."
$ logDebug( "Interaction 3" )
$ simpleState = "called"
show screen simple
"Now wait here"
$ logDebug( "Interaction 4" )
"Sorry, I'll put a hard pause here"
$ logDebug( "In the pause" )
show screen pause
$ renpy.pause( 10, True )
$ simpleState = "forgot"
"And now for the second screen"
$ logDebug( "Interaction 5" )
$ increaseState = "called"
show screen increase( 1 )
"Now wait again"
$ logDebug( "Interaction 6" )
"Sorry, I'll put another hard pause here"
$ logDebug( "In the pause" )
show screen pause
$ renpy.pause( 10, True )
"DONE"
Thank you all for responding, the help is appreciated. And thanks for the necromancer compliment.I actually got this working. But life keeps kicking me in the but so i never ended up making the VN.
...
Hope this helps.