Utils: Change Equips

This script provides several utility functions for changing equips. If you are using scripts that provide custom equip types, you won’t be able to use the default change weapon/change armor.

Additional functions can be added as needed.

Download

Script: download here

Installation

In the script editor, place this script below Party Manager and above Main

Usage

There are two ways to equip something

  1. Specifying a particular slot ID, or
  2. Specifying a particular etype ID

Important: these script calls behave the same way as the regular “change equipment” event command: you must have the equip in your inventory for it to be equipped. This is because wearing a piece of armor is not the same as adding a piece of armor to your inventory and putting it on.

Equip by Slot ID

Slot ID’s are numbered based on the order that they appear for a given actor. The first slot in your list is slot 1, the second slot is 2, and so on.

When you specify a slot ID, the engine will simply try to equip it in that slot. If it doesn’t work, then it will automatically be removed.

The script calls for this are

equip_weapon(actor_id, slot_id, weapon_id)
equip_armor(actor_id, slot_id, armor_id)
equip_item(actor_id, slot_id, item_id)
remove_equip(actor_id, slot_id)

Equip by Etype ID

When you specify an etype ID, the engine will try to find a slot that has the appropriate etype ID. If it finds one, it will equip the item in that slot. If it doesn’t, then it will not do anything.

The script calls for this are

equip_weapon_by_etype(actor_id, etype_id, weapon_id)
equip_armor_by_etype(actor_id, etype_id, armor_id)

You may also like...

17 Responses

  1. Flimbo says:

    Hi Tsukihime,

    I'm using this script together with Core- Equip Slots and Custom Slots. Since I have two accessory slots (same etype), it seems right now the function equip_armor_by_etype locates the first compatible slot, regardless if there is already an accessory equipped there, and equips the item there (the previosly equipped item goes to the inventory). So I was wondering if it would be possible to change the function, to test if there is an avaliable and empty slot of a certain etype, since with those scripts we can have more than one.

    Thanks!

  2. Deathpunkin says:

    I'm trying to use an item, to equip multiple armor/weapons at once.
    it works with standard equipment.

    but I'd like to have it work with etypes. the problem I have is how to get 'actor.id' to refrence the chosen actor instead of using an id.

    so my 'set' works as a potion would. that calls a common event, 'equip armor' on the selected one.

    if that makes sense.

  3. Hime says:

    Added methods for automatically finding slot ID's given an etype ID.

  1. September 29, 2015

    […] start off, get the script from here, open the script editor (F11) and insert it under the “▼ Materials section” and above the […]

Leave a Reply to Deathpunkin Cancel reply

Your email address will not be published. Required fields are marked *