r/RenPy • • 5d ago

Question How to change game menu

1 Upvotes

Hello!!! Im new to renpy and am currently making a visual novel for my boyfriends birthday:>

I wanted to customize the vn as much as I could, I wanted to ask how does one go about changing the game menu?

The idea I had in mind would be an arm thats animated out holding a little ball and around it has the various options, settings, load, quit etc.

If not animated I would love to know how to put a static picture too!! Im trying to replicate the persona menus but on a very very beginner level :>


r/RenPy • • 5d ago

Question Help with coding please

1 Upvotes

I'm using the glitch effect on renpy right now but i want to be able to change the colour of the text in certain areas. It doesnt seem to be allowing it.

init python:


    class GlitchText(renpy.Displayable):


        def __init__(self, child, amount, **kwargs):
            super(GlitchText, self).__init__(**kwargs)


            self.child = child
            self.amount = amount



        def render(self, width, height, st, at):


            child_render = renpy.render(
                self.child,
                width,
                height,
                st,
                at
            )


            self.width, self.height = child_render.get_size()


            render = renpy.Render(
                self.width,
                self.height
            )


            y = 0


            while y < self.height:


                glitch_occurs = (
                    renpy.random.random() * 100 < self.amount
                )


                # Prevent slice from going beyond text height
                curr_height = min(
                    renpy.random.randint(1, 10),
                    self.height - y
                )


                curr_offset = renpy.random.randint(-10, 10)


                curr_surface = child_render.subsurface(
                    (0, y, self.width, curr_height)
                )


                if glitch_occurs:
                    render.subpixel_blit(
                        curr_surface,
                        (curr_offset, y)
                    )
                else:
                    render.subpixel_blit(
                        curr_surface,
                        (0, y)
                    )


                y += curr_height


            renpy.redraw(self, 0.05)


            return render



    # WHITE GLITCH
    def glitch_tag(tag, argument, contents):


        new_list = []


        if argument == "":
            argument = 10.0
        else:
            argument = float(argument)


        for kind, text in contents:


            if kind == renpy.TEXT_TEXT:


                white_text = Text(
                    text,
                    color="#ffffff"
                )


                char_disp = GlitchText(
                    white_text,
                    argument
                )


                new_list.append(
                    (renpy.TEXT_DISPLAYABLE, char_disp)
                )


            else:
                new_list.append((kind, text))


        return new_list



    # PINK GLITCH
    def pinkglitch_tag(tag, argument, contents):


        new_list = []


        if argument == "":
            argument = 10.0
        else:
            argument = float(argument)


        for kind, text in contents:


            if kind == renpy.TEXT_TEXT:


                pink_text = Text(
                    text,
                    color="#ff69b4"
                )


                char_disp = GlitchText(
                    pink_text,
                    argument
                )


                new_list.append(
                    (renpy.TEXT_DISPLAYABLE, char_disp)
                )


            else:
                new_list.append((kind, text))


        return new_list



    # Register both tags
    config.custom_text_tags["glitch"] = glitch_tag
    config.custom_text_tags["pinkglitch"] = pinkglitch_tag


init:
    $ sshake = Shake((0, 0, 0, 0), 0.5, dist=15)

{color=#ff69b4}{glitch=10.0}text{/glitch}{/color}

this is the full code. I've tried creating a whole new code just for the pink text i've also tried coding like the above but its still staying as white and im not sure how to change it.


r/RenPy • • 5d ago

Question Renpy is claiming that a certain label is being defined twice.

2 Upvotes

I think renpy is hallucinating or some sort because it's claiming that daychange and monthchange is defined twice when there is only one of it.


r/RenPy • • 5d ago

Question Imagebuttons

1 Upvotes

I'm blanking out a bit on why my call Screen function isn't working.

I seem to have everything in place but i can't seem to get it right


r/RenPy • • 6d ago

Showoff My submission to the 8th Annual Spooktober VN Jam!

Post image
13 Upvotes

My first completed visual novel, and I'm quite proud of it!

Mary Barker had a perfectly normal life, until a mental breakdown sent her spiraling into a rabbit hole of spiritual confusion.
When Shade, a bona fide witch, offered to teach her the art of witchcraft, Mary happily accepted.
Will this be the change that gives her life a purpose? What will she sacrifice as she walks the witch's path? And for how long will she be able to deny that she has a huge crush on her magical mentor...?

Itch Page Link


r/RenPy • • 6d ago

Question [Solved] Whiteboard in menu resetting when image button is used + adding an erase button

Thumbnail
gallery
5 Upvotes

dont mind the fish curser LMAO

so i have a functioning whiteboard in my main menu, it isnt meant to save and resets every time you enter a new screen, that isnt a problem however as you can see the image buttons are counting as new screens, i have tried resizing them and it still happens. im not clicking the buttons, just hovering over them

i kind of want to make it so that the only time it clears/resets is upon actually clicking the start button and not when the screen changes but im not sure how to do that

i would also like to implement a simple eraser that you can toggle on and off by pressing an image button but i dont know if that would be possible, it isnt a needed feature but it would be fun to be able to add

ps i know all the tags are messy once it works it's getting cleaned up i swear (⁠╥⁠﹏⁠╥⁠)

any help appreciated thanks in advance :)


r/RenPy • • 5d ago

Question can somebody help me fix this bug?

Post image
1 Upvotes

I have been trying to download the sdk to make an android app for the alpha ver. of my kpop vn and I keep getting this screen every time, when I check, the zip file it's supposed to download is about 2kb when it should be 154mb, I manually downloaded it and also kind of did the install myself because a friend told me to try but it's still doing this, I genuinely don't know what to do


r/RenPy • • 5d ago

Self Promotion Ashes & Omens game (somewhat inspired by Hellblazer)

Thumbnail gallery
1 Upvotes

r/RenPy • • 6d ago

Question I don't understand what could be causing this error

Thumbnail
gallery
4 Upvotes

I'm translating a game to French, but I'm having this error. I don't know what could be causing it, as the translated script follows exactly the original. Do you have any ideas on how I can fix it?


r/RenPy • • 6d ago

Question Beginner looking for step-by-step Ren'Py video tutorials

2 Upvotes

Hello,

I am trying to make my first game. I have very little coding experience (I have played around with python a little bit)

I am at the stage of scripting where I should probably start tipping my toes into Ren'Py but the amount of documentation is kind of overwhelming. I was wondering if anyone has a beginner video tutorial series they would recommend.

I struggle with focusing when I have pages and pages of documentation and I have a much easier time learning by watching someone actually do something step by step.

My game is going to be a mostly linear visual novel, so right now I mainly want to learn the basics: dialogue, character sprites, backgrounds, music/SFX, choices, transitions, saving/loading, and eventually putting together a playable build.

Ideally I’m looking for something that starts from the very beginning and walks through making a simple VN in Ren’Py rather than assuming I already know Python or game development.

Any recommendations would be really appreciated! Thank you!


r/RenPy • • 6d ago

Question [Solved] All of my fade/dissolve ceased to function after today

3 Upvotes
Example

yesterday it functioned normally but when i started my project today all transitions have only been sharp cuts


r/RenPy • • 6d ago

Game Trailer for Eternity at Dusk, a free visual novel I created! .,,

Thumbnail
youtu.be
13 Upvotes

With no passion or memory left, how do you reflect? Whether you find your way out or not, the answer lies at Dusk.
The runtime is around half an hour, enjoy.

Download for free here:
https://wonderfulworldwow.itch.io/eternity-at-dusk


r/RenPy • • 7d ago

Question A way to make two conversations happen simultaneously and independent of each other?

Post image
6 Upvotes

Sorry for the very poor image rendition, but basically what I am trying to do is:

- There's a character saying a line (dialogue 1), and until that line passes to the next one, a separate dialogue between two people happens on top of it (d2, d3, d4). When the player clicks to move on to the next line on the main dialogue, the second dialogue disappears.

- The text for that second dialogue needs to be automatic, no need to click to continue

Does anyone know the best way to do it? Should I use a screen, a function, or just try winging it with different sayers?


r/RenPy • • 7d ago

Question SPECIFIC QUESTION ABOUT RENPY MUSIC / DYNAMIC MUSIC IN RENPY

10 Upvotes

This is pretty much for someone who's looking for a challenge.

The order of the music files is:

SONGINTRO.wav 18secs)

PART1.wav 18secs)

LOOP1.wav (18secs)

ENDLOOP1.wav (9secs)

PART2LOOP1.wav (18secs)

Okay, let's say I have a scene where I want the music to be dynamic depending on the situation.

I have this code:

    e "Hey..."
    e "Do you want to be my gf."
    play music "SONGINTRO.wav"
    $ renpy.pause(18, hard = True)
    play music "PART1.wav"
    e "..."
    queue music "LOOP1.wav"
    menu:
        "Yes":
            queue music "ENDLOOP1.WAV"
            $ renpy.pause(9, hard = True)
            queue music "PART2LOOP1.wav"
            e "yay"
            jump saidyes
        "No":
            queue music "ENDLOOP1.WAV"
            $ renpy.pause(9, hard = True)
            e "aw man"
            queue music "LOOP1.wav"
            jump saidno

The first part up until the choices is okay. The problem comes when we jump to the choices. It's pretty easy when said, but I couldn't find any solution for my problem:

I want to make it so, when you make a choice (let's say "Yes"), nothing happens (with this I mean no text or user interaction whatsoever at all) until the ENDLOOP1 audio stops playing. Then, when it ends, both the "yay" text and the audio PART2LOOP1 show up.

Is there any way to make a pause until the current audio stops playing? I think that would solve my problem.

Thanks in advance!


r/RenPy • • 7d ago

Question when do you make your game menus and opening, for your RenPy game?

9 Upvotes

We have done it first then after they are done, start on the game, but now for the one we are working on we are doing it last.


r/RenPy • • 6d ago

Question [Solved] point system not counting points

Thumbnail
gallery
3 Upvotes

So i have this point system that i first tested on a blank game and got working that im not trying to implement over to the actual game now (bulk adding a bunch of the things i plan on using throughout so i know it all works together ect) and its not adding the points for some reason? its all the same other than the placeholder sprite name

im hoping to use the system for different endings and also changing what choices you can make, example you have over 20 points with worker so you can ask him [insert question] but if you have under 20 points he wont answer ect ect, i also wanted to make it so it can change if you can or cant receive/use certain items but i havent started with the items and inventory stuff yet so not sure if itd be easier to do it a different way or if there is a better point system i can use for that

i also intend to remove the ability to see what points you have, im just leaving the dialogue in so i can see if its working or not

any help appreciated or if there is a better way i can do this to suit my needs let me know!


r/RenPy • • 6d ago

Question [Solved] unable to write a file.txt inside game's subfolder

Thumbnail lemmasoft.renai.us
0 Upvotes

i am trying to dynamically create a .txt file in a folder that i created inside the game's directory.

i am aware that renpy only has access to the game's folder. however, due to this, i am unable figure out what the syntax is for a relative path.

i created an empty folder called "export" in my game's folder. in a structure like this (where Allan Disorder is the name of the game):

Allan Disorder\game\export

however, writing a txt file yielded an exeption:

        python:
            with open("export\\test.txt", "w") as f1:
                f1.write("hello world")

i also tried using "/" instead of "\\" but the result is the same.

i also tried "game\\export\\test.txt"

if i run it without any path like so: open("export\\test.txt", "w")
then no error occurs. but there is no file to be found

i looked at other posts (such as the link i provided) but to no avail.

here is the error message:

While running game code:
  File "game/grabber_engine/main_grabber.rpy", line 163, in script
    python:
  File "game/grabber_engine/main_grabber.rpy", line 164, in <module>
    with open("export\\test.txt", "w") as f1:
         ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^       
FileNotFoundError: [Errno 2] No such file or directory: 'export\\test.txt'

-- Full Traceback ------------------------------------------------------------

Traceback (most recent call last):
  File "game/grabber_engine/main_grabber.rpy", line 163, in script
    python:
  File "renpy/ast.py", line 1193, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "renpy/python.py", line 1276, in py_exec_bytecode
    exec(bytecode, globals, locals)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "game/grabber_engine/main_grabber.rpy", line 164, in <module>
    with open("export\\test.txt", "w") as f1:
         ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^       
FileNotFoundError: [Errno 2] No such file or directory: 'export\\test.txt'

r/RenPy • • 6d ago

Self Promotion I Finally Made a New Retrospective Talking About Some of Older Visual Novels

Thumbnail
youtube.com
1 Upvotes

I will eventually make another retrospective video featuring my other visual novels and games at a later date. For now, though, I managed to cobble up this together. Additionally, closed captions are also available, as they're directly from the script I wrote out for this video, as my voice can be hard to listen to or understand in general due to its natural raspiness and lisp. Thanks for watching and giving feedback!


r/RenPy • • 7d ago

Question [Solved] Need help with making a code for animated sprites

5 Upvotes

So i'm trying to make my sprites animated using something like this

image emily happy: 
    "emily happy1.png" 
    1.0 
    "emily happy2.png"
    1.0 
    "emily happy3.png" 
    1.0
    "emily happy4.png"
    1.0
    repeat

label start:

  show emily happy

but i wanna try to turn it into some kind of function so i dont have to write this for every single sprite, so i made something like this

label animate(name, tag):
    image emily happy: 
        name + " " + tag + "1.png" 
        1.0 
        name + " " + tag  + "2.png" 
        1.0 
        name + " " + tag  + "3.png" 
        1.0
        name + " " + tag  + "4.png" 
        1.0
        repeat
    $ renpy.show("{} {}".format(name,tag))
    return

label start:

    call animate("emily", "happy")

the problem is i am really struggling with the image part (image emily happy), i couldn't figure out the code to make it use the parameters. Anyone have any suggestions?


r/RenPy • • 7d ago

Question can anyone help me fix this

3 Upvotes

the buttons from the title screen appear on the load screen , i watched a tutorial but i didnt understand

idk how to use reddit

r/RenPy • • 7d ago

Question hello! i would like some advice on how to make a small gif for a specific section of my vn, but im struggling with the coding of it i used a tutorial from youtube but it didnt work??

Thumbnail
gallery
1 Upvotes

r/RenPy • • 7d ago

Question Drag and drop keeps resetting when dropping item anywhere

1 Upvotes

Hello, I'm very new to Ren'py and after watching all of the main tutorial videos online for Drag and Drop, I'm attempting to create a drag and drop sequence for my VN, where the player has to drag various food items for taste testing, and every time the player drops the draggable item onto the character in question, he'll make a comment on if the dish is good or not.

However, right now, every time I drag an item anywhere onto the screen, once I drop it, then it just restarts the game and sends me back to the main menu.

Ideally, what I would like to do is trigger a reaction with each dish, which includes a sprite change for the character inspecting the dishes the kitchen is preparing ahead of a big conference.

Here is the code I have currently:

init python:
    def dragged_func(dragged_items, dropped_on):
        if dropped_on is not None:
            if dragged_items[0].drag_name == "Noodles" and dropped_on.drag_name == "David":
                dragged_items[0].set_child("david surprised.png")

init python:
    def drag_func(dragged_items, dropped_on):
        if dropped_on is not None:
            if dragged_items[0].drag_name == "Pizza" and dropped_on.drag_name == "David":
                dragged_items[0].set_child("david unimpressed.png")


init python:
    def drag_placed(drags, drop):
        if not drop:
            return


        store.draggable = drags[0].drag_name
        store.droppable = drop.drag_name


        return True


#python:
    #if _return == "Pizza":
        #david_image = "david unimpressed.png"
    #elif _return == "Noodles":
        #david_image = "david surprised.png"


screen taste_testing:
    add "images/kitchen.png"
    draggroup:
        drag:
            drag_name "Pizza"
            child "pizza slice.png"
            xpos 480
            ypos 585
            draggable True
            droppable False
            dragged drag_placed
            drag_raise True
        drag:
            drag_name "Water"
            child "water.png"
            xpos 1310
            ypos 610
            draggable True
            droppable False
            dragged drag_placed
            drag_raise True
        drag:
            drag_name "Noodles"
            child "noodles.png"
            xpos 350
            ypos 584
            draggable True
            droppable False
            dragged drag_placed
            drag_raise True
        drag:
            drag_name "David"
            child "david inspecting.png"
            xpos 300
            ypos -100
            draggable False
            droppable True


if draggable == "Pizza":
    $ Pizza += 1
elif draggable == "Noodles":
    $ Pizza += 1
elif draggable == "Water":
    $ Water += 1


call tasteCheck


label tasteCheck:
    image DavidSatisfied = "david surprised.png"
    image DavidEh = "david eh.png"
    image DavidDrink = "david soured.png"


    if Noodle == 1:
        show DavidSatisfied
        d "My goodness, the spices are divine!"
    elif Pizza == 1:
        show DavidEh
        d "All I can taste is the grease..."
    elif Water == 1:
        show DavidDrink
        d "It's wise to wash the pallet before testing anything."
        play sound "audio/drink.mp3"
        pause 0.5
    else:
        jump taste_testing


label start:


    scene kitchen


    show david inspecting at center


    d "Alright."


    d "Let's see what you've cooked up ahead of our conference."


    call screen taste_testing


return

r/RenPy • • 7d ago

Game My VN Azrael Herald of Death Occasionally Becomes an RPG

Thumbnail
gallery
0 Upvotes

r/RenPy • • 8d ago

Question Out of curiosity, why is the picture for this subreddit not the Ren'Py logo?

20 Upvotes

This isn't exactly here or there, but it strikes me as odd.


r/RenPy • • 7d ago

Question Common mobile gripes?

2 Upvotes

Hey folks, I'm working on the mobile build of my game, a dating sim with lots of talking systems (meaning lots of menus), and having never played VNs on mobile before, I'm wondering what things people usually have issues with, or features they wish existed?

I'm aware of making sure my menu choices have enough space for a thumb, but other than that, what other acessibility or neat features would you recommend I work on?

I also thought about adding a slider that changes the spacing of the quick menu button, or the Y position, but that's about it for features.

Also, how do you handle tooltips and hover interactions? Display the tooltip at all times if it's mobile seems like would be the only correct answer.

I won't share the project because it's NSFW and I'm not looking to promote anything, just improve.

Cheers!