xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
172
Reaction score
36
how to use the CustomOnEquipEval to change main character speed when equip fairy boots or fairy wing accessory? thanks.
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
694
Reaction score
620
First Language
German
Primarily Uses
RMMV
@xabileug
Code:
<Custom On Equip Eval>
if (user.actorId() === $gameParty.leader().actorId()) {
$gamePlayer.setMoveSpeed(6);
}
</Custom On Equip Eval>

<Custom On Remove Equip Eval>
if (user.actorId() === $gameParty.leader().actorId()) {
$gamePlayer.setMoveSpeed(4);
}
</Custom On Remove Equip Eval>

Like this for example.

EDIT: We have to make sure to check if the actor that equips this item is the party leader or not.
 
Last edited:

Chazareth

Veteran
Veteran
Joined
Jul 18, 2016
Messages
171
Reaction score
30
First Language
English
Primarily Uses
RMMV
Is WAY_CustomOnEquipEval compatible with YEP_EquipCore? It says to place the plugin below YEP_EquipCore, so I would assume they are but the on equip evals I have set up are only running when YEP_EquipCore is turned off.
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
694
Reaction score
620
First Language
German
Primarily Uses
RMMV
@Chazareth
I will send you a DM with a link to a demo project that you can use to recreate that issue. Then I can take a look at it.
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
191
Reaction score
83
First Language
French
Primarily Uses
RMMV
Just dropping by to say fabulous work and thank you for sharing, Waynee!
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
191
Reaction score
83
First Language
French
Primarily Uses
RMMV
Hi Waynee,

When exactly is the CustomOnEquipEval called when a piece of equipment is equipped? I'm trying to change the character's face upon accepting the selection of a piece of armor in the equip menu.

Edit: found out the script is called immediately when you accept the selection.


Question I now have is: is there a way to run a CommonEvent immediately when changing a piece of equipment, or do we have to exit the equipment menu for the CommonEvent to start?

What I'm trying to do: call the common event that changes the face sprite, the battler, the walker, the set items, etc. while still in equipment menu.

<Custom On Equip Eval>
$gameTemp.reserveCommonEvent(4)
</Custom On Equip Eval>

If not doable, I'll just change the face sprite of the armor and hat temporarily (for aesthetics purpose only), and then run the Common Event when exiting the menu.

Thanks!
 
Last edited:

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
694
Reaction score
620
First Language
German
Primarily Uses
RMMV
@Moon_Haven
The way MV is designed, Common Events cannot run while the menu is open, they only run after the menu is closed.
 

Moon_Haven

Veteran
Veteran
Joined
May 5, 2020
Messages
191
Reaction score
83
First Language
French
Primarily Uses
RMMV
@Moon_Haven
The way MV is designed, Common Events cannot run while the menu is open, they only run after the menu is closed.

That's what I feared... I will have to go with the route of only updating the sprite temporarily until I run the Event when we exit the menu.

Would you be so kind to give me some guidance on the proper code logic that I should use with your plugin?

I want to change the character face depending on two pieces of equipment: hat and body armor.

Let's say I have 9 hats and 9 body armor.
I have made the 100 sprites (combo of 9 hats with each piece of body armor, plus a version without hat or a body armor).

Here's what I was thinking:

3 variables:
1: holds the hat ID
2: holds the body armor ID
3: holds the combo of the hat ID and body ID, (27 for instance would be hat 2 and body 7)


Example: for Hat1

Code:
<Custom On Equip Eval>

    // Set hat
    $gameVariable.setValue(1, 1);
    var temp1 = 1;

    // Get Body armor currently worn
    var temp2 = $gameVariables.value(2) * 10;

    // Calculate hat/body combo
    var temp3 = (temp1 * 10) + temp2;

    // Set sprite
    user.setFaceImage(temp3, 0);
    user.refresh();

</Custom On Equip Eval>


I think the above could potentially work, except in the instance when the player decides to remove the hat or the armor, and go naked... and this is where I think I'm stuck.
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
659
Reaction score
217
First Language
English
Primarily Uses
RMMV
Quick question, using CustomOnEquilEval, what eval string could I use to store the equipped actor's ID into a variable?
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
694
Reaction score
620
First Language
German
Primarily Uses
RMMV
@Vis_Mage
Code:
<Custom On Equip Eval>
$gameVariables.setValue(1, user.actorId());
</Custom On Equip Eval>
 

ScorchedGround

Blizzards most disappointed fan
Veteran
Joined
Apr 12, 2020
Messages
488
Reaction score
696
First Language
German
Primarily Uses
RMMV
Hey, @waynee95 ,
Quick question regarding WAY_EvalText;

I am using some evals in my skill descriptions.
Now, I'd like to display these skill descriptions in a message box.

For that I used the script call

$gameVariables.setValue(Y, $dataSkills[X].description);

And then I just used the \V[x] text code to display the variable.
I also tried using an evaltext INSIDE the message box like this:

${$dataSkills[X].description}

But when I display the description using the variable, the evaltext no longer works.
The rest of the description is displayed perfectly.

Is there any easy way to fix this?

Here is an example of what I mean:

evaltext.png
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
694
Reaction score
620
First Language
German
Primarily Uses
RMMV
@ScorchedGround
Yeah that does not work unfortunately. For now I can only offer a cheesy solution until I can think of something better. But that fill fix your problem.

1. Go into the plugin and add the following piece of code to line 226 in the plugin file.
JavaScript:
window.evalText = evalText;

2. If you want to display the skill description inside a message, you know do this:
Code:
${evalText($dataSkills[X].description)}
 

ScorchedGround

Blizzards most disappointed fan
Veteran
Joined
Apr 12, 2020
Messages
488
Reaction score
696
First Language
German
Primarily Uses
RMMV
@waynee95
I don't mind the solution being cheesy.
The solution seems to work well enough for what I am trying to do.

So thank you very much for your time!
 

Latest Threads

Latest Posts

Latest Profile Posts

Finished with the semester; finally have some time to play around with MV :kaopride:
Started work on the fishing Mini-Game
The Dark Toon art style is now available as Steam branches. (Both for the main game and the demo)
Battle.jpgCaptain.jpgCutsene.jpg
There are 2 versions. One only affects combat, cutscene, and portraits. The other one changes more.
So, technically, the game now has 7 versions on steam.
Arcade-Style RPGM Games? RM2k3 Game Jam & Synth-Retro Music by Azakaela | RPG Maker News #39

Forum statistics

Threads
111,352
Messages
1,060,421
Members
144,682
Latest member
hgrreese
Top