Additional Images and Variables for a New Character - shawna-p/mysterious-messenger GitHub Wiki

Notice

These pages are out of date! The most recent version of the documentation can be found here: https://mysterious-messenger.readthedocs.io/en/stable/

This page is retained so that it can still be linked to.

Additional Images and Variables for a New Character

Besides the images required to set up things like spaceship thoughts (Adding Spaceship Thoughts for a New Character) and an album (Adding or Removing CG Albums) for a new character, there are a few more optional images you can add to integrate the character into the game.

For the purposes of this tutorial, these examples will show how to add a character named Bob to the program.

Day Select Images

These images appear on the day select screen underneath the box containing the current day (e.g. "5th Day"). They typically indicate which route the player is on during this day.

To define an image for your new character, go to variables_editable.rpy and find the heading DAY SELECT IMAGES. There are several images defined here.

To add an image for Bob, define the image:

image day_b = "Menu Screens/Day Select/day_v.png"

where "Menu Screens/Day Select/day_v.png" leads to the file with Bob's day select image. It is typically rectangular and 263x367 pixels. Then, when defining a RouteDay object, you can pass it the argument day_icon="day_b" or day_icon='b' to have that day display Bob's day select image.

For example, to modify the path definition defined in Setting up Sequential Chatrooms to use Bob's day select image, you can use:

default bob_bad_end_1 = ["Bad End 1",
    RouteDay('6th',
        [ChatHistory("Everything is going wrong", 'day_6_chatroom_6b', '19:02', [b]),
        ChatHistory("The End", 'day_6_chatroom_7b', '21:13')]
    ),
    day_icon="day_b"
]

Save & Load Images

You can also define an image that will appear on the save file when the player saves the game after playing through a particular chatroom. This is a variable attached to each individual ChatHistory object.

To define such an image for Bob, go to variables_editable.rpy and find the heading SAVE & LOAD IMAGES. There are several images defined here.

To add an image for Bob, define the image:

image save_b = "Menu Screens/Main Menu/msgsl_image_bob.png"

where "Menu Screens/Main Menu/msgsl_image_bob.png" is the path to the image you want to use for the save file. It is typically square and 109x109 pixels.

Then, to have this image appear on the save file after the player has played through a certain chatroom, use the argument save_img="b" or save_img="save_b" for each ChatHistory object this image should appear on.

For example, to modify the path definition defined in Setting up Sequential Chatrooms to use Bob's save image for each of the available chatrooms, you can use:

default bob_bad_end_1 = ["Bad End 1",
    RouteDay('6th',
        [ChatHistory("Everything is going wrong", 'day_6_chatroom_6b', '19:02', [b], save_img="b"),
        ChatHistory("The End", 'day_6_chatroom_7b', '21:13', save_img="b")]
    )
]

Note that you can use just "b" instead of "save_b" because the image was defined as image save_b. If it was defined as image save_bob then you would need to either use save_img="bob" or save_img="save_bob".

Story Mode/VN Images

You can define an image that will appear for a VN section associated with your new character in the timeline. This image is automatically used for VN sections defined using a particular naming scheme with your character's file_id.

To define such an image for Bob, go to variables_editable.rpy and find the heading STORY MODE/VN IMAGES. There are several images defined here.

To add an image for Bob, define the image:

image vn_b = 'Menu Screens/Day Select/vn_b.png'

Where 'Menu Screens/Day Select/vn_b.png' is the path to the image you want to use for VN sections associated with Bob. It is typically rectangular and 555x126 pixels.

Then, whenever you create a label for a VN, just add the suffix _b where b is the file_id of the character the VN should be associated with e.g.

label my_chatroom_vn_b:

will create a VN section after the chatroom my_chatroom, and it will use the icon defined via image vn_b. Unlike with Save & Load Images and Day Select Images, you must use Bob's file_id for the definition of both the VN image as well as the VN label in order for the program to find the correct files.