Changing equipment type through weapon equipment (mostly for dual wield)

Status
Not open for further replies.

Seacliff

RPG Maker Mastermind
Veteran
Joined
Nov 8, 2012
Messages
2,982
Reaction score
1,129
First Language
Yes
Primarily Uses
RM2k
Hello, fellow RPG makerers.

To the point, I have an actor that can dual wield. He can also use two weapon types, for now we'll say they are swords and guns. I'm trying to get it so this actor can wield either one or two swords or one or two guns at a time, not both at once.

The way I feel like this would be best fixed is if there was a notetag for swords saying you can't equip guns, and a notetag for the guns saying you can't equip swords. In other words, I want it so I can easily change what types of weapons an actor can or cannot equip without having to change classes.

That's the best I can explain it, if I need to explain more I will. As far as I know Yanfly's Equip, Tsukihime Equip slots, and Formar's custom slots do not have a feature like this. Unless I overlooked something...
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
This can be easily achieved using Tag Manager

It requires some creative thought but once you understand the logic you should probably agree that it's simple.

http://www.himeworks.com/2013/03/07/tag-manager/

If you don't already know about the tag manager, it simply allows you to add "tags" to your database objects.

For example, you might tag your "Long Sword" with a "sword" tag.

The tag itself doesn't mean anything; it's just an arbitrary string of characters. You could just as easily tag it "blah" or "32y187da"

The actor inherits all of the tags from its equips, states, class, and other things.

For example, if an actor was holding a Long Sword, then it has the "sword" tag in its list of tags.

The tag manager allows you to determine whether an object can be equipped based on the existence (or non-existence) of tags.

For example, you can say that a Hand Axe cannot be equipped if you have a "sword" tag.

So the solution is as follows

1. Tag your axes as follows

<tag: axe><tag_cond: !sword>The <tag_cond> is a conditional tag.If the condition is not met, then you can't equip it.

In this case, it means NO "sword" tag (the ! in front of the tag negates it)

2: tag your swords as follows

<tag: sword><tag_cond: !axe>This means that you can't equip a sword if you have an axe tag.Consequently, this means that if you are holding an axe, then you can't equip any swords.

Simply do this for all your axes and swords and now you can easily prevent an actor from holding swords if it's holding an axe.
 
Last edited by a moderator:

Seacliff

RPG Maker Mastermind
Veteran
Joined
Nov 8, 2012
Messages
2,982
Reaction score
1,129
First Language
Yes
Primarily Uses
RM2k
I just tried that, works exactly how I wanted it too, thanks!
 

Lunarea

Artist
Global Mod
Joined
Mar 1, 2012
Messages
8,840
Reaction score
7,797
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 Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top