Combining any two weapons of the same type?

I'm aware that I could easily have two specific weapons combine into another "combination" weapon.


What I am looking for is if there is a way to have any two weapons of the same type (like any two swords), be able


to be combined into the specific combination weapon.


For example lets say I have 4 different swords. I would want swords A and B to make sword E (the combination sword).


I would also want any other combination of 2 of the 4 swords to produce sword E (such as A and C or something like B and D).


Is this possible to do
Anything can be done - in most cases you make all the different weapons in the database, and when the player wants to combine them (by skill, event or whatever) you call a common event that removes the single weapons from inventory and adds the combined weapon.


You'll probably need to use several conditional branches and show choices in the event to ask what the player wants and if the required swords are available.
You'll probably need to use several conditional branches and show choices in the event to ask what the player wants and if the required swords are available.



Yeh I tried making conditional branches (even kept comments on it so all the options wouldnt get mismatched). Only issue is the contents get really long even with just a few weapons and adding more weapons later on seems like a nightmare scenario attempting to change it all again.


Is there a more compact way to do the item checks? I was thinking of having switches checked for each weapon but I'm not sure how to translate that into the correct choices for the user to pick from.


(with there being more than just two weapons and all).


It feels like something is going over my head here but I'm not sure what.


(I could post the common event that calls the conditional branches but its REALLY long. Mainly because it has to consider all combinations: A,B,C//A,B//B,C//A,C.  You get the idea.)
It will always get long.


No matter how you solve the problem (another alternative is to use a crafting script for the combination, but that does nothing for a later separation), you will always have to list every combination possible. The only things that changes between solutions is how those lists look like and sometimes how long they are.


Because no computer can read your mind and create those lists for you.

Original thread: https://forums.rpgmakerweb.com/threads/combining-any-two-weapons-of-the-same-type.61839/