Salvage Items

Name: Salvage Items


Version: 1.1


Author: Mr. Trivel


Created: 2015-12-13


 


What does it do?


Allows players to salvage unneeded items and get something back.


 


Screenshots:


[IMG]http://puu.sh/lTuXB/f6ad1d1803.png[/IMG]


 


How to use?



To make items salvageable just add the following tag to items:



<salvage>


[TYPE] [iD] [QUANTITY] [CHANCE]


</salvage>


 


[TYPE] - Item type. w - weapon, a - armor, i - item


[iD] - ID of the item


[QUANTITY] - How many player gets from salvaging


[CHANCE] - Chance of success - 1.0 - 100%, 0.5 - 50%, 0.04 - 4%


 



Example:


<Salvage>


i 8 1 1


i 8 1 0.75


i 8 1 0.25


</Salvage>






 



Plugin: <Link: Github>


How to download Script. Click the link above, there will be a button named Raw, press Right Click -> Save As.








Terms of Use:


Don't remove the header or claim that you wrote this plugin.


Credit Mr. Trivel if using this plugin in your project.


Free for non-commercial projects.


For commercial use contact Mr. Trivel.




 
Wow this is perfect I was just looking for this 🙂  

An idea for improvement: make the chance of success a formula (unless it is already possible). This will allow the rate to be based on player's stats or skills for example.

Keep up the good work.
Very good plugin, thank you!
I love the idea about this plugin, but I can not get it to work sadly.

I have installed it and can see the Salvage option in the menu. I have made 2 items

0007 Wood

0008 Metal 

 and in my weapons I have a 

0001 Sword

in there I have added in the Note

<Salvage>

i 7 2 1

i 8 1 1

</Salvage>

But when I go in the game and try to salvage the sword its not in the salvage menu. I have tried to give my party some extra swords but still no luck. 

I hope you can help me out here please =)
@Azkarath,


are you using any other plugins?


Version 1.1


 - Crash fix when trying to salvage null object.
I've been trying it aswell and the weapons show up, but the objects not, so salvage fails.


Got this in the Sword's Notetag:


<Salvage>


i 111 1 0.1


i 112 1 0.75


i 113 1 0.25


i 114 1 0.75


</Salvage>


But in game it won't appear.


Driftwood Gaming made a tutorial and Azkarath was stating there that it worked with items but not with weapon/armor.


So it maybe conbflict with Yanfly's Item Core, as it sets weapons/armor to independent items.


I tried after setting the sword as not independent item, then it worked.


However, that's sadly not a solution, only did the test :/.


nosalvage.png
I've been trying it aswell and the weapons show up, but the objects not, so salvage fails.


Got this in the Sword's Notetag:


<Salvage>


i 111 1 0.1


i 112 1 0.75


i 113 1 0.25


i 114 1 0.75


</Salvage>


But in game it won't appear.


Driftwood Gaming made a tutorial and Azkarath was stating there that it worked with items but not with weapon/armor.


So it maybe conbflict with Yanfly's Item Core, as it sets weapons/armor to independent items.


I tried after setting the sword as not independent item, then it worked.


However, that's sadly not a solution, only did the test :/.


View attachment 33357

YF's Independent Items remove the note info from Independents.  You'd have to add a fix to it.


And a request for Mr T.  🙂  Could you make it so certain items are not shown as potential materials as opposed to seeing what you could get, but then not getting it.


I'd rather the player think of gaining a bonus item than losing what looks like a sure thing.


Thanks.
Sounds like something conflicting with individual items then. I'll see how to fix it over the weekend.


P.S. I never knew there was a tutorial!
I made a small plugin to address the issue.


http://pastebin.com/eHzetsjQ


Just put it under the ItemCore Plugin and it should allow weapons and armor to work properly with this plugin.
@Henryetha@Maliki79 Didn't Yanfly add in a parameter specifically to enable keeping independent item notes already?
@Henryetha@Maliki79 Didn't Yanfly add in a parameter spefically to enable keeping independent item notes already?

I don't know.  It might've been added since I made the fix.


I will try with the current version and see if the issue was resolved.


Update:  Looks like YF did correct the issue.  So with that I'd suggest people try updating the itemcore plugin and parameter "Midgame Note Parsing" to True.  (Worked for my plugins. 🙂 )


As an aside, my snippet will still work. 
and parameter "Midgame Note Parsing" to True. 

Oh this is working! Nice!


edit:


so sorry for bothering again.. but sadly, it won't work with DreamX random affixes plugin aswell x.x


DreamX updated his Plugin, everything is working!
@Mr. Trivel


Amazing one! Just one question:


How can I remove the Weapons / Armor categories? I just needed the Item one...
I cannot for the life of me make this work.
4CfADR6

I have the tags in there all other plugins disabled but I cannot get it to show up in the menu.
Is this plugin currently broken by an update or am i doing something wrong?
@GodOfRanch As this plugin has not been updated for a couple of years, I think it is highly unlikely to work in any of the later versions of the engine.
@GodOfRanch As this plugin has not been updated for a couple of years, I think it is highly unlikely to work in any of the later versions of the engine.
Fair enough. It's unfortunate because it's a very simple alternative to yanfly's

Original thread: https://forums.rpgmakerweb.com/threads/salvage-items.52858/