SEK_AttackCountAndFormula - v 3.3

SEK_AttackCountAndFormula - v 3.3
By SEK


Introduction
Counts uses of skills and attacks and adds a bonus damage formula.


You can also learn skills after using x times a skill or a weapon.

Features
- You can see how many times an actor uses a skill, save the counter to a variable and change it through plugin command.
- Skill uses will be saved even if you save you game, close it and open it again (it's not a temporary counter!)
-You can set a formula to add more damage to a skill!
It can be based on its Attack Counter, on Actor level and on General Formula!
-You can set a limit to the Attack Counter considered during the calculation of bonus damage
-You can set a General Formula for new unlocked skills without a specific formula!

v 3.0 - Weapon counter and formula for simple attacks implemented!
v 3.1 - Shows next to a skill name its counter.


v 3.2 - Modify skill counter text, size & color


         - fixed issues with YEP_SkillCore


v 3.3 - You can learn new skills after x uses of a skill or a weapon.


Parameters:


Skill General Formula


-General formula for new skill's bonus damage. If 0, no bonus will be added. Default is "ac*lv".


Weapon General Formula


-General formula for new weapon's bonus damage. If 0, no bonus will be added. Default is "ac*lv".


Draw Skill Counter in menu


-Set this true to draw Skill Counter in menu. Default is true.


Menu Counter Color


-Counter's color. Use message colors. Default is 6.


Skill Counter Menu Text


-Skill Counter's Text in menu. Write "null" to hide it. Default is  "Counter:".


Font Size


-Skill Counter's Font Size in menu. Default is 20.



Show Message when a skill is learned
-Default is true.


Formula Writing Notes:
ac = Attack Counter: the number of times the skill/Weapon has been used by the actor.
lv = The actor's level.
gf = The General Formula used by new skills/Weapons.
don't leave spaces when writing the formula!

Plugin Commands:


AttackCount showsc


If Draw Skill Counter in menu is true, sets it false, otherwise sets it true. 


AttackCount set x y z
Sets the counter of a skill from an actor to a specific number.
x = actorId
y = skillId
z = number of uses

AttackCount get x y z
Puts the counter of a skill from an actor into a Variable.
x = actorId
y = skillId
z = variableId 

AttackCount add x y z
Adds a specific number of uses to the counter of a skill from an actor.
x = actorId
y = skillId
z = number of uses to add

AttackCount GFset x
Changes the base damage bonus formula used for all new skills.
x = formula, written with no spaces, 
where 
-ac = y's attack counter; 
-lv = x's level
-gf = General Formula

AttackCount bonus x y z
Adds a bonus damage/heal to the basic damage/heal
based on a formula that must be written with no spaces.
x = actorId
y = skill to apply the formula to
z = formula, written with no spaces, 
where 
-ac = y's attack counter; 
-lv = x's level
-gf = General Formula

Example: AttackCount bonus 1 10 25*ac+2*lv
if actor one is level 10 and has used skill 10 five times,
bonus damage will be 25*5+2*10 = 145.

AttackCount limit x y z
Adds a limit to an actor's attack's counter.
Note: Attack Counter will still increase, but if it goes over
this limit, it will be considered lowered to the limit
during bonus damage calculation. 
Set it to -1 to remove the limit!
x = actorId
y = skillId
z = Attack Counter Limit


AttackCount learn actorId skillToUse x skillToLearn forgetPreviousSkill


 You'll learn a new skill after x uses of a skill. 


 If the last parameter is >0, You'll forget the previous skill.


AttackCount wlearn actorId weaponToUse x skillToLearn


 You'll learn a new skill after x uses of a weapon.


PLUGIN COMMANDS NOTE:
Plugin Commands are the same for weapons: just add "w" before the command.
Example: AttackCount wlimit x y z


Screenshots/Video


Formula part for weapons (skills work just the same, without w at the beginning of the command):



Skill learn
Demo
Not needed

Plugin
Right click here to save the plugin

Credit and Thanks
- SEK
- Silver Element -for suggesting the weapon part: great idea!


- Fitcher -for suggesting the possibility to show how many times a skill has been used!

Author's Notes
Even if I try my best, I might not be able to help with issues.
You are free to use this plugin. If you do use it, I'd like to have my name and my plugin's name included in credits.
Nice work on the plugin!


I am trying to understand how to display the counter without using the variable, is that possible?
I can try to add this... How would you like to show it? as a message?
i was thinking if its somehow possible to make it visible in the menu when you look at characters skills.
i was thinking if its somehow possible to make it visible in the menu when you look at characters skills.

My suggestion would be make the window scroll to the left.


You keep the skill list has it is but instead of showing MP you show the numbers.


Or add a new tab that open a new scene instead of scrolling.
v 3.0 - Added same mechanism for weapons.
i was thinking if its somehow possible to make it visible in the menu when you look at characters skills.

Is it ok like this? (Just for skills)


(I'd put an option to show it or not)


battle:


screenshot.79.jpg


menu:


screenshot.80.jpg
v 3.1 - Shows next to a skill name its counter.


Thanks Fitcher!
Wow, having the same feature for weapons is an amazing idea!


The plugin is doing just what i was looking for now, but i just noticed an issue when using Yanfly_SkillCore plugin as it adds changes to skill cost display and causes it to overlap.


Is there anything that can be done about that?


Here is a screenshot showing the issue in red and in green the possible solution i was thinking.


The nr 1 would make it possible for a custom text to be be displayed before the counter, if its possible.


The nr 2 would fix the issue but not have the custom text possibility.


Is it possible to do one of those?

Skill_usage.jpg
v 3.2 - Modify skill counter text, size & color


         - fixed issues with YEP_SkillCore


screenshot.83.jpg


screenshot.84.jpg
v 3.3 - You can learn new skills after x uses of a skill or a weapon.


AttackCount learn actorId skillToUse x skillToLearn forgetPreviousSkill


 You'll learn a new skill after x uses of a skill. 


 If the last parameter is >0, You'll forget the previous skill.


AttackCount wlearn actorId weaponToUse x skillToLearn


 You'll learn a new skill after x uses of a weapon.
For me this is perfect now! you did a good job on the plugin.


If any improvements comes to mind i let you know.


But now this does everything and even some extra over to what i was originally looking for.


Thank you so much!
Hey thanks for making this plug in. But, Im wondering, is this only applicable to count the skill that used by actor? Can I count the skill that used by enemies as well?
i get the count going up. but i dont learn the new skill, wondering fi i have it called in the wrong spot? where do you put the call at for it to work properly?
Great! Cool plugin! 


Would it be possible to count skillTYPE uses too? 


That you have use black magic skills 10 times for example. That fire and water counts to black magic for example 
Hey thanks for making this plug in. But, Im wondering, is this only applicable to count the skill that used by actor? Can I count the skill that used by enemies as well?


Great! Cool plugin! 


Would it be possible to count skillTYPE uses too? 


That you have use black magic skills 10 times for example. That fire and water counts to black magic for example 

Nice ideas! I'll try to add them asap, but I'm really busy these days, so you'll have to wait at least untill 17th february, *Exams* sorry about that...

i get the count going up. but i dont learn the new skill, wondering fi i have it called in the wrong spot? where do you put the call at for it to work properly?

I tried it, it works fine.. are you sure you wrote it right? 
- plugin call example "AttackCount learn 1 10 5 11 1"
Using 5 times skill 10, actor 1 will forget skill 10 (forget parameter = 1) and learn skill 11
Nice ideas! I'll try to add them asap, but I'm really busy these days, so you'll have to wait at least untill 17th february, *Exams* sorry about that...


I tried it, it works fine.. are you sure you wrote it right? 
- plugin call example "AttackCount learn 1 10 5 11 1"
Using 5 times skill 10, actor 1 will forget skill 10 (forget parameter = 1) and learn skill 11



alright 😀


i will wait and than i will spam as hell so you dont forget it xD
@SEK How about now? 😀
@SEK How about now? 😀
hahaha I thought about you this morning! I'm updating old plugins and old videos, I'll do it soon 😉
I cant wait for it 🙂
Than my mastery system can grow *. *

Original thread: https://forums.rpgmakerweb.com/threads/sek_attackcountandformula-v-3-3.60217/