I've been trying to make a forging system that allows you to trade materials to upgrade special weapons to the next tier to keep them from becoming obsolete. To do this, I used Yanfly's Map Select Equip to check which weapon/armor is being selected.
I've got the event itself working, but when it gives me an ID for weapon 1, it generates ID 3005 and Armor 1 gives 3010. I replicated this in a new project and figured out that this problem is because of the independent items from Yanfly's Item Core. The default independent Starting ID is 3000, but that would make weapon 1 be ID 3000 or 3001, not 3005. Also, I have more than 5 weapons, so armor 1 shouldn't be giving an ID of 3010. I'm not sure what's causing the issue with the IDs, so I don't want to set up the system to start at 3005, because I might accidently fix it and ruin the system.
Does anyone know what the problem here is? Thanks in advance!
Need some help with both Yanfly's Item Core and Yanfly's Map Select Equip
● ARCHIVED · READ-ONLY
-
-
The big concern here is that the id's can vary greatly depending on the order weapons and armor are acquired. So whatever you're doing event-wise needs to take that into consideration.
What does the event itself look like? Could you show a screenshot of the event you're trying to make work? -
The big concern here is that the id's can vary greatly depending on the order weapons and armor are acquired. So whatever you're doing event-wise needs to take that into consideration.
What does the event itself look like? Could you show a screenshot of the event you're trying to make work?
This is the event
Yet it gives 3005, and armor 1 does the same but with 3010.
The Item core is set to start independent (Armor and weapons) at 3000.
-
Honestly, I don't think there's a problem here. If you're using independent weapons and armors, you need to know exactly which to affect. If you want the base item ID, the code is something like this (after using Select Equip to get the variable):
item.baseItemId
I'm not 100% familiar with Item Core, but I think you do something like this to reference the item:
$dataWeapons[$gameVariables.value(13)].baseItemId
That should give the base ID of the weapon in question. -
If you want the base item ID, the code is something like this (after using Select Equip to get the variable):
item.baseItemId
I'm not 100% familiar with Item Core, but I think you do something like this to reference the item:
$dataWeapons[$gameVariables.value(13)].baseItemId
That should give the base ID of the weapon in question.
Where would those codes go? I want the player to pick an weapon or armor and get it's ID in variable for a conditional branch. I tried inputting it in control variable but I got an error message. I don't mind if the conditional branches start at 3000 but I want to know why it's giving 3005 so it doesn't change on me later without my knowledge. I tried putting it in a plugin command after using the map equip select screen but it didn't change the variable and still gave a 3005. -
As long as the item exists, the independent item ID shouldn't change. Unless you're replacing the iron sword with another weapon, it shouldn't change on its own. What exactly is the process you're using to upgrade weapons? Once I know that, we can see if you need to worry about changing IDs.
-
As long as the item exists, the independent item ID shouldn't change. Unless you're replacing the iron sword with another weapon, it shouldn't change on its own. What exactly is the process you're using to upgrade weapons? Once I know that, we can see if you need to worry about changing IDs.
I was going to take away the item and give a new one if you gave the materials you need so that it works. The problem is that it starts at 3005 for weapons and 3010 for armor, when neither of them should be starting at that number. I don't want to set up a system if there's a problem with the numbering because it might get fixed and I'd have to do it over. I have no idea why there is an extra 5 slots before the Iron Sword and 10 slots before the Basic Helmet (Armor 1). There are no independent items and there are more than 5 armors, so it can't be that armor is before weapons.
I'll build the system and it'll probably work but if you can think of a way to remove the missing IDs please let me know :) -
In theory, as long as you do the necessary weapon check before the trade, it should be okay. Just make sure you're checking for the BASE item ID, not the independent one, when deciding what to trade.
-
In theory, as long as you do the necessary weapon check before the trade, it should be okay. Just make sure you're checking for the BASE item ID, not the independent one, when deciding what to trade.
So the plugin command would be like this?
MapSelectEquip 13 Weapon item.baseId
or are the two separate commands? -
First, it's the plugin command separate to get the variable. item is just a reference point I used for the item you want to check, so you need to acquire that item through code. As for how, I'm actually lost at this point. What you're attempting is actually pretty complicated, and I'm not super familiar with how Yanfly set up independent items. If you can figure out how to reference the item through the set variable somehow, that should give the item. I just don't know exactly how to do that. My only guess is this:
$dataItems[$gameVariables.value(13)].baseItemId
If that doesn't work, I'm not sure what else to try. -
First, it's the plugin command separate to get the variable. item is just a reference point I used for the item you want to check, so you need to acquire that item through code. As for how, I'm actually lost at this point. What you're attempting is actually pretty complicated, and I'm not super familiar with how Yanfly set up independent items. If you can figure out how to reference the item through the set variable somehow, that should give the item. I just don't know exactly how to do that. My only guess is this:
$dataItems[$gameVariables.value(13)].baseItemId
If that doesn't work, I'm not sure what else to try.
I'll try that. Maybe I can get Yanfly to explain the independent items. Thanks for the help. :)