Confusing issue "show eileen happy", always shows her...

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
User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Confusing issue "show eileen happy", always shows her...

#1 Post by ISAWHIM »

I get that we can "Add an image named 'eileen happy.png', to our 'images' directory, to change the image"...

However, who the hell wants an image named 'eileen happy'?

Changing the name and adding a picture with the same name, still loads 'eileen happy', though there is no actual image 'eileen happy.png'.

EG, change the name in the file to "Test". (Why Test.png fails is beyond comprehension. Wouldn't want it confused with actual character names.) Now add an image "Test.png", and reload the game. It still shows "eileen happy", with the name "Test" written over her chest. But, not the actual "Test.png" file that you just told it to load.

Please, in the future, include that image, or remove that from the "blank project", which has to be removed every time. We already have a "tutorial" that can't be removed correctly and a "The Question" sample that can't be removed correctly. Or explain, on that same location, that all "image names", for some unfathomable reason, must be "small letters", in code, but not as actual image file names.

But I suggest fixing the code so it works. Showing "Show eileen happy", implying that is all that is needed to "Show an image", which does not work here, is misleading and confusing to "getting started". When trying to display an image named "Test.png", by typing "show Test". Since most humans capitalize first letters of most file names, or expect a program to be smart enough to know that "Test" or "test" = "Test" or "test", when case sensitivity is redundant and pointless for everything except linux, which often ignores case sensitivity and NEVER changes it on you, as renPy does. (It changes "Test" to "test", and that little major factor, can only be found in the help file, if you look closely at the little mention of it.)

Respectfully, when looking for images, it should also default to "eileen/happy.png" for "eileen happy", when present. It would be/is redundant to expect to find "eileen/eileen happy.png" as a naming convention. "bob/happy.png", "sue/happy.png", "joe/happy.png" is what most tend to "do", sort of the reason they each have a folder. They wouldn't need folders if the name was in every file. That is a poor thing to promote... Redundancy.
Last edited by ISAWHIM on Fri Dec 30, 2016 2:38 pm, edited 1 time in total.

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Confusing issue "show eileen happy", always shows her...

#2 Post by Divona »

Are you talking about placeholder character? It's there for people who doesn't have image to play around with to start scripting right away, without the need to worry about the images. Here is a link to documentation on Placeholder: https://www.renpy.org/doc/html/displaya ... aceholders

"eileen happy" is the name of displayable. It is a misunderstanding that it is relating to image name. It is not. "eileen happy" need to be define using "image" first, for example:

Code: Select all

image eileen happy = "test.png"

label start:
    show eileen happy
This will show "test.png" for character name "eileen" with "happy" expression.

To display image by using "show", you can just put the "image" and "file name" there:

Code: Select all

label start:
    show image "test.png"
It just seem like you try to force the language idealism upon what the language is. For example, why some country spell "color" instead of "colour"?
Completed:
Image

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Confusing issue "show eileen happy", always shows her...

#3 Post by ISAWHIM »

I think you responded before I finished editing. :P

The "issue" (confusion), was with the file-name "Test.png". (Capitalized letter in name.)

RenPy, for some reason, converts all image-names to "All small letters", internally. So you need to use "show test" to display "Test.png", without using (image show = "Test.png" {Which works with "test.png" here, again, oddly.)

Which can be set to... (Case-sensitive crap demanded here. Test and test and tEst are all unique! Why?)
image Test = "test.png" (or "Test.png")

and then displayed with...
show Test (Using a capital letter works here, only because you made it capital above, when loading. If you use "show test", it loads eileen again.)

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Confusing issue "show eileen happy", always shows her...

#4 Post by Divona »

The way you write script is just not how it supposed to be from the start. In every example on how to load image are either declare image first and use them in script, or point directly to the image file.

It is like asking why in C# language you have to add ";" at the end of every line of code?
Why you have to indent the next line when you're using "if" in python?
Why in Java you have to assign interger, float, string to variable when in python it's smart enough to know what type of variable you're using?

Maybe it just haven't been designed the way you think it's supposed to work. :wink:
Completed:
Image

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2405
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Confusing issue "show eileen happy", always shows her...

#5 Post by Ocelot »

In every example on how to load image are either declare image first and use them in script, or point directly to the image file.
You are forgetting about image auto-defining feature: https://www.renpy.org/doc/html/displayi ... -directory

However it clearly states how it works. And honestly I am not a fan of it. I would prefer if it was opt-in, or at least required to read documentation to use it.
< < insert Rick Cook quote here > >

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Confusing issue "show eileen happy", always shows her...

#6 Post by ISAWHIM »

Yes. it is just an annoyance. Partly because it is in every "New project", and partly because it is not clearly explained right there, where it is trying to "show you", how to display an image.

It shouldn't be in the "new project" creation at all. A "new project" should be 100% blank.

Still, typing "show test" should load "Test" or "test" or "tEst", just as "image xxx = "Test.png", would load "Test.png" or "test.png", or "tEst.png".

(You do not have to use "image xxx = 'somename.png'" to load an image, just "show somename". Which is specific to images.)

[NOTE: This is just a petty gripe. Having things case-sensitive annoys only some. Non-case-sensitive annoys no-one. Why anyone would still prefer/design around and force the prior, is beyond me. Only forcing it in some instances, but not others, is "confusing". Especially since you can't have files with "test" and "Test" and "tEst", in the same directory, on windows or many other devices that even use case-sensitive stuff.]
Last edited by ISAWHIM on Fri Dec 30, 2016 4:18 pm, edited 1 time in total.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2405
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Confusing issue "show eileen happy", always shows her...

#7 Post by Ocelot »

typing "show test" should load "Test" or "test" or "tEst", just as "image xxx = "Test.png", would load "Test.png" or "test.png", or "tEst.png".
What should it show if you have all three images? And in similar note, whch file should it load if all three are present? (Most OS aside from Windows have case-sensitive filenames. Internally, NTFS is case-sensitive too, actually.)

Python is designed to be case-sensitive, so threating variable name as another name is completely alien to everything and would be surprising to much more people.
< < insert Rick Cook quote here > >

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Confusing issue "show eileen happy", always shows her...

#8 Post by ISAWHIM »

Ocelot wrote:
typing "show test" should load "Test" or "test" or "tEst", just as "image xxx = "Test.png", would load "Test.png" or "test.png", or "tEst.png".
What should it show if you have all three images? And in similar note, whch file should it load if all three are present? (Most OS aside from Windows have case-sensitive filenames. Internally, NTFS is case-sensitive too, actually.)

Python is designed to be case-sensitive, so threating variable name as another name is completely alien to everything and would be surprising to much more people.
It would only show "test", not all three anyways...

"file names are converted to lower-case"

but...

"code for files is not", thus, the issue.

If you commonly name files, "MyFile.xxx", you expect that it would load with "MyFile", but it is seen as "myfile", which would just confuse the use of "myfile" if use with "MyFile", thus, defeating the purpose of "being case sensitive" in the first place.

Why it wouldn't ALSO convert "show MyFile" into "show myfile", since that is all it can read, for a file, is where the annoying issue is. I have to type "myfile" when my files are humanly named, "MyFile", but only for the specific image-loader "show xxx".

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2405
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Confusing issue "show eileen happy", always shows her...

#9 Post by Ocelot »

It would only show "test", not all three anyways...
What it would show if you have only Test, tEst, teSt and tesT?

Ignoring case in code is a big mistake. Nothing should allow that.

Now for auto-definition. Notice that it doesn't actually load stuff on-demand, it just creates a bunch of image definitions following strict and well laid-out rules. It does not change how parsing works. If you write image file name in improper case when on case-sensitive OS, it would not load file you want, because technically it does not exist.
So both in variable names and in filenames handling RenPy works similarly.

Again, auto-definition just goes through list of all files and generate appropriate image definitions for files with names somehow related to file names. Converting to lowercase does makes some sense here: lowercase variable names are both Ren'Py and Python coding standards, at least one OS treats filenames as case-insensitive and you really should not have files with names, whch differs only in case of letters.
< < insert Rick Cook quote here > >

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Confusing issue "show eileen happy", always shows her...

#10 Post by ISAWHIM »

I agree, but that isn't what is happening for this specific item.

Thus, the confusion.

The first thing someone would do with "eileen happy", is not create an image "eileen happy.png", but replace that specific name with something they might have for a test image. Like me, "Test.png", then wonder why it doesn't work, when they type the matching "show Test".

Even if they added a file called "eileen happy.png", since it is a name, they would naturally name it "Eileen happy.png", which WOULD work, but if they changed it to "Herbert happy.png" and "show Herbert happy", it would not. (With no mention as to this specific and unusual behavior, which COULD easily be changed in code, without any issues. By simply forcing "show XxxxX" to be "show xxxxx", as it does when reading any other file-name, since this is specific to file name reading. Just as they changed the code to read "Test.png" or "tEst.png" as "test.png", instead of the case-set name it actually is.)

This is like changing every door in your house to 32" for wheelchair access, but leaving the front and back door at 28" wide.

Post Reply

Who is online

Users browsing this forum: No registered users