Pay up cost, then open 3 chests and clain found contents. Good luck!
This minigame can have configurable prize table, see setup instructions.
Update 28.11.2024:
1. Option to pre-render won prize, ala GB Chest.
2. Configurable Hold Up. Can be enabled for all items, restricted to main prize, or disabled at all.
3. Shadow for all text drawing.
See the new constants inside the script file.
1.Set up 2 sequences of combos, 2 combos each:
Chest - Closed, then open. Both combos must have "none" type and fully solid. Set CMB_CHEST_GAME_CLOSED to closed chest combo.
Rupee then blank - for FFC itself to charge cost.
2. --Prize table building--
Set aside 1 unused screeen. Fill that screen with combos, whose ID`s (order in table, not combo type) are equal to ID`s of prize items, use the same combo multiple times to increase the chance of winning practicular item.
Flag "special item" combos (like heart piece ID) with CF_CHEST_GAME_PRIZE_DATA_MAIN_PRIZE flag, so upon winning this item, Screen`s Special Item flag will set on and any furtner such win cases will reward backup item. Use screen`s undercombo (the screen, where the game is located) to define backup prize ID.
--
3.Place chests in the game screen, using only CMB_CHEST_GAME_CLOSED combos.
4.Place FFC with Rupee combo at location, where Link could pay up cost to start minigame.
D0 - number of chests to open per game
D1 - Map for locating prize table. (step 2)
D2 - Screen used to define prize table. (step 2)
D3 - 1 - turn the game into classic Money making game - Combo ID`s define amout of rupees to gain/lose. CF_CHEST_GAME_PRIZE_DATA_MAIN_PRIZE sets negative number.
D4 - Cost per play, in rupees.
D5 - String to display at screen entrance, usually to render game rules.
D6 - String to display when the game is over
D7 - 1 - allow replaying the game without exiting/reentring screen.
A note on prize data table:
Look at this "jumbled mess" in screenshot #2. Combos in that screeen have IDs that are IDs of items offered as prizes in chest game. To define prize from opened chest, the script picks one combo of that screen at random and spawns item, whose ID is the same, as ID of combo in combo table. For instance, in the top left corner of the screen, you see two pieces of rock, whose ID is #20, the same ID as ID of Triforce Fragment item, These two combos are also flagged with flag #10. The script treats ID`s of flagged combos as "main prize" and sets "Special Item" state, if such prize is won, and then replaces subsequent such pize wins with backup prize, which is defined by undercombo of the screen, where treasure chest minigame is located.
As for Money Game (D3=1), the IDs of combos in that "jumbled mess" define amount of money won/lost, and if flag#10 is placed on that combo, the game treats it as negative, and Link will lose that amount of money. If flag #10 is not set, Link will gain amout of rupees, equal to ID of the randomly picked combo.