Visual novel help ;-;

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
StarsongKG
Regular
Posts: 33
Joined: Tue Apr 03, 2018 4:10 pm
Skype: starsongrebeccawooleverstarsong
Soundcloud: @outlook.com (Skype)
Contact:

Re: Visual novel help ;-;

#16 Post by StarsongKG »

My V.N isnt wanting to show a picture..

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Visual novel help ;-;

#17 Post by kivik »

StarsongKG wrote: Mon Apr 30, 2018 8:27 pm Question how do you tint the screen a color? Like I know you can put blood on it somehow but I want to tint it black-ish.. To make it dark and keep it dark the whole game (unless she finds someone or something that makes her life brighter when she has it with her or when shes with the person)
Easiest way is probably to create an alpha image of the colour that you want, then show it on screen. You may want to show it on a different layer though or it'd end up being covered by images you show later on in your code.
https://www.renpy.org/doc/html/config.h ... fig.layers
https://www.renpy.org/doc/html/displayi ... -statement - look at onlayer
StarsongKG wrote: Tue May 01, 2018 1:47 pm My V.N isnt wanting to show a picture..
Can you elaborate?

User avatar
Enchant00
Regular
Posts: 136
Joined: Tue Jan 12, 2016 1:17 am
Contact:

Re: Visual novel help ;-;

#18 Post by Enchant00 »

StarsongKG wrote: Mon Apr 30, 2018 8:27 pm Question how do you tint the screen a color? Like I know you can put blood on it somehow but I want to tint it black-ish.. To make it dark and keep it dark the whole game (unless she finds someone or something that makes her life brighter when she has it with her or when shes with the person)
You can use the im.MatrixColor for that.

Code: Select all

image scary_scene dark = im.MatrixColor(
    "scary_scene.jpg",
    im.matrix.tint(.31, .21 .91))
Steps:
1. Change the scary_scene dark to any name you like
2. Change "scary_scene.jpg" to the filename of your image. Make sure to change .jpg if your image filetype is different.
3. im.matrix.tint(.31, .21 .91)) The 3 decimal numbers are your red, green, and blue in this order. The range is from 0.0 - 1.0 so what that means is that 0.0 is the absence of a color while 1.0 is the max display of the color. So something like im.matrix.tint(.0, .0, 1.0)) would mean No Red, No Green, Max Blue. You just have to adjust the number until you get something you like.

Then to use this, you just have to show the image like any other way in in renpy.

You can also use ATL inside the image block to put some animations like having a dissolve effect of something like that or you can use the built in transitions like so

Code: Select all

show scary_scene dark with fade
Sorry, I'm not at home atm so I can't test this out so reply back if you have any problems. :lol:
My V.N isnt wanting to show a picture..
Show us your code and we could probably see what's wrong with it.

StarsongKG
Regular
Posts: 33
Joined: Tue Apr 03, 2018 4:10 pm
Skype: starsongrebeccawooleverstarsong
Soundcloud: @outlook.com (Skype)
Contact:

Re: Visual novel help ;-;

#19 Post by StarsongKG »

Code: Select all

show bg jlvngroom png

"I walk out into my kitchen and grab something to eat, As I sit on my couch and read a book."

"a few minutes later"

"Jenna" "I better make my lunch."

"I pack some Mac and Cheese from last nights dinner, and slide a orange into my lunch bag."

"I check the time."

"Jenna" "Its 8:00!! I need to get ready and leave!"

"I run into my room and get dressed, and brush my teeth."

"I then run back into the living room, grab my stuff and head to the door. Kissing luna on the forhead and leaving for school."

show bg schooloutside png

"Reed" "Oh! Hey Jenna!!"

"My head perks up as i hear Reed say my name and I wave"

"Jenna" "Hey Reed."

"Reed" "Mind if i walk with you?"

"Jenna" "No! Not at all!!"

"Reed" "Awesome!"

"We walk to school, chatting about our cats and our friends.. But what i totally forgot about?"

"Michael" "HEY REED WAIT UP!"

"I growl quietly at the sound of Michaels voice"

"God why him?? Today was perfectly fine untill HE showed up. ughh"

"Reed" "Hey dude!"

"Michael" "Are you guys a couple. You guys ALWAYS walk together! I miss when we use to walk together"

"I bite my lip, staying quiet."

"Maybe because im more like-able then you." 
Last edited by StarsongKG on Fri May 04, 2018 10:54 pm, edited 2 times in total.

StarsongKG
Regular
Posts: 33
Joined: Tue Apr 03, 2018 4:10 pm
Skype: starsongrebeccawooleverstarsong
Soundcloud: @outlook.com (Skype)
Contact:

Re: Visual novel help ;-;

#20 Post by StarsongKG »

idk why its not in code form..

StarsongKG
Regular
Posts: 33
Joined: Tue Apr 03, 2018 4:10 pm
Skype: starsongrebeccawooleverstarsong
Soundcloud: @outlook.com (Skype)
Contact:

Re: Visual novel help ;-;

#21 Post by StarsongKG »

Tho it wants to change to the next photo.. Just not bg schooloutside

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Visual novel help ;-;

#22 Post by kivik »

Use the following code block to insert code and preserve indentation:

[code]Your code here[/code]

Also, try removing the png part of your image names. I'm guessing you haven't declared the images and just have the files in your image folder. Ren'py automatically creates the images for you but it drops the file extension: https://www.renpy.org/doc/html/displayi ... -directory

Note the first example, image eileen happy is created for the following files, not eileen happy png:

Code: Select all

game/images/eileen happy.png
game/images/Eileen Happy.jpg
game/images/eileen/eileen happy.png

StarsongKG
Regular
Posts: 33
Joined: Tue Apr 03, 2018 4:10 pm
Skype: starsongrebeccawooleverstarsong
Soundcloud: @outlook.com (Skype)
Contact:

Re: Visual novel help ;-;

#23 Post by StarsongKG »

Mk. (btw ive fixed my backgrounds. Im using scenes now)

StarsongKG
Regular
Posts: 33
Joined: Tue Apr 03, 2018 4:10 pm
Skype: starsongrebeccawooleverstarsong
Soundcloud: @outlook.com (Skype)
Contact:

Re: Visual novel help ;-;

#24 Post by StarsongKG »

Code: Select all

 scene bg thumbnail
    
    "Before this game begins, This should be played AFTER LIFT! Bright Days™, This contains curse words, Depression, Suicidal thoughts, and Anxiety."
    
    "If you choose to continue this game and play it, please remember, there is dark matters at hand in this. Please agree if your okay with whats below."
    
menu:
    
    "Anxiety, Depression, Suicidal thoughts, self-harm, foul lauguage, bullying"
    
    "I Agree" :
        
        "Loading Rebecca's Route"
        
    "I Disagree" :
         
         "Goodbye"
            $ I Disagree = True
    return
     label after_menu: 


How do i fix this.. Im trying to do like if you disagree, it quits itself or leaves the game, but it does it for both of the things..
Last edited by StarsongKG on Sat May 05, 2018 3:23 pm, edited 1 time in total.

StarsongKG
Regular
Posts: 33
Joined: Tue Apr 03, 2018 4:10 pm
Skype: starsongrebeccawooleverstarsong
Soundcloud: @outlook.com (Skype)
Contact:

Re: Visual novel help ;-;

#25 Post by StarsongKG »

StarsongKG wrote: Wed May 02, 2018 8:42 pm idk why its not in code form..
Fixed

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Visual novel help ;-;

#26 Post by kivik »

StarsongKG wrote: Fri May 04, 2018 10:53 pm How do i fix this..
What's the error?

Your indentation is all over the place - you need to remember Renpy (and Python) cares about indentation a lot, so you need to make sure your codes are indented as they suggest in the documentation. Think of your code as blocks: everything inside each block needs to be indented. Therefore:

Code: Select all

label noindent:
    "stuff inside should be indented"
    menu:
        "This menu is inside the label, so I've indented it"
        "What about code inside a menu choice?":
            "Yep, you indent those, because a menu choice is also a block"
        "What about a different choice?":
            "Well the choice is part of the menu block, so you move it back one indentation"
    "Cool, so after the menu block, I can go back to a single indent?"
    "That's right!"
    "And remember, the return statement is part of the label block, so single indent as well"
    return

label newlabel:
    "What if I'm starting a new label?"
    "Well labels should be root level, so no indentation for the new label"
    "Cool, hope this all makes sense!"
    return
It's worth noting that when Online Documentation show code examples, it assumes that you've already managed the indentation for that particular block. So whilst the documentation may show something without a root indent:

Code: Select all

while True:
    "this is a loop!"
You would actually need to indent it if it's inside something:

Code: Select all

label looplabel:
    while True:
        "this is a loop!"
    return
Also, if you haven't already, make sure you're using a coder's text editor, like Atom. They're very helpful with indentations, amongst other things like syntax highlighting (so keywords are one colour, variables are another colour, strings another colour). I don't know if there're "lint packages" for it specifically for Ren'py, but linters can help identify syntax error for you before you test your code.

StarsongKG
Regular
Posts: 33
Joined: Tue Apr 03, 2018 4:10 pm
Skype: starsongrebeccawooleverstarsong
Soundcloud: @outlook.com (Skype)
Contact:

Re: Visual novel help ;-;

#27 Post by StarsongKG »

Cant delete this post ;-;
Last edited by StarsongKG on Sat May 05, 2018 7:17 pm, edited 1 time in total.

StarsongKG
Regular
Posts: 33
Joined: Tue Apr 03, 2018 4:10 pm
Skype: starsongrebeccawooleverstarsong
Soundcloud: @outlook.com (Skype)
Contact:

Re: Visual novel help ;-;

#28 Post by StarsongKG »

my picture for my game wont show. Its only showing the character creator logo ;-;
Last edited by StarsongKG on Sat May 05, 2018 7:18 pm, edited 1 time in total.

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Visual novel help ;-;

#29 Post by kivik »

You've used indentations, but they're not at the right level. Read my last post, look at how I indent the menu choices :) Read what I actually wrote in the code as well (the text itself), they're purposely written to point out the errors in your indentations.

If your images aren't showing, then Renpy isn't able to find the image files - you need to check whether your image file is in the correct location with the right spelling in relation to what you've written. Read this part of the documentation very carefully (pay attention to the red text, that's what the image would be called in game, in relation to what the image files are called, note the lack of png in the image name).

Programming languages can't guess what you mean when you don't follow their syntax exactly, so if you add something, or remove something, the compiler will assume you mean something different than what you think. So double check everything to see if they match the way the documentation explains it.

StarsongKG
Regular
Posts: 33
Joined: Tue Apr 03, 2018 4:10 pm
Skype: starsongrebeccawooleverstarsong
Soundcloud: @outlook.com (Skype)
Contact:

Re: Visual novel help ;-;

#30 Post by StarsongKG »

I saved the picture where the previous one was, with the same name and stuff

Also, OHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH But how do i kick the player out if they pick i Disagree?

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]