The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Adding more shiny Pokemon forms? (Pokemon rarity system)

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old October 9th, 2016 (11:35 AM).
Luster's Avatar
Luster Luster is offline
Form changing script (HINT)
 
Join Date: Feb 2010
Location: In a skip behind Lidl.
Gender: Male
Nature: Rash
Posts: 29
Hi everyone,

I've been developing an idea for expanding on shiny Pokemon mechanics. As you probably know, there is a 1 in 8,192 chance of encountering a wild shiny Pokemon in Fire Red. I'm wondering if it's possible to add a second shiny form for every Pokemon, with a 1 in 1,024 chance (for example) of encountering one. They'd be rarer than a standard Pokemon but considerably more common than a shiny Pokemon. Let's call them uncommon for now.

The offset that loads a shiny Pokemon's palette is at 0x80440F4 (thanks FBI). It calculates whether or not a Pokemon is shiny. At 0x8044120 there is the following:

ROM:08044120 CMP R0, #7
ROM:08044122 BLS loc_8044134
ROM:08044124 LDR R0, =palc_table_normal

This checks if the value calculated from the Pokemon's PID is 7 or less. There's an 8 in 65,536 - or 1 in 8,192 - chance of this value being equal to 7 or less. That's our shiny chance! If it is, it branches to 0x8044134, which then loads the shiny palette table to R0. If it's more than 7, the Pokemon's normal palette is loaded to R0 instead.

If it was possible to add another CMP command below the BLS command, would it be possible to load a third palette instead? Here's what I mean -

CMP R0, #7 @ 1 in 8,192 chance
BLS loc_8044134 @branch to load shiny palette
CMP R0, #40 @ 1 in 1,024 chance
BLS loc_8740000 @branch to load uncommon palette (example offset)
LDR R0, =palc_table_normal

This would load the shiny palette if the value is equal to or below 7 as normal, then check if it's equal to or below 64 (0x40 in hex). If it's higher than 7, but equal to or lower than 64 the Pokemon's uncommon palette would be loaded instead. If it's higher than 64 the Pokemon's standard palette is loaded.

This would mean creating another set of palettes for each Pokemon but I can see this being a popular feature. Perhaps if it were developed a community effort could get a new set of palettes completed pretty quickly. I'm not too great with ASM but can make a start on a new routine, if anyone a little more knowledgeable than me could help me out or give some input it would be greatly appreciated.

Thank you!
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:22 AM.