Maliki's Attach Augments EX ver 1.5

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
691
Reaction score
267
First Language
English
Primarily Uses
N/A

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
 
Last edited by a moderator:

digger6

Villager
Member
Joined
Mar 27, 2013
Messages
23
Reaction score
4
First Language
Swedish
Primarily Uses
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%>
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
691
Reaction score
267
First Language
English
Primarily Uses
N/A
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.
 

digger6

Villager
Member
Joined
Mar 27, 2013
Messages
23
Reaction score
4
First Language
Swedish
Primarily Uses

matthew30903

Veteran
Veteran
Joined
Jun 29, 2014
Messages
82
Reaction score
31
First Language
English
Primarily Uses
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?
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
691
Reaction score
267
First Language
English
Primarily Uses
N/A
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.
 

matthew30903

Veteran
Veteran
Joined
Jun 29, 2014
Messages
82
Reaction score
31
First Language
English
Primarily Uses
Thank you for the explanation. Hopefully a solution presents itself, but it is only a mild inconvenience compared to the utility your plugin provides.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
691
Reaction score
267
First Language
English
Primarily Uses
N/A
Updated to allow percentages!
 

digger6

Villager
Member
Joined
Mar 27, 2013
Messages
23
Reaction score
4
First Language
Swedish
Primarily Uses
Fantastic, this let's me create a system with common, rare or epic quality of loot.
 

kovak

Silverguard
Veteran
Joined
Apr 3, 2016
Messages
1,256
Reaction score
1,559
First Language
PT - EN
Primarily Uses
RMMV
Is it possible to add augments to items equiped on actors with this plugin?
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
691
Reaction score
267
First Language
English
Primarily Uses
N/A
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.
 

ThePotatoOfFire

8-bit Obsessed
Veteran
Joined
Jan 15, 2016
Messages
157
Reaction score
58
First Language
English
Primarily Uses
RMMV
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?
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
691
Reaction score
267
First Language
English
Primarily Uses
N/A
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.
 

ThePotatoOfFire

8-bit Obsessed
Veteran
Joined
Jan 15, 2016
Messages
157
Reaction score
58
First Language
English
Primarily Uses
RMMV
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)?
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
691
Reaction score
267
First Language
English
Primarily Uses
N/A
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.
 

digger6

Villager
Member
Joined
Mar 27, 2013
Messages
23
Reaction score
4
First Language
Swedish
Primarily Uses
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:

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)
 
Last edited:

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
691
Reaction score
267
First Language
English
Primarily Uses
N/A
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.
 

Fox536

Veteran
Veteran
Joined
Nov 5, 2015
Messages
173
Reaction score
60
Primarily Uses
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);
};
 

Skurge

" (GASP) What's going on!? "
Veteran
Joined
Jul 12, 2015
Messages
1,184
Reaction score
247
First Language
English
Primarily Uses
N/A
Sorry not to get confused but this is to augment weapons or something yes?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

So I have a lighter work schedule next week. Is that a sign to move on to MZ?
I got a new rpg idea yesterday, titled "The Hero We Summoned to Save Us is a War Criminal from our Past?!"
Work on Yanfly's MZ plug-ins is coming along nicely. Looking forward to getting them: http://www.yanfly.moe/wiki/Core_Engine_VisuStella_MZ
so uh variables can only be used for num lol? I guess I gotta fix that once MZ come out lol

Forum statistics

Threads
100,726
Messages
978,837
Members
132,353
Latest member
BM_ANDERSON
Top