Firstly,As the title says, how can I add for example "$" or "%" character in renpy dialogue ?
$
is a character like any other when in a string. [
, {
, \
), you've two way to add a %
. You can do as said
\
right before it, or you can just double the character.mc "I'll give you 10 \% of the total"
, or that way, mc "I'll give you 10 %% of the total"
.Thank you! I really appreciate it.Firstly,$
is a character like any other when in a string.
Secondly, like for the other special characters ([
,{
,\
), you've two way to add a%
. You can do as saidYou must be registered to see the links, and escape the character by adding a\
right before it, or you can just double the character.
Therefore, you can do it either this ways,mc "I'll give you 10 \% of the total"
, or that way,mc "I'll give you 10 %% of the total"
.
how can i make renpy check if there is a label available and then do some action
label whatever:
if renpy.has_label( "patreonBonus1" ):
call patreonBonus1
jump endOfUpdate
label endOfUpdate:
"This is the end, beautiful friend."
"This is the end, my only friend, the end."
return
label patreonBonus1:
[something]
return
By usingDo you know can I force everyone to watch the intro the first time, and they get a choice if to skip for the 2nd etc playthrough ?
label start:
# Never saw the introduction, so show it
if persistent.introSeen is None:
jump intro
# Have seen the intro at least once, so ask what to do
menu:
"Watch the introduction":
jump intro
"Skip the introduction":
jump gameStart
# The introduction
label intro:
[Whatever you want]
# Mark that the introduction have been seen.
$ persistent.introSeen = True
# and continue.
jump gameStart
label gameStart:
[whatever you want]
By default, thewhat's the difference between init -1, init 499 and 501 those are the ones that I encountered
init
blocks are proceeded according to the alphabetical order of the path+filename where they are located :init
blocks will be proceeded according to this offset, and for blocks that have the same "priority offset", it's the alphabetical order that will be applied.init
blocks in "game/core/constants.rpy" at -1
, to ensure that the core will be initialized when you'll finally initialize the rest of the game ; and so, you can create constants into "game/characters/vanessa.rpy" that will have init
blocks at the default offset (0).default
or image
by example. By default they are proceeded at the "priority offset" 0, but if they are preceded by an init 1:
or init 1 python
they will be proceeded at the "priority offset" 1.It's just a number.[...] but what about 499 and 501 ?
init:
blocks are processed in the order of that number, from low to high. So -485
would be run before -322
. -1
before 0
.0
.499
and 501
to run after the usual stuff (499 being higher than 0). Maybe they'd seen someone use 100
or 200
and wanted to make sure their code ran later than that. Maybe they just threw darts at a dart board until they came up with a number they liked. Either way, they also seem to have decided that there were two sections of code and one needed to run after the other (otherwise they could have just used 499
only).init:
blocks exist with the same number, things are processed alphabetically according to their filenames.init:
define incest = False
# ... then the rest of the game
init 1:
define incest = True
init:
level numbers are different. Then as the game is initializing, all the init 0:
level code is executed and the value of incest
is set to False
. Then... if the patch file doesn't exist... that is the end of it. However if the patch file does exist... once all the init 0:
level code has been run, all the init 1:
code starts (and so on). The end result being that the value of incest
is set to True
. Obviously this is a simple example... things can be as simple or complicated as you like.It feel like this person expected a priority of 500 somewhere, and had things to do before (499) and after (501) it. But I don't know what was expected ; Ren'py itself works at -1500 and 1500.Either way, they also seem to have decided that there were two sections of code and one needed to run after the other (otherwise they could have just used499
only).
Always have a small "test.rpy" file with:One last thing anne O'nymous
my game is ready, and I'm going to compile it soon. anything I need to know before I do it?
init python:
config.developer = True
Your persistent data are in the "game/save" directory, therefore they will not be included in the distribution file.like maybe my persistent data goes into the build or saves (I know its far fetched, but better safe than sorry)
Except that it's your lucky day, nothing... or perhaps everything ?anything to check for before hitting the BUILD Button?