Skill, Weapon, Class, and State EXP

Could someone please make me a plugin to create and store numbers that will represent Class, Skill, Weapon, and State Experience Points?


The storage system should be four 2D arrays, one for each of the four aspects I mentioned above (If making four 2D arrays is too much to ask, I could probably figure out how to make the other three myself from your code.) The outer arrays should be the number of actors, while the inner arrays should be the number of classes, skills, weapons, or states. The inner arrays should be initialized with zeros. This will make it so that each actor gains their own exp and should be a lot easier to manage than the rpg maker variables.


The plugin needs to have getter and setter methods to use and modify the data.


The information from the arrays will then be used in damage formulas or other calculations.


Thank you very much for your help, and apologies if my request is unreasonable or impossible, I'm still ignorant to a lot of JS and RPG Maker Plugins. I have experience with Java, but the transition to Javascript has been a little confusing. I'm hoping this script will also help me understand the rpg maker plugin and scripting system better.


Please also mention what you'd like to be credited as. Again, thank you very much.
Hi @Tsbrdain!


Try this: http://pastebin.com/RLwFdSSj


I made it according to your specs but I wonder, why not have the class/skill/weapon/state exp stored per game Actor instead of having a 2d array?


So my plugin creates inside $gameSystem the following arrays:


classExp
skillExp
weaponExp
statesExp


That you can modify with the following commands:


$gameSystem.changeClassExp(actorId,classId,change)
//change will be added to the class EXP
//If no change is provided it will instead return the current EXP
//The following comands have the same behaviour
$gameSystem.changeSkillExp(actorId,skillId,change)
$gameSystem.changeWeaponExp(actorId,weaponId,change)
$gameSystem.changeStateExp(actorId,stateId,change)


Try it, and tell me if it works for you or not (it does in my blank project).
My knowledge of how plugins work is very limited, and I thought a 2d array would be easier to use than actor data for some reason... 


But wow, I can't thank you enough for the plugin! I tried it a little bit, but couldn't get it to work in my project. I need to get some rest now, (I stayed up way too long trying to make my own plugin with no luck) but I promise I'll test it out more once my head is clear, and I'll get back to you about it. Thanks again, I really appreciate the plugin!
@Tsbrdain Ok, so I'll need to know in what context you want to call those commands, but first follow those steps:


1-Import the plugin, make sure it is turned on


2-Create an event and use one or two commands inside a script call


3-Test the event


Then tell me if it works or not, by pressing F8 to bring the console and typing $gameSystem and then looking at the arrays.


Here is how it looks in my project:

Spoiler
pFCqJrH.png



The script call in an event first, then the console, before and after clicking the event.
I got it working Astfgl66. Thanks again for the plugin, it's running perfectly!
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/skill-weapon-class-and-state-exp.68949/