Skip to content

Information

Exodia edited this page Sep 27, 2023 · 21 revisions

Character Info

For add a character info use CharacterInfo class. CharacterInfo is a class that contains essential information about a character and used for rename, change age, etc.

I reccomand to follow this metod for create a character: Character Properties Method.

Add Character Info

(code-snippets: DR_CharacterAdd)

default mcI = CharacterInfo(
    name = "Name", surname = "Surname", age = 18, gender = GenderEnum.FEMALE,
    other_values = {},
    relationships = {}
)
define mc = Character("{b}[mcI.name]{/b}",
    icon = None,
    info_screen = None,
    color = "#0702ff", who_outlines = [(2,"#000000")], what_prefix = "\"", what_suffix = "\"", what_outlines = [(2,"#000000")]
)

Change Name

For change name use changeName function, this function open a input box and ask for a new name.

(code-snippets: DR_CharacterInfo_ChangeName)

"Player" "My name is:"
$ mcI.changeName()

Change Surname

For change surname use changeSurname function, this function open a input box and ask for a new surname.

(code-snippets: DR_CharacterInfo_ChangeSurname)

"Player" "My surname is:"
$ mcI.changeSurname()

Change Age

For change age use changeAge function, this function open a input box and ask for a new age.

(code-snippets: DR_CharacterInfo_ChangeAge)

mc "I am ... years old"
$ mcI.changeAge()

renaming_mc

For set the first value of player name and surname I reccomand to use renaming_mc function.

exemple:

call renaming_mc(mcI)

Relationships

Red more here: Relaction

Get Set Remove functions

CharacterInfo() use the dictionary to store the values of the variables.

Olther methods for modify character info are get, set and remove.

exemple:

python:
    mcI.set("name", "New Name")
    mcI.set("new_variable", "New Value")
    age = mcI.get("age")
    mcI.remove("new_variable")

Screen

Read more here: Screen & Translations