-
Notifications
You must be signed in to change notification settings - Fork 105
BaseCharacter
Returns a string representing the character's ID. This is used to identify them in-game, and is used for pretty much every function that has to do with characters.
(_p : int) Increases the respective stat of the character by _p, emitting the pain_changed (or lust_changed, or stamina_changed) signal if the final stat value is different than what it was before the function was called. The stat value is clamped between 0 and the value returned by the stat's respective threshold function (inclusive). It will always emit the stat_changed signal.
Returns the current value of the respective stat for this character.
Returns this character's name. You should probably edit this when making your own characters.
Returns a short description for this character.
Returns the value of getSmallDescription with the character's special relationship string added at the end in color. You should probably not edit this.
Returns the base value for this character's respective stat threshold. This is then used to calculate the final value in the respective threshold functions.
Returns the respective stat's final threshold value, based on its respective base threshold function, with a minimum value of 10 for pain and lust, and 0 for stamina.
Returns this character's respective stat percentage, from 0.0 to 1.0 (inclusive).
Returns the ambient pain for this character, from their buffsHolder variable.
(effectID : String, args : Array = []) Tries adding the status effect with the effectID ID to the character, returning true if it's applied and false otherwise. The percentage chance to not apply it is calculated from getStatusEffectImmunity(effectID) for this character, whose value is clamped between 0.0 and 1.0 (inclusive), multiplied by 100 (final chance 0% to 100%, inclusive). If it's applied, the args are passed onto the status effect.
(effectID : String) Returns true if the character has this status effect, otherwise it returns false.
(effectID : String) Returns this character's effectID status effect if they're afflicted by it, otherwise returns null.
(effectID : String) Removes the status effect with the effectID ID from this character if they're afflicted by it, does nothing otherwise.
Returns whether this character can currently stand up in combat, affected by the Collapsed status effect and the perk CombatBetterGetUp. Note that if the character doesn't have the Collapsed status effect, this will return false.
Returns the statusEffects dictionary, with the effects' IDs as keys and their objects (extending StatusEffectBase) as values.
Returns a dictionary with the character's status effects' IDs as keys and the result of their saveData() function as the values.
(data : Dictionary[String, Dictionary]) Removes every current status effect from this character using removeEffect() and then adds the status effects with IDs corresponding to data's keys and, if the effect can be created, loads the effect's data using the value of the respective key.
(panel : StatusEffectsPanel) Updates the panel based on current status effects.
(_seconds : int) Processes this character's timedBuffs by decrementing their duration by the _seconds value, and sets the timedBuffs to only the ones that have a duration higher than 0.
Returns an array with the IDs of this character's attacks for all generic battles.
(_battlename : String) Returns this character's attacks for a specific battle (based on _battlename), returns null by default. This function's return value will replace the character's attacks if it's different than null and the battle has the name _battlename, otherwise the default attacks will be used (from _getAttacks()).
Returns true if the character is currently doing the respective action in combat.
setFightingStateNormal, setFightingStateDodging, setFightingStateBlocking, setFightingStateDefocusing (void)
Sets this character's current fighting state to the specified state.
Returns this character's gender, which affects their char color by default.
Returns this character's pronoun gender, which are derived from the getGender() function by default. Gender affects pronouns as follows:
- Other: it/its
- Androgynous: they/them
- Female: she/her
- Male: he/him
Returns the chat color for this character, defaulting to one according to the value returned by the getGender() function, or red if the gender is invalid. Return value can be a hex color code (eg. #FFFFFF, #f776ff), or a named color (see Godot's Color constants). Default gender colors are the following:
- Other: #77D86C
- Androgynous: #BA82FF
- Female: #FF837A
- Male: #5696EA
(text : String) Returns the text string colored (using BBCode tags) to match this character's chat color (from getChatColor()), with their speech modifiers applied.
Returns the character's respective variable, with acceptable suffixes (and return object types) being: LustInterests, Inventory, SkillsHolder, BuffsHolder, FetishHolder, Personality.
(newexp : int) Adds newexp general experience to the character. Emits the character's skillsHolder's experienceChanged signal.
(skillID : String, amount : int, activityID : null or String) Adds a value of experience equal to amount to this character's skill with ID skillID. If activityID is not null or an empty string, the experience will be added only once, and any further calls of this function with the same skillID and activityID will do nothing. Emits the skill's experienceChanged (skill extends from SkillBase class) signal if experience is added. If the character has no such skill, a new one will be created and assigned to them.
(perkID : String) Returns true if this character has the perk with ID perkID.
(statID : String) Returns this character's stat value with ID statID. Valid stats are Vitality, Agility, Sexiness and Strength in the base game (can be found as constants in the Stat class).