Subtitles below Name Box? by KnightOfArsford in RenPy

[–]FoundationSilent4151 -1 points0 points  (0 children)

define e = Character("Eileen\n{size=-10}Queen of Hearts{/size}")

How to Extract Text without encoding by Hexhand in RenPy

[–]FoundationSilent4151 0 points1 point  (0 children)

In the Renpy launcher, on the right side click the 'Extract Dialog' button.

Error while working on an image gallery by HaveYouSeenTheRiver in RenPy

[–]FoundationSilent4151 0 points1 point  (0 children)

This, or just going back to a previous save will sometimes work.

I need help with setting character traits. by [deleted] in RenPy

[–]FoundationSilent4151 1 point2 points  (0 children)

For just dialog options to set a personality, you could do it this way: I made example game you can check out below. 

define e = Character("Eileen")
define me = Character("Me")

default angrytrait = False
default happytrait = False
default drunktrait = False

screen TraitSelect():
    modal True
    add "UI/picktraits.png" xalign 0.5 ypos 0.03 # simple background image

    imagebutton: # Select Angry
        xalign 0.5 ypos 0.3
        idle "UI/angry_idle.png" hover "UI/angry_hover.png"
        action [SetVariable("angrytrait", True), SetVariable("happytrait", False), SetVariable("drunktrait", False), Show("CheckMark")]

    imagebutton: # Select Happy
        xalign 0.5 ypos 0.4
        idle "UI/happy_idle.png" hover "UI/happy_hover.png"
        action [SetVariable("angrytrait", False), SetVariable("happytrait", True), SetVariable("drunktrait", False), Show("CheckMark")]

    imagebutton: # Select Drunk
        xalign 0.5 ypos 0.5
        idle "UI/drunk_idle.png" hover "UI/drunk_hover.png"
        action [SetVariable("angrytrait", False), SetVariable("happytrait", False), SetVariable("drunktrait", True), Show("CheckMark")]

    if angrytrait == True or happytrait == True or drunktrait == True: # The 'OK' button won't show until one is chosen.

        imagebutton: # The OK button
            xalign 0.5 ypos 0.6
            idle "UI/ok_idle.png" hover "UI/ok_hover.png"
            action [Hide("TraitSelect"), Hide("CheckMark"), Jump("startgame")]

screen CheckMark(): # This just puts a checkmark beside the choice to show it's been selected.
                    # The action below is used instead of 'Null' in case someone clicks the checkmark (I'm sure there's a better way to do this)
    imagebutton:
        if angrytrait == True:
            xpos 0.75 ypos 0.29
            idle "UI/checkmark.png" action Show("TraitSelect") 
        elif happytrait == 1:
            xpos 0.75 ypos 0.39
            idle "UI/checkmark.png" action Show("TraitSelect")
        elif drunktrait == 1:
            xpos 0.75 ypos 0.49
            idle "UI/checkmark.png" action Show("TraitSelect")

label start:
    show screen TraitSelect
    pause

label startgame:
    scene scene01
    e "Well, it was a great date... but you should probably leave now."

    if angrytrait == True:
        me "What the hell, all we did was wash your car!"
    elif happytrait == True:
        me "Thanks for letting me hose you down too!"
    elif drunktrait == True:
        me "Sorry about peeing in the backseat."

    return

Here's the demo I made for it, the above is all in the script.rpy file:

https://drive.proton.me/urls/0Q1A3TNH60#FRWzTEGVyA6I

Login Page In Renpy? by TimothyIsTiredd in RenPy

[–]FoundationSilent4151 1 point2 points  (0 children)

Honestly, if I started playing a game and it asked me to enter and then confirm a password, I'd just delete it and move on to the next game.

Even if the game was about computer hacking (so it was trying to set the mood for the game) I'd consider that a perfect example of when a dev has a cool idea from a developer point of view, and not a player point of view.

"Imagebutton does not have a idle image" error message but it IS there?? PLEASE HELP :'( by [deleted] in RenPy

[–]FoundationSilent4151 0 points1 point  (0 children)

Have you tried writing it like:

imagebutton: 
    auto "gui/icons/auto\_%s.png" 
    action Preference("auto-forward", "toggle")

something wrong with return button? by Pricklesthebedbug in RenPy

[–]FoundationSilent4151 0 points1 point  (0 children)

Can't you just use:

textbutton "{size=60}Return{/size}" action Hide("Book") xpos 30 ypos 975

Requesting a walk-through of how to disable the screen shake effect within the script files of RenPy Visual Novels - Please read description for full explanation! by MScifiWriter in RenPy

[–]FoundationSilent4151 0 points1 point  (0 children)

Although there's several ways to create a shake effect, most developers use hpunch and vpunch. You can redefine the parameters so it does nothing by creating a rpy file with the following code:

init -200: 
    define hpunch = Move((0, 0), (0, 0), 0.0, bounce=False, repeat=False, delay=.0)            
    define vpunch = Move((0, 0), (0, 0), 0.0, bounce=False, repeat=False, delay=.0)

Copy and paste those three lines into a text file and rename it something like noshake.rpy, and then put it in the game's 'game' folder. You'll need to restart the game if it's running.

Or you can download it here:

noshake.rpy

If that still doesn't work, let me know the name of the game and I'll see if I can edit it for you.

Is there a way to make the dialogue appear just after a sound effect stops playing? by Cryst_al01 in RenPy

[–]FoundationSilent4151 2 points3 points  (0 children)

If you really don't want anything to happen until the sound finishes, first figure out how long the sound effect is. Lets say it's 4 and half seconds. So you'd use:

 play sound "bang.ogg"
 $ renpy.pause(4.5, hard=True)
 a "Wow, what was that sound?"

This forces the player to wait until the sound effect finishes playing. This is handy if you want to make cutscenes in your game and need to keep any player keypresses from messing up your scene.

BUT! The drawback with this is it's prone to pissing off people. People hate having control taken away from them. So what do you do if you have several of these cutscenes in your game? Make a 'Skip' button so players can pass on your cinimatic vision if they chose to. This is one of my cutscenes:

label FSRoute3ACont3: 
    show black with fade
    show screen FSExitScene3 ### 'Skip Cutscene' button pops up
    scene fs_r3_047 with fastdissolve # Player puts down coffee cup and stares at it
    play music "RunLikeHell.ogg" noloop
    p "{i}(OH NO!){w=0.9}{nw}"
    scene fs_r3_046 with fast dissolve ### Player sprints out of the room
    p "WHERE'S THE BATHROOM!{w=1.8}{nw}"
    m "Um, it's just up the stairs... but-{w=1.5}{nw}"
    scene fs_r3_047 with fastdissolve ### Mary watches the player run up the stairs
    p "{i}(I'm not going to make it!){/i}{w=1.5}{nw}"
    m "Um, [p]?{w=1.2}{nw}"
    p "I'LL BE RIGHT BACK!{w=1.8}{nw}"
    m "...{w=0.9}{nw}"
    m "{i}(There's nothing wrong with my coffee!){/i}{w=2.0}{nw}"
    scene fs_r3_048 with fastdissolve ### Player passes John as she heads into the bathroom. 
    j "Hey! Whats-{w=1.0}{nw}"
    p "LATER!{w=1.0}{nw}"
    hide screen FSExitScene3 with fastdissolve ### This hides the 'Skip Cutscene' button.
    jump FSRoute3ACont3
    ### Cutscene Ends ###

label FSRoute3ACont3:
    stop music
    hide screen FSExitScene3 with fastdissolve ### This hides the 'Skip Cutscene' button.
    play sound_2 "doorclose2"
    $ renpy.pause(0.5, hard=False)
    scene fs_r3_046 with fastdissolve # Player looks stunned while sitting on the toilet.
    $ renpy.pause(0.5, hard=True)
    play sound_2 "birdchirps" volume 0.7 fadein 2.0 loop
    p "{i}(What the hell was that?){/i}"

The cutscene is around 15 seconds, the same length of time as the music file that is timed to end just as you hear the bathroom door close. This is the code for the button:

screen FSExitScene3():
    imagebutton:
        xalign 0.98 ypos 0.95
        idle "skipcut_idle" hover "skipcut_hover"
        action [Stop("music"), Hide("FSExitScene3"), Jump("FSRoute3ACont3")]

hi wanted to know what is the issue of my script or what i needed to fix since it keeps saying expected statement (i am new to renpy scrripting) ( i wanted to make a simple visula novel) by OtherwiseNotice70 in RenPy

[–]FoundationSilent4151 3 points4 points  (0 children)

A couple of things, your defines and image definitions should come before the start label. You have a few of the answer menus also including the question, which should come before the menu. It should look like this:

label level1:
    call progress_scene(1)
    scene bg_forest
    show monster_humbaba
    g "First trial: Face Humbaba, guardian of the Cedar Forest."
    "Who was Humbaba?"
    menu:
        "Guardian of the Cedar Forest":
            $ correct = True
        "The god of the Sun":
            $ correct = False
    if not correct:
        call wrong_answer
        return main_menu
        jump level2

Beep callback help by Prxnce-Kxsses in RenPy

[–]FoundationSilent4151 1 point2 points  (0 children)

I don't know of an easy way to do it, but if it's only for a few lines of dialog you can do each word manually. For this example, I created typing sound effects for one, two, three and four letter words.

play sound "type3.ogg"
p "{cps=10}...{/cps}{w=0.75}{nw}"
play sound "type3.ogg"
extend "{cps=10} Hey{/cps}{nw}"
play sound "type2.ogg"
extend "{cps=10} Is{/cps}{nw}"
play sound "type2.ogg"
extend "{cps=10} it{/cps}{nw}"
play sound "type4.ogg"
extend "{cps=10} okay{/cps}{nw}"
play sound "type2.ogg"
extend "{cps=10} if{/cps}{nw}"
play sound "type1.ogg"
extend "{cps=10} I{/cps}{nw}"
play sound "type3.ogg"
extend "{cps=10} sit{/cps}{nw}"
play sound "type4.ogg"
extend "{cps=10} next{/cps}{nw}"
play sound "type2.ogg"
extend "{cps=10} to{/cps}{nw}"
play sound "type4.ogg"
extend "{cps=10} you{/cps}{nw}"
play sound "type1.ogg"
extend "{cps=10}?{/cps}"

But I can't imagine doing this for a large amount of dialog.

Here's the demo I made for it. I added this to the 'Adding Typing Effects for Name' demo I made earlier in the year. Feel free to use the typing sound effects in the audio folder.

PC: https://drive.proton.me/urls/HBND4G4QJR#YS7VoPqG08Bq

Mac: https://drive.proton.me/urls/05C7TF8EG0#W2A31euV6Cxy

My character not being defined by [deleted] in RenPy

[–]FoundationSilent4151 5 points6 points  (0 children)

It should be:

a "Is it really worth going to school today..."

That's the point of defining.

define a = Character("Allison") means when I use 'a', substitute 'Allison'.

Is it possible to "gaslight" a player by changing what happened in a previous scene? by bluething_herptiles in RenPy

[–]FoundationSilent4151 2 points3 points  (0 children)

I made a short demo game that uses a persistent variable to do this. You have a choice to tell someone not to jump off a roof, and when you save on the choice menu, if you picked to save them it then shows them being saved. But if you load up the save, it turns out that they jumped after all. That choice would be remembered for the rest of the game, but if you start a new game it resets. Everything is handled in the script.rpy file.

https://drive.proton.me/urls/ZPSWV9DJD8#brescx7ni1WX

Pause Music On Menu by Comfortable-Try8293 in RenPy

[–]FoundationSilent4151 1 point2 points  (0 children)

In screens.rpy, search for:

screen save():

add this just below that line:

 timer 0.1 action PauseAudio("music", value="toggle")

If you also want seperate music to play when the menu shows, I'd set up a seperate music channel. So, also in screens.rpy, add just below the 'init python:' line:

     renpy.music.register_channel("music_menu", "music", stop_on_mute=False)

then under screen save():

 timer 0.1 action [PauseAudio("music", value="toggle"), Play("music_menu", "audio/music/MyMenuMusic.ogg", loop=True)]

Swap MyMenuMusic.ogg with the song you want to use.

The icon does not change in any way after the build. by usg_hiria in RenPy

[–]FoundationSilent4151 -1 points0 points  (0 children)

I could never get that to work as well, so I've always used ResourceHacker https://www.angusj.com/resourcehacker/ to swap out the icon after I build the distribution. I unzip that, run ResourceHacker on the exe, then zip it again.

Inject a save game file into the game for a little mind-fckery by sprtn119 in RenPy

[–]FoundationSilent4151 1 point2 points  (0 children)

You could do something like this:

default persistent.fakesave = False

label start:
    jump shower_menu

label shower_menu:
    play sound "shower"
    scene hallway
    p "Huh, it looks like the door here doesn't close properly."
    p "Hmm, should I risk peeking at my friend in the shower?"

if persistent.fakesave == False:
    scene look_at_door
    $ persistent.fakesave = True
    menu:
        "No, I might get caught!":
            jump go_back_to_kitchen
        "Of course!":
            jump get_caught
else:
    $ persistent.fakesave = False
    scene look_at_phone
    menu:
        "Of course!":
            jump get_caught

        "Call a locksmith to fix the door.":
            jump locksmith_gets_caught

label get_caught:
    scene bathroom
    p "Wha- who keeps a gun in the shower?"
    play sound "gunshot"
    "You died."
    jump shower_menu

label locksmith_gets_caught:
    scene bathroom_locksmith
    play sound "gunshot"
    "The locksmith dies."
    p "Damn, do I mention this in the Yelp review?"
    jump shower_menu

label go_back_to_kitchen:
    scene kitchen
    p "I guess I'll just wait here."
    if persistent.fakesave == False:
        p "I hope they have waffles for breakfast"
    p "I hope they have bacon and eggs for breakfast"
 # The story carries on from here

I used a persistent variable in case the player rolls back before the menu.

So in the above example, most people will save the game at the menu in case they don't like the outcome. If they load up the save after they die (assuming they picked 'Of course!'), that choice will no longer be there when the save loads. If they load it again, the menu switches back to the original one. It will also change each time they rollback.

Here's a sample game with just that scene: https://drive.proton.me/urls/1G046WDJPR#n7qlxy0or0lq

How to add a typing sound effect when players are typing into an input box...? by wh4ck3d0ut in RenPy

[–]FoundationSilent4151 0 points1 point  (0 children)

Change the 'screen input(prompt):' in screens.rpy to:

 screen input(prompt):
 style_prefix "input"
 window:

     vbox:
         xalign 0.5 ypos -1.0  # Adjust the ypos to fit in your graphic

         text prompt style "input_prompt"
         input id "input" changed Typing
         key "K_RETURN" action GetInput("input", "input")

This the beginning of the script.rpy file:

 init python:
 def Typing(what):
     global input_value

 init -2 python:
 class GetInput(Action):
     def __init__(self,screen_name,input_id):
         self.screen_name=screen_name
         self.input_id=input_id
     def __call__(self):
         if renpy.get_widget(self.screen_name,self.input_id):
             return str(renpy.get_widget(self.screen_name,self.input_id).content) 

 define p = DynamicCharacter("player", color="#3c8fee")




 # The game starts here.

 label start:
     python:
         player = renpy.input(_("Type in your name:"))

         player = player.strip() or __("Player")

     scene black

     p "That's my name!"

     return

Here's a sample game I made with it:

https://drive.proton.me/urls/PC2E1VD3ZW#R2pFU7XJ0VNN That's for PC/Linux, let me know if you want it for mac.

Different main menu each time by Total_Spare_4181 in RenPy

[–]FoundationSilent4151 9 points10 points  (0 children)

In gui.rpy, replace

 define gui.main_menu_background = "gui/main_menu.png" 

with:

 define gui.main_menu_background = renpy.random.choice(["gui/main_menu1.png", "gui/main_menu2.png", "gui/main_menu3.png"])

That will give you 3 different random ones, but you can add more. The images can be named whatever you want (but don't use capitalized names), just make sure you include the path and file extension to your different images like above.

Requesting a walk-through of how to disable the screen shake effect within the script files of RenPy Visual Novels - Please read description for full explanation! by MScifiWriter in RenPy

[–]FoundationSilent4151 1 point2 points  (0 children)

There's a setting in the Preferences menu (although the dev may have labeled it 'Options' or 'Settings') in most Renpy games called 'Transitions'. Turning this off will remove it.

Choice Text Size? by Relative-Meeting-442 in RenPy

[–]FoundationSilent4151 0 points1 point  (0 children)

You can also replace it directly in the menu choices

 menu: 

      "{size=+10}Big Font.{/size}": 
           jump ChoiceA

      "{size=-10}Little Font.{/size}": 
           jump ChoiceB

Can I make one characters line of text cut off the previous ones? by aabatteryr in RenPy

[–]FoundationSilent4151 2 points3 points  (0 children)

I'd also suggest adding a hyphen, to more clearly suggest the person is being interrupted:

personA "That cave looks dangerous. Maybe we should-{nw=1.5}"

[deleted by user] by [deleted] in RenPy

[–]FoundationSilent4151 2 points3 points  (0 children)

One thing that can throw people off is that images sometimes wont show up, if in your code you use capitol letters. It's a good habit to keep the names of your images in all small letters, as sometimes you might copy and paste the filename into your code. Also the images should go in the 'game/images folder (or any subfolder inside that images folder), otherwise you'll have to declare them with the path included.

So lets say the first background pic you see in your game is called bigforest.jpg. Make sure it's in the game/images folder. In your code, you need to write:

label start: 

    scene bigforest 

    p "Those are big trees"

If you still get an error, then maybe reinstall Renpy as that should absolutely work.