Equipped Armor ID to variable?

I am trying to create a fight where a mini boss rips off an actor's clothes and then destroys the clothes with fire forcing the affected actor to finish the last 10% of the fight without equipment. (the boss will not take his weapon)

I need some way to store what the actor has equipped on all equipment slots other than his weapon (I know it will require multiple variables).

I then can just do a change equipment command and set everything to none.

But I need what was equipped removed from the inventory as well. My understanding is that the change equipment command just stores your old equipment in the inventory.

How do I do this? Is there a custom variable call script for this?
yes, and there should be a topic for the script equivalents of all event commands to contain and explain that.
Sorry, I can't answer your question directly because VXA was ten years ago and I don't remember all the ruby code from then. But it is listed in said topic, although you'll need to dig a bit deeper into it.
Will the enemy return the stolen equipment or not? Just asking.
yes, and there should be a topic for the script equivalents of all event commands to contain and explain that.
Sorry, I can't answer your question directly because VXA was ten years ago and I don't remember all the ruby code from then. But it is listed in said topic, although you'll need to dig a bit deeper into it.
That is incorrect. The script call collection thread only has script calls for things that you can already do without scripts. My situation needs something not listed. Plus, there are only 8 replies to that thread, so there is nothing to dig through. Only a couple more scripts were posted in those 8 comments and they still pertain to what you can do without scripts.
That list (if you got the correct one) contains the command to set an equipment by script.
That is the same as reading out what equipment is there just by using that info slighlty different
That list (if you got the correct one) contains the command to set an equipment by script.
That is the same as reading out what equipment is there just by using that info slighlty different

There is not enough information to do what I want.

I see "
$game_actors[id].change_equip_by_id(slot, equip) if $game_actors[id]
# id is actor id
# slot is the slot number (0=weapon, 1=shield, 2=head, 3=body, 4=accessory)
# equip is the weapon or armor id
"

but no clue how to convert it. It appears that it is not the same as reading out what is there.

I assume I have to change something in
"$game_actors[id].change_equip_by_id(slot, equip)"

"$game_actors." something I guess
Well, if you stop ignoring my previous question, I might be able to help you here.
Why do you need to know whether the gear will be returned or not? If you must know, there is an NPC in a nearby town who will give him something better
I guess that makes it way easier than expected. 😮

EDITED

Ruby:
# * Special Equipment Removal ACE * #
#   Scripter : Kyonides Arkanthes
#   2023-05-30

# * Script Calls * #

# - First Step: Find an Actor, namely a Teammate
#   actor = $game_party.members[ActorIndex]

# - Discard Equipment By Index (SlotID)
#   actor.discard_equip_by_index(SlotID)

# - Discard Many of Them By Indexes (SlotIDs)
#   actor.discard_equip_by_indexes(SlotID1, etc.)

# - Discard Equipment By Index (SlotID) and Store it in a Game Variable
#   actor.store_discarded_equip_by_index(VarID, SlotID)

# - Discard Many of Them By Indexes (SlotIDs)
#   -> It will store them in consecutive Game Variables!
#   actor.store_discarded_equip_by_indexes(VarID, SlotID1, etc.)

class Game_Actor
  # Store Equipment ID or Name? :id or :name or :equip (the whole object)
  EQUIP_VAR_MODE = :id
  def discard_equip_by_index(index)
    this_equip = @equips[index]
    this_equip.object = nil if this_equip.object
  end

  def discard_equip_by_indexes(*slot_ids)
    slot_ids.each {|slot_id| discard_equip_by_index(slot_id) }
  end

  def equip_id_or_name(slot_id)
    equip = @equips[slot_id].object
    case EQUIP_VAR_MODE
    when :id
      equip ? equip.id : 0
    when :name
      equip ? equip.name : "?"
    when
      equip
    end
  end

  def store_discarded_equip_by_index(var_id, index)
    $game_variables[var_id] = equip_id_or_name(index)
    discard_equip_by_index(index)
  end

  def store_discarded_equip_by_indexes(var_id, *slot_ids)
    slot_ids.each do |slot_id|
      store_discarded_equip_by_index(var_id, slot_id)
      var_id += 1
    end
  end
end

It includes several instructions on how to use it, but feel free to ask questions if needed.
I ended up moving this fight to later in the game.

@kyonides

Is this how you do this to permanently remove equpped equipment?

1687660027505.png
Why did you add zeroes to those indexes? And by indexes I meant equipment slots starting from 0...
I see "
$game_actors[id].change_equip_by_id(slot, equip) if $game_actors[id]
# id is actor id
# slot is the slot number (0=weapon, 1=shield, 2=head, 3=body, 4=accessory)
# equip is the weapon or armor id
"
These slots? removing head, body, and accessory.

And I do not need the preceding 0s?
Yes, the weapon, the shield or secondary weapon, the helmet, etc.
No leading zeros at all.
Thanks. I probably will not be able to try it out until at least tomorrow
@kyonides

your script is broken!!! It crashes my game every time!!!

1687731933688.png



Code:
Game_Interpreter:1409:in `eval': undefined method `discard_equip_by_indexes' for #<Game_Actor:0x9f56c58>, NoMethodError
    from Game_Interpreter:1409:in `eval'
    from Game_Interpreter:1409:in `command_355'
    from Game_Interpreter:196:in `execute_command'
    from Game_Interpreter:102:in `run'
    from Game_Interpreter:59:in `block in create_fiber'


Fix this please
It probably as simple as "save project before doing battle test"
Nope. I was actually in game when this happens. I talked to the six people that triggers a man to tell me to go to the desert, I talk to that man, which turns on a switch for Palkia to appear. Touch Palkia, battle, and when the Palkia tries to steal the armor, the game always crashes


It makes you save to do a test play.
Then check again if the script is installed
Script is definitely installed
1687732922530.png



Edit: I noticed that the error output does not even mention the script itself whatsoever. This means either the script is not running at all for whatever reason or @kyonides script is all wrong
You see, you don't have to use it. I don't mind, especially if you're involved in one way or another. You're always extremely unpolite, making huge statements about how terrible something is. I'm tired of your bad attitude so I don't care if it works or not.

Original thread: https://forums.rpgmakerweb.com/threads/equipped-armor-id-to-variable.157914/