Information on Objects for battles and actions?

I apologize if this is in the wrong place.

I am familiar with JavaScript, and would like to try to develop some small plugins that affect the battle experience. It would seem that the documentation for this is not especially forthcoming, and so far I have not had much success in trying to reverse engineer some of the Battle objects using the F8 dev tool.

It would be amazing if there is a resource somewhere that explains some of the js objects related to battles and actions therein. I would love if someone could direct me to something like that.

Failing that, I wondered if someone might be able to get me started on the first step of my journey: determining what element a particular battler has been hit with and printing that to the console.

Thanks!

EDIT: I thought it might be helpful to paint a fuller picture of what I'm trying to accomplish.

I would like to eventually build something that will:
  • Identify the element of a skill targeting a battler.
  • Based on the element, add to a counter.
  • When the counter reaches its maximum, apply a specific state.
  • Allow for notetags (on enemies) to define which elements will contribute to the counter.
  • Allow for notetags (on enemies) to define the counter's maximum value.
The central classes you need to pay attention to for the battle system are BattleManager (in rpg_managers.js) and Scene_Battle (in rpg_scenes.js). These call into all sorts of things, of course, particularly the Game_Action class which handles all actions performed in battle (as well as on the map) - that's in rpg_objects.js. I believe determining the element should be somewhere around the executeDamage function (in rpg_objects.js); you can probably find the exact spot by searching for places where elementRate is called.

Original thread: https://forums.rpgmakerweb.com/threads/information-on-objects-for-battles-and-actions.123338/