Ren'Py Titlescreen Code

Adeana

Newbie
Mar 4, 2018
68
87
Hi and sorry if i hit the wrong thread, aint sure.

iv seen it in one of the VN's not sure which,
most games use a patch to change the naming of a character from roommate to sister and so on,
with that VN there was a code you enter on the titlescreen to avoid the needing of a patch.
iv tryed to find a posting, vid or other tutorial, to see how thats used to get it working, sadly didnt find it, maybe i just used the wrong tags or so i dont know.

would be great to get some help with that. Or something similar.

thanks up front
 

jon95

Member
Game Developer
Sep 29, 2018
176
392
Hi and sorry if i hit the wrong thread, aint sure.

iv seen it in one of the VN's not sure which,
most games use a patch to change the naming of a character from roommate to sister and so on,
with that VN there was a code you enter on the titlescreen to avoid the needing of a patch.
iv tryed to find a posting, vid or other tutorial, to see how thats used to get it working, sadly didnt find it, maybe i just used the wrong tags or so i dont know.

would be great to get some help with that. Or something similar.

thanks up front
you mean persistent variables?
something similar to this:
Python:
if not persistent.patch:
    sis = "Anna"
else:
    sis = "sister"
then you make another rpy file and write
Code:
init:
    $ persistent.patch = True
or
Python:
python:
        name = renpy.input(_("What's your relationship with her?"))
        name = name.strip() or __("roommates")
 
Last edited:

Adeana

Newbie
Mar 4, 2018
68
87
thanks for that but not exactly.

so not like
you start a new game and they are roommate, landlady, and so. then you add the patch and they are sister, mother ..
or have the decision ingame what your relationship is

more like,
the VN iv played used insted of a patchfile a code on the Titlescreen. and it changes by using that code itself.

in someway its like activating a 2nd route

so i think its some code using the gui and the script file

If Code "False/True"
lable startA
else
lable startB

or so
 

jon95

Member
Game Developer
Sep 29, 2018
176
392
thanks for that but not exactly.

so not like
you start a new game and they are roommate, landlady, and so. then you add the patch and they are sister, mother ..
or have the decision ingame what your relationship is

more like,
the VN iv played used insted of a patchfile a code on the Titlescreen. and it changes by using that code itself.

in someway its like activating a 2nd route

so i think its some code using the gui and the script file

If Code "False/True"
lable startA
else
lable startB

or so
if you want to add "Cheatmenu" to the main menu, I think this might be the code you want
Python:
default apply_code_return = "Invalid Code!"
default mom = "Anna"
default input_code = ""

label apply_code:

    $ input_code = renpy.input("Input your code here:", length=20)
    $ input_code = input_code.strip()
    $ apply_code_return = "Invalid Code!"

    if not input_code:
        return

    if input_code == "incest":
        $ mom          =   Character("Mom")
        $ apply_code_return = "Incest on!"

    $ input_code = ""
    return


screen cheatmenu():

    tag menu

    ## This use statement includes the game_menu screen inside this one. The
    ## vbox child is then included inside the viewport inside the game_menu
    ## screen.
    use game_menu(_("Cheatmenu"), scroll="cheatmenu"):

        vbox:
            xpos 175
            spacing 10

            label "Input your Code to make changes to the game"

            null height 20
            vbox:
                xalign 0.5
                yalign 0.5
                text "{b}Code:{/b}" xalign 0.5 yalign 0.5 size 44

                if apply_code_return and apply_code_return != "":
                    null height -10
                    text "{i}( " + apply_code_return + " ){/i}" xalign 0.5 yalign 0.5 size 26
                    null height 10

                frame:
                    xalign 0.5
                    xsize 250
                    ysize 74

                    textbutton "Input Code" xalign 0.5 yalign 0.5 action [ui.callsinnewcontext("apply_code")]
and add this to screen navigation():
Python:
textbutton _("Cheatmenu") action ShowMenu("cheatmenu")
 
Last edited:

Adeana

Newbie
Mar 4, 2018
68
87
Im sorry that i somehow cant realy explane it that good.

Its somehow like that, but insted of changing a relation. like in that code.
it should be more like starting a different story.

so that after entering a code it starts a different story.

if code "true"
jump storyA
else
Jump storyB

storyA:
this is me and my junger twin brothers. our mom and dad worked together at collage befor we were born .....

storyB:
this is me and this guys here are the sons of our Family frends, my dad and there dad worked together at a Lawers office ....

so insted of changing only a relationship like from Landlord to Father. Changing the whole starting point of the story.
 
Last edited:

jon95

Member
Game Developer
Sep 29, 2018
176
392
Im sorry that i somehow cant realy explane it that good.

Its somehow like that, but insted of changing a relation. like in that code.
it should be more like starting a different story.

so that after entering a code it starts a different story.

if code "true"
jump storyA
else
Jump storyB

storyA:
this is me and my junger twin brothers. our mom and dad worked together at collage befor we were born .....

storyB:
this is me and this guys here are the sons of our Family frends, my dad and there dad worked together at a Lawers office ....

so insted of changing only a relationship like from Landlord to Father. Changing the whole starting point of the story.
you can do this in the script file, first:
Python:
default incestpath          =   False
#change $ mom          =   Character("Mom") to
$ incestpath          =   True
then go to your script file or where you write the code for the events and dialogues and write something like this:
Python:
if incestpath:
    jump path_a
else:
    jump path_b
   
label path_a:
    "this is me and my junger twin brothers. our mom and dad worked together at collage befor we were born ..... "
   
label path_b:
    "this is me and this guys here are the sons of our Family frends, my dad and there dad worked together at a Lawers office .... "
 
Last edited:

Adeana

Newbie
Mar 4, 2018
68
87
Now if i get it right
this could be used for the main menu

Python:
default apply_code_return = "Invalid Code!"
default story1 = "nope"
default input_code = ""

label apply_code:

    $ input_code = renpy.input("Input your code here:", length=20)
    $ input_code = input_code.strip()
    $ apply_code_return = "Invalid Code!"

    if not input_code:
        return

    if input_code == "thecode":
        $ story1 = storyline1("yeps")
        $ apply_code_return = "Code Activ!"

    $ input_code = ""
    return


screen codemenu():

    tag menu

    ## This use statement includes the game_menu screen inside this one. The
    ## vbox child is then included inside the viewport inside the game_menu
    ## screen.
    use game_menu(_("Codemenu"), scroll="codemenu"):

        vbox:
            xpos 175
            spacing 10

            label "Input your Code"

            null height 20
            vbox:
                xalign 0.5
                yalign 0.5
                text "{b}Code:{/b}" xalign 0.5 yalign 0.5 size 44

                if apply_code_return and apply_code_return != "":
                    null height -10
                    text "{i}( " + apply_code_return + " ){/i}" xalign 0.5 yalign 0.5 size 26
                    null height 10

                frame:
                    xalign 0.5
                    xsize 250
                    ysize 74

                    textbutton "Input Code" xalign 0.5 yalign 0.5 action [ui.callsinnewcontext("apply_code")]
this inside the Script

Python:
default storyline1 =   False
#change $ story1 =   storyline1("yeps") to
$ storyline1 =   True

###

if storyline1:
    jump path_a
else:
    jump path_b
and in the screen navigation

Python:
textbutton _("Codemenu") action ShowMenu("codemenu")
 

jon95

Member
Game Developer
Sep 29, 2018
176
392
Python:
default storyline1 =   False
#change $ story1 =   storyline1("yeps") to
$ storyline1 =   True
the code is ok but these lines are not needed here. I might have not been clear about something
Python:
default apply_code_return = "Invalid Code!"
default  storyline1 =   False

default input_code = ""

label apply_code:

    $ input_code = renpy.input("Input your code here:", length=20)
    $ input_code = input_code.strip()
    $ apply_code_return = "Invalid Code!"

    if not input_code:
        return

    if input_code == "thecode":
        $ storyline1 = True    ##this is what i meant by change $ mom          =   Character("Mom") to $ incestpath          =   True

        $ apply_code_return = "Code Activ!"

    $ input_code = ""
    return
this code with the screen code are put in the screen.rpy file while the "if " code is put in where you need make changes to the game
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,578
17,789
so that after entering a code it starts a different story.
Do you really need this ?
Ren'py already offer you the possibility to change the dialog lines, to replace a label by another, and to dynamically decide which image should be shown. Using this will be less works than having to write two different game where the changes would stay very limited and not effectively alter the story itself.
 

jon95

Member
Game Developer
Sep 29, 2018
176
392
Do you really need this ?
Ren'py already offer you the possibility to change the dialog lines, to replace a label by another, and to dynamically decide which image should be shown. Using this will be less works than having to write two different game where the changes would stay very limited and not effectively alter the story itself.
I also think so but he/she might have other thoughts or different ideas he/she want to apply based on different codes :unsure:
 

Adeana

Newbie
Mar 4, 2018
68
87
Do you really need this ?
Ren'py already offer you the possibility to change the dialog lines, to replace a label by another, and to dynamically decide which image should be shown. Using this will be less works than having to write two different game where the changes would stay very limited and not effectively alter the story itself.
the whole story would have to compleatly be changed, the way its going to be told,
this ways its the easyer to keep up with the "rules"
also its easyer to rewrite some parts of the story

and thanks a lot jon95
 
  • Like
Reactions: jon95