Question regarding the Script and Text Adjustments.

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.
Post Reply
Message
Author
User avatar
VirusChris
Newbie
Posts: 18
Joined: Thu Jan 23, 2014 5:14 am
Contact:

Question regarding the Script and Text Adjustments.

#1 Post by VirusChris » Tue Jan 28, 2014 2:25 am

Hey there again, I wanted to ask a few questions regarding some of the things that Ren'py can do with the text but first off I've been quite curious about this one thing. I would experiment around and look at the tutorials but I'm currently busy with two jobs at the moment that I have barely any time to myself to quickly look over some of these things, so excuse me if this is common knowledge and just a matter of seconds to learn but I wanted to have these questions resolved in one go if you don't mind.

1) First off, I was wondering about this... when creating the story of your Visual Novel do you have to include all of the codes, all of the events, everything into one script which is the one we get defaultly when we start out the engine? Or is it possible to pan out the story in mutliple scripts like chapters or episodes in the story? If so does that mean we have to re-put the key phases from the original source into the new script or can we still call upon them from the original source?

I'm wondering plus I just thought that if that were to happen what would become the choices the players have selected become? We they be lost and have to re-ask everything again or is the memory saved and continue to use and called upon from the original script to the new one. Just really curious about this one.

2) My second question is about the Dialogue Box you use in the game. I'm curious if you can change the position to any spot on the screen? For example, let's use number position:

789
456
123

By default the Dialogue Box is at 2 of the screen, at the bottom, for the players to read but I was hoping we can change the position temporarily to the top at position 8.

Also if the Dialogue Box can re-size to be smaller to the text is starts at the center more than at the left like around position 7. One more thing is can you have the Dialogue Box's background be hidden? Kinda like in the RPG Makers for the XP and VX where you can change the position of the Dialogue Box and hidden the box or make it visible anytime you call upon this function.

The reason is that in the beginning of my VN there's a dream sequence where a voice is calling to the player and I wanted to have the Dialogue Box's background be invisible for this part and at the top of the screen and have the Dialogue Box's background and position return when the player speaks. Can I do that?

3) This one is relative simple for a question, but can I change the color of certain text instead of white all the time? Like to use for mentioning an important character or key-phase within the story? How does one do that?

4) My fourth question is more along the lines if I can add new choices on another playthrough? Like a New Game Plus sort of feature? Well I was thinking and planning on have characters have three choices on what race their characters could be and after playing through the game with all the default races that can picked, namely beat the VN game three times each as one of the three races, and upon a fourth playthrough a 4th option is added as a bonus for the player to pick which include new dialogue and scenes specifically for that new race option.

Is that possible to do?

5) And for my final question how do you change the default Window Screen of Ren'py from a 4:3 size to a 16:9 widescreen? Due to the nature of my game is more preferable this way but I have no idea how one might do this yet I've seen someone do using Ren'py before.

Thank you for taking your time looking over my question and thank you once again if you could answer them for me.

Tsapas
Regular
Posts: 69
Joined: Mon Oct 14, 2013 8:18 am
Contact:

Re: Question regarding the Script and Text Adjustments.

#2 Post by Tsapas » Tue Jan 28, 2014 10:17 am

VirusChris wrote: 1) First off, I was wondering about this... when creating the story of your Visual Novel do you have to include all of the codes, all of the events, everything into one script which is the one we get defaultly when we start out the engine? Or is it possible to pan out the story in mutliple scripts like chapters or episodes in the story? If so does that mean we have to re-put the key phases from the original source into the new script or can we still call upon them from the original source?

I'm wondering plus I just thought that if that were to happen what would become the choices the players have selected become? We they be lost and have to re-ask everything again or is the memory saved and continue to use and called upon from the original script to the new one. Just really curious about this one.
No, there is no need to have your entire game in one file. When the game starts, Ren'Py parses all the .rpy files present in the /game folder and acts accordingly.
2) My second question is about the Dialogue Box you use in the game. I'm curious if you can change the position to any spot on the screen? For example, let's use number position:

789
456
123

By default the Dialogue Box is at 2 of the screen, at the bottom, for the players to read but I was hoping we can change the position temporarily to the top at position 8.

Also if the Dialogue Box can re-size to be smaller to the text is starts at the center more than at the left like around position 7. One more thing is can you have the Dialogue Box's background be hidden? Kinda like in the RPG Makers for the XP and VX where you can change the position of the Dialogue Box and hidden the box or make it visible anytime you call upon this function.

The reason is that in the beginning of my VN there's a dream sequence where a voice is calling to the player and I wanted to have the Dialogue Box's background be invisible for this part and at the top of the screen and have the Dialogue Box's background and position return when the player speaks. Can I do that?
You can manipulate and position textboxes as you like, and define specific textboxes for each character if you want to as well.
3) This one is relative simple for a question, but can I change the color of certain text instead of white all the time? Like to use for mentioning an important character or key-phase within the story? How does one do that?
You can change the text color of the whole game, the text color of a specific character or the text color of a specific line. There are options for all of these.

Code: Select all

init:
    style.default.color = "#FF0000"
This makes all text in the game red.

Code: Select all

init:
    $ pov = Character("pov", what_color="#FF0000") 
This makes all text associated with the pov character red.

Code: Select all

"{color=#f00}hello{/color}"
This makes a specific line red.
4) My fourth question is more along the lines if I can add new choices on another playthrough? Like a New Game Plus sort of feature? Well I was thinking and planning on have characters have three choices on what race their characters could be and after playing through the game with all the default races that can picked, namely beat the VN game three times each as one of the three races, and upon a fourth playthrough a 4th option is added as a bonus for the player to pick which include new dialogue and scenes specifically for that new race option.

Is that possible to do?
It is quite possible to have NG+ modes in your game through persistent variables, yeah.
5) And for my final question how do you change the default Window Screen of Ren'py from a 4:3 size to a 16:9 widescreen? Due to the nature of my game is more preferable this way but I have no idea how one might do this yet I've seen someone do using Ren'py before.
You can tailor the window screen to your liking. E.g.

Code: Select all

config.screen_width = 1280
config.screen_height = 720
will make your game screen a 16:9 AR with 1280x720 resolution.

User avatar
VirusChris
Newbie
Posts: 18
Joined: Thu Jan 23, 2014 5:14 am
Contact:

Re: Question regarding the Script and Text Adjustments.

#3 Post by VirusChris » Wed Jan 29, 2014 1:27 am

Would've liked more details on three of my questions, but thanks!

1) So how do I separate the story into multiple scripts? How do I have the other parts of the story call upon the events of the first one basically?

2) So what are the exact codes to change the Dialogue Box positions and to hide the Text Box so only the text and not the background are showing?

4) So... if I have the game looked into the variable of the race you selected and when you beat the game it will register to the game itself so if I played a New Game from scratch the game will still acknowledged I cleared the game once with that race and so when I beat it with the original three races the fourth race option will show up?

5) So if I switch the config screen to this values into a 16:9 widescreen resolution, will my 900x540 screen will be useless to use and have to re-adjust the picture to fit the new format? I recall someone using the 16:9 widescreen resolution and using 900x540 images unless there's some mis-information.

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Question regarding the Script and Text Adjustments.

#4 Post by Asceai » Wed Jan 29, 2014 7:45 am

VirusChris wrote:1) So how do I separate the story into multiple scripts? How do I have the other parts of the story call upon the events of the first one basically?
Simply create new .rpy files in the game directory. Ren'Py automatically loads every .rpy file and basically treats them as one big file. You can use labels and jump to them or call them from any other script. So you might have scene1.rpy that starts with "label scene1:" and at the end has "jump scene2", or whatever else you like.
VirusChris wrote:2) So what are the exact codes to change the Dialogue Box positions and to hide the Text Box so only the text and not the background are showing?
"window hide" and "window show" can hide and unhide it respectively.

To change the positions, set "style.window.left_margin", "style.window.right_margin", "style.window.top_margin" and "style.window.bottom_margin" to whatever you want. I don't know exactly how it works positioning-wise (I'm still yet to use ren'py) but I assume you can move it with style.window.xalign/yalign etc. like any other displayable, which may be better (this might be how it controls in which direction the textbox expands, which it can do to show more text)
VirusChris wrote:4) So... if I have the game looked into the variable of the race you selected and when you beat the game it will register to the game itself so if I played a New Game from scratch the game will still acknowledged I cleared the game once with that race and so when I beat it with the original three races the fourth race option will show up?
You can do this with persistent data. What you then need to do is check those persistent variables at the start of your game (when the race selection screen comes up) and add a 4th option if they are set.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Question regarding the Script and Text Adjustments.

#5 Post by Donmai » Wed Jan 29, 2014 8:05 am

VirusChris, here are some links where you will find some useful information:
http://lemmasoft.renai.us/forums/viewto ... =8&t=24083
http://lemmasoft.renai.us/forums/viewto ... =4&t=24813
http://lemmasoft.renai.us/forums/viewto ... =51&t=9233
You will also find many valuable information on the Cookbook section of this Forum.

As for the multiple script question: Ren'Py reads all the .rpy scripts as one, but it will look for some labels that will be executed in a logical order: http://lemmasoft.renai.us/forums/viewto ... 66#p250366
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
VirusChris
Newbie
Posts: 18
Joined: Thu Jan 23, 2014 5:14 am
Contact:

Re: Question regarding the Script and Text Adjustments.

#6 Post by VirusChris » Wed Jan 29, 2014 2:32 pm

Thanks a lot guys! I will be sure to check them out and experiment with them to test before I use them for my game!

User avatar
VirusChris
Newbie
Posts: 18
Joined: Thu Jan 23, 2014 5:14 am
Contact:

Re: Question regarding the Script and Text Adjustments.

#7 Post by VirusChris » Fri Feb 21, 2014 2:11 am

OK, sorry to bump this old topic but I've come across something I noticed compared to my Visual Novel's screen to the other even though I'm using the same width and height with 1280 x 720 but my screen is STILL smaller than this other Visual Novel which has the ideal window screen look I want.

Though I noticed that the other Visual Novel looked like the whole game screen was ZOOMED in making everything enlarged even the fonts looks big as well and I compare it to mine and notice how "distant" it is and the font smaller as well being almost hard to read in a way.

What am I missing here? How do I "zoom in" the game screen to keep it at the 16:9 resolution but appear bigger than it seems?

Sorry for bothering you guys about this game, but I like to know.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Question regarding the Script and Text Adjustments.

#8 Post by PyTom » Sat Mar 01, 2014 11:47 am

Potentially, you just need to drag the window to make it bigger or smaller.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Google [Bot]