"User" vs "a" for WAY_EvalText

Help...I'm using WAY_EvalText and ran into an issue where I'm being required to use "a" out of combat and "user" in combat for the same skill description. I have no idea how to get around this.

For example, if I want a skill description to say...
Deals (ATK x2) damage.​
I have to write this if I want it to show correctly while out of combat:
Deals ${a.atk * 2} damage.​
But if I want it to show correctly in combat, I have to write this:
Deals ${user.atk * 2} damage.​

Screenshots (using "a"):
a.png

a2.png


Screenshots (using "user"):
user.png

user2.png
That seems odd, because the plugin definitely defines "a" if the scene is Scene_Battle:

Code:
else if (currentScene instanceof Scene_Battle) {
      a = BattleManager.actor();

If you're using custom scene plugins that create new systems that aren't in the default, the evaltext plugin won't have a concept of "a" or "user" for them unless you code one in.
It probably because the particular battle system didn't use BattleManager.actor() so it returns null or something.

I hate js plugins because most of the plugin dev write it so that it couldn't be overwritten easily.
But here is an instruction that you could try.

I'm assuming this plugin in particular.
Insert a new line in 195 ~ 196
Code:
const user = a;

Then, start to use "user" instead of "a".
I'm assuming this plugin in particular.
Insert a new line in 195 ~ 196
Code:
const user = a;

Then, start to use "user" instead of "a".
Dang, that gave me the worst of both situations lol, as in I get the error both in combat and out of combat (i.e. a combination of my 2nd & 3rd screenshot). Perhaps I'll try the reverse...

Edit: Damn, neither const user = a; nor const a = user; worked. What's perplexing is that when i try const a = user; instead, I get this:
1595244185992.png


Edit2: Sweet! I moved const user = a; to line 91 and it worked for both situations!😂
At least I fixed something today lol, even if I had to stay up to 4:30am to do it! Thanks @TheoAllen for the idea. Finally time for bed...gonna have to edit over 100 skill descriptions tmrw...😠
Glad that worked for you. it just about making both returns the same object. I don't bother to double-check the placement or put more conditions. I was going back here thought there was something missing in my logic but you solved it yourself. Nice.

Original thread: https://forums.rpgmakerweb.com/threads/user-vs-a-for-way_evaltext.124275/