Hey, I'm working on this accessory upgrading system where various equipment can be upgraded into several higher tiers. I would like to implement the following features to streamline this process:
Players can craft with the accessory they have equipped
Players cannot craft with any accessories in their inventory
Once crafted, the new accessory equips itself
Now, as a relative beginner, I'm not even sure if any of these things are possible. Base Terraria doesn't allow equipped items to be crafted with, and if there's away around that, I'm not sure how to make the game avoid crafting with the ones in the player's inventory. I believe replacing the previous equipment with the new one should be relatively easy, but I'd need to find what functions can change the player's inventory like that. This accessory has its own dedicated slot, so it only has to go to one place.
If the other two features get added, I think feature two can be mostly gotten around by only showing the recipe if the required item is equipped, using recipe conditions or something. Maybe even, feature one could be gotten around by requiring nothing in the crafting recipe, and having feature three delete the previous equipment in the slot, assuming feature two works how I just described. However, I have yet to look deeply into the features I could use because I want to hear what more experienced people have to think.
Are any of these ideas possible? If not exact code, what functions should I start looking at that might prove most fruitful? Any pointers in the right direction would be greatly appreciated, before I embark on this adventure.
Players can craft with the accessory they have equipped
Players cannot craft with any accessories in their inventory
Once crafted, the new accessory equips itself
Now, as a relative beginner, I'm not even sure if any of these things are possible. Base Terraria doesn't allow equipped items to be crafted with, and if there's away around that, I'm not sure how to make the game avoid crafting with the ones in the player's inventory. I believe replacing the previous equipment with the new one should be relatively easy, but I'd need to find what functions can change the player's inventory like that. This accessory has its own dedicated slot, so it only has to go to one place.
If the other two features get added, I think feature two can be mostly gotten around by only showing the recipe if the required item is equipped, using recipe conditions or something. Maybe even, feature one could be gotten around by requiring nothing in the crafting recipe, and having feature three delete the previous equipment in the slot, assuming feature two works how I just described. However, I have yet to look deeply into the features I could use because I want to hear what more experienced people have to think.
Are any of these ideas possible? If not exact code, what functions should I start looking at that might prove most fruitful? Any pointers in the right direction would be greatly appreciated, before I embark on this adventure.