Skip to content

My First Demo

grunt-lucas edited this page Oct 15, 2024 · 12 revisions

Note: this tutorial assumes that the porytiles executable exists on your system path. It also assumes your pokeemerald project is stored at the $HOME location. If your executable or project lives elsewhere, you'll need to change those paths in the commands below.

This tutorial is a simplified version of the tutorials contained at Compiling A Primary Tileset and Compiling A Secondary Tileset. Check those pages for a more comprehensive look at these topics.

  1. Open a pokeemerald project (pokefirered and pokeruby are also supported via command line options) in Porymap. Porytiles supports both dual-layer-tile and triple-layer-tile project configurations.

  2. In Porymap's menu bar, select Tools -> New Tileset. Create a primary set called PorytilesPrimaryTest.

  3. In Porymap's leftside panel, right click one of the map groups and create a new map called PorytilesTestMap. For this map's primary tileset, select gTileset_PorytilesPrimaryTest. Then save the map.

  4. Run one of the following commands, depending on the layer type of your project.

Dual layer:

porytiles compile-primary -Wall -dual-layer -o $HOME/pokeemerald/data/tilesets/primary/porytiles_primary_test Resources/Examples/simple_primary_1 Resources/Examples/metatile_behaviors.h

Triple layer:

porytiles compile-primary -Wall -o $HOME/pokeemerald/data/tilesets/primary/porytiles_primary_test Resources/Examples/simple_primary_1 Resources/Examples/metatile_behaviors.h
  1. In Porymap, select File -> Reload Project.

  2. The metatile picker on the right should now show a basic tileset! Start mapping on your new map, and then save.

  3. Open one of the layer PNGs in Resources/Examples/simple_primary_1 and edit it. Re-run the command from Step 4, and then reload Porymap again like in Step 5. You should see your changes reflected in both the map and the metatile picker.

  4. You can stop here and enjoy! Or, if you want to bring in a secondary set as well, please read on.

  5. In Porymap, select Tools -> New Tileset. Create a secondary set called PorytilesSecondaryTest.

  6. In Porymap, make sure PorytilesTestMap is open. Use the tileset selector to change PorytilesTestMap's secondary tileset to gTileset_PorytilesSecondaryTest. Then save the map.

  7. Again, run the command that corresponds to your project's layer type.

Dual layer:

porytiles compile-secondary -Wall -dual-layer -o $HOME/pokeemerald/data/tilesets/secondary/porytiles_secondary_test Resources/Examples/simple_secondary_1 Resources/Examples/simple_primary_1 Resources/Examples/metatile_behaviors.h

Triple layer:

porytiles compile-secondary -Wall -o $HOME/pokeemerald/data/tilesets/secondary/porytiles_secondary_test Resources/Examples/simple_secondary_1 Resources/Examples/simple_primary_1 Resources/Examples/metatile_behaviors.h
  1. In Porymap, select File -> Reload Project.

  2. Your map now has a custom primary and secondary tileset! Feel free to keep editing these sets to see what Porytiles can do!