• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Pokeemerald] Ruins of Alph Sliding Puzzles [+ pokefirered]

5,256
Posts
16
Years

Ruins of Alph Sliding Puzzles

VQzqqxR.gif


Just a simple port of the Ruins of Alph sliding puzzles from HG/SS. All four puzzles (Kabuto, Omanyte, Aerodactyl and Ho-Oh) are included with initial layouts as close as possible to how they appear in HG/SS (with some tiles moved due to the loss of the top and bottom rows of tiles for the smaller GBA screen size).

Github branch: https://github.com/sphericalice/pokeemerald/tree/sliding_puzzles

Script usage:
Code:
fadescreen FADE_TO_BLACK
setvar VAR_0x8004, PUZZLE_KABUTO
setvar VAR_0x8005, FALSE // or TRUE if you want to display the solved puzzle
special DoSlidingPuzzle
waitstate
goto_if_eq VAR_RESULT, TRUE, EventScript_PuzzleSolved

The layouts for puzzles are in src/data/sliding_puzzles.h. To add new puzzles, you'll need to define the new puzzle's ID in include/constants/sliding_puzzles.h, add relevant entries to sPuzzleLayouts and sTileOrientations in src/data/sliding_puzzles.h, add your new puzzle's graphics in graphics/sliding_puzzle/puzzles/ and define the graphics at the top of src/data/sliding_puzzles.h as pointed to in sSpriteSheet_Tiles. I don't really have time to write up a full tutorial on adding new puzzles but hopefully the code is self-documenting enough for someone with C experience to understand.

pokefirered branch: https://github.com/Jaizu/pokefirered/tree/sliding_puzzles
by Jaizu
 
Last edited:

Jaizu

Average rom hacker
284
Posts
14
Years
That's pretty cool and hopefully players will find cool uses to it, thanks for sharing o/
 
12
Posts
4
Years
  • Age 26
  • Seen Oct 2, 2023
Thanks a lot for sharing !
That's a cool feature to have.
EDIT : I tried it, but it appeared that solving the puzzle doesn't switch the VAR 0x8005 to TRUE ; so the script cannot continue even if solved.
 
Last edited:
5,256
Posts
16
Years
Thanks a lot for sharing !
That's a cool feature to have.
EDIT : I tried it, but it appeared that solving the puzzle doesn't switch the VAR 0x8005 to TRUE ; so the script cannot continue even if solved.

The special sets VAR_RESULT to TRUE if the player solves the puzzle, but this is obviously volatile so I recommend whatever happens in your script checks that VAR_RESULT is TRUE and sets a flag to remember if so. Then, if the player interacts with the script again, check if that flag is set and set VAR_0x8005 to TRUE if it is to display the solved puzzle. I didnt incorporate flag checking directly into the special as some people may want to reuse individual puzzles in several places and it's pretty simple to just use normal script flag checking to control this logic flow.
 
Last edited:
Back
Top