DocsPhone reference

Phone reference

All functions and options for the Phone plugin.

Functions

phone.contact(character, flavour)

Register a character as a phone contact. Call this before the character sends any messages.

ParameterTypeDescription
characterCharacterA Ren'Py Character() object.
flavourstrColour name for the contact bubble. One of: soda, lilac, butter, peach, sky, berry.

phone.message(character, text)

Add a message from a contact to the conversation history.

ParameterTypeDescription
characterCharacterThe sending contact. Must be registered with phone.contact() first.
textstrThe message text.

phone.typing(character, duration)

Show the typing indicator for a contact before a message.

ParameterTypeDescription
characterCharacterThe contact who appears to be typing.
durationfloatDuration in seconds.

phone.choices(options)

Show reply choices inside the phone and return the option the player picks.

ParameterTypeDescription
optionsliststrOne to four reply strings.

Returns the chosen string.

phone.notify(character) — Full

Show a small notification bubble without opening the phone screen.

ParameterTypeDescription
characterCharacterThe contact sending the notification.

phone.photo(character, path) — Full

Send a photo inside a conversation.

ParameterTypeDescription
characterCharacterThe sending contact.
pathstrPath to the image file, relative to game/.

The phone screen

Open the phone interface from your script:

call screen phone_screen

Options

Set options once, in game/pamyu_config.rpy, using define pamyu.<option> = <value>.

OptionTypeDefaultEditionWhat it does
flavourstr"soda"Lite and FullDefault frame colour for new contacts.
typing_speedfloat1.0Lite and FullSpeed of the typing animation. 2.0 is twice as fast.
soundstr or None"pamyu/phone/pop.ogg"Lite and FullSound played when a new message arrives. None turns it off.
notifyboolTrueFullShow a notification bubble when a message arrives and the phone is closed.
themestr"sorbet"FullReady-made colour theme: sorbet, nightlight, or casebook.
max_historyint200Lite and FullMaximum messages kept per contact. Older ones are removed first.