[Solved] Help with Yanflys Item Requirements

Status
Not open for further replies.

NehpetsYar

Villager
Member
Joined
Jun 1, 2014
Messages
11
Reaction score
5
First Language
English
Primarily Uses
Hello everyone!

I'm using yanfly's plugins and I'm trying to work out how to check the characters level when equipping a weapon using his Item Requirements plugin. I read the documentation and I know its going to require a javascript eval using the
<Custom Enable Requirement> </Custom Enable Requirement> note tags. I've looked around for some time now and have yet to find the answer to this. I'm looking to make a weapon unequipable if the character is say level 10. Thanks for those of you who took the time to read this. Sorry ahead of time if this has been answered a million times already.

I tried something like this to no avail. I'm sure it's way off.
<Custom Enable Requirement>
condition = battler.level >= 10;
</Custom Enable Requirement>
 
Last edited:

xDRAGOONx

Veteran
Veteran
Joined
Jan 22, 2019
Messages
219
Reaction score
173
First Language
English
Primarily Uses
RMMV
You can achieve this through Yanfly's Equip Core Plugin utilizing this notetag:

<Custom Equip Requirement Condition>
if (user.level >= 10) {
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>

Item Requirements is strictly for usable items, not for weapons and armor.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,225
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

NehpetsYar

Villager
Member
Joined
Jun 1, 2014
Messages
11
Reaction score
5
First Language
English
Primarily Uses
Ahh, I see. Thank you very much, I didn't even realize that it wasn't for weapons and armor. I suppose I should read more next time. But I do have what I need for Equip Requirement so I really appreciate it! I apologize for posting in the wrong area, thank you for moving it.
 

xDRAGOONx

Veteran
Veteran
Joined
Jan 22, 2019
Messages
219
Reaction score
173
First Language
English
Primarily Uses
RMMV
I tried something like this to no avail. I'm sure it's way off.
<Custom Enable Requirement>
condition = battler.level >= 10;
</Custom Enable Requirement>
Also, I've had trouble shortening these types of custom requirement condition statements in this way in the past. Maybe it was just me messing up the syntax but I've found it successful more often when I write it out in the same way as it shows in the plugin commands, i.e. in the response I posted earlier.
 

NehpetsYar

Villager
Member
Joined
Jun 1, 2014
Messages
11
Reaction score
5
First Language
English
Primarily Uses
Thanks for the tip, I dabble in JS but thats about as far as it goes. Any help is a big help.
 

xDRAGOONx

Veteran
Veteran
Joined
Jan 22, 2019
Messages
219
Reaction score
173
First Language
English
Primarily Uses
RMMV
I'm glad to help, honestly. I am still learning as well but these formus have definitely gone a long way to help me get to where I am now. Other than just trying to solve my own problems, trying to help solve other issues that come up helps me learn so much more than I would by working on my own game alone.
:rock-left: :LZYcool: :rock-right:
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,225
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top