Character Functions

Also see: Generic Functions

Accepted bonus/multiplier data: "attribute", "skill", "budgetmax"

addCharacterDataBonus(CharacterData > CharacterKey, Type > String Data, Type > String Key, Type > Float Value)

Alternative: addCDBonus()
Accepted data: "attribute", "skill", "budgetmax"
Adds an additive bonus to the given data without changing the base value. Use this for temporary changes, like equipment, consumables etc.
Example: "game.addCDBonus("player", "attribute", "strength", 5)"

getCharacterDataBonus(CharacterData > CharacterKey, Type > String Data, Type > String Key)

Alternative: getCDBonus()
Returns the current additive bonus of a data.
Example: "game.getCDBonus("player", "attribute", "strength")"

removeCharacterDataBonus(CharacterData > CharacterKey, Type > String Data, Type > String Key, Type > Float Value)

Alternative: removeCDBonus()
Removes the given value from the additive bonus. This is equivalent to calling "addCharacterDataBonus" with a negative bonus.
Example: "game.removeCDBonus("player", "attribute", "strength", 5)"

addCharacterDataMultiplier(CharacterData > CharacterKey, Type > String Data, Type > String Key, Type > Float Value)

Alternative: addCDMultiplier()
Accepted data: "attribute", "skill", "budgetmax"
Adds an multiplicative bonus to the given data without changing the base value. Use this for temporary changes, like equipment, consumables etc.
Example: "game.addCDBonus("player", "attribute", "strength", 2)"

getCharacterDataMultiplier(CharacterData > CharacterKey, Type > String Data, Type > String Key)

Alternative: getCDMultiplier()
Returns the current multiplicative bonus of a data.
Example: "game.getCDMultiplier("player", "attribute", "strength")"

removeCharacterDataMultiplier(CharacterData > CharacterKey, Type > String Data, Type > String Key, Type > Float Value)

Alternative: removeCDMultiplier()
Removes the given value from the multiplicative bonus. This is equivalent to calling "addCharacterDataMultiplier" with (1 / Value), except for 0 which has to be removed with this function.
Example: "game.removeCDMultiplier("player", "attribute", "strength", 2)"

createCharacter(CharacterFileData Identifier Type > String, JobFileData Identifier Type > String)

Creates a character with the given CharacterFileData and JobFileData.

destroyCharacter(CharacterData > CharacterKey)

Destroys the given CharacterData.

regenerateCharacterImage(CharacterData > CharacterKey)

Regenerate a new image for the given character.

calculateCharacterImage(CharacterData > CharacterKey)

Recalculates the image of the given character.

getCharacterImagePath(CharacterData > CharacterKey)

Returns the characters image path.

getFeatureOptions(FeatureFileData Identifier Type > String)

Returns an Type > Array of all options a feature has.

calculateCharacterAttendance(CharacterData > CharacterKey)

Calculates the characters attendance.

calculateAllCharacterAttendance()

Calculates all characters attendance.

isCharacterHome(CharacterData > CharacterKey)

Returns true if the character is at home.

isWearingOutfitType(CharacterData > CharacterKey, OutfitTypeType > String)

Returns true if the character is wearing the outfit type on chest and legs.