Tutorial:Creating New Types

From PMDOWiki
Revision as of 22:50, 25 August 2023 by Trio (talk | contribs)

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

Type Ordering
Index Type
0 NoneTypeless
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 {TypeIcon|type=Bug}}Bug 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 you will 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.

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