The problem is solved, but there's still things to say about your code, mostly to help you have way less works to do :
Python:
label start:
init python:
config.keymap['stat'] = "shift_K_F6" #This is the code to call the stats screen.
show screen keymap
This is wrong, really wrong. It's more or less the same thing that what
79flavors already said regarding the
default
.
init
is something totally independent and have no reason to be in a
label
.
Actually you are breaking the flow of the game, creating an empty label named "start", followed by an anonymous piece of code starting by
show screen keymap
. Ren'py is strong enough to know how to works with this kind of errors, but yet it's something you should avoid. Therefore, what you need to write is :
Code:
init python:
config.keymap['stat'] = "shift_K_F6" #This is the code to call the stats screen.
label start:
show screen keymap
Python:
screen stats:
add "gui/stats-wip.png"
modal True
zorder 100
vbox:
grid 3 4:
vbox xpos 355 ypos 100:
text "{size=30}{b}{color=#38dec5}{font=Roboto-Light.ttf} Tiffany{/font}{/color}{/b}"
text "{size=22} "
text "{color=#f8d443}{b}{font=Roboto-Light.ttf}[Tif2]{/font}{/b}{/color}"
text "{size=26} "
text "{color=#dc0808}{b}{font=Roboto-Light.ttf}[Tif]{/font}{/b}{/color}"
vbox xpos 790 ypos 95:
text "{size=30}{b}{color=#38dec5}{font=Roboto-Light.ttf} Daria{/font}{/color}{/b}"
text "{size=26} "
text "{color=#f8d443}{b}{font=Roboto-Light.ttf}[Dar2]{/font}{/b}{/color}"
text "{size=26} "
text "{color=#dc0808}{b}{font=Roboto-Light.ttf}[Dar]{/font}{/b}{/color}"
[...]
You must be registered to see the links
is a statement designed specifically to position the content for you. Therefore, either you don't need to position the
vbox
, or you don't need the
grid
(potentially replacing it by a
frame
).
You also don't need all those
color
and
font
tags, you can use style instead. And there's no need for the
text "{size=26} "
lines, Ren'py have a
You must be registered to see the links
screen statement for this.
Code:
style statsBase:
font "Roboto-Light.ttf"
bold True
style statsName is statsBase:
size 30
color "#38dec5"
style statsValue1 is statsBase:
color "#f8d443"
style statsValue2 is statsBase:
color "#dc0808"
screen stats:
[...]
vbox xpos 355 ypos 100:
text " Tiffany" style "statsName"
null height 22
text "[Tif2]" style "statsValue1"
null height 26
text "[Tif]" style "statsValue2"
vbox xpos 790 ypos 95:
text " Daria" style "statsName"
null height 26
text "[Dar2]" style "statsValue1"
null height 26
text "[Dar]" style "statsValue2"
[...]
I had no option but to use an init block to define variables; I was running into a weird bug that wouldn't let me define variables other way.
No you don't have. I just launched your game after removing the
init
and putting back the
default
at 0 indentation, and it worked fine. Like I said at this time, the line pointed clearly wasn't the one at fault, which happen time to time with Ren'py ; and visibly you solved the effective problem without noticing it.
Also, since I had to take a look at your code, please, please, get ride of all your
define intr00 = "0.01a/intro/intr00.jpg"
lines. It's surely something painful for you to write, and it's totally useless (in addition to not be how you should have done it).
Ren'py have its own mechanism to automatically declare of all the images. It's automatic, you've nothing to do, during its init process Ren'py will declare a variable for each unique name of your images.
So, the image "0.01a/intro/intr00.jpg" can be directly addressed in Ren'py with "intr00". Instead of your :
Code:
define intr00 = "0.01a/intro/intr00.jpg"
[...]
show image intr00
[...]
You can just have :
And this apply for the 533 images you defined. As much lines that you hadn't to write, as much
image
that you don't have to write after all the
show
statements.
And if effectively you need to manually define an image (because two have the same name, by example), what you have to use is the
You must be registered to see the links
statement :
Code:
image intr00 = "0.01a/intro/intr00.jpg"
[...]
show intr00