Maliki's Attach Augments EX ver 1.5


Maliki's Attach Augments EX
​


 
​


ver 1.5
​


 
​






Features:  This Plugin allows users of Yanfly's Attach Augments plugin to have preset Augments on items.  Also allows for mandatory slot fills, disallowing slots from having no augment.


HowTo: Required Yanfly's Attach Augment Plugin and any associated Plugins.


Install this Plugin under the Attach Augment plugin.


(Detailed instructions can be found in the plugin's help section.)


Plugin Conflicts:  There shouldn't be any conflicts with this plugin, however let me know if any are found and I'll try to correct them.


Permissions: This plugin can be used in any project, commercial or otherwise, as long as credit is given.


Updated: You can now have random augments preset on items!


Updated: Pre-loaded Augments are now shown when buying in the Shop Scene.  Instance Items must be bought once per slot in the shop per Shop Scene call.  The items reset and reroll random augments every time you enter the shop scene.


Updated: You can now use percentages to determine augments! 


(Those who used previous versions DO NOT need to change note tags unless you wish to take advantage of the update.)


Updated: Updated to address potentially serious memory leak issue.  Those using an older version are very strongly encouraged to update to the current version.


Updated: Updated to allow specific slots to be affected with <augreplaceonly> tags.  Also fixed issues with buying items in shops.


Download: http://pastebin.com/0CDkuEAZ
Is there any chance you could edit this so you could add a percentage chance to each augment chance. 


For example;


<preAugment:item 1 10% or item 2 20%, armor 2 5%, none or armor 4 10%>
Is there any chance you could edit this so you could add a percentage chance to each augment chance. 


For example;


<preAugment:item 1 10% or item 2 20%, armor 2 5%, none or armor 4 10%>

I'll look into it.  In the meantime, you can just put multiples of the same augment to increase the chance of it being added.
ok, thanks
This is a great addition, thank you.


It seems to be preventing buying multiple weapons one after another in a shop seen without closing it first. You mentioned this in the documentation, is there a reason for this?
This is a great addition, thank you.


It seems to be preventing buying multiple weapons one after another in a shop seen without closing it first. You mentioned this in the documentation, is there a reason for this?

In order for the augments to show up in the shop scene, they had to first be created in the database.  And as per YanFly's code, you cannot have more than one instance item at a time.  Therefore you can only buy one at a time.  I considered making the shop reroll a new item every time you bought one, but I couldn't do that without breaking compatibility with most other plugins that work with shops.  If you can think of a solution, I'm always open to the suggestion.
Thank you for the explanation. Hopefully a solution presents itself, but it is only a mild inconvenience compared to the utility your plugin provides.
Updated to allow percentages!
Fantastic, this let's me create a system with common, rare or epic quality of loot.
Is it possible to add augments to items equiped on actors with this plugin?
Is it possible to add augments to items equiped on actors with this plugin?

The augments are added at the time the equip is created.


So if the start a new game, any equips the actors start with can have augments. Also any time you add an equip to your inventory it will roll for augments.


I hope that is sufficient.
Exactly what I was looking for! However, I attempted to dowload it from the pastebin and Windows Defender regognized it as a virus. Any suggestions?
Exactly what I was looking for! However, I attempted to dowload it from the pastebin and Windows Defender regognized it as a virus. Any suggestions?

It's a false positive.  If you really feel unsure about it, you can copy/paste the code into a text file. (You get far enough that you can actually see it, yes?)


Then just name it with the proper file type ( .js ) and you're all set.
Got it to work. I was looking through the help file, and I noticed that the <augreplaceonly> tag is pretty general. Any way to make it more specific (i.e. Augment type)?
Got it to work. I was looking through the help file, and I noticed that the <augreplaceonly> tag is pretty general. Any way to make it more specific (i.e. Augment type)?

Sounds like a good enough reason to update.  I'll look into when time permits.
Got it to work. I was looking through the help file, and I noticed that the <augreplaceonly> tag is pretty general. Any way to make it more specific (i.e. Augment type)?

Updated!
I only found 1 problem with this plugin,
when i try to use <Not Independent Item> from yanfly item core it doesn't respect it and forces all items to be independent.
(YEP_ItemCore 1.26, YEP_CoreEngine 1.24, YEP_X_AttachAugments 1.09, mal_attachaugments_ext 1.5).
Sorry for necroposting

found a typo in the plugin:
line 242: if (item.nonIndepdent) return false; changed to
if (item.nonIndependent) return false; and it works

Another problem, Cannot Detach from attach augments causes the game to crash whem the player receives an item with this setting. Gives this error:

Spoiler: Error
TypeError: Cannot set property '1' of undefined
at Function.ItemManager.applyAugmentCanotDetach (YEP_X_AttachAugments.js:1020)
at Function.ItemManager.processAugmentEffect (YEP_X_AttachAugments.js:822)
at Function.ItemManager.processAugmentList (YEP_X_AttachAugments.js:815)
at Function.ItemManager.installAugmentToSlot (YEP_X_AttachAugments.js:769)
at Function.ItemManager.PreloadAugment (mal_attachaugments_ext.js:134)
at Function.ItemManager.customizeNewIndependentItem (mal_attachaugments_ext.js:102)
at Function.DataManager.addNewIndependentItem (YEP_ItemCore.js:660)
at Function.DataManager.registerNewItem (YEP_ItemCore.js:647)
at Game_Party.gainIndependentItem (YEP_ItemCore.js:1053)
at Game_Party.gainItem (YEP_ItemCore.js:1043)
All of your errors seem to stem from updating YF plugins past what I worked with, which in the case of the Attach Augments one, was 1.08. I'll look into an update that should fix the problems.
Hey Maliki79, you need a patch for the CannotDetach augment, I wrote one if you want to add it

Code:
// Augments - CannotDetach Patch
var ItemManager_applyAugmentCanotDetachPatch = ItemManager.applyAugmentCanotDetach
ItemManager.applyAugmentCanotDetach = function(mainItem, slotId) {
    if (mainItem.augmentSlotEnable == undefined) {
        ItemManager.checkAugmentSlots(mainItem);
    }
    ItemManager_applyAugmentCanotDetachPatch.call(this, mainItem, slotId);
};
Sorry not to get confused but this is to augment weapons or something yes?

Original thread: https://forums.rpgmakerweb.com/threads/malikis-attach-augments-ex-ver-1-5.64821/