How Do I Combine Shield and Weapin Items into one Menu Catagory?

Cougarmint

Veteran
Veteran
Joined
Sep 19, 2017
Messages
35
Reaction score
14
First Language
English
Primarily Uses
RMVXA
Disclaimer:
I know that there may be a custom script or two out there already, but I am trying to develop a game without having to rely on two many third party scripts.

Basically, I'm working on a game concept that replaces Shields and Helmets with ranged and auxiliary weapons. I'm doing this without any scripting simply by reserving the "weapons" database as a "melee" section, then using the "Shield" and "Helmet" section of the Armors category to create the two new weapons categories. These add extra ability commands to the skill menu, which allow for ranged and auxiliary attacks without having to use the dual wield slot or fiddle with outside scripts that add extra slots or what not, because for the game concept I will only be using one slot for a full "armor set" and a "trinket". Therefore, since the head and shield slots won't be used, I figured I'd re-purpose them.

Because of this, what I want to do is combine the helmets, shields and weapons into one "weapons" category while leaving the armor sets and trinkets in the "Armor" category, retitled "Gear". Therefore, how do I script it so that the menu looks for specific item slots, not just the RPG::Armor tag? Moreso, is it even possible to separate the two? Basically, what are the internal identifiers for shields and helmets, if there are any?

Also, the reason why I'm not using the dual_wield tag is because I don't want the player to be able to use both melee and ranged weapons at the same time, as that would defeat the purpose of having to choose rather to do a melee or ranged attack.

Here's what I have modified as of thus far.

Code:
  def include?(item)
    case @category
    when :item
      item.is_a?(RPG::Item) && !item.key_item?
    when :weapon
      item.is_a?(RPG::Weapon) || item.is_a?(RPG::Armor)
    when :armor
      item.is_a?(RPG::Armor)
    when :key_item
      item.is_a?(RPG::Item) && item.key_item?
    else
      false
    end
  end
If what I'm asking for is impossible, I have a backup idea of just combining everything under the category of "gear" and getting rid of one of the other categories all together.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,920
Reaction score
7,450
First Language
German
Primarily Uses
RMMV
yes, it is possible - there are several scripts for creating categories of items or equipment that you can try to use as a guideline. But it basically requires a rewrite of the equipment scene.

There is one additional problem with your idea that you need to keep in mind:
Weapon data is a bit different than armour data. You can see that in the database itself, where weapons have only one "weapon type" and then an animation setting for the use with normal attack, and the armours have both armour type and equipment type instead.
If you have to make your own categories it might be easier to make new categories by notetags in the weapon section and completely remove the armor option than to transform armors into weapons (because those will be missing the animation data).

That however depends on what exactly you want to do - for other uses it might be enough to simply rename the "armor" into "ranged/auxilliary" in the terms tab of the database.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
https://forums.rpgmakerweb.com/index.php?threads/zs-category-items.107814/
This should probably work for your project. Notetag regular items, weapons and armor items however you want and they can show up in different item categories.

EDIT: you'll also need to fiddle with these lines of Window_ItemCategory code:

Code:
  def make_command_list
    add_command(Vocab::item,     :item)
    add_command(Vocab::weapon,   :weapon)
    add_command(Vocab::armor,    :armor)
    add_command(Vocab::key_item, :key_item)
  end
 

Cougarmint

Veteran
Veteran
Joined
Sep 19, 2017
Messages
35
Reaction score
14
First Language
English
Primarily Uses
RMVXA
@Andar: I appreciate the help, and well aware of the animation thing. That's why I set up the bow so that it adds a skill set + the required skills for said skillset, as seen in the first attachment below. The skills handle all the animation on their own. I actually did the same for the weapons themselves as well, as seen in the second attachment. This leaves the standard "attack" button open as a default "unarmed" hit that I can keep open for a "disarm state", which disables the skill sets attached to the items, forcing the player to use the standard attack if they are afflicted with it. And by attaching skills to the weapons themselves, I can create a variety of weapons that have different damage, look and feel depending on how they are used.

I will definitely look in the "scene" section you were talking about, and hopefully work it out from there. I didn't think to look at that to be honest.

@ZirconStorms I appreciate the script. If I can't get this to work on my own, I will consider using your script. I would rather try to figure it all out on my own though, so I don't have to rely too much on outside scripts.
 

Attachments

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

Latest Threads

Latest Posts

Latest Profile Posts

I think I've got my hero designs pretty much finialised ( still got some tweaks. ) In the end it'll be the four outfit colour variants with four different skintones.

I'm a bit conflicted. One the one hand, it's quite visually cool to make bodies of water that the player can interact with by going into it. However obscuring the player character from a gameplay perspective is pretty bad. Hmm... There's the option to make the area around the player visible, but then that kind of defeats the purpose of submerging them. :unsure:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
Another two plugins done! One being an on map grid inventory.
busy with my newborn child, can't even touch pc at all ;_;

Forum statistics

Threads
104,297
Messages
1,005,351
Members
135,812
Latest member
Yagyu_Chan
Top