RMMZ Is there a way (script code) to remove all items...

Indinera

Indie Dev
Regular
Joined
Mar 13, 2012
Messages
2,549
Reaction score
1,282
First Language
French
... from for instance Item ID 25 to 101?
Same question for weapons and armors.
Thanks!
 

Eliaquim

Hakuen Studio
Regular
Joined
May 22, 2018
Messages
3,364
Reaction score
2,675
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi there!

The script call to lose an item is:
$gameParty.loseItem(item, amount, includeEquip)

So, if you want to remove several items Id:
For progressive Ids:

JavaScript:
for(let id = 25; id <= 101; id++){
    $gameParty.loseItem($dataItems[id], 99, false)
}

For non-progressive ids, you can create an array with the ids you want:

JavaScript:
const ids = [25, 34, 40, 30]

for(const id of ids){
    $gameParty.loseItem($dataItems[id], 99, false)
}

replace $dataItems with $dataWeapons or $dataArmors.
 

Latest Threads

Latest Profile Posts

One of my biggest pet peeves? Action Button events not being interactable unless they are same as character.


Like... for why?
The X-Mas and ~ all ~ December long Calendar Project seems to bring my machine right to the limit. A very good oportunity to test what my pc can do. Or at which point I should decide to take a step back from filling the rendering program with assets.
The new grafics card and ram do their job well, that's for sure. My own early Christmas gifts were a good investment.
my laptop keyboard gave up, they keep glitching out, it seems like it's time to finally replace them, honestly surprised it lasted this long.
Tiny setback. Turns out my Title Screen image and one of my primary background & avatar images are AI Generated. Glad I went back and checked all my resource links. So I am in hot pursuit of replacement images. Which is fine since I was still missing some images that I need anyway.
Watching Vibrato Chain Battle System is too awesome! watch I wish had this gfx and animation skill to make such game!

Forum statistics

Threads
136,892
Messages
1,271,123
Members
180,671
Latest member
astra123
Top