I am in the process of designing skills for the player characters, but I was wondering what is the most effective way to about storing/organizing them. I have been researching this for a few days and I have seen a lot of answers. Programming guy I was speaking too said I should go for a more in depth organization that organizes by Type → Element ->Charge
->cooldown
Can I have some advice before I take a wrong path?
Variables my skills will use:
Type ( physical or special - formula will use Atk/Def or Special ATK/ Special DEFdepeding on type)
Element (10 types)
Power
Accuracy
Hits
Charge
Cooldown
This one looks close to what I was envisioning, but is it a smart way to go about it?
MENU SCRIPT
{
SaveInformation(Skill1ID = Slot1ID)
SaveInformation(Skill2ID = Slot2ID)
SaveInformation(Skill3ID = Slot3ID)
SaveInformation(Skill4ID = Slot4ID)
}
PLAYER SCRIPT
{
IF (Presskey(1)){
skillDataBase(LoadInformation(Skill1ID))
IF (Presskey(2)){
skillDataBase(LoadInformation(Skill2ID))
IF (Presskey(3)){
skillDataBase(LoadInformation(Skill3ID))
IF (Presskey(4)){
skillDataBase(LoadInformation(Skill4ID))
}
SKILLDATABASE SCRIPT
{
function ID1(){
string name = "Fireball"
int damage = 5
int manacost = 3
int castTime = 0.5f
float castRange = 3
instantiate (fireball, player.position, player.rotation)
}
function ID2(){
string name = "Arcane Strike"
int damage = 5
int manacost = 3
int cast time = 0.5f
float castRange = 3
instantiate (arcanestrike, player.position, player.rotation)
}
//etc, 20 more skills