Directories?

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
Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

Directories?

#1 Post by Enerccio »

Renpy support aditional directories in game directory?
And if yes, they can be compiled in archive? :)
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#2 Post by PyTom »

Yes, we will automatically archive files in the game directory, and in all its sub-directories.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

#3 Post by Enerccio »

PyTom wrote:Yes, we will automatically archive files in the game directory, and in all its sub-directories.
and so how i can acess the files in thiese sudirectories?
Like my path to image is:
c:\Documents and

Code: Select all

Settings\Enerccio\Desktop\renpy-6.1.0\2200AD\game\images\ayaki_normal\ayakia.png
so how can i call that image in game?
like image a present normal = "images\ayaki_normal\ayakia.png"
?
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#4 Post by PyTom »

You need to use forward-slashes (/) rather than back-slashes (\), but other than that you are correct.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

#5 Post by Enerccio »

PyTom wrote:You need to use forward-slashes (/) rather than back-slashes (\), but other than that you are correct.
bkackslashes dont work for me... but when i write two backshlashes it works somehow...
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

#6 Post by Jake »

Enerccio wrote: bkackslashes dont work for me... but when i write two backshlashes it works somehow...
A single backslash simply 'escapes' the following character - it's a special feature used to get newlines ("blah\n blah") and quotes ("So he said \"Yay!\"...") and so on into strings. A double-backslash is the escape code to get a single backslash in the resulting string, which is why that works.

On the other hand, backslashes don't work as part of the path on non-Windows systems, where as I understand it forward slashes do work as part of the path on Windows and non-Windows systems, so you should always use forward-slashes anyway for compatibility reasons.
Server error: user 'Jake' not found

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#7 Post by PyTom »

Jake is right on the money. Don't use backslashes unless you don't want your game to work on Linux and Mac.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

#8 Post by Enerccio »

PyTom wrote:Jake is right on the money. Don't use backslashes unless you don't want your game to work on Linux and Mac.
okay i replaced backslashes with other ones

Damn, why even in this windows and other platforms are different??? :shock: :cry:
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

derik
Regular
Posts: 57
Joined: Wed Oct 18, 2006 4:56 am
Contact:

#9 Post by derik »

Enerccio wrote:
PyTom wrote:Jake is right on the money. Don't use backslashes unless you don't want your game to work on Linux and Mac.
okay i replaced backslashes with other ones

Damn, why even in this windows and other platforms are different??? :shock: :cry:
Hh. Do I have to do this for imagepaths too? (If I stick them in sub-directories?)

I don't recall it being a problem.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

#10 Post by PyTom »

Yes, you need to do it for image paths as well, if you want your game to work on Linux and Mac. (Hm... I should probably make lint check for this, if it doesn't already.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot], peach_light