Case Sensitive Image names

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
FlipTopBin
Newbie
Posts: 15
Joined: Thu Apr 12, 2018 5:55 am
Contact:

Case Sensitive Image names

#1 Post by FlipTopBin »

My apologies for this question which must have been asked 1000 times but I just can't find the answer at the moment:

I understand that

scene test

will match test.jpg and Test.jpg, but

scene Test

will match neither

Is there any way to make the image name in the scene statement case insensitive so that both of these statements will work the same?

I suspect the answer is "no" in which case there MUST be an existing feature request for this so where do I go to bump it. If there isn't a feature request then where do I go to log one?

P.S. I understand the Python is case sensitive and Linux file names are case sensitive but the majority of VNs must be viewed and developed on Windows these days where file names are case insensitive so artificially making them sensitive makes very little sense.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Case Sensitive Image names

#2 Post by Imperf3kt »

Sure, you can do that by not using the automatic image defining.

Code: Select all

image test = "images/test.jpg"
image Test = "images/Test.jpg"
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

FlipTopBin
Newbie
Posts: 15
Joined: Thu Apr 12, 2018 5:55 am
Contact:

Re: Case Sensitive Image names

#3 Post by FlipTopBin »

Yeah. I am trying to get away from having to define everything through an image object which is what I do now.

Lets put this another way then: If Renpy is going to convert all my file names to lowercase before processing them, then there should be some corresponding behaviour you can switch on to convert all file names used in scene/show to lowercase as well. Where would I log such a feature request?

The other option would be to have some kind of content management system which converts case sensitive human readable names into lowercase identifiers. I have seen many games which use apparently machine generated file names for their images so are there utilities out there to manage my images for me?

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Case Sensitive Image names

#4 Post by xavimat »

I understand "what", but may I ask "why"?
Can't you simply write "scene test"?
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

FlipTopBin
Newbie
Posts: 15
Joined: Thu Apr 12, 2018 5:55 am
Contact:

Re: Case Sensitive Image names

#5 Post by FlipTopBin »

My VN already has 100s of images and will be well into the 1000s by the time I am done so I have to give them descriptive multi-word names like:

BobAlleyJumpsLeftFiresGun

I could write

bob_alley_jumps_left_fires_gun

but this would involve me re-writing several hundred names at this point as I used the first naming convention which I normally use when proper programming. I will use a different naming convention if/when I write another VN but for now I am pretty much stuck with this.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]