summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTriteHexagon <37734530+TriteHexagon@users.noreply.github.com>2020-08-08 16:46:17 +0100
committerTriteHexagon <37734530+TriteHexagon@users.noreply.github.com>2020-08-08 16:46:17 +0100
commit568d3a2854ea94b811272f7e27ddf2764159e3e5 (patch)
tree2462d766f6a6d36c456307ea4938a979e1f806c9
parentf639f34369e0fe3be909aab4d6a3f90968fabcd3 (diff)
Fix table of contents
-rw-r--r--Add-more-music-that-changes-at-night.md20
1 files changed, 10 insertions, 10 deletions
diff --git a/Add-more-music-that-changes-at-night.md b/Add-more-music-that-changes-at-night.md
index d0e8bb8..7f994d1 100644
--- a/Add-more-music-that-changes-at-night.md
+++ b/Add-more-music-that-changes-at-night.md
@@ -2,15 +2,15 @@ In DPPt and SuMo/USUM, the music for most areas of the overworld changes during
## Contents
-1. [Understanding how the Johto Wild Battle night version is programmed](#1-Understanding-how-the-Johto-Wild-Battle-night-version-is-programmed)
-2. [Adding a Night version](#2-Adding-a-night-version)
+1. [Understanding how the Johto Wild Battle Night version is programmed](#1-Understanding-how-the-Johto-Wild-Battle-Night-version-is-programmed)
+2. [Adding a new Night version](#2-Adding-a-new-night-version)
3. [Adding the code that switches the music at night](#3-Adding-the-code-that-switches-the-music-at-night)
4. [Adding the rest of the music](#4-Adding-the-rest-of-the-music)
5. [Adding softer drumkits](#5-Adding-softer-drumkits)
-6. [Adding a new wave](#6-Adding-a-new-wave)
+6. [Adding a custom wave](#6-Adding-a-custom-wave)
7. [Adding the Kanto Wild Battle Night theme](#7-Adding-the-kanto-wild-battle-night-theme)
-## Understanding how the Johto Wild Battle Night version is programmed
+## 1. Understanding how the Johto Wild Battle Night version is programmed
You can skip this section, since knowing about how the original night song is programmed isn't necessary to the rest of the tutorial. But if you're curious about how the original night music is programmed or the music engine in general, this is a good way to get started.
If you open the `johtowildbattlenight.asm` file, which contains this particular music, you'll immediately notice it's only 29 lines long, way too short to contain the entire song. This is because, unlike the Night versions in the later gens, this one reuses almost the entire code of the regular Day version. The file pretty much only contains the header defining the different channels (in this case, the Noise channel isn't used) and almost immediately calls the main loop of the Day version for each channel (as defined by the last command in each channel, `sound_loop`). In short, the differences between **the Day and Night version isn't the notes themselves, but the way they are played**. Here are the main differences between the two versions:
@@ -23,7 +23,7 @@ If you open the `johtowildbattlenight.asm` file, which contains this particular
Apart from these changes, we're also going to make a small change to the Noise channel for the music which uses it: define new, lower noise notes to make the music even softer.
-## Adding a new Night version
+## 2. Adding a new Night version
As an example, we'll add the Night version of New Bark Town into the game. [Here's a link to the file containing the original song, plus the night version at the bottom](https://pastebin.com/vhA3P0Xy), with the transformations we have covered earlier. Note that this file uses the depreciated music commands, but the file should still work fine in more recent versions of pokecrystal.
@@ -49,7 +49,7 @@ INCLUDE "audio/music/goldenrodcity.asm"
```
Now it should work, and the new night version should be in the game! You can use it like any other song in the game, for example adding it to a specific map in New Bark Town. But the objective is to play this version only during the night, and in all maps that play the New Bark Town song.
-## Adding the code that switches the music at night
+## 3. Adding the code that switches the music at night
The way we are going to make the game switch the music at night is by "hijacking" the code that loads the music into the wram. But first, we need a way to tell the game what are the "pairs" of songs we want to switch between. We are going to do that through a table.
@@ -134,7 +134,7 @@ RestartMapMusic::
```
Here we're just loading the current map music from the wram to `c` and checking if it needs to be changed using the same function as before.
-## Adding the rest of the music
+## 4. Adding the rest of the music
The rest of the asm files for all overworld music of Gen 2 are in the files below:
* [Azalea Town](https://pastebin.com/XjgQCb8i)
@@ -191,7 +191,7 @@ Of course, you can use this same code to add any new pairs of Day/Night music by
If you try to add all the songs in at the same time, the game will compile and work fine; however, a few songs might sound a bit weird. This because we still have to define the lower noise notes and the respective drumkits. Likewise, although the game will compile, the Viridian City music uses a custom wave, which will also have to be included; if you don't include this, the song will sound weird as well.
-## Adding softer drumkits
+## 5. Adding softer drumkits
First, we need to define these new drumkits.
Edit **audio/drumkits.asm**:
@@ -369,7 +369,7 @@ And add the new "softer" drumkits at the end of the same **drumkits.asm** file:
You may notice the `Drumkit_Empty` on the list of drumkits. This is used to keep the offset between the normal and the softer versions of the drumkit 6 spaces apart (so drumkit $6 is the softer version of drumkit $0, drumkit $7 is the softer version of drumkit $1, etc); no song in the vanilla game uses drumkit $2, so we don't need to define this lower version. This isn't really necessary but this helps in case you need to add in a new Night version of your own.
-## Adding a custom wave
+## 6. Adding a custom wave
For the Viridian City nighttime version to sound correct, we'll need to add in a new wave. This is very easy to do.
@@ -393,7 +393,7 @@ WaveSamples:
This new wave is a "softer" version of wave $4. The music is already pulling the wave from index A, so unless you have any extra custom waves, there shouldn't be an issue.
-## Adding the Kanto Wild Battle Night theme
+## 7. Adding the Kanto Wild Battle Night theme
Adding the Kanto Wild Battle theme works just like any other Night song. Replace the original song with [this file](https://pastebin.com/p19WcKbx) and add a new `Music_KantoWildBattleNight` pointer and `MUSIC_KANTO_WILD_BATTLE_NIGHT` constant.