Day 2
On Sunday I was feeling only marginally better. I began to get really frustrated with Renpy, almost to tears. It has such an extensive wiki... but everything the wiki contains is out of date. So when you google for how to do something, chances are the solution posted in the forum is also out of date.
Today I wanted to do some minor customization to the display of text boxes and character images. I wanted to get a separate name box for the character names, to appear above the text box. Fortunately with new Renpy, this is a default feature. Unfortunately, the positioning of the name box is designed to be relative to the text box, and it takes a bit of trial and error to move it around on the screen. I discovered you can press shift+r while the game is running to reload the scripts. In fact, once you've done this once, every time you save the script it'll automatically refresh the game. That's nifty.
Anyway, about positioning the name box. I had problems with this, because I wanted to move it UP the screen, above the text box. I tried reducing the ypos values for the name box, lower and lower, but even at zero the name box was still within the text box. It was driving me nuts! Then on a whim I put in a negative value, and that did it! Damn that took forever to figure out.
The way the y axis works is going to continue to drive me nuts, because I keep thinking of graphing in like math class. Y gets more value going up, but in Renpy, it's the opposite. My college education is getting in the way here :p
Anyway, with that solved, next I wanted to reposition where the character sprites get drawn. Renpy has these nifty positions labeled "at left" and "at right" to set the sprite to the far left/far right of the screen. But I decided I didn't want them that far to the left/right. I figured somewhere in the options there should be a section where the position for "at left" and "at right" are defined.
I couldn't find it at all. I searched again and again and tore some hair out. I mean, I knew I could define my own positions, maybe create an "at left2" or something but why should I do that when I should be able to just edit the existing position, right...?
On a whim I ended up manually defining "at left" and "at right" at the beginning of the game script and it seems to be working. I guess putting that there overwrites the default setting for these positions.
For the record, I set "at left" to be xpos of 0.25 and "at right" to 0.75. When I get actual sprite art instead of placeholders, I'll probably play around with these again to get the positioning juuuust right.
Oh, and you can see I added some placeholder images. Silhouettes made from public domain vector art. I added frown and smile versions so I can have placeholder emotions too. It makes everything look ridiculous but hey it's just a WIP haha.
The last problem I had was that I wanted to have a dumb door opening sound effect play when a new character entered the room in one scene. I put the file in the directory, and told Renpy to play the file, but it kept crashing when it tried to load the game, telling me "door" is not defined.
I was like, well, I know image files have to be defined... do I have to define sound files too? I couldn't find anything about that on google... Other people with sound errors had problems with indenting the script, or directory errors where the file couldn't be found. I opened Renpy's dev mode file list and it could see door.mp3, so that wasn't the problem.
Tldr: it turns out I didn't put the file name in quotation marks. It was supposed to be
play sound "door.mp3"
instead of
play sound door.mp3
It's always something little, isn't it? haha
Oh, and here's the stats now!
Statistics:
The game contains 221 dialogue blocks, containing 3,024 words and 15,586
characters, for an average of 13.7 words and 71 characters per block.
The game contains 2 menus, 17 images, and 23 screens.