diff options
author | i0brendan0 <i0brendan0@github.com> | 2019-07-08 14:02:42 -0500 |
---|---|---|
committer | i0brendan0 <i0brendan0@github.com> | 2019-07-08 14:02:42 -0500 |
commit | 6007021b525da8d88a9e39889f49a482cb6293ba (patch) | |
tree | 312eb6ece02edfdfd19251acb4aced862083ef37 | |
parent | da5e0402cc3e5038c91c3f446d68973cc2cc4448 (diff) | |
parent | f50c6c7f84bcf9b61124850ca6fa260ba1ded50e (diff) |
Merge branch 'master' of https://github.com/pret/pokecrystal.wiki
-rw-r--r-- | Add-a-new-Pack-pocket.md | 8 | ||||
-rw-r--r-- | Adding-Level-Caps.md | 125 | ||||
-rw-r--r-- | Allow-tiles-to-have-different-attributes-in-different-blocks-(including-X-and-Y-flip).md | 10 | ||||
-rw-r--r-- | Custom-order-for-the-Old-Pokédex-mode.md | 3 | ||||
-rw-r--r-- | Edit-the-Town-Map.md | 4 | ||||
-rw-r--r-- | Expand-the-Town-Map-tileset.md | 2 | ||||
-rw-r--r-- | Sideways-stairs-with-diagonal-movement.md | 2 | ||||
-rw-r--r-- | Tutorials.md | 1 | ||||
-rw-r--r-- | screenshots/player-colors.png | bin | 21696 -> 21669 bytes |
9 files changed, 142 insertions, 13 deletions
diff --git a/Add-a-new-Pack-pocket.md b/Add-a-new-Pack-pocket.md index 406d9c6..c9632eb 100644 --- a/Add-a-new-Pack-pocket.md +++ b/Add-a-new-Pack-pocket.md @@ -790,7 +790,7 @@ These are tilemaps for the pocket name labels in pack_menu.png. Each one is thre .MenuData: db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags db 5, 8 ; rows, columns - db 2 ; horizontal spacing + db SCROLLINGMENU_ITEMS_QUANTITY ; item format dbw 0, wNumBalls dba PlaceMenuItemName dba PlaceMenuItemQuantity @@ -805,7 +805,7 @@ These are tilemaps for the pocket name labels in pack_menu.png. Each one is thre .MenuData: db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP ; flags db 5, 8 ; rows, columns - db 2 ; horizontal spacing + db SCROLLINGMENU_ITEMS_QUANTITY ; item format dbw 0, wNumBalls dba PlaceMenuItemName dba PlaceMenuItemQuantity @@ -820,7 +820,7 @@ These are tilemaps for the pocket name labels in pack_menu.png. Each one is thre +.MenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags + db 5, 8 ; rows, columns -+ db 2 ; horizontal spacing ++ db SCROLLINGMENU_ITEMS_QUANTITY ; item format + dbw 0, wNumBerries + dba PlaceMenuItemName + dba PlaceMenuItemQuantity @@ -835,7 +835,7 @@ These are tilemaps for the pocket name labels in pack_menu.png. Each one is thre +.MenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP ; flags + db 5, 8 ; rows, columns -+ db 2 ; horizontal spacing ++ db SCROLLINGMENU_ITEMS_QUANTITY ; item format + dbw 0, wNumBerries + dba PlaceMenuItemName + dba PlaceMenuItemQuantity diff --git a/Adding-Level-Caps.md b/Adding-Level-Caps.md new file mode 100644 index 0000000..dccffb9 --- /dev/null +++ b/Adding-Level-Caps.md @@ -0,0 +1,125 @@ +1. In engine/battle/experience.asm, go to line 9, `cp LOW(MAX_LEVEL + 1)`. This is what we first need to change. Before the `ld a, d` on the line before it, add +``` ++ ld a, [wLevelCap] ++ inc a ++ push bc ++ ld b, a +``` +After that, below `ld a, d` add +``` ++ cp b ++ pop bc +``` + +2. There are now five more instances of `MAX_LEVEL` that you'll need to change. First, go to line 7149 of engine/battle/core.asm, `ld d, MAX_LEVEL`. Replace this with +``` ++ push af ++ ld a, [wLevelCap] ++ ld d, a ++ pop af +``` +Second, ctrl + f for the next instance of MAX_LEVEL. You'll notice that the line before this reads `ld a, [hl]` Before this line, add +``` ++ ld a, [wLevelCap] ++ push bc ++ ld b, a +``` +Then, after `ld a, [hl]`, add +``` ++ cp b ++ pop bc +``` +Third, ctrl + f for the next instance of MAX_LEVEL. You'll notice there's a `ld a, [wBattleMonLevel]` before it. Before this, add +``` ++ ld a, [wLevelCap] ++ push bc ++ ld b, a +``` +After `ld a, [wBattleMonLevel]`, add +``` ++ cp b ++ pop bc +``` +Fourth, ctrl + f for the next instance of MAX_LEVEL. Replace `ld d, MAX_LEVEL` with +``` ++ push af ++ ld a, [wLevelCap] ++ ld d, a ++ pop af +``` +Fifth, ctrl + f for the final instance of MAX_LEVEL. You'll notice before it reads `ld a, e`. Before this, add +``` ++ ld a, [wLevelCap] ++ push bc ++ ld b, a +``` +Then, after `ld a, e`, add +``` ++ cp b ++ pop bc +``` +Now you're done with replacing the max level checks with the level cap checks. + +3. Now, you need to add wLevelCap to wram.asm in the root folder. In wram.asm, go to line 2668, `wBeverlyFightCount:: db ; unused`. Since this byte is unused, you can replace it. Replace this line with `wLevelCap:: db`. + +4. Optional: You'll notice that the exp. gain text still displays when you reach the level cap. To remove this, go to line 7059 in engine/battle/core.asm, which should be about the lines of +``` + inc de + dec c + jr nz, .stat_exp_loop +``` +Add this routine after it: +``` ++ pop bc ++ ld hl, MON_LEVEL ++ add hl, bc ++ ld a, [wLevelCap] ++ push bc ++ ld b, a ++ ld a, [hl] ++ cp b ++ pop bc ++ jp nc, .next_mon ++ push bc +``` +Next, go to +``` + ld c, PARTY_LENGTH + ld d, 0 +.count_loop +``` +Underneath this, add +``` ++ push bc ++ push de ++ ld a, [wLevelCap] ++ ld b, a ++ ld a, [wPartyCount] ++ cp c ++ jr c, .no_mon ++ ld a, c ++ dec a ++ ld hl, wPartyMon1Level ++ call GetPartyLocation ++ ld a, [hl] ++.no_mon ++ cp b ++ pop de ++ pop bc ++ jr nz, .gains_exp ++ srl b ++ ld a, d ++ jr .no_exp ++.gains_exp +``` +Last, under that is +``` + xor a + srl b + adc d + ld d, a +``` +After this, add `.no_exp` + +To set a level cap, write this in a script: +`loadmem wLevelCap, number from 0 to 255 representing what your level cap should be`
\ No newline at end of file diff --git a/Allow-tiles-to-have-different-attributes-in-different-blocks-(including-X-and-Y-flip).md b/Allow-tiles-to-have-different-attributes-in-different-blocks-(including-X-and-Y-flip).md index 682aa20..fdcd158 100644 --- a/Allow-tiles-to-have-different-attributes-in-different-blocks-(including-X-and-Y-flip).md +++ b/Allow-tiles-to-have-different-attributes-in-different-blocks-(including-X-and-Y-flip).md @@ -589,7 +589,7 @@ The `LoadMetatiles` routine copies data from \*_metatiles.bin (pointed to by `[w We also fixed [the bug that only allowed 128 blocks](../blob/master/docs/bugs_and_glitches.md#loadmetatiles-wraps-around-past-128-blocks), since you'll probably need 256 to take full advantage of this block attribute system. ```diff - ScrollMapDown:: + ScrollMapUp:: hlcoord 0, 0 ld de, wBGMapBuffer call BackupBGMapRow @@ -600,7 +600,7 @@ We also fixed [the bug that only allowed 128 blocks](../blob/master/docs/bugs_an + call BackupBGMapRow ... - ScrollMapUp:: + ScrollMapDown:: hlcoord 0, SCREEN_HEIGHT - 2 ld de, wBGMapBuffer call BackupBGMapRow @@ -611,7 +611,7 @@ We also fixed [the bug that only allowed 128 blocks](../blob/master/docs/bugs_an + call BackupBGMapRow ... - ScrollMapRight:: + ScrollMapLeft:: hlcoord 0, 0 ld de, wBGMapBuffer call BackupBGMapColumn @@ -622,7 +622,7 @@ We also fixed [the bug that only allowed 128 blocks](../blob/master/docs/bugs_an + call BackupBGMapColumn ... - ScrollMapLeft:: + ScrollMapRight:: hlcoord SCREEN_WIDTH - 2, 0 ld de, wBGMapBuffer call BackupBGMapColumn @@ -636,6 +636,8 @@ We also fixed [the bug that only allowed 128 blocks](../blob/master/docs/bugs_an `FarCallScrollBGMapPalettes` used to update `wBGMapPalBuffer` when the screen was scrolled. We deleted it, so now have to update it the same way as `wBGMapBuffer`. +(Note that before June 17, 2019, the names of `ScrollMapUp` and `ScrollMapDown` were mistakenly reversed, as were `ScrollMapLeft` and `ScrollMapRight`.) + ## 8. Finish changing how tile attributes are loaded diff --git a/Custom-order-for-the-Old-Pokédex-mode.md b/Custom-order-for-the-Old-Pokédex-mode.md index 4e803cb..a91059c 100644 --- a/Custom-order-for-the-Old-Pokédex-mode.md +++ b/Custom-order-for-the-Old-Pokédex-mode.md @@ -88,6 +88,7 @@ Edit [main.asm](../blob/master/main.asm): ```diff SECTION "bank10", ROMX +-INCLUDE "engine/pokedex/pokedex.asm" INCLUDE "data/moves/moves.asm" INCLUDE "engine/pokemon/evolve.asm" @@ -97,7 +98,7 @@ SECTION "bank11", ROMX INCLUDE "engine/events/fruit_trees.asm" INCLUDE "engine/battle/ai/move.asm" INCLUDE "engine/pokemon/mail.asm" -INCLUDE "engine/pokedex/pokedex.asm" ++INCLUDE "engine/pokedex/pokedex.asm" INCLUDE "engine/pokedex/pokedex_2.asm" ``` diff --git a/Edit-the-Town-Map.md b/Edit-the-Town-Map.md index 38eb75c..3acdda0 100644 --- a/Edit-the-Town-Map.md +++ b/Edit-the-Town-Map.md @@ -160,7 +160,7 @@ You can minimize those elements by making them only take up two rows. Edit [engi .ok farcall PokegearMap - ld a, $07 -- ld bc, $12 +- ld bc, SCREEN_WIDTH - 2 - hlcoord 1, 2 - call ByteFill - hlcoord 0, 2 @@ -232,7 +232,7 @@ You can minimize those elements by making them only take up two rows. Edit [engi - hlcoord 1, 1 - -; Middle row -- ld bc, 18 +- ld bc, SCREEN_WIDTH - 2 - ld a, " " - call ByteFill - diff --git a/Expand-the-Town-Map-tileset.md b/Expand-the-Town-Map-tileset.md index 78474df..e753ad7 100644 --- a/Expand-the-Town-Map-tileset.md +++ b/Expand-the-Town-Map-tileset.md @@ -187,4 +187,4 @@ Now we're done! With extra tiles and custom colors, your project can have a real  -(Example Town Maps: FRLG-style Kanto by Rangi, HGSS-style Johto from [Polished Crystal](https://github.com/Rangi42/polishedcrystal), RSE-style Hoenn by SaveState, DPPt-style Sinnoh by SaveState, Aurum by Bruhium, and [Brass](https://github.com/WasabiRaptor/Pokemon-Brass/).) +(Example Town Maps: FRLG-style Kanto by Rangi, HGSS-style Johto from [Polished Crystal](https://github.com/Rangi42/polishedcrystal), RSE-style Hoenn by SaveState, DPPt-style Sinnoh by SaveState, Aurum by Bruhium, and Invar by Wasabi_Raptor for [Brass](https://github.com/WasabiRaptor/pokebrass).) diff --git a/Sideways-stairs-with-diagonal-movement.md b/Sideways-stairs-with-diagonal-movement.md index bb0c93d..9e2502c 100644 --- a/Sideways-stairs-with-diagonal-movement.md +++ b/Sideways-stairs-with-diagonal-movement.md @@ -1,6 +1,6 @@ All the stairs in Gen 1 and 2 only go upwards. Gen 3 had a few that go downwards, like the ones descending towards Trainer Tower in FRLG, but it took until Gen 4 with its true 3D maps for sideways stairs to be introduced. ROM hacks have already [implemented sideways stairs](https://www.pokecommunity.com/showthread.php?t=378934) in Gen 3; this tutorial shows how to implement them in pokecrystal. -(The code for this feature was adapted from [Pokémon Brass](https://github.com/WasabiRaptor/Pokemon-Brass/).) +(The code for this feature was adapted from [Pokémon Brass](https://github.com/WasabiRaptor/pokebrass).) ## Contents diff --git a/Tutorials.md b/Tutorials.md index 4741ef1..257224a 100644 --- a/Tutorials.md +++ b/Tutorials.md @@ -50,6 +50,7 @@ Tutorials may use diff syntax to show edits: - [Fishing rod](Add-a-new-fishing-rod) - [Battle transition](Add-a-new-battle-transition) - [Spawn point (for Fly or Teleport)](https://github.com/pret/pokecrystal/wiki/Spawn-Point-(for-Fly-or-Teleport)) +- [Level cap](Adding-level-caps) ## How to edit the… diff --git a/screenshots/player-colors.png b/screenshots/player-colors.png Binary files differindex 15c6fe0..fa30bb0 100644 --- a/screenshots/player-colors.png +++ b/screenshots/player-colors.png |