LordOfPotatos

Villager
Member
Joined
Oct 9, 2015
Messages
12
Reaction score
3
First Language
english
Primarily Uses
Is it possible to give the player an equip that comes with an attachment? if it's possible can you randomize it?

I imagine you can use the functions the plugin uses to make new equips when the player uses an attachment from the menu but this seems to be beyond my ability.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
551
Reaction score
530
First Language
german
Primarily Uses
RMMZ
This is a script that I used. It's not 100% perfect and may need some tuning, but it can be a good starting point for you. This script will take the weapon called "Blaster" and attach the augment "Glyph of the Voltage" on it if the Party has both items.

Code:
let weapon = $gameParty.allItems().find(item => item.name == "Blaster");
let augment = $gameParty.allItems().find(item => item.name == "Glyph of the Voltage");

if (weapon && item)
    ItemManager.applyAugmentEffects(weapon, augment, 0, 1);
The 0 represents the slotId and 1 represents "gain", but I forgot what exactly "gain" means.
 

LordOfPotatos

Villager
Member
Joined
Oct 9, 2015
Messages
12
Reaction score
3
First Language
english
Primarily Uses
oh so you just add the equip and the item and then use the item on the new equip.
that seems so obvious now XD
thank you!
 

LordOfPotatos

Villager
Member
Joined
Oct 9, 2015
Messages
12
Reaction score
3
First Language
english
Primarily Uses
got the randomized version working :D

Code:
$gameParty.gainItem($dataWeapons[$gameVariables.value(1)], 1, false);
$gameParty.gainItem($dataItems[$gameVariables.value(2)], 1);

weapon = $gameParty.allItems().find(item => item.name == $dataWeapons[$gameVariables.value(1)].name);
augment = $gameParty.allItems().find(item => item.name == $dataItems[$gameVariables.value(2)].name);

ItemManager.applyAugmentEffects(weapon, augment, 0, 1);
 

Latest Threads

Latest Posts

Latest Profile Posts

Man, this quick One Map game is causing unprecedented amounts of trouble.
I always end up having issues with things i'd never expect.

Capture.PNG

Those friggin mountains man xD
Time for my daily walk/jog ''Literally starts raining while I open the door''
I just discovered there's a giant jellyfish in the Ace RTP. My day is made.

Forum statistics

Threads
112,401
Messages
1,068,057
Members
146,052
Latest member
Prandom
Top