Condition for dual wield skill

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
Well, as you know, in skill database, the required weapon has two slot weapon type, but it's an "or" condition. That mean if one of two type equipped, the skill can be used. But i'm making a skill for dual wield type, so that i want two equip slot to be equipped with the required weapon, not just one. Is there anyway to make a skill will check if 2 weapon has been equipped or not?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Well, you'd need a custom skill requirement script for that which allows you to use custom RGSS3 methods. I think Yanfly's custom cost script might be able to handle that even if it's not really a cost since the actual checking of conditions and the actual cost handling are separate in that script anyway


If you do use that script, then you'd probably combine the cost checking and the weapon type / equipped weapons check for the requirements part to ensure that he has enough resource to use the skill plus your custom requirement.
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
Well, you'd need a custom skill requirement script for that which allows you to use custom RGSS3 methods. I think Yanfly's custom cost script might be able to handle that even if it's not really a cost since the actual checking of conditions and the actual cost handling are separate in that script anyway

If you do use that script, then you'd probably combine the cost checking and the weapon type / equipped weapons check for the requirements part to ensure that he has enough resource to use the skill plus your custom requirement.
I do use YEA's skill cost, but, one way or another, i think YEA's skill cost will only check if player have item ID or the item ID has been equipped or not, not the slot type has been equipped or not.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
AFAIK, you can use full RGSS3 lines in yanfly's script, so that will be doable as long as you would know the RGSS3 methods that you need to use. Now if the script doesn't allow you to use RGSS3 lines, then yeah, it won't be doable.
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
You can do that I believe. It's just a matter of knowing the correct methods to use.

AFAIK, you can use full RGSS3 lines in yanfly's script, so I think that will be possible.
Is that so? Well, i will try if i can make it or not. (I mean, maybe YEA's script can, but my knowledge is not enough to make it possible).
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
First, make sure if the script can really take RGSS3 lines coz my memory might be wrong (it's been ages since I looked at that script as I never really used it anyway). :)


it would be easy if you just want to check what the two weapons are (or if there's two weapons or not which is as simple as actor_object.weapons.size == 2)... checking which weapon is in which slot might be a bit harder to do based on my initial checking
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
First, make sure if the script can really take RGSS3 lines coz my memory might be wrong (it's been ages since I looked at that script as I never really used it anyway). :)

it would be easy if you just want to check what the two weapons are (or if there's two weapons or not which is as simple as actor_object.weapons.size == 2)... checking which weapon is in which slot might be a bit harder to do based on my initial checking
I don't think i'm gonna check what exactly what that weapon is.

For example, i have an Archer Actor. By using YEA's equip engine, i can make it have 2 slot: "bow" and "arrow". And, i want his skill can only be used if both bow and arrow is equipped. (In case you misunderstood, bow and arrow are equipment, not item, just think of it as dual sword). And, i want his skill can only be used if both bow and arrow is equipped.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
then theoretically, you'd just need to get the equipped weapons then check the weapon type of each of them.

something similar to this I think.

Code:
#save the weapons equipped firstx = actor_object.weapons#return false already in case there's only 1 weaponreturn false if x.size < 2#we check for either bow and arrow equipped#or arrow and bowreturn (x[0].wtype_id == BOW_TYPE_ID and x[1].wtype_id == ARROW_TYPE_ID) or (x[1].wtype_id == BOW_TYPE_ID and x[0].wtype_id == ARROW_TYPE_ID)
 
Last edited by a moderator:

Kuro Neko

Veteran
Veteran
Joined
Sep 26, 2013
Messages
173
Reaction score
15
First Language
English
Primarily Uses
then theoretically, you'd just need to get the equipped weapons then check the weapon type of each of them.

something similar to this I think.

#save the weapons equipped firstx = actor_object.weapons#return false already in case there's only 1 weaponreturn false if x.size < 2#we check for either bow and arrow equipped#or arrow and bowreturn (x[0].wtype_id == BOW_TYPE_ID and x[1].wtype_id == ARROW_TYPE_ID) or (x[1].wtype_id == BOW_TYPE_ID and x[0].wtype_id == ARROW_TYPE_ID)
Sorry for the late reply, Shana. I'm a little busy recently. And, yeah, something like that. I just want the skill to check both weapon equipped if they both are the required type, then allow or not the player to use that skill.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top