diff options
author | Idain <luiscarlosholguinperez@outlook.com> | 2022-03-19 20:08:05 -0400 |
---|---|---|
committer | Idain <luiscarlosholguinperez@outlook.com> | 2022-03-19 20:08:05 -0400 |
commit | d73de36e55c3130d5a6e384ccc6b2c5a4259884e (patch) | |
tree | a6e3db9417422e70873846dfcb9474858697b7a2 | |
parent | c6df6752b7f5574aeb823ea31cbbf16a341931a5 (diff) |
Change Content sub-indexes
-rw-r--r-- | Make-wild-Pokémon-encounter-levels-vary.md | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Make-wild-Pokémon-encounter-levels-vary.md b/Make-wild-Pokémon-encounter-levels-vary.md index f5dc497..2c166b9 100644 --- a/Make-wild-Pokémon-encounter-levels-vary.md +++ b/Make-wild-Pokémon-encounter-levels-vary.md @@ -18,13 +18,13 @@ You decide what works best for you and your vision for your fangame! ## Contents 1. [Method #1: Understanding Bug Catching Contest Encounter Code](#1-method-1-understanding-bug-catching-contest-encounter-code) - - [Add max levels in probabilities](#add-max-levels-in-probabilities) - - [Change wild encounter algorithm](#change-wild-encounter-algorithm) - - [Other notes for Method 1](#other-notes-for-method-1) + 1. [Add max levels in probabilities](#11-add-max-levels-in-probabilities) + 2. [Change wild encounter algorithm](#12-change-wild-encounter-algorithm) + 3. [Other notes for Method 1](#13-other-notes-for-method-1) 2. [Method #2: Custom probabilities and level ranges for each encounter table](#2-method-2-custom-probabilities-and-level-ranges-for-each-encounter-table) - - [Adjust data related to wildata constants](#adjust-data-related-to-wildata-constants) - - [Edit the encounter tables](#edit-the-encounter-tables) - - [Fix space issues](#fix-space-issues) + 1. [Adjust data related to wildata constants](#21-adjust-data-related-to-wildata-constants) + 2. [Edit the encounter tables](#22-edit-the-encounter-tables) + 3. [Fix space issues](#23-fix-space-issues) 3. [Method #3: Hijack the surf variance code](#3-method-3-hijack-the-surf-variance-code) @@ -108,7 +108,7 @@ This code is used to randomize wild encounters in the Bug Catching Contest. We t We can see that there's a minimum and maximum level for every wild Pokémon. The last slot, occupied by Venomoth, signals the end of the list. We can use a part of the algorithm of Bug Catching Contest encounters in [engine/overworld/events.asm](../blob/master/engine/overworld/events.asm) to randomize regular wild encounters. -### Add max levels in probabilities +### 1.1. Add max levels in probabilities Edit [data/wild/probabilities.asm](https://github.com/pret/pokecrystal/blob/master/data/wild/probabilities.asm). @@ -135,7 +135,7 @@ Edit [data/wild/probabilities.asm](https://github.com/pret/pokecrystal/blob/mast Both `MaxLevelGrass` and `MaxLevelWater` contain the level buffs to obtain the highest-leveled encounter on that area. For example, if the first slot in the encounter table is Lv. 2, then the max level for the wild Pokémon will be Lv. 4. -### Change wild encounter algorithm +### 1.2. Change wild encounter algorithm Finally, we change the wild encounter algorithm in [engine/overworld/wildmons.asm](../blob/master/engine/overworld/wildmons.asm): @@ -210,7 +210,7 @@ Finally, we change the wild encounter algorithm in [engine/overworld/wildmons.as And there you have it! Wild encounters have been randomized. -### Other notes for method #1 +### 1.3. Other notes for method #1 Take note that the slots in `MaxLevelGrass` and `MaxLevelWater` in [data/wild/probabilities.asm](../blob/master/data/wild/probabilities.asm) correspond to the probability slots in the same file. Also, each slot is tied to the wild Pokémon slots in each map where there are wild encounters. Thus if you use the tutorial to [add a wild Pokémon slot](Add-a-new-wild-Pokémon-slot), you also need to add new slots in `MaxLevelGrass` and/or `MaxLevelWater`. @@ -369,7 +369,7 @@ Let's give a quick explanation. The code works similarly to `ChooseWildEncounter You might have noticed that we did `ld bc, NUM_GRASSMON * 4` at some point and it's because each slot will now contain four bytes (% chance, species, min. level and max. level) instead of two (level, species). We need to make similar changes in other places, too. -### Adjust data related to Wildata constants +### 2.1. Adjust data related to Wildata constants Let's edit data related to `NUM_GRASSMON` and `NUM_WATERMON`. In the same file: @@ -457,7 +457,7 @@ Finally, edit [constants/pokemon_data_constants.asm](../blob/master/constants/po About this last edit, since the encounter tables now have more bytes the data length of each one is bigger, so we needed to adjust the related constants. -### Edit the encounter tables +### 2.2. Edit the encounter tables This is the most tedious part. You'll now have to edit _each encounter table_ to match the new format. For example, this is how it'd look like for Sprout Tower 2F: @@ -526,7 +526,7 @@ This is the most tedious part. You'll now have to edit _each encounter table_ to You have five places to edit: [data/wild/johto_grass.asm](../blob/master/data/wild/johto_grass.asm), [data/wild/kanto_grass.asm](./blob/master/data/wild/kanto_grass.asm), [data/wild/johto_water.asm](../blob/master/data/wild/johto_water.asm), [data/wild/kanto_water.asm](../blob/master/data/wild/kanto_water.asm) and [data/wild/swarm_grass.asm](../blob/master/data/wild/swarm_grass.asm). _Have fun._ -### Fix space issues +### 2.3. Fix space issues Congrats! You edited each encounter table and it probably took you some hours, but you have a new problem: one of your banks is now full and you can't assemble your ROM. An easy way to fix this is to put [engine/overworld/wildmons.asm](../blob/master/engine/overworld/wildmons.asm) in a new section. Go to [main.asm](../blob/master/main.asm): |