ITK_CharacterBase - golden-coconut-studio/TikiAdventuresWiki GitHub Wiki

ITK_CharacterBase is the base class of all character actors. It is primarily used to assign properties to both players (Tiki's and Enemies). CharacterBase primarily features a struct containing all the common properties that both players and enemies share, and functions to instantly set, or modify these properties, as well as get a reference to them.


CHARACTER PROPERTIES

All characters will have a struct that define their properties (See image below).

Name

Name:                   A name for characters. used to uniquely name a character.

Health

OriginalHealth:         This is a reference to the initial health value of the character. Originals are a reference to  
                        the very first instance of its property. Originals can be used to return to the original  
                        values for when we want temporal property changes.
                       
                       

MaxHealth:              This is the maximum amount of health a character can have.
                        Max health works so a character cannot exceed its value. As well as other functions such as 
                        resetting the health on revival.


CurrentHealth:          The current health value of the character. 
                        Used to calculate how much health a character still has, and is the value that will be altered 
                        by things such as damage, healing and deciding when a character should die.

Movement Speed

OriginalMovementSpeed:  This is a reference to the initial movement speed value of the character. Originals are a 
                        reference to the very first instance of its property. Originals can be used to return to the 
                        original values for when we want temporal property changes.
    
                
MovementSpeed:          This is a value that represents how fast a character moves. This value can be used to alter 
                        the max walk speed in the character movement component, and thus speed up or slow down a 
                        character.

Attack Speed

OriginalAttackSpeed:    This is a reference to the initial attack speed value of the character. Originals are a 
                        reference to the very first instance of its property. Originals can be used to return to the 
                        original values for when we want temporal property changes.
    
                
AttackSpeed:            This is a value that represents how fast a character can attack. This value enhances how fast 
                        an animation can run. By increasing it, the animation should run faster, and by decreasing it, 
                        it would slow down the animation. 

Damage Multiplication

OriginalDamageMulti:    This is a reference to the initial damage multiplier value of the character. Originals are a 
                        reference to the very first instance of its property. Originals can be used to return to the 
                        original values for when we want temporal property changes.
    
                
DamageMulti:            This is a value that multiplier the amount of damage a character can deal. The value will 
                        enhance damage values by multiplying them. Putting it below 1 will decrease the damage.

Blueprint View


ALTER STATS FUNCTIONS

Getters

Getters are functions that you can call through blueprint. Each getter will return you the value of its variable. You can use these in blueprint if you want a simple function to get your character's properties. Type any of these names in your blueprint that is or inherits from characterBase and you should get them.

Modifiers

There are currently 2 ways to change a variable from a characterBase. There's the setters, which set a property to a given value regardless of any condition. And there's the modifiers, which will only set if certain conditions are met (E.G.: the character must be alive). Designers will have access to the modifiers, since it will calculate certain conditions for them, and thus they will not need to blueprint them themselves. Setters are inaccessible to designers, and is only intended for programmers to use in very specific situations.

Blueprint Example


CHARACTER TEAM

All characters will be part of some kind of team. These teams can be used by designers to decide who is allied with whom. This way, enemies could target a certain team, while players could be separate teams if need be. (NOTE: WIP, still needs proper definition)

Blueprint Example


OTHER PROPERTIES

These are some additional remainder properties.

Character ID

ID's will be expressly unique Identification names for every single character. Regardless of what kind of 
character it is. Every character will have its unique ID that no other character has.

Camera Ref

This is a reference to the camera that is following the characters. Can be used to access the camera.

Rotate Widget

This function allows you to rotate the widget that is attached to the character.