remove additional equipment using events

Neutimulus

Warper
Member
Joined
Aug 1, 2019
Messages
1
Reaction score
0
First Language
Korean
Primarily Uses
RMVXA
I used "Yanfly's Ace equip Engine" to add 5 to 7 additional equipment slots.
(https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/ace-equip-engine/)

I would like to be able to release it only through certain events when the equipment is worn in the additional equipment slot.
So I gave the fixed effect to the equipment of the additional equipment slot.
However, through the event, it is possible to release only the equipment slots 0 ~ 4 by default (weapons, shields, etc.).

Perhaps it is possible to create an event that releases a device in a specific number of equipment slots through a script.
But I do not know how to do it because I do not have enough knowledge of script.
please help me
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
The script you are using already provides a method for that. Line 619, the method is "change_equip". It is an aliased method (which means that it uses the same name of the one in the default engine), and it allows you to equip things in a certain slot. It takes two parameters: slot_id and item. Slot id is an integer representing your slot index (the first index is 0, which represents your weapon, the second is 1, and so on), while Item can either be a weapon or an armor.

If it is a weapon you have to use $data_weapons[item_id], if it is an armor you have to use $data_armors[item_id]. The final result when trying to equip an item is this (in the example below I am using actor 3, slot 2 and armor 24):
Code:
$game_actors[3].change_equip(2, $data_armors[24])
Do not forget to change those values (3, 2 and 24) to fit your needs, and do not forget that when equipping an item you should remove the said item from the player inventory, when removing an item from the equipment slot, you should add that item to the player inventory. If you do not, your items will respectively have infinite uses or be permanently removed when removing them from the equipment.
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top