Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,977
Reaction score
4,591
First Language
English
Primarily Uses
RMMZ
@Trihan
I see, that is very helpful, thank you for the info!

So I have this setup now, which does not seem to work:

<Custom Apply Effect>
user._counter = 2; // Does this need to be user or target?
</Custom Apply Effect>

<Custom React Effect>
if (value > 0 && target._counter > 0) { // And what about these?
target._counter -= 1;
value = Math.round(value * 0.5);
} else if (target._counter <= 0) {
target.removeState(139);
}
</Custom React Effect>

Side-question, I imagine that I should give each counter unique names right?
Calling every counter "counter" is surely prone to causing conflicts.
Yeah, you want each distinct effect to have a unique identifier unless they all use the same counter.

For Custom Apply Effect, I believe YEP plugins consider user and target to be the same object, so it shouldn't matter. For Custom React Effect it needs to be target.
 

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
751
Reaction score
1,133
First Language
German
Primarily Uses
RMMV
Okay, I got it working now, thank you very much @Trihan !
 

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
751
Reaction score
1,133
First Language
German
Primarily Uses
RMMV
Is it possible to create Wait commands in notetags?
Because I am pretty sure that

this.wait(x);

is not gonna work.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,977
Reaction score
4,591
First Language
English
Primarily Uses
RMMZ
Is it possible to create Wait commands in notetags?
Because I am pretty sure that

this.wait(x);

is not gonna work.
Hmm, that's a good question. What exactly are you trying to do?
 

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
751
Reaction score
1,133
First Language
German
Primarily Uses
RMMV
Well, the problem is esentially that I play animations in some of my notetags, and they cause minor lag upon loading the image files I presume. This in itself is not too bad, but it kind it also makes it really hard sometimes to read the popups (like damage, states, and custom popups etc.) that come with it.

For context, I am using VE_DamagePopup.

Here is an example:
(This is actually a part of the guardian angel state you helped me some time ago with)

<Custom Respond Effect>
if (target.hpRate() === 0) {
target.addState(178);
target.removeState(177);
target.startAnimation(357);

var text = "Guardian Angel! [\\I[4136]]";
var motion = 'Custom 4, Wait, Wait, Wait, Wait, Wait, Custom 3';
var font = "this.standardFontFace()";
var size = 28;
var color = '#ffe75e';
var x = 20;
var y = 20;
user.callCustomPopup(text, motion, font, size, color, x, y);
}
</Custom Respond Effect>

In this case I am displaying a custom popup that comes with the plugin saying "Guardian Angel!" to notify the player that the effect has triggered. However, this popup appears simultaneously to the animation which makes the popup difficult to read since at the time its appearance, there is some "startup-lag"
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,977
Reaction score
4,591
First Language
English
Primarily Uses
RMMZ
Well, the problem is esentially that I play animations in some of my notetags, and they cause minor lag upon loading the image files I presume. This in itself is not too bad, but it kind it also makes it really hard sometimes to read the popups (like damage, states, and custom popups etc.) that come with it.

For context, I am using VE_DamagePopup.

Here is an example:
(This is actually a part of the guardian angel state you helped me some time ago with)

<Custom Respond Effect>
if (target.hpRate() === 0) {
target.addState(178);
target.removeState(177);
target.startAnimation(357);

var text = "Guardian Angel! [\\I[4136]]";
var motion = 'Custom 4, Wait, Wait, Wait, Wait, Wait, Custom 3';
var font = "this.standardFontFace()";
var size = 28;
var color = '#ffe75e';
var x = 20;
var y = 20;
user.callCustomPopup(text, motion, font, size, color, x, y);
}
</Custom Respond Effect>

In this case I am displaying a custom popup that comes with the plugin saying "Guardian Angel!" to notify the player that the effect has triggered. However, this popup appears simultaneously to the animation which makes the popup difficult to read since at the time its appearance, there is some "startup-lag"
In that case you should be able to do $gameTroop._interpreter.wait(x)
 

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
751
Reaction score
1,133
First Language
German
Primarily Uses
RMMV
Unfortunately, this does not seem to do anything.


<Custom Respond Effect>

if (target.hpRate() === 0) {

target.addState(178);
target.removeState(177);
target.startAnimation(357);

$gameTroop._interpreter.wait(20);

var text = "Guradian Angel! [\\I[4136]]";
var motion = 'Custom 4, Wait, Wait, Wait, Wait, Wait, Custom 3';
var font = "this.ExtraFont";
var size = 28;
var color = '#ffe75e';
var x = 20;
var y = 20;
user.callCustomPopup(text, motion, font, size, color, x, y);
}
</Custom Respond Effect>

It's not so bad though, I am sure I'll find another solution besides using a wait command.
Using a wait command was just my first thought since it seems the most straightforward.
 

ScorchedGround

Blizzards most disappointed fan (More than ever)
Veteran
Joined
Apr 12, 2020
Messages
751
Reaction score
1,133
First Language
German
Primarily Uses
RMMV
Is there any way to reference a skills ID inside a skill notetag?
Here is what I've been working with so far:

JavaScript:
<Custom Requirement>
value = $dataSkills[511]._activated ? false : true;
</Custom Requirement>

<Custom Cost Display>
\e['$dataSkills[511]._activated ? "\#\I[1058]" : "\#\I[1060]"']\r
</Custom Cost Display>

<After Eval>
$dataSkills[511]._activated = true;
</After Eval>

I'd like to replace the "511" with something more dynamic, in this case the skill ID of the skill which has the notetag.

After some testing, it seems that

JavaScript:
this.item()

actually returns the skill in question.
However, after trying out

JavaScript:
this.item().id

it seems that this only works with the After Eval notetag.
When it comes the Custom Requirement and Custom Cost Display however,
it's throwing me an error that this.item() is either not defined or not a function.

@Trihan Are there any other options I can try that could work with the above mentioned notetags?
 

zelanius

Mechanics Freak
Veteran
Joined
Apr 29, 2020
Messages
155
Reaction score
45
First Language
English
Primarily Uses
RMMV
Hi, not sure if anyone can help me on this, but I am trying to figure out the script call to add a trait to a character after learning passive skills using YEP's Skill Learn System plugin. The reason I do not want to use states is because, in my experience, it can overwhelm the game and cause the gameplay to be very laggy if everyone is loaded on states from passive skills. Hence, I just wanted to use the Learn Cost Eval function of YEP's Skill Learn System to add traits like learning to use new equipment, or adding the trait that doubles gold. Thanks in advance!
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,533
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Hi, not sure if anyone can help me on this, but I am trying to figure out the script call to add a trait to a character after learning passive skills using YEP's Skill Learn System plugin.
The trick with this is that traits are defined in the database - just changing them in the game won't have a lasting effect.

There are a few plugins you can use to do this, such as Shaz's Dynamic Traits and Effects, or Galv's Dynamic Traits.
 

zelanius

Mechanics Freak
Veteran
Joined
Apr 29, 2020
Messages
155
Reaction score
45
First Language
English
Primarily Uses
RMMV
The trick with this is that traits are defined in the database - just changing them in the game won't have a lasting effect.

There are a few plugins you can use to do this, such as Shaz's Dynamic Traits and Effects, or Galv's Dynamic Traits.
Thanks. I don't think Shaz's plugin has what I need, and while Galv's look promising initially, the script call function just did not work within YEP's Learn Cost Eval for me.

In any case, I just wanted to check if it is possible to use script call to add traits in conjunction with YEP's Skill Learn System. If not, I will be forced to use states, but will try to limit the characters that can learn certain traits to avoid a clunky game.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,533
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Thanks. I don't think Shaz's plugin has what I need, and while Galv's look promising initially, the script call function just did not work within YEP's Learn Cost Eval for me.
What do you need to do that Shaz's plugin can't?
In any case, I just wanted to check if it is possible to use script call to add traits in conjunction with YEP's Skill Learn System.
I'm not sure how my first answer was incomplete, but: yes. There isn't a built-in function that does so, but the code could be figured out. But without one of the aforementioned plugins to provide supporting framework, it won't have any lasting effect.
 

zelanius

Mechanics Freak
Veteran
Joined
Apr 29, 2020
Messages
155
Reaction score
45
First Language
English
Primarily Uses
RMMV
What do you need to do that Shaz's plugin can't?

I'm not sure how my first answer was incomplete, but: yes. There isn't a built-in function that does so, but the code could be figured out. But without one of the aforementioned plugins to provide supporting framework, it won't have any lasting effect.
I just wanted to use Skill Cost Eval to permanently add traits to characters when they learn the skill. I can do this easily with the various parameters but traits is a problem for me. Shaz's plugin, from what I can tell, is entirely based on plugin command, instead of script call. Hence, it does not work with the Skill Cost Eval function in YEP's Skill Learn System plugin. Hope this clarifies why Shaz's plugin will not work.

Also, I am not saying that your answer is incomplete. Just highlighting the issue I faced with the plugins you mention.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,533
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Shaz's plugin, from what I can tell, is entirely based on plugin command, instead of script call. Hence, it does not work with the Skill Cost Eval function in YEP's Skill Learn System plugin. Hope this clarifies why Shaz's plugin will not work.
Plugins are written in JavaScript, so anything the plugin does can be achieved by finding and calling the appropriate function in the plugin's code. Just because the author doesn't tell you what the functions are named (like Yanfly does in some places) doesn't mean one can't read the file and use it :wink:

So that's not a reason the plugin can't do what you want, it's a reason for you to post in Shaz's thread asking for help with the appropriate script calls if you can't read JavaScript well enough to figure it out.

Alternately, Yanfly has a Script Call Plugin Commands plugin that allows you to use plugin commands inside of eval areas without any looking up or asking necessary.

Hope something in there helps!
 

zelanius

Mechanics Freak
Veteran
Joined
Apr 29, 2020
Messages
155
Reaction score
45
First Language
English
Primarily Uses
RMMV
Plugins are written in JavaScript, so anything the plugin does can be achieved by finding and calling the appropriate function in the plugin's code. Just because the author doesn't tell you what the functions are named (like Yanfly does in some places) doesn't mean one can't read the file and use it :wink:

So that's not a reason the plugin can't do what you want, it's a reason for you to post in Shaz's thread asking for help with the appropriate script calls if you can't read JavaScript well enough to figure it out.

Alternately, Yanfly has a Script Call Plugin Commands plugin that allows you to use plugin commands inside of eval areas without any looking up or asking necessary.

Hope something in there helps!
Thanks @ATT_Turan . Unfortunately, I am not very good with JS, but when I read through the plugins, could not find any clues. Will keep trying.
 

zelanius

Mechanics Freak
Veteran
Joined
Apr 29, 2020
Messages
155
Reaction score
45
First Language
English
Primarily Uses
RMMV
Hi All, not sure if anyone could help me out with one issue. I am using the YEP Skill Mastery Levels and Message Eval Text plugins. What I am trying to achieve is to show the Skill Mastery Level next to the skill name instead of as a small number in the corner of the skill icon. However, I cannot, for the life of me, figure out the code. Any help would be greatly appreciated.

Codes I tried (I was testing this on Skill ID 49):
JavaScript:
\evalText<<battler.skillMasteryLevel(49)>>
JavaScript:
\evalText<<user.skillMasteryLevel(49)>>
JavaScript:
\evalText<<this.skillMasteryLevel(49)>>
JavaScript:
\evalText<<$gameActors.actor(a.actorId()).skillMasteryLevel(49)>>
JavaScript:
\evalText<<$gameActors.actor(this.actorId()).skillMasteryLevel(49)>>
JavaScript:
\evalText<<$gameActors.actor(this._actorId()).skillMasteryLevel(49)>>
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,533
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
@zelanius All of your examples are wrong because they all try to make a reference to the actor that is "using" the message - battler, user, this, a, these all must be a part of a function that is "using" or "activating" the code.

But messages don't come from any actor, they're just written there.

So you simply need to use an agnostic reference to a specific actor. You got close at the end, where you started referencing $gameActors, but then you broke it again by talking about a and this. Just put a fricking ID in there :guffaw:

Code:
$gameActors.actor(4).skillMasteryLevel(49)
 

zelanius

Mechanics Freak
Veteran
Joined
Apr 29, 2020
Messages
155
Reaction score
45
First Language
English
Primarily Uses
RMMV
@zelanius All of your examples are wrong because they all try to make a reference to the actor that is "using" the message - battler, user, this, a, these all must be a part of a function that is "using" or "activating" the code.

But messages don't come from any actor, they're just written there.

So you simply need to use an agnostic reference to a specific actor. You got close at the end, where you started referencing $gameActors, but then you broke it again by talking about a and this. Just put a fricking ID in there :guffaw:

Code:
$gameActors.actor(4).skillMasteryLevel(49)
Thanks for the response. Unfortunately, this won't work for me because multiple actors can use the same skill, so I guess I just have to give up on that idea.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,533
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Thanks for the response. Unfortunately, this won't work for me because multiple actors can use the same skill, so I guess I just have to give up on that idea.
Well, then you just need to provide some context. You have never said, for example, where you're trying to display this text.

Is it a message that pops up when the skill is used? Are you looking at it in an actor's skill list in the status menu? There are dozens of ways to reference an actor, but you need to provide some context.
 

zelanius

Mechanics Freak
Veteran
Joined
Apr 29, 2020
Messages
155
Reaction score
45
First Language
English
Primarily Uses
RMMV
Well, then you just need to provide some context. You have never said, for example, where you're trying to display this text.

Is it a message that pops up when the skill is used? Are you looking at it in an actor's skill list in the status menu? There are dozens of ways to reference an actor, but you need to provide some context.
What I am basically trying to do is:
1. Skill 49 as an example can be used by multiple Actors.
2. As an example, I currently have 2 Actors who can use the skill.
3. The skill has up to 5 Mastery levels.
4. I would like to show the skill name as ABC Skill Level \evalText<<code to pull the skill level for the current actor>>
5. If Actor 5 has skill level 5, it will show as ABC Skill Level 5 when I look at Actor's 5 skill list, and if Actor 2 has skill level 2, it will show as ABC Skill Level 2 when I look at Actor's 2 skill list, whether in the main menu or in battle.
 

Latest Threads

Latest Profile Posts

Messing around with fragment shaders (filters). This thing is HUGE and I'm surprised almost no one makes good use of. Even the number of plugins that do this stuff are limited.
ScreenShot_6_28_2022_3_2_40.png

There's 7 main areas in the game that are all connected. This train get's you from an underground lab to the center of someone's subconscious. inside the train you can talk to some of the passengers. but going to the top of it, there's battles.
Speedrunning all character portraits just so they all have the same quality. Not sure if this was a good idea, but now I'm almost done.
We now have a gameplay video!
DrBuni wrote on Akiritas's profile.
That is a cute Link picture, reminds me of the Samurai Jack artstyle.

Forum statistics

Threads
123,152
Messages
1,154,435
Members
161,500
Latest member
VerehrER
Top