-
-
Notifications
You must be signed in to change notification settings - Fork 18
Defining Characters and Naming Them
To define new characters you have two choices on how to define them in definitions.rpy
DynamicCharacters are meant to be used for characters that are more in-use in the game such as Monika, Sayori, Natsuki, Yuri and MC. Let's break down Sayori to know how to define new characters.
This is Sayori's DynamicCharacter code from definitions.rpy
define s = DynamicCharacter('s_name', image='sayori', what_prefix='"', what_suffix='"', ctc="ctc", ctc_position="fixed")
-
define s
- You are telling DDLC that this is Sayori's Definition for her name, and sprites and the variable to use when Sayori says something, in this cases
is her dialogue variable. -
s_name
- This is the variable that defines Sayori's name. See Naming Characters below on how to name a character name variable. -
image='sayori'
- This tells DDLC what sprites Sayori uses that hassayori
in the name. See Defining Sprites on how to define sprites for a character. -
what_prefix='"'
&what_suffix='"'
- This is what symbol DDLC uses for dialogue before and after dialogue is spoken. By default, prefix and suffix are set to"
which shows in-game as"Hi."
. Changing it to*
or any other symbol will show in-game as*Hi.*
ctc
and ctc_position
can be ignored as these center the text to the textbox of DDLC.
In this example I will define a new DynamicCharacter name Sayonika
define sa = DynamicChaacter('sa_name', image='sayonika', what_prefix='"', what_suffix='"', ctc="ctc", ctc_position="fixed")
Character() in DDLC is only used twice in the game when Natsuki and Yuri are speaking at the same time. Character() tends to be used for minor characters or group of characters that have less importance in the game.
Let's break down Natsuki and Yuri's special Character() definition.
define ny = Character('Nat & Yuri', what_prefix='"', what_suffix='"', ctc="ctc", ctc_position="fixed")
Everything in Character() is the same as DynamicCharacter() except that it does not use the image=
part of DynamicCharacter and has a fixed named defined instead of ny_name
.
Character() has the ability to be used in NVL. NVL is a special type of presentation where the dialogue is shown as a paragraph in the game. In this example, I made MC as a NVL Character.
define mcn = Character('Player NVL', kind=nvl, color="#c8c6ff")
-
kind=nvl
- This tells DDLC that this character is a NVL character and not a ADV or Standard Dialogue Character. -
color="#c8c6ff"
- This defines the name color of the person speaking in NVL. You can change this to make separate colors for separate characters in NVL.
To name characters, you can define them in definitions.rpy
.
In here we will make a new character based off Monika's default name code. Default is what Ren'Py will use every time a new game is made.
default m_name = "Monika"
-
m_name
this is the variable name that will hold the names of our characters at the beginning of a new game.
If I was to define Sayonika's Name, it will be like this
default sa_name = "Sayonika"
You can also change their names in game by doing $ m_name = "Mon-ika
anywhere in your script story. If I wanted to do this, it will be like this.
sa "I guess I can be called Sayori-Monika?"
$ sa_name = "Sayori-Monika"
sa "Cause I'm half Sayori and half Monika?"