Function to get armor rating in yanflys armor scaling

Hello All,

I'm using yanflys armor scaling and srds battle status window. I can use a JavaScript evaluation in srds plugin to display different values. I was trying to see if I could find a function to get the actors armor rating from yanflys plugin. I cant for the life of me understand yanflys code.

Alternatively, since I know the formula for how armor is calculated I could use that but the formula changes depending on what type of armor it is. For example light armor = actor.def/7
Medium armor = actor.def/5 etc etc

The problem with that is if I hard code those formulas into srds plugin they won't be dynamic to armor reduction skills and what not. And I also don't know how to check what type of armor the actor is wear (light, medium, heavy)

Any assistance would be greatly appreciated!

Original thread: https://forums.rpgmakerweb.com/threads/function-to-get-armor-rating-in-yanflys-armor-scaling.89864/