Usually when I am coding I tend to have 3-5 versions of script files with the same name open, for instance, if I am working on code for screens I will have a few screens files from my previous games open to see how I solved a problem before, or several versions of the gui file if I am working on the gui code, etc. This ends up being really confusing and it becomes difficult to tell them apart as they all have the same name in the editor (right now I am using notepad ++ but I have had the same problem in other editors).
Is there any way around this?
Can the screens, and gui files be renamed?
Is there another way to just change the display name inside editors? (this might be preferable)
Do you have a system or suggestions for best practices for this type of problem?
multiple screens/script files in editor - how to tell them apart
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.
- ComputerArt.Club
- Veteran
- Posts: 427
- Joined: Mon May 22, 2017 8:12 am
- Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
- Location: Taiwan
- Contact:
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: multiple screens/script files in editor - how to tell them apart
i suggest that you put a note at the top stating what they are used for.
sample:
make sure you put the # in to grey it out.
i think you can name it anyway you want them to be but not 100% sure
you can try it and find out to see what happens
sample:
make sure you put the # in to grey it out.
Code: Select all
#this screen for gallery settings.
you can try it and find out to see what happens
- ComputerArt.Club
- Veteran
- Posts: 427
- Joined: Mon May 22, 2017 8:12 am
- Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
- Location: Taiwan
- Contact:
Re: multiple screens/script files in editor - how to tell them apart
Thanks, yes I guess that was lazy of me not to test it out in the first place.rayminator wrote: ↑Sat Apr 21, 2018 11:31 am i suggest that you put a note at the top stating what they are used for.
sample:
make sure you put the # in to grey it out.i think you can name it anyway you want them to be but not 100% sureCode: Select all
#this screen for gallery settings.
you can try it and find out to see what happens
Just tested renaming the screens file and the game still runs, provided both the rpy and rpyc files are renamed. If only the rpy file is rename it creates a new rpyc file and then fails to load the game.
Hopefully this type of renaming won't cause an unexpected errors, e.g. when building a distribution or android build. It might be a solution. Yeah, I kinda need the file name to be different or at least the name displayed in the relevant tab on the editor as I don't want to scroll up to the top and lose my place all the time.
If anyone has any further suggestions for best practices, I would love to hear them.
Facebook:
Renpy Creators and Enthusiasts Facebook Group
My latest game:
Famous Fables: Read, Learn and Play - Android App for teaching children to read
Creative Commons stuff:
Shape transitions,
100+ 360° photos of Japan,
Re: multiple screens/script files in editor - how to tell them apart
The renaming won't cause any problems, as Ren'py basically reads all the files with .rpy extensions and compiles them (there're some other stuff going on but you don't need to know that in this context).
However, to solve your actual problem, there're a few things you can do:
First of all you should utilise the "Project" feature of your text editor. Add the project folder in your text editor and then only open files from within the project in that particular window. I'm not that familiar with Atom, but in Sublime Text, the Project Name is displayed along the title bar - I expect the same feature for Atom.
Now if you keep the project windows separate, and having to tab between them, you'll easily be able to tell which project you're working on. Another clue would be which project you're working on, is what tabs are opened.
In Sublime Text I can actually add multiple project folders (from different renpy games) into the same project, and if I open two files with the same name, it even tells me in the tab which file is from which folder. Again I don't know what Atom can do - but I know it has plugins which may give you the same features even if it's not out the box.
Personally I'd also recommend creating new rpy files that your script.rpy calls / jumps to, then you'd typically be working on different file names than other game anyway. There're no universal best ways, but you can break down your game by logic, by chapter, by characters, or combination of all of that.
However, to solve your actual problem, there're a few things you can do:
First of all you should utilise the "Project" feature of your text editor. Add the project folder in your text editor and then only open files from within the project in that particular window. I'm not that familiar with Atom, but in Sublime Text, the Project Name is displayed along the title bar - I expect the same feature for Atom.
Now if you keep the project windows separate, and having to tab between them, you'll easily be able to tell which project you're working on. Another clue would be which project you're working on, is what tabs are opened.
In Sublime Text I can actually add multiple project folders (from different renpy games) into the same project, and if I open two files with the same name, it even tells me in the tab which file is from which folder. Again I don't know what Atom can do - but I know it has plugins which may give you the same features even if it's not out the box.
Personally I'd also recommend creating new rpy files that your script.rpy calls / jumps to, then you'd typically be working on different file names than other game anyway. There're no universal best ways, but you can break down your game by logic, by chapter, by characters, or combination of all of that.
- Ocelot
- Lemma-Class Veteran
- Posts: 2400
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: multiple screens/script files in editor - how to tell them apart
A quick note: if you delete, rename, move or alter script files themselves, delete .rpyc files and let game recompile them again. If there is a .rpyc file withput corresponding .rpy, it will still be loaded (and you will basically load two .rpy files with same content in your case)
< < insert Rick Cook quote here > >
Who is online
Users browsing this forum: Semrush [Bot]