Skip to content

How To Add A New Type

jcbvns edited this page Sep 2, 2019 · 12 revisions

This tutorial will go over how to add a new type. As an example, we'll be adding the Dark type.

Contents

  1. Define A Type Constant
  2. Give That Constant A Name
  3. List The Type Matchups
  4. Update Pokemon Types
  5. Update Move Types

1. Define A Type Constant

Edit constants/type_constants.asm:

     ; Elemental types
     NORMAL   EQU $00
     ...
     ICE      EQU $19
     DRAGON   EQU $1A
+    DARK     EQU $1B

2. Give That Constant A Name

Edit text/type_names.asm

     TypeNames:

	     dw .Normal
             ...
	     dw .Dragon
+            dw .Dark

     .Normal:   db "NORMAL@"
     ...
     .Dragon:   db "DRAGON@"
+    .Dark:     db "DARK@"

3. List The Type Matchups

Edit data/type_effects.asm

Format Order: Attacking Type,Defending Type,Type Effectiveness (x2 = 20, x0.5 = 05, x0 = 00)

	...
	db DRAGON,DRAGON,20
+	db DARK,GHOST,20
+	db DARK,PSYCHIC,20
+	db DARK,FIGHTING,05
+	db DARK,DARK,05
+	db DARK,FAIRY,05
+	db FIGHTING,DARK,20
+	db BUG,DARK,20
+	db GHOST,DARK,05
+	db PSYCHIC,DARK,00
+	db FAIRY,DARK,20

4. Update Pokemon Type

	db DEX_GYARADOS
	...
	db WATER
-	db FLYING
+	db DARK

5. Update Move Types

	move KARATE_CHOP,  NO_ADDITIONAL_EFFECT,        50, NORMAL,   100, 25
	...
-	move BITE,         FLINCH_SIDE_EFFECT1,         60, NORMAL,   100, 25
+	move BITE,         FLINCH_SIDE_EFFECT1,         60, DARK,     100, 25

And that's it! You've added a new type into the game.