"User" vs "a" for WAY_EvalText

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,626
Reaction score
1,195
First Language
English
Primarily Uses
RMMV
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
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
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.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,599
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
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".
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,626
Reaction score
1,195
First Language
English
Primarily Uses
RMMV
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!:kaojoy:
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...:kaoangry:
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,599
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,455
Members
137,821
Latest member
Capterson
Top