[SOLVED] Trying to Get Attack Power in Script

I know this should seem easy for the life of me, but I wanted to be sure I'm doing this correctly.

Quite simply I am writing a plugin with a parameter (Value X). If this value is not 0 or undefined, then we take Actor1's Attack Power * ValueX = Weight Limit. (kind of similar to how D&D 5e takes Strength Score * 15 = the basic amount of weight you can carry).

So what I'm asking is - within a Game_Party class, how would one go about getting actor 1's ATK value?

Like would this work (pseudo code obviously, not full thing):
var MyVar = MyVar || {};
MyVar.params = PluginManager['myplugin'];
MyVar.value = Number(MyVar.params['Value']);

var actor = $dataActors[1]; // getting actor 1 only
var iwsLimit = actor.atk * MyVar.value;
}
I think to change a parameter like Attack, you'll need this code:

$gameActors.actor(actorId).Param(paramId);

Not 100% positive on this though, since I can't test it.
Boom. That did it. Using the script command in an event I tested:

var test = $gameActors.actor(1).param(2);
console.log(String(test));

And it displayed 26 (which was correct). So that got their attack value 🙂 Thank you so much Retro!

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/solved-trying-to-get-attack-power-in-script.103122/