summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMCboy <atasro2@gmail.com>2018-06-14 04:27:46 +0430
committerMCboy <atasro2@gmail.com>2018-06-14 04:27:46 +0430
commit8fe64b2c5b6bb13f09e6bdc68ba2ff842b1867f6 (patch)
tree73c88a7bad5a85bdfac3c095c430e0411ce1d927
parentcc89416ddf68d1a65b6a206fd5ba66e6aa4d981c (diff)
Created Add a new radio channel (markdown)
-rw-r--r--Add-a-new-radio-channel.md158
1 files changed, 158 insertions, 0 deletions
diff --git a/Add-a-new-radio-channel.md b/Add-a-new-radio-channel.md
new file mode 100644
index 0000000..e1a676d
--- /dev/null
+++ b/Add-a-new-radio-channel.md
@@ -0,0 +1,158 @@
+This tutorial teaches you how to add a new radio channel in pokecrytsal.(radio channels with text coming soon!)
+
+for this tutorial were going to add national park as a channel that plays its music.
+
+
+## Contents
+
+1. [Define a radio constant](#1-define-a-radio-constant)
+2. [Give the type a name](#2-give-the-type-a-name)
+3. [List the type matchups](#3-list-the-type-matchups)
+4. [Make it searchable in the Pokédex](#4-make-it-searchable-in-the-pokédex)
+5. [Update Pokémon types](#5-update-pokémon-types)
+6. [Update move types](#6-update-move-types)
+7. [Change `POLKADOT_BOW` to boost Fairy moves](#7-change-polkadot_bow-to-boost-fairy-moves)
+
+
+## 1. Define a radio constant
+
+
+Edit [constants/radio_constants.asm](../blob/master/constants/radio_constants.asm):
+
+```diff
+; radio channel ids
+; indexes for:
+; - RadioChannelSongs (see data/radio/channel_music.asm)
+; - PlayRadioShow/RadioJumptable (see engine/pokegear/radio.asm)
+; - RadioChannels (see engine/pokegear/radio.asm)
+ const_def
+ const OAKS_POKEMON_TALK ; 00
+ const POKEDEX_SHOW ; 01
+ const POKEMON_MUSIC ; 02
+ const LUCKY_CHANNEL ; 03
+ const BUENAS_PASSWORD ; 04
+ const PLACES_AND_PEOPLE ; 05
+ const LETS_ALL_SING ; 06
+ const ROCKET_RADIO ; 07
+ const POKE_FLUTE_RADIO ; 08
+ const UNOWN_RADIO ; 09
+ const EVOLUTION_RADIO ; 0a
++ const NATIONAL_PARK_RADIO
+```
+
+
+## 2. Define a pointer to the radio station.
+
+
+Edit [engine/pokegear/radio.asm](../blob/master/engine/pokegear/radio.asm):
+
+```diff
+RadioJumptable:
+; entries correspond to constants/radio_constants.asm
+ dw OaksPKMNTalk1 ; $00
+ dw PokedexShow1 ; $01
+ dw BenMonMusic1 ; $02
+ dw LuckyNumberShow1 ; $03
+ dw BuenasPassword1 ; $04
+ dw PeoplePlaces1 ; $05
+ dw FernMonMusic1 ; $06
+ dw RocketRadio1 ; $07
+ dw PokeFluteRadio ; $08
+ dw UnownRadio ; $09
+ dw EvolutionRadio ; $0a
++ dw NationalParkRadio
+```
+
+```diff
+UnownRadio:
+ call StartRadioStation
+ ld a, 1
+ ld [wNumRadioLinesPrinted], a
+ ret
+
+EvolutionRadio:
+ call StartRadioStation
+ ld a, 1
+ ld [wNumRadioLinesPrinted], a
+ ret
++
++NationalParkRadio:
++ call StartRadioStation
++ ld a, 1
++ ld [wNumRadioLinesPrinted], a
++ ret
+```
+
+## 3. Define the music for the channel.
+
+
+Edit [data/radio/channel_music.asm](../blob/master/data/radio/channel_music.asm):
+
+
+```diff
+RadioChannelSongs:
+; entries correspond to radio channel ids
+ dw MUSIC_POKEMON_TALK
+ dw MUSIC_POKEMON_CENTER
+ dw MUSIC_TITLE
+ dw MUSIC_GAME_CORNER
+ dw MUSIC_BUENAS_PASSWORD
+ dw MUSIC_VIRIDIAN_CITY
+ dw MUSIC_BICYCLE
+ dw MUSIC_ROCKET_OVERTURE
+ dw MUSIC_POKE_FLUTE_CHANNEL
+ dw MUSIC_RUINS_OF_ALPH_RADIO
+ dw MUSIC_LAKE_OF_RAGE_ROCKET_RADIO
++ dw MUSIC_NATIONAL_PARK
+```
+
+
+## 4. Set the name of the channel and add a pointer for loading it
+
+```diff
+; 917c3 (24:57c3)
+
+BuenasPasswordName: db "BUENA'S PASSWORD@"
+NotBuenasPasswordName: db "@"
++NationalParkName: db "Narional Park@"
++
++LoadStation_NationalPark:
++ ld a, TESTSTATION_RADIO
++ ld [wCurrentRadioLine], a
++ xor a
++ ld [wNumRadioLinesPrinted], a
++ ld a, BANK(PlayRadioShow)
++ ld hl, PlayRadioShow
++ call Radio_BackUpFarCallParams
++ ld de, NationalParkName
++ ret
+```
+
+
+## 5. Set the channel to a frequency you like
+
+i set mine to 15
+
+```diff
+RadioChannels:
+; entries correspond to constants/radio_constants.asm
+
+; frequency value given here = 4 × ingame_frequency − 2
+ dbw 16, .PKMNTalkAndPokedexShow
+ dbw 28, .PokemonMusic
+ dbw 32, .LuckyChannel
+ dbw 40, .BuenasPassword
+ dbw 52, .RuinsOfAlphRadio
++ dbw 58, .NationalPark
+ dbw 64, .PlacesAndPeople
+ dbw 72, .LetsAllSing
+ dbw 78, .PokeFluteRadio
+ dbw 80, .EvolutionRadio
+ db -1
+```
+
+johto exclusive channel
+
+```diff
+.TestStation:
+ jp LoadStation_TestStation \ No newline at end of file