Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
285
First Language
English, German
Primarily Uses
N/A
Hi!

I'm trying to set up a custom show eval to have a skill only appear if a particular item, say "Pistol", is equipped in the left hand.

<Custom Show Eval>

if ($game_actors[1].equips.include?($data_weapons[6]) false)) {

visible = true;

} else {

visible = false;

}

</Custom Show Eval>

But... I THINK that will show it if it's equipped in either hand, right? And only on actor 1?

Is there a way to tweak this so it shows for any actor who has weapon 6 equipped in the left hand only? (I'm going to make a separate one checking for right hand)
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,646
First Language
Czech
Primarily Uses
RMMV
if (user._equips[1].itemId == 6) {
visible = true
}else {
visible = false
}
explanation: If user's second equip slot contains item with ID 6, it is visible.
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
285
First Language
English, German
Primarily Uses
N/A
How is that that you're so awesome?! Man, you rock. THANK YOU.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,646
First Language
Czech
Primarily Uses
RMMV
I'm not so awesome. I just once wanted to create an item that was equippable only if other items were equipped... Eventually found the solution, however then I realized that I couldn't force the player to not being able to unequip the other items before unequipping this one, so had to work it out differently in the end... :D
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
285
First Language
English, German
Primarily Uses
N/A
Actually, I have an add-on to this question: How would I go about setting it up so that the skill was only visible if the user had two specific items equipped? Like this?

if (user._equips[1].itemId == 6 && user._equips[0].itemId == 7) {
visible = true
}else {
visible = false
}
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,646
First Language
Czech
Primarily Uses
RMMV
yup, exactly.
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
285
First Language
English, German
Primarily Uses
N/A
@Poryg I hate to drag you back here... but I just got around to actually testing this, and it's not working. With:

<custom show eval>

if (user._equips[0].itemId == 6) {

visible = true;

} else {

visible = false;

}

</custom show eval>

The skill isn't appearing when I have weapon ID 6 equipped in my first slot. (Doesn't work with equips[1] and the second slot either). If I remove the custom show eval, the skill appears as normal. I tried swapping "itemId" for "weaponId" in case it was trying to read for an "item" type item in the database, but that didn't work either.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,646
First Language
Czech
Primarily Uses
RMMV
Sorry, I typed before I thought. I checked it now to be 100% sure.

user._equips[0]._item._itemId == 6 is correct. I forgot the _item thing.
Next time if you want to check for yourself, launch the game, press f8 to bring the console and use $gameActors.actor(actorId), it will sghow you everything about the actor.
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
285
First Language
English, German
Primarily Uses
N/A
Yeah, I learned about the console last night - I actually found the community discord and was in there getting some help, a kind soul actually came up with some JS that worked. Still haven't managed to get the augment-variable thing working though, unfortunately, kept running into roadblocks. I'm tempted to reach out to Yanfly himself and see what he suggests..
 

Latest Threads

Latest Posts

Latest Profile Posts

Next goal is to make pull & push + lift & throw systems with mouse support and have skill levels in them and action indicators!
>What's your avatar about? Is it yours?
I did not do that drawing. It's a screenshot taken from a comic featuring characters from Touhou such as Tenshi and Iku (the girl in the avatar). It's drawn by someone under the name of Yohane.
Link to the comic (SFW, but navigating around Dynasty Reader is NSFW)
Progress on my game is nearly done, so I figured I show you guys the title screen. I hope you like it!
Title Screen.png
Does this ever happen to anyone?: your making a battle sprite [or any sprite] then when you mess something up you then see it as something diff, then working with it? its hard to say in words but it happens to me all the time
found out how to change pfp, literally there's a hidden thingy on the bottom of it

Forum statistics

Threads
109,167
Messages
1,042,668
Members
141,665
Latest member
beauty143
Top