(Answered) (Yanfly) Additional Skill Requirements?

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
Using Yanfly's Skill Core is there a way to add additional weapon requirements for a skill? For example I have a skill called "Burst Shot". In the editor I can have it require up to 2 different kinds of weapons, but I have 4 weapons that I would like to be available.


EG: Burst Shot requires Guns, Bows, Crossbows, or Launchers.


http://yanfly.moe/2015/10/13/yep-8-skill-core/


<Custom Show Eval>


???


</Custom Show Eval>


This seems to be how one would do it.... but I don't know what to put in there. lol


*edit* Thanks to Nekoyoubi for the answer! The correct code is within this link:


https://gist.github.com/nekoyoubi/c360c644036166f619ae820a1ed7b873


Just replace the "2, 4, 6, 8" with the weapon types of your choice.
 
Last edited by a moderator:

Nekoyoubi

Plugin & Utility Developer
Veteran
Joined
May 2, 2013
Messages
92
Reaction score
71
First Language
English
Primarily Uses
I actually am considering extending YEP - Skill Core to give notetags for gear and gear types based on this, but in the meantime, you'll find what you need by setting your <Custom Show Eval> to the following...


var wids = [2,4,6,8];
visible = $gameParty.members().reduce(function(a,b) {
return b.equips().reduce(function(c,d) {
return c || ((d !== null && d.wtypeId !== undefined)
? wids.indexOf(d.wtypeId) >=
: false);
}, a);
}, false)





Replace the "2,4,6,8" with the weapon types you're looking for, and things should be gravy. ;)


Edit: For  space consolidation, and because the RM forums' code box keeps destroying my code, here is a gist that works, and only takes up three total notebox lines: https://gist.github.com/nekoyoubi/c360c644036166f619ae820a1ed7b873
 
Last edited by a moderator:

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
It pops up with "Syntax Error Unexpected Token" after I learn the skill.
 
Last edited by a moderator:

Nekoyoubi

Plugin & Utility Developer
Veteran
Joined
May 2, 2013
Messages
92
Reaction score
71
First Language
English
Primarily Uses
It pops up with "Syntax Error Unexpected Token" after I learn the skill.
Any chance you can send me the actual text you have inside the <tags>?
 

Nekoyoubi

Plugin & Utility Developer
Veteran
Joined
May 2, 2013
Messages
92
Reaction score
71
First Language
English
Primarily Uses
So sorry about that. Fixed the issue. Tested it fully. I just updated the original message so there was no confusion.
 

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
So I tried copy/paste the whole thing as one line and that didn't work. Tried breaking to the next line where you had written return and deleting "return" and that didn't work.


Pretty sure my issue right now is I have no idea where to break it into multiple lines.
 
Last edited by a moderator:

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
That worked perfectly! Thank you! I'll update my first post with your answer.


And actually.. while I have you here maybe you can answer a question I posted in a different thread about a week ago.


Is there any way I could do this same thing with class/subclass?


Example: I can combine Guardian and Paladin in any order of class/subclass to make a Crusader. There's a skill called Templar Strike that is unlocked in the Paladin skill set if you're equipped with both Paladin and Guardian.


I know this:


<Require Class: 37, 3>


<Require Subclass: 37, 3>


Allows me to have the skill greyed out if you don't have the right class combo, but I would love it if it could just disappear off the list entirely without the right class combo.


Bear in mind a Crusader can be formed from Pal/Guardian or Guardian/Pal.


Here's the link to my other post.






*edit* Ack! There's no "best answer" button!
 
Last edited by a moderator:

Nekoyoubi

Plugin & Utility Developer
Veteran
Joined
May 2, 2013
Messages
92
Reaction score
71
First Language
English
Primarily Uses
Nah, no need for a "Best Answer". The [ ♥ Like this ] mostly serves that purpose. The more people "like" the solution, it's generally an indication of acceptance. ;)


Also, let me look into your other post and I'll see what I can come up with. Though, I'm already a bit behind with your extra pools post. ;p
 

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
Aye! I liked it.


And yeah.. I've been making a few posts lately. lol


I try to update my initial post once I find the answer.


Off to work for now!
 
Last edited by a moderator:

Nekoyoubi

Plugin & Utility Developer
Veteran
Joined
May 2, 2013
Messages
92
Reaction score
71
First Language
English
Primarily Uses
Oh, just a side-note. I have it on pretty good authority, that if your reasoning behind adding "(Yanfly)" to your title is to get a fluffy response, you're going to be disappointed. I would suggest dropping that title-tag from your posts. Noting in the OP that you're using YEP - X is usually more than enough, and in most cases, just based on a well constructed title, we all know what you're using going into it. ;)   But again, I'm just giving you my impressions from comments from the bunny itself; do with them what you will.
 

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
On break at the moment. If by "fluffy response" you mean a response by Yanfly himself, then no. I don't expect a response from him when there's probably others who could answer the questions just as well. I put Yanfly I the title so people know before clicking on it that it pertains to his scripts. It would be the same if I put (Yami) or (Victor Engine) in the title. Saves people from clicking on it if it's for a plugin or engine they aren't familiar with.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,240
Members
137,609
Latest member
shododdydoddy
Top