-
-
Notifications
You must be signed in to change notification settings - Fork 5
Information
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.
(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")]
)
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()
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()
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()
For set the first value of player name and surname I reccomand to use renaming_mc
function.
exemple:
call renaming_mc(mcI)
Red more here: Relaction
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")
Read more here: Screen & Translations