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
559
Reaction score
540
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
559
Reaction score
540
First Language
german
Primarily Uses
RMMZ
With some adjustments, yes for sure.
 

Latest Threads

Latest Posts

Latest Profile Posts

The snowy mountains in my game are finally done... what a crazy journey.
I participated in the official video event collection!
Well I am infinitely upset that I finally got a good idea... after the Touch the Stars game jam is pretty much over.

Gather resources to build a spaceship to escape the apocalypse! It would have been cool....
Thinking that if I get MZ, I'll work on a new Project. How about instead of just an RPG, I make it episodic, like an anime? You might even get fanservice. Oh, but I need the right costume for the character.
"but what even is an API??"

Forum statistics

Threads
113,606
Messages
1,076,163
Members
147,611
Latest member
AeriaGloris123
Top