-
Notifications
You must be signed in to change notification settings - Fork 991
Add a new type
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.
Gen I was before the Physical/Special split, so any types with an index number less than $14 are physical, and anything afterwards or equalivent to is special. Dark type was classified as a physical type in Gen II and III, so we'll include Dark type as Type $09.
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
+DARK EQU $09
FIRE EQU $14
WATER EQU $15
GRASS EQU $16
ELECTRIC EQU $17
PSYCHIC EQU $18
ICE EQU $19
DRAGON EQU $1A
TYPES_END EQU const_value
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 .Dark
- 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
.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@"
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
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 it's 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
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.