Change element rate via script using variable

Hello.


Is there a way with JS  to change elemental rate for actor by variable?


In my game system actors training their special abilities in guilds. 


With ability "Resist Fire" which can be trained by step 1 from 1-100 his "natural" Fire Element rate should drop by 0.5% by each point spent into "Resist Fire". 


something like:


Actor(ID).ElementRate(ID) - gameVariable(ID)/200


Thank you. 

Original thread: https://forums.rpgmakerweb.com/threads/change-element-rate-via-script-using-variable.69654/