Creating Ground Maps

From PMDOWiki
Revision as of 00:43, 12 September 2022 by IDK (talk | contribs) (raw paste)

This tutorial will cover the steps needed to create a Ground Map out of existing PMD map sheets. We will attempt to recreate Temporal Pinnacle from Explorers of Time/Darkness.

Before starting, it is highly recommended you begin with your game set to a mod, so that you’re editing a mod instead of the base game. The tutorial will move forward with that assumption. Tilesheet Import To begin, we need the original spritesheet. You can find one from Spriter’s Resource, Project Pokemon, etc. https://www.spriters-resource.com/resources/sheets/111/114536.png?updated=1551214483 https://projectpokemon.org/home/gallery/image/77281-d30p42apng/




This map consists of two components: The main map and the animated pedestal. We will split them into separate sheets. https://i.imgur.com/8vGCcWP.png https://i.imgur.com/ntHuzya.png

We will be creating a map using 24x24-sized tiles, so we must make sure that both tilesets have dimensions that are multiples of 24.










The Ground Editor can be found in the Data tab when running the game in dev mode:





When you open this editor from the title screen, it will load a blank ground map.


Now, import both TemporalPinnacle and TemporalPinnacleAnim from png:








Both tilesets are now loaded:


Now, load TemporalPinnacle into the map:




This will load the entire tileset into the currently chosen layer:










Navigate to the pedestal with WASD, and press F1 to view the XY coordinates of the cursor.









Next, add a new layer to the map for the animations:


Double-click the layers to change their names:





Click on TemporalPinnacleAnim in the tileset list, and click on any position in the tileset to choose it:











Right-Click to multi-select:












Turn on animations and set the frame length to 30:












Shift+Click to automatically add new frames to the animation. Shift+Right Click to do it while preserving the multiselect:











Do this for the third frame, and then the second frame again to create a full animation cycle:













Click on the map to place your animation:

The pedestal should now animate.








Switch to the map properties and set the name and music:












Now save the map. You must save it in the Data/Ground directory of your mod:


Once saved, you can test it walking around in it:


You will be able to walk around the map, and outside of it.

We are missing a spawn point, so the game spawns us at X0 Y0. There are no walls. Darkness shows at the end of the map. We need to fix all of these issues.



Walls and Entities Click on Edit Ground in the Dev Controls to reopen the editor:

Go to the Walls tab, and click “Show Walls”. Click and drag on the map to draw walls:

You can also use the Rectangle and Fill tool to assist in this. Next, switch to the Entities tab:

Switch to “Add New” mode, and choose an object type of Marker. Markers are spawn points. Name it Entrance, set the Direction to Up.

This will be the main spawn point for the map. Click on the map to place the entity, seen below:

Note that if you place the entity in the wrong spot initially, you can move it using the arrow keys. CTRL+Arrow keys moves the entity by 8 pixels. If you placed the wrong type of entity entirely, you can delete with Right Click. Let’s also add Dialga to this map. Switch to Add New mode, and choose an object type of Character. Name it Dialga.

Set the Direction to Down. Alter the appearance to be Dialga. When we use this character for a future cutscene, it will be waiting at the top.

You can zoom in using scroll wheel for more precise adjustments. F1 can be used to tell positioning. It’s the pair of coordinates on the top-right labeled “OBJ”. Next, switch to the Properties tab:

Set the Scroll Edge to Clamp.


Save and Test.

You should now have a properly blocked, and explorable map. Accessing the Map Your ground map currently exists as a file. However, it must also be made accessible. To do this, you must add it to an existing zone.

Go to the Data tab in the Dev Controls, and click on Zones. Double-click on Guildmaster Island. Scroll down to the Ground Maps section.

Add your map to the end of this list.

Temporal Pinnacle now exists as a part of the Guildmaster Island zone. You can dev-travel to it by using the Travel Tab:


With these settings, click Enter Ground to travel to the ground map.

We still need to make the ground map accessible by normal play. It’s time to edit the script.

We will be adding Temporal Pinnacle to the list of accessible travel destinations in base camp:

We will not require any progress to unlock it.



Navigate to Data/Script/ground/ in your PMDO folder.

This is where scripting for every ground map in the base game is stored. When making mods that change scripts, we need to make a copy from the base game and place it in our mod. Copy the base_camp folder.

And then paste the copy in the Data/Script/ground/ folder in your mod’s folder.









Next, Go into the base_camp folder, and open init.lua in a text editor (Notepad++ recommended)

We are going to edit the north exit to include temporal pinnacle.











Scroll down to the function base_camp.North_Exit_Touch

The list of ground entrances is defined here. Add one more, for Temporal Pinnacle: {Flag=true,Zone=1,ID=13,Entry=0}

Flag stands for the save flag that activates access to this ground map. We set it to true because we always want it unlocked from the start. Zone stands for the zone of the location. Guildmaster Island is Zone 1. ID is the ground map number of the location. Temporal Pinnacle, being at the end of the list, is 13. Entry is the index of the entry point for the ground map. We set it to 0, for the first entry point in the ground map. Save the file.


To bring these changes into effect, either restart the game or reload the scripts. There’s a button for that in the Scripts tab:

You should now be able to access Temporal Pinnacle.

Next, we will add scripts.



Scripting a Cutscene Navigate to Data/Script/Ground/temporal_pinnacle in your mod folder. It should have been created when you saved the ground map. Open init.lua.

You should see an autogenerated script file with stubbed functions.

We are going to fill out the Enter function with a cutscene similar to the rematch dialogue against Dialga in PMD2: https://www.youtube.com/watch?v=750i5NMrgBU We will shorten and adapt this to fit one party member, but can extend it to 2 or more later on.







Make the following edits:

You can find more information about the available script commands in this document: Scripting Cheat Sheet



Save the file, and reload scripts. Re-enter Temporal Pinnacle and the cutscene should play out.


For now, we have made the boss cutscene kick you back to base camp. To make this cutscene lead into an actual boss battle, we need to create the dungeon map. The dungeon map tutorial picks up where this one leaves off: Making Dungeon Maps