Randomize Duel/Item Minigames

MP2 Randomize Duel/Item Minigames

Event Type
  1. Before Player Turn Event
Input Required
Yes (Parameter)
Programming Language
MIPS (Assembly)
Source
Custom-Made
394_29_04_21_11_33_27_0.jpg

These events are designed to allow you to randomize which Duel Minigame or Item Minigame is played on a custom board. While PP64 now accommodates randomisation, these events allow you to select a specific minigame to be played or to give each minigame a different chance of being selected.

The two events work in a similar fashion. There is one parameter, "Selector", which can be set to 0 for minigame randomization or 1-6 to play a specific minigame. The values are as follows:
  • Western Land
  • Pirate Land
  • Horror Land
  • Space Land
  • Mystery Land
  • Bowser Land

If set to randomize the minigame, there is an array inside the event that contains each minigame's percent chance of being played. These chances can be edited by setting each byte equal to that minigame's percent chance plus all the bytes prior in the list. For example, if Western Land's minigame is at 10%, and you want to set Pirate Land's minigame to 25%, you would set the byte for Western Land to 10 (10% chance with 0 minigames before it in the list) and the byte for Pirate Land to 35 (25% chance plus Western Land's 10% chance). The final byte will be 100 (all the minigame chances should sum to 100%).

It is recommended to use the event for randomization as "Before player turn" so that the minigame is randomized at the start of each player's turn. Alternatively, it could be set as "Before turn" and it will randomize at the start of each new turn. You could also set the Item Minigame Randomizer event onto specific spaces with the "Selector" set to a specific minigame, allowing for specific Item Spaces to play specific Item Minigames.

Credit goes to Rain for providing the GetRand function! These events should be Everdrive-compatible. If there are any issues, please feel free to let me know!

NOTE: These events are currently only compatible if Western Land is overwritten.
  • 394_29_04_21_11_33_28_1.jpg
    394_29_04_21_11_33_28_1.jpg
    72.9 KB · Views: 84
Downloads
173
Views
571
Rating
0.00 star(s) 0 ratings
Creator
MarioComix
Version
1.0
First release
Last update

More from MarioComix:

Back
Top