diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2019-01-27 21:46:26 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2019-01-27 21:46:26 -0500 |
commit | d9b8d318e320f4c941344602eabdf842879adb7d (patch) | |
tree | 798a65a2466804eec97e4dc165ebbebb4e1a8ebf /Tips-and-tricks.md | |
parent | 9786a165ff48c7fc86dc982110b24db7c6030ddf (diff) |
Useful unused data and routines
Diffstat (limited to 'Tips-and-tricks.md')
-rw-r--r-- | Tips-and-tricks.md | 62 |
1 files changed, 57 insertions, 5 deletions
diff --git a/Tips-and-tricks.md b/Tips-and-tricks.md index 714efd4..a3d8364 100644 --- a/Tips-and-tricks.md +++ b/Tips-and-tricks.md @@ -3,12 +3,14 @@ This page is for small hints about how to edit pokecrystal that don't need an en ## Contents -- [How to change shiny odds](#how-to-change-shiny-odds) -- [How to stop the white hue of the blue palette from animating](#how-to-stop-the-white-hue-of-the-blue-palette-from-animating) +- [Change the odds of encountering a shiny Pokémon](#change-the-odds-of-encountering-a-shiny-pokémon) +- [Stop the blue palette from animating its white hue](#stop-the-blue-palette-from-animating-its-white-hue) +- [Make overworld sprites darker at night](#make-overworld-sprites-darker-at-night) +- [Enemy trainers have maximum happiness for a powerful Return](#enemy-trainers-have-maximum-happiness-for-a-powerful-return) - [Lowercasing Pokémon names cuts off their first letter](#lowercasing-pokémon-names-cuts-off-their-first-letter) -## How to change shiny odds +## Change the odds of encountering a shiny Pokémon The odds of encountering a shiny Pokémon in Gen 2 are 1 in 8,192. That value isn't literally defined anywhere: it's a consequence of making shininess based on DVs. A shiny Pokémon has: @@ -22,13 +24,63 @@ The routine that checks those specific values is `CheckShininess` in [engine/gfx Also, the red Gyarados has hard-coded values for its DVs of 14/10/10/10; they're defined as `ATKDEFDV_SHINY` and `SPDSPCDV_SHINY` in [constants/battle_constants.asm](../blob/master/constants/battle_constants.asm). -## How to stop the white hue of the blue palette from animating +## Stop the blue palette from animating its white hue There are eight palettes used for tilesets: `GRAY`, `RED`, `GREEN`, `WATER`, `YELLOW`, `BROWN`, `ROOF`, and `TEXT`. It's called `WATER` instead of `BLUE` because its lightest hue gets animated for some tilesets, cycling between three colors. This makes water (and rocks, whirlpools, and waterfalls) look more dynamic, but it prevents you from making static blue tiles (like Mart roofs). To stop it, edit [engine/tilesets/tileset_anims.asm](../blob/master/engine/tilesets/tileset_anims.asm) and replace all the instances of `dw NULL, AnimateWaterPalette` with `dw NULL, WaitTileAnimation`. +## Make overworld sprites darker at night + +Edit [gfx/overworld/npc_sprites.pal](../blob/master/gfx/overworld/npc_sprites.pal): + +```diff + ; nite +- RGB 15,14,24, 31,19,10, 31,07,01, 00,00,00 ; red +- RGB 15,14,24, 31,19,10, 10,09,31, 00,00,00 ; blue +- RGB 15,14,24, 31,19,10, 07,23,03, 00,00,00 ; green +- RGB 15,14,24, 31,19,10, 15,10,03, 00,00,00 ; brown +- RGB 15,14,24, 31,19,10, 30,10,06, 00,00,00 ; pink ++ RGB 15,14,24, 16,10,09, 17,03,00, 00,00,00 ; red ++ RGB 15,14,24, 16,10,09, 05,04,27, 00,00,00 ; blue ++ RGB 15,14,24, 16,10,09, 03,10,02, 00,00,00 ; green ++ RGB 15,14,24, 16,10,09, 08,04,02, 00,00,00 ; brown ++ RGB 15,14,24, 16,10,09, 18,05,04, 00,00,00 ; pink + RGB 31,31,31, 31,31,31, 13,13,13, 00,00,00 ; silver + RGB 15,14,24, 08,13,19, 00,11,13, 00,00,00 ; tree + RGB 15,14,24, 12,09,15, 08,04,05, 00,00,00 ; rock +``` + + +## Enemy trainers have maximum happiness for a powerful Return + +Edit [engine/pokemon/move_mon.asm](../blob/master/engine/pokemon/move_mon.asm): + +```diff + TryAddMonToParty: + ... + GeneratePartyMonStats: + ; wBattleMode specifies whether it's a wild mon or not. + ; wMonType specifies whether it's an opposing mon or not. + ; wCurPartySpecies/wCurPartyLevel specify the species and level. + ; hl points to the wPartyMon struct to fill. + ... + + ; Initialize happiness. ++ ld a, [wMonType] ++ and $f + ld a, BASE_HAPPINESS ++ jr z, .got_happiness ++ ld a, $ff ; max happiness for enemy trainers ++.got_happiness + ld [de], a + inc de + + ... +``` + + ## Lowercasing Pokémon names cuts off their first letter -If you simply lowercase all the names in [data/pokemon/names.asm](../blob/master/data/pokemon/names.asm) and rebuild the ROM, the first letter of their names may be missing. The cause is changing `"FARFETCH'D"` to `"Farfetch'd"`, because `'d` is actually a single character. The fix is to pad its name to the same length as all the rest with an `@`, so that it becomes `"Farfetch'd@"`.
\ No newline at end of file +If you simply lowercase all the names in [data/pokemon/names.asm](../blob/master/data/pokemon/names.asm) and rebuild the ROM, the first letter of their names may be missing. The cause is changing `"FARFETCH'D"` to `"Farfetch'd"`, because `'d` is actually a single character. The fix is to pad its name to the same length as all the rest with an `@`, so that it becomes `"Farfetch'd@"`. |