Some more notes on inserting images and inserting images and creating new positions.
INSERTING IMAGESFirst step is to choose image names and add those images to the images directory.
Image names should be simple, like “bg city street” or “luke scared”.
Parts of the name should be separated by spaces.
Must only consist of lower case letters, numbers, and underscores.
The first part is the tag, IE “bg” or “luke”
You can open the images directory from the Ren’Py launcher.
File names should must the same names as the image in the image directory.
Image types must be jpg, png, or webp.
Ex:
bg city street.png
luke scared.jpg
luke_happy.png
Backgrounds are designated by “scene”
The character pic shown is designated by “show”
If you want to position the character anywhere besides the default spot, designate positioning after character pic with “at [position]”
Ex:
scene bg city street
show luke scared
show narwhal happy at right
You can also designate special positions and layer images.
Ex:
show luke scared
show trixie scary at centerleft behind luke scared
You can temporarily hide images with “hide”.
Ex:
show trixie scary at centerleft behind luke scared
hide trixie scary
“Hide” is usually used when a character or prop leaves the scene before the scene is over.
If a new image is placed where another image already is, the new image will replace the old one.
Changes happen instantly, so…
scene bg city street
show luke scared
show narwhal happy at right
…will all appear at the same time.
All together now!
define l = Character(“Luke”)
define n = Character(“Narwhal”)
define t = Character(“Trixie”)
label start:
scene bg city street
show luke scared
show narwhal at right
l “Wh- Where did Trixie go?”
n “Narwhal narwhal narwhal.”
show trixie scary at centerleft behind luke scared
t “BOO!”
l “AAAAAH!”
hide trixie scary
l “Aaah! She disappeared into thin air!”
CREATING NEW POSITIONSPositions besides left, right, and the default center are designated by the x and y axis.
Ex:
xalign: 0.75
yalign: 1.0
Assign the position to a character by putting a colon behind the character’s intro.
Ex:
show luke scared:
xalign: 0.75
yalign: 1.0
xalign positions horizontally
yalign positions vertically
xalign 0.0 is far left of screen
xalign 0.5 is center of screen
xalign 1.0 is far right of screen
Note: must use decimal point. Just “1” will not work.
yalign 0.0 is top of the screen
yalign 1.0 is bottom of the screen
Note: most character images default to yalign 1.0. You will rarely change this.
To keep you from having to repeatedly enter position alignments, you can define shortcuts.
These are made using “transform”.
They are defined at the top of the file, right after the characters.
Ex:
transform centerleft:
xalign: 0.25
yalign: 1.0
After the shortcut has been defined, you can enter it in the “at” clause of the “show” statement.
Ex:
show trixie scary at centerleft
Transforms are sticky. If you do not designate a new transform when you replace the character image with another, it will stay where the previous image was.
All together now!
define l = Character(“Luke”)
define t = Character(“Trixie”)
transform centerleft:
xalign: 0.25
yalign: 1.0
transform farright:
xalign 1.0
yalign: 1.0
label start:
scene bg city street
show luke annoyed
show trixie happy at centerleft behind luke annoyed
l “Trixie, can you please not stand so close behind me?”
t “Your shampoo smells nice.”
show trixie scared
t “LUKE, THERE’S A SPIDER IN YOUR HAIR!”
show luke scared at farright
l “AAAAAAAAAH GET IT OFF GET IT OFF GET IT OFF!”
Let me know if you guys are enjoying this, and I'll keep updating this with new notes.