Adding a New Character to Phone Calls - 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.

Adding a New Character to Phone Calls

First, go to character_definitions.rpy. Under the heading Phone Call Characters you will see several characters already defined.

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

You need to give Bob a Character object so he can speak in phone calls. A definition for Bob may look like the following:

define b_phone = Character("Bob",
    kind=phone_character,
    voice_tag="b_voice")

These variables are explained below.

Field Description Example
name The name of the character "Bob"
kind Allows this Character to "inherit" from another, previously defined Character. In this case, the phone_character object already has many attributes related to phone calls defined, so inheriting them means you don't have to retype them. phone_character
voice_tag The voice tag associated with this character. Allows players to switch voice acting for this character on and off. This should be Bob's file_id + "_voice" "b_voice"

See Note on Voiced Characters for more information on adding a voice tag to a character.

So long as you have passed your definition of default b = ChatCharacter(...) the variable phone_char=b_phone, you can now write dialogue for phone calls like so

b "How are you, [name]?"

Adding a phone call contact image

If Bob is a part of the variable character_list, he will show up in the Contacts tab of the phone app. In order for Bob to show up properly, you need to define an image that is Bob's file_id + _contact.

In variables_editable.rpy under the heading PHONE CONTACT IMAGES, several images are already defined. You can add Bob's image to the end of this list like:

image b_contact = "Phone Calls/call_contact_bob.png"

This image should be 188x188 pixels and is typically round. Once defined, the program will be able to find and use this image for Bob's contact info on the Contacts screen.