Logan Walcutt Milestone 2: Stats
Hi Everyone!
Logan Here, For my second milestone I worked on building out the Stat system which will be used by both players and enemies, this consists of two primary scripts and some temporary ones used for testing proposes, The two primary scripts are named, Stats and Character_Stats and i will give a brief explanation for each one bellow.
Stats:
This script handles items such as the get value and final value sections, the get value is responsible for getting the original value of a stat or variable, while the final value section handles the value after any math or modifiers have been added to the original stats.
Modifiers: This is where any modifications can be done to the stats, for example say we have an accessory that gives the player additional health this would be done through modifiers, or if an enemy causes a de-buff to effect the player this could also be done through the modifiers section.
Character_Stats:
This script is where you will find all the actual stats, from Reinforcement (Vitality), Coolant Temp (Endurance), Strength, Dexterity, Charm, Intelligence, Weight Capacity, Magic Resist, Damage, Crit_Chance, CritDMG, all of which are public variables there is also 2 private variables, used for the internal math in the script, those which are currentHealth and CurrentCoolantTemp which are used for tracking the health and endurance within the math.
*There is temporary sections within this script since it was built before being integrated into our project, so sections such as DoDomage, TakeDamage and Die will not be included in the next milestone where these scripts and the leveling system are fully integrated into our project in time for the play testing.
The Next two sections deal with critical chance and critical damage respectively.
CriticalChance is determined by taking the CritChance Stat and adding the dexterity stat. it then calculates that total, including if their are any modifiers affecting either stats. Then a number 0-100 is randomly chosen and if the total value of Critical chance is higher then that random number the player or enemy will hit a critical hit.
CriticalDMG is determined by taking the CritDMG stat and adding the Strength Stat this is then multiplied by 0.1f to turn the integers into a float. This final value is then multiplied by the Damage stat and then rounded and turned back into a Integer and this is what the CritDMG is.
The other two scripts have the same information inside, one for the player and one for the enemy, Inside they have two sections an override for the start which stats it is the player or enemy component and an override for the TakeDamage assigning it to the player or enemy based on which script
For the Next milestone I will be converting this stat script into a scriptable object, and building out the leveling system, This selection of scripts was built this way in order for me to get an understanding of what will be needed and to help test specific variables and the math behind them within a project i know functions.
Get Iron Echos: Zenith's Uprising
Iron Echos: Zenith's Uprising
A Robotic Wanderer "Zenith" With corrupted memories hiding their past, they embark on a journey looking for answers
Status | In development |
Authors | Strayife, JohnIsDecent, WickedSomeone, logan21113, Xexem |
Genre | Action |
More posts
- Seth and Logan: Milestone 3 - Weapon System3 days ago
- Milestone 3: Replacing UI Assets and Inventory10 days ago
- Seth Kolb: Milestone 2 - Procedural textures and Modular Building19 days ago
- Seth Kolb: Milestone 2 - Shaders19 days ago
- Seth Kolb: Milestone 1: Level Blockout and Greyboxing19 days ago
- Seth Kolb: Milestone 1 - Player Controller Devlog19 days ago
- Lance Harrington - Milestone 2 Part 2: Questing And Dialog19 days ago
- Logan Walcutt Introduction25 days ago
Leave a comment
Log in with itch.io to leave a comment.