Is there a way to open a file outside of the game directory?
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.
- ringo_ni_ringo
- Newbie
- Posts: 7
- Joined: Tue Mar 18, 2014 12:01 pm
- Projects: Spinoza Rosa
- Location: Tucson, AZ
- Contact:
Is there a way to open a file outside of the game directory?
So, I am noticing that my "game" folder for this project is getting really crowded and hard to sort through when I need to change/re-size/edit an image or shorten a sound so it fits. I could just use the 'Search' that windows has but it isn't effective to search by the file type or name. I was thinking of separating the sprites and backgrounds from the music and sounds and making it more organized. Maybe I'm just a bit OCD when it comes to how things are organized on computers and such, but it really does help me a lot to do so. (I've spent a chunk of time trying to research this and either there's nothing or Google is stupid.)
Re: Is there a way to open a file outside of the game direct
Use subfolders.
- ringo_ni_ringo
- Newbie
- Posts: 7
- Joined: Tue Mar 18, 2014 12:01 pm
- Projects: Spinoza Rosa
- Location: Tucson, AZ
- Contact:
Re: Is there a way to open a file outside of the game direct
Well yes, but how do I call them? Like I tried to, and it worked. The problem I have is that I don't know if telling it "C:/Users/Zoe/Desktop/PROJECTS/Spinoza Rosa/game/bleh/bleh.png" would work on another computer. I'm still kind of a noob when it comes to ren'py and python, but I have lots of experience in visual BASIC and html.
Re: Is there a way to open a file outside of the game direct
Just the "bleh/bleh.png" will do.
- ringo_ni_ringo
- Newbie
- Posts: 7
- Joined: Tue Mar 18, 2014 12:01 pm
- Projects: Spinoza Rosa
- Location: Tucson, AZ
- Contact:
Re: Is there a way to open a file outside of the game direct
Oh, thank you. >_<; I feel kinda silly now.
- ringo_ni_ringo
- Newbie
- Posts: 7
- Joined: Tue Mar 18, 2014 12:01 pm
- Projects: Spinoza Rosa
- Location: Tucson, AZ
- Contact:
Re: Is there a way to open a file outside of the game direct
Okay so ren'py hated what ever I did. I gave it the images for all the characters and the backgrounds just like this:
and it gives me this error:
What did I do wrong to upset this thing to the point that it won't run at all?
Code: Select all
## Declare character images below this line.
## FIAMN
image fiamn neutral = "/characters/fiamn/fiamn_neutral.png"
image fiamn semb = "/characters/fiamn/fiamn_semb.png"
image fiamn emb = "/characters/fiamn/fiamn_emb.png"
image fiamn silly = "/characters/fiamn/fiamn_silly.png"
image fiamn sad = "/characters/fiamn/fiamn_sad.png"
image fiamn serious = "/characters/fiamn/fiamn_serious.png"
image fiamn angry = "/characters/fiamn/fiamn_angry.png"
image fiamn annoyed = "/characters/fiamn/fiamn_annoyed.png"
image fiamn happy = "/characters/fiamn/fiamn_happy.png"
I have the folders set up like this:I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 820, in script
IOError: Couldn't find file '/characters/fiamn/fiamn_neutral.png'.
What did I do wrong to upset this thing to the point that it won't run at all?
-
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: Is there a way to open a file outside of the game direct
get rid of the / at the start of the paths
Code: Select all
image fiamn neutral = "characters/fiamn/fiamn_neutral.png"
- ringo_ni_ringo
- Newbie
- Posts: 7
- Joined: Tue Mar 18, 2014 12:01 pm
- Projects: Spinoza Rosa
- Location: Tucson, AZ
- Contact:
Re: Is there a way to open a file outside of the game direct
Thank you. >_< Everything works fine now.
It was a pain to go through and change that though...
It was a pain to go through and change that though...
Re: Is there a way to open a file outside of the game direct
Get a decent text editor and use the replace function. Noone changes this stuff manually if there is a pattern to fix on.
- ringo_ni_ringo
- Newbie
- Posts: 7
- Joined: Tue Mar 18, 2014 12:01 pm
- Projects: Spinoza Rosa
- Location: Tucson, AZ
- Contact:
Re: Is there a way to open a file outside of the game direct
Y-you don't have to do it manually? 0A0
- Destiny
- Veteran
- Posts: 468
- Joined: Thu Jun 14, 2012 2:00 pm
- Projects: Cards of Destiny, Sky Eye
- Location: Germany
- Contact:
Re: Is there a way to open a file outside of the game direct
Nope, pretty much all text editors (especially those of Ren'Py) feature the search/replace feature
You only have to watch out what to replace with what (if the way is "/liam/liam_not", then just replacing "/liam" into "liam" will result in a "liamliam_not" instead of the wanted "liam/liam_not").
You only have to watch out what to replace with what (if the way is "/liam/liam_not", then just replacing "/liam" into "liam" will result in a "liamliam_not" instead of the wanted "liam/liam_not").
Cards of Destiny (WIP) / Sky Eye (WIP)
Who is online
Users browsing this forum: Ahrefs [Bot], DewyNebula, MisterPinetree, Sugar_and_rice