This is my first real attempt at a plug in so I'm trying to do something simple but useful. Looking to be pointed in the right direction. Hopefully this is the right place to post it. There are active mods here they'll make sure I get it right.
Goal:
To keep track of the number of uses for a skill, item or weapon. This number can than be used in the effect formula.
Example:
Skill Fire has been used by Actor George 100 times. His damage for the skill fire is more effective than for Actor Marian who has only used it 50 times.
Simple Damage formula a.mat + a.actionXP/5
In our example above, assuming both George and Marian both have a magic attack of 50, then George would do 70 damage and Marian would do 60.
After the call skill use gets ticked up one. This is all handled behind the scenes by the battle manager.
I'm going to start with skills and then use the same theory for items and weapons later.
What I have so far:
What I know I'm missing:
--- For every skill in skillXP for the actor I need to add a spot in the array. I don't know if I should do that when the game first loads... or if maybe I can push into the array an object with the skills name and then save the xp variable in that object each time I call the effect in the damage. I'm not sure. Any suggestions? I'm going to play with it, but any help is appreciated.
--- I know I'm missing other stuff too, but I'm unconsciously incompetent on a lot of this, so I have no idea what else I could be missing. I'm just aware of my own shortcomings.
Goal:
To keep track of the number of uses for a skill, item or weapon. This number can than be used in the effect formula.
Example:
Skill Fire has been used by Actor George 100 times. His damage for the skill fire is more effective than for Actor Marian who has only used it 50 times.
Simple Damage formula a.mat + a.actionXP/5
In our example above, assuming both George and Marian both have a magic attack of 50, then George would do 70 damage and Marian would do 60.
After the call skill use gets ticked up one. This is all handled behind the scenes by the battle manager.
I'm going to start with skills and then use the same theory for items and weapons later.
What I have so far:
(function() {
var parameters = PluginManager.parameters('EffectXp');
// So the game recognizes my code right?
}
//================================================================================
//Array that is attached to actor?
//================================================================================
Game_Actor.prototype.skillXP(actorId) = [null, XP] {
var XP = 0;
}
//================================================================================
//Game_Battler.prototype.effectSkill
//================================================================================
Game_Battler.prototype.effectXP = function(a) {
var x = a.actorId(); //grabs actorId to tick up corresponding effectXP param.
var y = a.skillId(); //grabs skillId to tick up corresponding effectXP param.
return $gameActor.actor(x).skillXP[y];
}
var parameters = PluginManager.parameters('EffectXp');
// So the game recognizes my code right?
}
//================================================================================
//Array that is attached to actor?
//================================================================================
Game_Actor.prototype.skillXP(actorId) = [null, XP] {
var XP = 0;
}
//================================================================================
//Game_Battler.prototype.effectSkill
//================================================================================
Game_Battler.prototype.effectXP = function(a) {
var x = a.actorId(); //grabs actorId to tick up corresponding effectXP param.
var y = a.skillId(); //grabs skillId to tick up corresponding effectXP param.
return $gameActor.actor(x).skillXP[y];
}
What I know I'm missing:
--- For every skill in skillXP for the actor I need to add a spot in the array. I don't know if I should do that when the game first loads... or if maybe I can push into the array an object with the skills name and then save the xp variable in that object each time I call the effect in the damage. I'm not sure. Any suggestions? I'm going to play with it, but any help is appreciated.
--- I know I'm missing other stuff too, but I'm unconsciously incompetent on a lot of this, so I have no idea what else I could be missing. I'm just aware of my own shortcomings.