Pre-attaching augments to weapons for Yanfly's Attach Augments

Limmoh

Warper
Member
Joined
Mar 12, 2014
Messages
4
Reaction score
1
First Language
Alim
Primarily Uses
Hi everyone! I need some help with Attachable Augments (YEP). (RPGMV)

I'm planning to use the plugin in a different way than its intended. I want weapons to have augments pre-attached to it without needing the player to equip it themselves. Is there any way to do this?

Thanks in advance!
 
Last edited:

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
704
Reaction score
429
First Language
English
Primarily Uses
RMMV
I'm not sure if this will end up being exactly useful for you in your specific use-case, but I used the Item Upgrade Plugin to automatically upgrade items that were created on a specific scene, to allow for player-synthesized items to be stronger than the equivalent item when purchased at a vendor.

JavaScript:
<On Creation Eval>
if (SceneManager._scene.constructor.name == "Scene_Crafting"){
 ItemManager.checkIUSEffects(item, $dataItems[101])
}
</On Creation Eval>
Put that tag on an item, and it will have the same effect. Which is to say, if the item was 'created' when the current scene is Scene_Crafting, it uses the item upgrade function to upgrade the item with the upgrade item in slot 101 in the items database.

You can change this to use the function for attaching augments instead, though I'm not sure what that would be, it shouldn't be hard to find it. You can also change the if check to look for a switch or something instead of the current scene, so you could flip a switch to cause an item to be pre-augmented, or otherwise be normal.

If you want this to be random, this probably won't help you much, but it's a good start.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
323
Reaction score
308
First Language
german
Primarily Uses
RMMZ
Facing the same issue, I did some experiments. This snippet is not perfect, but maybe helps you and/or other people here.

JavaScript:
var weapon = $gameParty.allItems().filter(
    item => item.name == "Blaster")[0];

var augment = $gameParty.allItems().filter(
    item => item.name == "Glyph of Voltage")[0];

ItemManager.applyAugmentEffects(weapon, augment, 0, 1);
As you can see it only works when you have exactly one of the weapon / augment
 

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

Latest Threads

Latest Posts

Latest Profile Posts

12 done, 4-5 started. Now that the weekend is over, things will sloooowwwww down again proabably.
when you're completely done with someone's crap lol...
Ami
--- Survival For RPGist Part 3 ---

F.Healer: Here it is,I made the Simple Sandwich
Survivalist
: it's so Delicious!
Chef: Here you Go! My Gourmet Steak.
Survivalist: It's Super Delicious,Too!
F.Mage: I Made it for you!
F.Healer: Uhh...Charcoal?
F.Mage No,It's a Toast!
Chef: Did you Let it in 10 Minutes?
F.Mage: Maybe?

Forum statistics

Threads
103,033
Messages
996,817
Members
134,507
Latest member
juegostudios
Top