I'm looking for a script that does 2 things with equipping:
1) Change the way the game populates the list of items to display (that the actor is allowed to equip) when [OK] is pressed on an equipment slot. Specifically, when you click [OK] on an equipment slot, the only items that should appear on the list are items of the same type as the one already equipped.
For example, if the actor has a sword equipped in the top slot, and the user wants to change it, only swords will be available to choose from, even if he can equip axes, etc. Additionally, there should be no "blank spot" added to the end of this list (the game does this by default to let you de-equip; I don't want to allow empty slots in this game). This also means that if you have 0 other items of the same type as one of your slots, that slot should be disabled/greyed out when the user clicks [OK] on "Change Equips".
The purpose of this rather weird tweak is that, for example, I have an actor who is able to equip 2 weapons - a dagger and an axe. But I don't want him able to equip 2 daggers or 2 axes. All of the actors actually function this way, just with different types of weapons.
~
2. The second part is that some weapon types should generate an attack, and some shouldn't.
For example, I have a warrior class who, like above, equips an axe and a dagger. This would cause him to attack twice. My wizard class, however, has a staff and a book both equipped as weapon slots. If she were to attack, I'd only want the staff to do any attacking. The same goes for my archer - the arrows equipped as their own separate weapon serve only to customize your weapon, not to provide a second attack.
I'm hoping to be able to fire some sort of tag into the notes of any weapon that should not be swung when attack is selected.
I don't know how farfetched this sounds, but if someone can do it, I'll be eternally grateful!
I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
What happens if they have NOTHING equipped in the top slot? What if they have multiple weapon types and they WANT to choose a different type (what if he can equip swords, axes or spears, and he has a sword in one slot and an axe in another? How does he equip the spear?)
Well, the idea is that there will never be nothing equipped in a weapon slot. There are four actors: one who equips swords and shields (only), one who equips staves and books (only), one who equips bows and arrows (only), and one who equips axes and daggers (only). Each actor starts equipped with the lowest form of each of their weapons (yes, shields are being treated as weapons here).
Being that each actor can only equip the two types of "handgear", there is no worry about wanting to equip a third type.
I'll be removing both the Remove All and Optimize options myself. If there is no empty slot at the end of lists of items, and slots are disabled/greyed out for which you have 0 available other items of that type to equip (e.g. my request), then it will be impossible to have nothing in one of those slots. But it must be that there are exactly one of each type - no empty slots, and 1 Bow/1 Arrows as opposed to 2 Arrows or 2 Bows (for example). So, when you click on the Bow to select another Bow to equip, only Bows are displayed, even though the actor can equip Bows and Arrows.
P.S.: They still will equip headgear, bodygear, and accessories as normal.
Isn't unusable weapon types don't appear on the list already?
Also, are you using any scripts to handle the two weapons? or is it the normal dual wield?
Yes, unusable weapon types already don't show up. What I mean is that (for example), actor "A", who can only equip Staves and Books, should only be able to equip staves in the top hand, and only books in the bottom. I ask this so that the actor can't equip a book in BOTH hands or a staff in BOTH hands - just one of each.
Since the actor starts with a staff in the top hand and a book in the bottom, and since I've made it so these slots can't be empty, I think it would suffice to make it so that the only items that show up on such a list are items of the same type as the item already equipped in that slot. So, if he has a book in his second hand, the list will show only books when the user tries to change the equipment in that slot.
I am using dual-wield to accomplish this. By default, when that actor goes to equip either hand, he gets to pick from all books and all staves. But I want it hand-dependent.
Truthfully, I think what I'm asking is for someone to script in a fifth item class ("weapon2" or something). This "weapon2" class of weapons would populate the list of equippable items for the actor's second hand, while the normal "weapon" class of weapons would show when changing top hand equipment. I'm hoping to be able to identify a weapon as "weapon2" class simply by placing a tag in the notes.
As mentioned in the original post, I'm also looking for a way of limiting which types of weapon generate a second attack while dual-wielding. For example, my warrior is equipped with a dagger and an axe—I want him to attack with both weapons. But the already mentioned actor with staff and book should only attack once (with the staff). I'm also hoping this can be established with a tag in the notes.
~
P.S. I resolved the small issue of making the "blank spot" not show up at the end of these item lists. All I had to do was change:
return true if item == nilto
return false if item == nilin the definition "include?" within Window_EquipItem, and now equipment can't be removed outright.
Okay, so this entire request has gotten incredibly long-winded. Let me abridge this and state concisely exactly what I'm looking for.
(All actors are set to dual-wield, and weapon slots will never be empty)
1. If the player presses OK on "Change" in the equip screen, any slots that you don't have unequipped items in your inventory for should be disabled/greyed out and thus unable to press OK on. This prevents the default action of showing an item window with only a blank to select should the player press OK on a slot for which the party has no equippable items. E.g., if an actor can only equip axes, knives, and heavy armour, then: the headgear slot would be disabled if you have no heavy helms unequipped in your inventory; the top weapon slot would be disabled if you have no other axes; the bottom slot disabled if you have no other knives, and so on.
2. If the player presses OK on either of the top 2 equipment slots, the only items available to equip will be items that are BOTH: able to be equipped by the actor; AND are of the same type as the item already in that slot. The slot will never be empty. E.g., if an actor can only equip staves and books, I will start him with a staff in the first weapon slot and a book in the second. When the player tries to change the staff equipped in the top hand, only staves will be available. When the player tries to change the book in the second hand, only books will be available item==nil must NOT be available.
3. If the actor attacks (remember all actors dual-wield), some weapons should generate a second attack, and others should not. E.g., the archer equipped with a bow in the top hand and arrows in the bottom hand should not attack with each weapon—but the warrior with the axe and the dagger should.
This was actually taken care of by not giving them attack animations 😛 .
I realize many may have "what-if" questions, but I really have given this thought, and it's literally exactly what I'm looking for.
Interesting idea, the custom slot script idea sounds good, if there is one that will allow the slot to be auto-disabled when the item list for that slot is empty... I don't really know of one.
As far as making them shield types, this would work for 3 of the 4 actors, but not for the actor who actually holds 2 weapons. I also really dont want arrows and spellbooks listed under 'armours' in the items window.
Well Engr. Adiktuzmiko, I know the rest of the readers can't see the suggestion you made that you thought was wrong and removed, but believe it or not you've put my thinking on the right track again! Your suggestion was far from wrong; it was exactly right.
Engr. Adiktuzmiko had suggested a custom slot script, and I hadn't seen any that fit the bill. So, I started testing all the ones I could find to see if there was something I could tweak. Turns out that HIME's custom slot script works differently than I asked for but does the same job effectively.
Thanks again Engr. Adiktuzmiko! Feel free to seal this one up ^^
I was thinking that you want it to be exactly as a weapon (both of the two) so I was thinking it might not work... I just woke up by the time anyways...