Jump to content

Recommended Posts

Posted
Is it A.Z.'s floette already programmed, or any evidence has been removed?

While most data in personal.garc is overwritten with Pikachu's data, FormCount is left intact.

Flabébé & Florges have 5 forms, Floette has 6 forms -> AZ's Floette is still there.

Posted
While most data in personal.garc is overwritten with Pikachu's data, FormCount is left intact.

Flabébé & Florges have 5 forms, Floette has 6 forms -> AZ's Floette is still there.

I suppose it mean that Floette can be usable (It's encouraging). I was almost thinking in another "azure flute" (Programmed but never released)

Posted
I suppose it mean that Floette can be usable (It's encouraging). I was almost thinking in another "azure flute" (Programmed but never released)

Well typically any unused formes get removed from Programming.

Spiky Ear Pichu did not get into BW B2W2 XY or ORAS, and it seems like Cosplay Pikachu formes were entirely removed.

If Floette forme count doesn't change, I suppose an event will eventually come..

Maybe they'll bundle it in the next Pokemon Bank event!

Posted

BTW it seems like Pokemon Structure in Sun Moon Demo is using ORAS structure, including total number of bytes,

yet it should have been changed, as TID is now displayed as 6 digits on summary screen (instead of the prev 5).

So either they have a new way of calculating TID, or for the sake of the demo, the structure has yet to be tweaked.

For example, Pkhex shows my TID/SID in SM to be 02337 and 08609 respectively,

yet the Pokemon I caught will display my TID as 201761

(as seen here:

)

Same shenanigan's with Ash Greninja:

Ash TID/SID is 31561/31221, but displayed as 131017.

At the very least, they are not faking us by using Capture Date,

as my Pokemon(Pikipek, not Greninja) Capture date is actually 01-01-2011.

So either the demo is programmed to display different TID (meaning SM demo pk7 structure is not representative of actual structure),

or they apply new type of shenanigans, such as some form of hashing TID and SID to give us a display TID.

edit:

also, in case it isn't clear,

Ash's Greninja, even when not in Ash-Greninja forme, in itself is an alternate form.

It looks like Greninja, but it is a separate form. Hence using Ability capsule on Normal Greninja won't result in obtaining Battle Bond.

Battle bond also isn't a hidden ability.

Ash's Greninja may not be breed-able, at this rate..

(or breed-able, but produces normal Froakies)

Posted
BTW it seems like Pokemon Structure in Sun Moon Demo is using ORAS structure, including total number of bytes,

yet it should have been changed, as TID is now displayed as 6 digits on summary screen (instead of the prev 5).

So either they have a new way of calculating TID, or for the sake of the demo, the structure has yet to be tweaked.

 

        //PokeTool::GetDrawID       public static int GetDrawID(uint TrainerID, int GameID)       {           if (GameID < 30)               return (int)(TrainerID & 0xFFFF);           else           {               return (int)((TrainerID + (((TrainerID / 1000000) * -15625) << 6)));           }       }

 

TrainerID is the full 4 byte id, tid and sid.

GameID's: 30 = Sun&Moon Demo, 31 = Sun, 32 = Moon, 33 = ???, 34 = ???

Note: this calculation allows any id from 0 to 999.999

And yes Greninja now has 3 forms

1. Form = Default

2. Form = "Battle Bond" Form, same stats as default form, just the ability is different (3x Battle Bond)

3. Form = "Ash-Greninja" Form

Posted
        //PokeTool::GetDrawID       public static int GetDrawID(uint TrainerID, int GameID)       {           if (GameID < 30)               return (int)(TrainerID & 0xFFFF);           else           {               return (int)((TrainerID + (((TrainerID / 1000000) * -15625) << 6)));           }       }

 

TrainerID is the full 4 byte id, tid and sid.

GameID's: 30 = Sun&Moon Demo, 31 = Sun, 32 = Moon, 33 = ???, 34 = ???

Note: this calculation allows any id from 0 to 999.999

And yes Greninja now has 3 forms

1. Form = Default

2. Form = "Battle Bond" Form, same stats as default form, just the ability is different (3x Battle Bond)

3. Form = "Ash-Greninja" Form

Your explanation of the formes is way better than me.

I am sadly unable to reproduce the result of the TID calculation.

On vb.net,

Dim trainerid = &H21A10921

GenVI_TID_ANS.Text = (trainerid And &HFFFF)

GenVII_TID_ANS.Text = ((trainerid + (((trainerid / 1000000) * -15625) << 6)))

Gen VI answer gives me 2337 (correct answer)

Gen VII answer gives me -31, where correct answer should be 201761

Posted
I am sadly unable to reproduce the result of the TID calculation.

On vb.net,

Dim trainerid = &H21A10921

GenVI_TID_ANS.Text = (trainerid And &HFFFF)

GenVII_TID_ANS.Text = ((trainerid + (((trainerid / 1000000) * -15625) << 6)))

Gen VI answer gives me 2337 (correct answer)

Gen VII answer gives me -31, where correct answer should be 201761

C# gives me the correct result 201761,

Also manually:

TrainerID / 1.000.000 = 564

564 * -15625 = -8812500

-8812500 << 6 = -564000000

-564000000 + TrainerID = 201761

//edit,

my code is an exact copy of the original asm code, but i just noticed -15625 << 6 = -1000000

so

TrainerID + ((TrainerID / 1.000.000) * -1000000)

or

TrainerID % 1.000.000

should work...

Posted
C# gives me the correct result 201761,

Also manually:

TrainerID / 1.000.000 = 564

564 * -15625 = -8812500

-8812500 << 6 = -564000000

-564000000 + TrainerID = 201761

//edit,

my code is an exact copy of the original asm code, but i just noticed -15625 << 6 = -1000000

so

TrainerID + ((TrainerID / 1.000.000) * -1000000)

or

TrainerID % 1.000.000

should work...

changing my formula fixed it:

 

Dim trainerid = &H21A10921           GenVI_TID_ANS.Text = (trainerid And &HFFFF)           GenVII_TID_ANS.Text = (trainerid + (((Math.Floor(trainerid / 1000000) * -15625) << 6)))

 

Apparently adding the rounddown to the divided result fixed it.

I wondering if they still use regular tid/sid for shiny calculation, or is it based on the new "TrainerID" displayed.

edit

since TID/SID has a calculation method to form TrainerID,

that means that Gen VII pokemon structure is indeed unchanged, just that the game reads it differently.

With that said, Pokemon Link structure and Wondercard structure is most likely unchanged too..

(I was looking into whether PK7 changed drastically, and whether to expect changes on wondercard format,

and whether ripping our WC7 out of WC7full or boss dumps would get any drastic changes, but this hints at no significant change..)

Posted
I wondering if they still use regular tid/sid for shiny calculation, or is it based on the new "TrainerID" displayed.

Nothing changed.

 

_BOOL4 __fastcall pml::pokepara::CoreParam::CalcShiny(unsigned int TrainerID, unsigned int PokemonID){ return ((unsigned __int16)TrainerID ^ (TrainerID >> 16) ^ (PokemonID >> 16) ^ (unsigned __int16)PokemonID) < 16;}

 

That new id is an exported function and only the FieldRo uses it to show that id, everything else uses the old id's.

//edit:

Wondercard was slightly changed,

Oras uses 6800 Byte

Sun&Moon Demo uses 16208 Byte

i haven't looked into it yet, but

Savedata::MysteryGiftSave::GetMameGiftNum

Savedata::MysteryGiftSave::GetBPGiftNum

Savedata::MysteryGiftSave::GetItemGiftNum

Savedata::MysteryGiftSave::GetPokeGiftNum

looks like they will give Battle Points via Wondercard... ^^

//edit2:

a quick look into the structure:

- Wondercard Size = 264 Byte -> nothing changed

- There are 48 spaces for cards

Types:

0 = Pokemon

1 = Item

2 = Battle Points

3 = Poké Beans (japanese: Mame, 豆)

There is some date field after the card storage, it's defaulted to 2000:01:01:00:00:00:00

Posted
Nothing changed.

 

_BOOL4 __fastcall pml::pokepara::CoreParam::CalcShiny(unsigned int TrainerID, unsigned int PokemonID){ return ((unsigned __int16)TrainerID ^ (TrainerID >> 16) ^ (PokemonID >> 16) ^ (unsigned __int16)PokemonID) < 16;}

 

That new id is an exported function and only the FieldRo uses it to show that id, everything else uses the old id's.

//edit:

Wondercard was slightly changed,

Oras uses 6800 Byte

Sun&Moon Demo uses 16208 Byte

i haven't looked into it yet, but

Savedata::MysteryGiftSave::GetMameGiftNum

Savedata::MysteryGiftSave::GetBPGiftNum

Savedata::MysteryGiftSave::GetItemGiftNum

Savedata::MysteryGiftSave::GetPokeGiftNum

looks like they will give Battle Points via Wondercard... ^^

//edit2:

a quick look into the structure:

- Wondercard Size = 264 Byte -> nothing changed

- There are 48 spaces for cards

Types:

0 = Pokemon

1 = Item

2 = Battle Points

3 = Poké Beans (japanese: Mame, 豆)

There is some date field after the card storage, it's defaulted to 2000:01:01:00:00:00:00

I'm surprised that so much can be seen, looks like they didn't change the functions much; afraid that they may break the demo?

Given Wondercard file size is the same, that means that at least offsets for interior items are the same,

which is good news to me.

Posted
I'm surprised that so much can be seen, looks like they didn't change the functions much; afraid that they may break the demo?

There is a lot more code ^^ like collecting zygarde cells, berry field island, fishing spot, join festa, battle tree, battle spot....

But the more interesting code is just dummy...

Magearna Event code:

 

int MagianaQREventEnableCheck(){ return 0;}

 

Pokédex QR making codes...

 

void NetApp::QR::QRUtility::SetUpZukanQRData(){ ;}

 

Posted
There is a lot more code ^^ like collecting zygarde cells, berry field island, fishing spot, join festa, battle tree, battle spot....

But the more interesting code is just dummy...

Magearna Event code:

 

int MagianaQREventEnableCheck(){ return 0;}

 

Pokédex QR making codes...

 

void NetApp::QR::QRUtility::SetUpZukanQRData(){ ;}

 

just curious, how is this extracted?

Been trying to solve the calculation for Mirage Daily Value for ORAS.

https://projectpokemon.org/forums/showthread.php?48320-Mirage-Islands-in-ORAS&p=221346&viewfull=1#post221346

Posted
just curious, how is this extracted?

Been trying to solve the calculation for Mirage Daily Value for ORAS.

https://projectpokemon.org/forums/showthread.php?48320-Mirage-Islands-in-ORAS&p=221346&viewfull=1#post221346

I could look into it, but later.

I use ida pro, patchrom and a cro/crs loading script.

patchrom is used to convert the exefs code.bin and exheader.bin into a loadable exefs.elf.

Then i load the exefs.elf and use the script to load static.crs, this loads a lot of export entries and give a basic overview where stuff is.

The rest is done via vTable decoding, string search and knowledge how stuff should look like.

Also hex-rays decompiler plugin helps a lot and after cleaning up you get a nice output like this:

 

void __cdecl Savedata::MyStatus::SetZenryokuRingFlag(MyStatus *this, int flag){ unsigned int v2; // r3@1 int v3; // r1@1 v2 = this->data.OutFitFlags[1] & 0xEFFFFFFF | (flag << 28); v3 = (unsigned __int16)(this->data.Flags & 0xFFFD) | 2 * flag; this->data.OutFitFlags[1] = v2; this->data.Flags = v3;}

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...