-
Notifications
You must be signed in to change notification settings - Fork 108
BaseCharacter
Contains functions and variables for all characters. Extends Node.
(newValue : int, oldValue : int)
Emitted upon respective value change, with arguments the value after the change (newValue) and the value before it (oldValue), in that order.
Emitted when a stat (Sexiness, Agility, Strength, Endurance) changes. Has no arguments.
Self-explanatory, no arguments.
Note
bodypart_changed can sometimes not be emitted, if defined as such by the function that affected the bodyparts. Such functions include giveBodypart() and removeBodypart() in this class.
(skillID : String)
Emitted upon leveling up a skill, with the skill's ID (skillID) as an argument.
(orificeName : String, newvalue : float, oldvalue : float)
Emitted when a bodypart's orifice (Orifice class) becomes more loose.
(senderName : String, receiverName : String)
Emitted when sharing fluids in tribadism is succesful and its message is enabled.
Note
It should be noted that both of the arguments are the characters' display names, and not their IDs.
Represent current values of respective stats. Pain and lust are 0 by default, stamina is 100.
Stores this character's respective object (BuffsHolder, SkillsHolder, Inventory).
Stores the character's status effects, with the effects' IDS as keys and their objects as values.
Ranges from 0.0 to 1.0 (inclusive), and represents a percentage value.
Stores a LustInterests object with the character's opinions in lewd stuff (mostly body-related stuff), stated as constants in the InterestTopic class.
Stores this character's disposition towards the fetishes stated in the FetishInterest class.
Stores this character's personality, in the following values (String, stated in the PersonalityStat class as constants), clamped between -1.0 and 1.0 (inclusive): Brat, Mean, Subby, Impatient, Naive, Coward.
Stores the fluids this character is covered in.
Stores the character's bodyparts.
An array of bodyparts that need time processing, consisting of all bodyparts the character has whose needsProcessing variable is true.
A Node whose children are the Bodypart objects defined in the bodyparts dictionary.
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
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 (Dictionary) 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.
Note
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).
Note
Default gender colors are the following:
- Other:
#77D86C - Androgynous:
#BA82FF - Female:
#FF837A - Male:
#5696EA - Invalid:
#FF0000
(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 and 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.
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.
Note
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.
(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).