• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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]

Ruins of Alph Sliding Puzzles

[PokeCommunity.com] Ruins of Alph Sliding Puzzles [+ pokefirered]


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:
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:
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