Neareyn

Villager
Member
Joined
Apr 21, 2021
Messages
19
Reaction score
3
First Language
German
Primarily Uses
RMMZ
Hey!

I plan a feature in my game which allows the player to get a random Item in a dungeon. The item will be collectable from a chest and the player can enter the dungeon multiple times to get more items, but never more than one time.

But I couldn't figure out how I can randomize the loot and how I can disable an item that the player already has (I tried to do it with switches and simple eventing but it didn't worked)

So I think I need is a plugin that allows me to get a random event from a trigger, but disable events if a certain switch is off/on.
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
551
Reaction score
530
First Language
german
Primarily Uses
RMMZ
So you want to get random items, but don't get an item twice? I think you can do this with eventing

Code:
loop
  Set Variable "random" as random number
  If Condition random = 1
    if Condition: Party has item "fiery sword"
      do nothing
     else
      gain item "fiery sword"
      break loop
  If Condition random = 2
    If Condition: Party has item "magical cloak"
      do nothing
    else
      gain item "magical cloak"
      beak loop
end loop

Be aware this eventing will break the game if you have all items from the list.
 

Neareyn

Villager
Member
Joined
Apr 21, 2021
Messages
19
Reaction score
3
First Language
German
Primarily Uses
RMMZ
Thank you very much! I will try it out later.
Can I use it as a common Event so it works with multiple maps?
 

Aerosys

Veteran
Veteran
Joined
Apr 23, 2019
Messages
551
Reaction score
530
First Language
german
Primarily Uses
RMMZ
With some adjustments, yes for sure.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,483
Reaction score
5,604
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to MZ Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Latest Threads

Latest Posts

Latest Profile Posts

Figured I would start posting what I am working on here. Anyways, a quest system plugin I have been working on:
20mgjmZ.png


What features would yall like to see in a quest system?
Playing my game to improve my game. (Totally not procrastinating)
Hope he recovers fast :|
Looks like it's functional:
It's a common thing to forget eating &drinking while you are working concentrated, right?
If I had discovered RPG-Maker before moving together with my girlfriend, I'd have died of dehydration a long time ago.

Forum statistics

Threads
112,500
Messages
1,068,726
Members
146,176
Latest member
Spooky_frog
Top