Skip to content
Guernouille edited this page Jan 15, 2020 · 12 revisions

This tutorial is for how to add new types for Pokemon or moves. As an example, we'll be adding the Dark type first introduced in Generation II.

Contents

1. Define a type constant

Gen I was before the Physical/Special split, so any types with an index number less than $14 are physical, and anything greater than or equal to it is special. Dark type was classified as a special type in Gen II and III, so we'll include Dark type as Type $1B.

Edit constants/type_constants.asm:

 ; Elemental types
 NORMAL   EQU $00
 FIGHTING EQU $01
 FLYING   EQU $02
 POISON   EQU $03
 GROUND   EQU $04
 ROCK     EQU $05
 BUG      EQU $07
 GHOST    EQU $08
 FIRE     EQU $14
 WATER    EQU $15
 GRASS    EQU $16
 ELECTRIC EQU $17
 PSYCHIC  EQU $18
 ICE      EQU $19
 DRAGON   EQU $1A
+DARK     EQU $1B
  TYPES_END EQU const_value

2. Give the type a name

Edit text/type_names.asm:

TypeNames:

	 dw .Normal
	 dw .Fighting
	 dw .Flying
	 dw .Poison
	 dw .Ground
	 dw .Rock
	 dw .Bird
	 dw .Bug
	 dw .Ghost

	 dw .Normal
	 dw .Normal
	 dw .Normal
	 dw .Normal
	 dw .Normal
	 dw .Normal
	 dw .Normal
	 dw .Normal
	 dw .Normal
	 dw .Normal
	 dw .Normal

	 dw .Fire
	 dw .Water
	 dw .Grass
	 dw .Electric
	 dw .Psychic
 	 dw .Ice
 	 dw .Dragon
+        dw .Dark

 .Normal:   db "NORMAL@"
 .Fighting: db "FIGHTING@"
 .Flying:   db "FLYING@"
 .Poison:   db "POISON@"
 .Fire:     db "FIRE@"
 .Water:    db "WATER@"
 .Grass:    db "GRASS@"
 .Electric: db "ELECTRIC@"
 .Psychic:  db "PSYCHIC@"
 .Ice:      db "ICE@"
 .Ground:   db "GROUND@"
 .Rock:     db "ROCK@"
 .Bird:     db "BIRD@"
 .Bug:      db "BUG@"
 .Ghost:    db "GHOST@"
 .Dragon:   db "DRAGON@"
+.Dark:     db "DARK@"

3. List the type matchups

Edit data/type_effects.asm:

 TypeEffects:
 ; format: attacking type, defending type, damage multiplier
 ; the multiplier is a (decimal) fixed-point number:
 ;     20 is ×2.0
 ;     05 is ×0.5
 ;     00 is ×0
         db WATER,FIRE,20
	 db FIRE,GRASS,20
         ...
        db ICE,DRAGON,20
	db DRAGON,DRAGON,20
+       db DARK,GHOST,20
+       db DARK,PSYCHIC,20
+       db DARK,DARK,05
+       db DARK,FIGHTING,05
+       db GHOST,DARK,05
+       db BUG,DARK,20
+       db FIGHTING,DARK,20
+       db PSYCHIC,DARK,00
        db $ff

4. Update Pokemon Types

Technically, no Gen I Pokemon in their base form had the Dark type retrofitted onto them. So, as an example, we'll give it to Gyarados, who has it in its Mega Evolution. Edit the following in data/baseStats/:

 dex DEX_GYARADOS
 ...
 db 100 ; base special
 db WATER ; species type 1
+db DARK ; species type 2
-db FLYING ; species type 2
 ...
 db 0 ; padding

5. Update the move types

Luckily, one move in Gen I did get retrofitted to be Dark type in Gen II onwards. That move is Bite. So, edit the type column in data/moves.asm:

 Moves:
 ; Characteristics of each move.

 move: macro
	 db \1 ; animation (interchangeable with move id)
	 db \2 ; effect
	 db \3 ; power
	 db \4 ; type
	 db \5 percent ; accuracy
	 db \6 ; pp
 endm

	 move POUND,        NO_ADDITIONAL_EFFECT,        40, NORMAL,   100, 35
 MoveEnd:
 ...
 	move PIN_MISSILE,  TWO_TO_FIVE_ATTACKS_EFFECT,  14, BUG,       85, 20
	move LEER,         DEFENSE_DOWN1_EFFECT,         0, NORMAL,   100, 30
+	move BITE,         FLINCH_SIDE_EFFECT1,         60, DARK,     100, 25
-	move BITE,         FLINCH_SIDE_EFFECT1,         60, NORMAL,   100, 25
        ...
 	move STRUGGLE,     RECOIL_EFFECT,               50, NORMAL,   100, 10

As of now, we have added all that is needed for the Dark type to function. I'd recommend adding some Dark-type Pokemon and moves in order to truly create a polished Dark type. For adding the Steel and Fairy types, the same steps are done as above, but instead of what changes you made above, you would make the changes that apply to your type.

Clone this wiki locally