Skip to content
ThePotatoGuy edited this page Oct 19, 2019 · 24 revisions

Dialogue Structure

init 5 python:
    addEvent(
        Event(
            persistent.event_database,
            eventlabel="monika_twitter",
            category=['monika'],
            prompt="Twitter",
            random=True
        )
    )

label monika_twitter:
    m 1eud "Did you know I'm on Twitter?"
    # ...
    return

Standard dialogue (dialogue that is brought up randomly or is trigger by the player using the "Say/Hey Monika" option) known as a "topic". Topic creation consists of two parts: the init 5 block and the actual dialogue. The init 5 block assigns properties to the topic, which can change how the topic can be seen and where it can be found.

Init 5 block

While "Topic" is used to refer to standard dialogue, the structure behind a topic is an "Event". The init 5 block is used to assign properties to these Events as well as tell the system that an Event exists.

The init 5 block can accept several properties, the most commonly used are shown here:

init 5 python:
    addEvent(
        Event(
            persistent.event_database,
            eventlabel="monika_topic_name",
            category=["category name", "another category name"],
            prompt="Prompt Name",
            random=True,
            pool=True,
            aff_range=(mas_aff.NORMAL, None)
        )
    )

Properties:

  • eventlabel - the label of your topic. This should correspond to the label used for the actual dialogue. Standard topics should use a label prefix of monika_. This is required.
  • category - category names this topic should belong to. This is used when viewing the topic in "Repeat Conversation" or "Say/Hey Monika"
  • prompt - text shown on the button that will trigger this topic. This is used when viewing the topic anywhere in the "Talk Menu"
  • random - True will allow this topic to be shown randomly. This should be used for topics where Monika initiates the conversation.
  • pool - True will allow this topic to appear in the Unseen menu as well as the "Say/Hey Monika" menu. This should be used for topics where the player initiates the conversation.
  • aff_range - this limits the availability of the topic based on Monika's current affection. Using None will specify unlimited range, so using (mas_aff.NORMAL, None) means that the topic is available from NORMAL affection and above. Available affection levels:
    • BROKEN - Monika appears broken
    • DISTRESSED - Monika looks sad
    • UPSET - Monika shows a neutral, uninterested expression. This does not mean the literal meaning of upset
    • NORMAL - standard affection. Monika has the standard smile (1eua)
    • HAPPY - Monika shows happier expressions
    • AFFECTIONATE - Monika is affectionate
    • ENAMORED - Monika is enamored with the player
    • LOVE - Monika is completely comfortable with the player

See definitions.rpy for the full list of properties. Many of these properties are specific to certain types of events and are not for standard dialogue usage.

Dialogue

Dialogue is standard renpy dialogue code. The general format is:

m spritecode "Dialogue"

For spritecodes, use the Sprite Previewer

Making Dialogue With Menus

Guide 1

If you're writing dialogue with choices, simply write "menu":". All lines in a menu must be indented. Dialogue in a particular choice must have an addtional indent. (IMPORTANT: Do NOT place an expression on the line that will serve as the question, it will make the game crash.)

The line below the menu will act as the question. Choices are on the same line, but end with a colon (:).

You don't necesasarily have to write as yes or no, it can be written in any way as long as it makes sense as a choice.

Using if, elif and else

Guide 1

If is used when a requirement is fulfilled, elif for a different requirement and else when no requirement is needed.

Use if seen_event("monika_insertlabelhere"): if you want the reader to only read some lines of dialogue that they have already seen, use if not seen_event("monika_insertlabelhere"): for the opposite.

Use if persistent.playername.lower()=='insertplayernamehere': for player names.

Forcing Readers To Go Through All choices With A Menu

Guide 1

Simply write what is shown above.

You will need to label your choices accordingly.

To go back to the choice menu use jump.

Locking Topics and Having Different Responses When Revisiting a Topic

Guide 1

Using Conditionals

Guide 1

Conditionals are used when you want to make your topic avalaible for a limited time or when specific conditions have been acheived.

Useful resources

Renpy's Text Styling documentation