Creating New Types

From PMDOWiki
Revision as of 02:59, 8 May 2024 by Trio (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In this walkthrough, we'll add a new type — Sound — into PMDO, which is based on the specification described here. Make your game is set to a mod in Modding Intro so that you’re editing a mod instead of the base game.

Creating the New Type

Begin by creating a new type in the Element list.

Click on Add and set the name to be "sound".

Click OK.

You should see the following page below:

Then do the following steps:

  • Set the Name to be "Sound"
  • Set the Symbol to be "" which represents the unicode \uE093. This will be located next to WaterWater in PMDO's unicode ordering.

Note: As of 0.7.16, you will need to manually open PMDO/MODS/{MOD_NAME}/Elements/sound.json to add the Symbol ""

Your JSON file for Sound should look similar to below:

{
"Version": "0.7.16.0",
"Object": {
"$type": "RogueEssence.Data.ElementData, RogueEssence",
"Name": {
"DefaultText": "Sound",
"LocalTexts": {}
},
"Comment": "",
"Symbol": ""
}
}

Click on OK and save your progress!

Editing Type Matchups

We will be referencing the chart below:

In the Dev Menu, navigate over to Constants -> Universal.

Under Universal States, click on PMDC.Dungeon.ElementTableState.

Below shows how the Type Matchups are ordered/indexed:

Type Ordering
Index Type
0 NoneNone
1 BugBug
2 DarkDark
3 DragonDragon
4 ElectricElectric
5 FairyFairy
6 FightingFighting
7 FireFire
8 FlyingFlying
9 GhostGhost
10 GrassGrass
11 GroundGround
12 IceIce
13 NormalNormal
14 PoisonPoison
15 PsychicPsychic
16 RockRock
17 SteelSteel
18 WaterWater

For example, clicking on the second System.Int32[] (Index 1) opens all the effectiveness of BugBug against all other types. The third element (Index 2) which represents DarkDark is shown with an effectiveness of 5 (see table below).

Below is a table of what effectiveness each number represents.

# Representation Effectiveness
0 No effect
3 Not very effective
4 Neutral
5 Super effective

In this case, the 5 represents that BugBug is super-effective against DarkDark.

Thus, when we add the Sound-type, we need to update each System.Int32[] element to include its matchup against Sound. For example, the first System.Int32[] (Index 0) is NoneTypeless versus all types.

Click on that.

Then click on Add and enter 4 to indicate that NoneTypeless is neutral against Sound.

Click OK and continue adding the rest of the type matchups (19 types in total) against Sound.

We also need to add a new System.Int32[] to represent how effective the Sound-type is against other types.

Under Type Matchups, click on Add.

Then, begin adding the effectiveness number from the table above. You will need add 20 (including Sound) numbers in total in the order corresponding to the indexed Pokémon types table. You should have the following numbers in this specific order: [4, 4, 4, 3, 3, 5, 4, 4, 5, 4, 4, 4, 4, 4, 4, 3, 4, 4, 5, 4].

Lastly, under Type Map, add the key "sound" with the value of 19 representing the 19th index within the Type Matchup table. It is essential that the key is the same name as the one we first created in the Element list.

Click OK and make be sure to save once you are finished!

Adding Type Icon

Remember that we set the Sound icon to "" (\uE093). We now need to modify the base game font to include the icon below.

Save the image and rename it to E093.png.

You should create backup of PMDO/Font/text.font or you can redownload later here.

Then you will need to download the necessary assets (~1.57 GB) here and place the folder the same level as the PMDO executable.

Note: You actually only need the RawAsset/Font directory for this guide.

Your folder structure should have a similar structure below:

MODS/
RawAsset/
├─ font/
│  ├─ text/
│  ├─ yellow/
PMDO

Then move the E093.png into RawAsset/font/text.

Through the command line, run the PMDO executable file like so:

./PMDO -convert font

This might take a couple minutes for the program to finish executing.

Note: This has the side-effect of replacing the current fonts in PMDO/Content/Fonts, hence the backup.

If everything worked correctly, you should see the following files in PMDO/Content/Fonts.

You can move/copy the new text.font into PMDO/MODS/{MOD_NAME}/Content/Fonts.

Viewing Results

We will now modify the one of the Pokémon to be Sound type. In the Dev Menu, navigate to Data->Monster and select Whismur.


Scroll down until you see Forms and click on Whismur.

Scroll down until you see the types and change Element 1 to Sound.

Click OK and save your work!

In the Player tab in the Dev Menu, set your character to be Whismur. You should see that Whismur is now a Sound-type!

!

This concludes adding your custom Pokémon type! You can enter a dungeon and check to see the type matchups are correct. This guide covered modifying the Type Matchup table and font modding! Keep in mind, you will need to modify many Pokémon and moves to be Sound type.