How can I change a fixed weapon equipped with a different one?

Okay, I'll explain what I'm trying to do.

I am looking to make a sword that has the Fixed setting, when equipped, at a certain point in the game, it will change to a stronger version of it, being a separate weapon, and as the previous one was equipped, it will also equip instantly.

1748383842614.png

(if you wonder what the ??? is, it's an skill I've been testing that only appears with that sword equipped, I don't show its name because it's a spoiler)
The bad thing is that even though in the event I am testing I use the change equipment command, the weapon does not change to the other one.

I have tried to search for scripts to see if I can disable the fixed state that the first weapon has, to see if it is possible to change it.

The closest script I have found is the Dynamics Features script by Shaz, but the problem is that I can't find what the necessary data_id is (because I don't think I even understand what it is), and the fact that when I apply the call script (remove_feature), I get this error.

1748384656979.png
You can just edit the equipment ID directly via a script command e.g.:

Ruby:
$game_party.leader.change_equip(0, $data_weapons[id of new sword])
You can just edit the equipment ID directly via a script command e.g.:

Ruby:
$game_party.leader.change_equip(0, $data_weapons[id of new sword])
It does not seem to have any effect :/
It does not seem to have any effect :/
Do you have the weapon in inventory at the time? It only works if you actually hold one.

If you need it to "magically" upgrade, try

Ruby:
$game_party.leader.force_change_equip(0, $data_weapons[id])
Do you have the weapon in inventory at the time? It only works if you actually hold one.

If you need it to "magically" upgrade, try

Ruby:
$game_party.leader.force_change_equip(0, $data_weapons[id])
I tried with the weapon equipped, and nothing.

And I also tried with the weapon in the inventory (unequipped), and also nothing.

I can't think what could be causing the problem :/

EDIT

Ok, the new command you posted, it works! Thanks for the Help!
You've possibly got a script interfering with the way equipment works; I just tried it on my sandbox project, and even the regular Change Equip event command works for me to replace a fixed weapon.

Edit: Oh, glad the force method worked for you. You're welcome!

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-change-a-fixed-weapon-equipped-with-a-different-one.177966/