Is it possible to "Split up" the script file ?
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.
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.
Is it possible to "Split up" the script file ?
Hello, so i was creating my Visual Novel, and the script is starting to be quite long, i though that maybe it was possible to make a script file for like each chapter but with no avail. So maybe one of you guys can help me out on this issue
Thank
Thank
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: Is it possible to "Split up" the script file ?
Make a new file named chapters.rpy for example, (place it where the scripts screens and etc.. where have been placed.) then in the launcher, press the current project and click "all script files", then there will be an opened new script that you created, (it starts with 1 line.)
make sure the labels will be putted in there and other function blah blah, and for the script.rpy, make a jump label so you can make a chapter label. (just like when you open screens in screens.rpy.)
(Plus, Ren'Py editor is infinite, (probably.)( it is depends how size the script is.)
Sorry for the bad explanation.
make sure the labels will be putted in there and other function blah blah, and for the script.rpy, make a jump label so you can make a chapter label. (just like when you open screens in screens.rpy.)
(Plus, Ren'Py editor is infinite, (probably.)( it is depends how size the script is.)
Sorry for the bad explanation.
Re: Is it possible to "Split up" the script file ?
Renpy processes every .rpy file in the folder at runtime. Make a folder called chapter 1, with a label called chapter one. Have it jump to label chapter 2, and make another file for that. You can split it up however you want, renpy sees it all as the same thing.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Is it possible to "Split up" the script file ?
Very much so possible, in fact it's the recommended way to organise your script.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- SpicyMayo1429
- Regular
- Posts: 36
- Joined: Tue Mar 20, 2018 11:23 am
- Contact:
Re: Is it possible to "Split up" the script file ?
To call another 'script' file, I've used this:
So if you go by chapters it'll look somthing like this:
Code: Select all
call section_1m from _call_Section_1_male
## section_1m would be the label name while Section_1_male is the name of the other file
Code: Select all
call label_name_here from _call_Chapter_1
- Matalla
- Veteran
- Posts: 202
- Joined: Wed Mar 06, 2019 6:22 pm
- Completed: Max Power and the Egyptian Beetle Case, The Candidate, The Last Hope, El cajón del viejo escritorio, Clementina y la luna roja, Caught in Orbit, Dirty Business Ep 0, Medianoche de nuevo, The Lost Smile
- itch: matalla-interactive
- Location: Spain
- Contact:
Re: Is it possible to "Split up" the script file ?
There's no need to reference the name of the other script file. I have 12 scripts in my proyect now (should be around 20 when the project is finished) and never use a reference to a fileSpicyMayo1429 wrote: ↑Fri Mar 15, 2019 12:31 am To call another 'script' file, I've used this:
So if you go by chapters it'll look somthing like this:Code: Select all
call section_1m from _call_Section_1_male ## section_1m would be the label name while Section_1_male is the name of the other file
Code: Select all
call label_name_here from _call_Chapter_1
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Is it possible to "Split up" the script file ?
Yeah, all that should be needed is to simply make sure there's a return at the end of one script and a label at the start of another.
To move between script files, one simply jumps or calls labels like normal, as if it was all one big file.
To move between script files, one simply jumps or calls labels like normal, as if it was all one big file.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Who is online
Users browsing this forum: Google [Bot], mirceea