Homebrew [WIP] PHBank - Pokémon Homebrew Bank

Gocario

GBAFail'd
OP
Member
Joined
Sep 5, 2015
Messages
640
Trophies
0
Location
Bourg Palette
XP
804
Country
France
I released the 1.0.6-beta-b.
The navigation in box selector should be fully functional, with DPad and stylus.

Well, I said at some point, it is useful information and instead of showing that information as text in upper screen showing the propper sprite would be great. I know it adds to the filesize, but there aren't that many formes that can be stored in the box (well, 20 vivillion, 15 flabebe line, deerling/sawsbuck....schoolgirl pikachu also has its own sprites, etc...)

Anyway, about the memory information, I'm 99% sure this is how the bank does it (and trading is almost the same, but we are interested in bank)

Data changes when trade/bank RECEIVER is NotOT::
(The following data are relative to the trainer that is RECEIVING the pokemon)
Code:
0x78-0x8F    Name of NotOT is put here
0x90-0x91    Null Terminator
0x92        NotOT Gender (0 - Male, 1 - Female) is put here

0x93        Current Handler is set to 1 (NotOT)

0x94-0x9D    Geolocation Data: when the pokemon is transfered to a different game and the receiver is NotOT, the following happens:
    geolocation 4 is moved to geolocation 5 slot
    geolocation 3 is moved to geolocation 4 slot
    geolocation 2 is moved to geolocation 3 slot
    geolocation 1 is moved to geolocation 2 slot
    geolocation 1 is set to that of the new NotOT
    0x94-0x95    Geolocation 1 - (Region,Country)
    0x96-0x97    Geolocation 2 - (Region,Country)
    0x98-0x99    Geolocation 3 - (Region,Country)
    0x9A-0x9B    Geolocation 4 - (Region,Country)
    0x9C-0x9D    Geolocation 5 - (Region,Country)
0x9E-0x9F    Unused
0xA0-0xA1    Unused
0xA2    NotOT Friendship: this sets friendship to base friendship (depends on species: http://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_base_friendship)
0xA3    NotOT Affection: this is reset to 0
0xA4    NotOT Memory Intensity: all traded pokemon have this value set to 0x01
0xA5    NotOT Memory Line: this is set to 0x04 *Pokemon* became *Trainer*’s friend when it arrived via Link Trade at... *area*."
0xA6    NotOT Memory Feeling: randomly assigned, ranges from 0x00 to 0x09 when traded from pokemon bank (only 10 out of the 24 possible values are used when trading). This is the conclusion after checking about 200 bank transfered pokemon. Normal trades seem to range from 0x00 to 0x12 (19 possible values). I have yet to see the other 5 values being used
0xA7    Unused
0xA8-0xA9    NotOT Memory TextVar: for pokemon bank this is set to 0x0000 ("somewhere"). For normal trades that would be the player's location when the game was saved prior to trading (http://bulbapedia.bulbagarden.net/wiki/Memory_Girl#Locations) and feeling value
0xAA-0xAB    Unused
0xAC-0xAD    Unused
0xAE    Fullness: this is mantained, it's a global value for OT and NotOT
0xAF    Enjoyment:  this is mantained, it's a global value for OT and NotOT
Data changes when trade/bank RECEIVER is OT:
Code:
0x93        Current Handler is set to 0 (OT)

Yes, that's all that happens.
Good work!
I was joking about alt.form!
I'll try to do the transfer simulation.
 

Ekaitz

Redhead Believer
Member
Joined
Jun 13, 2010
Messages
608
Trophies
0
XP
441
Country
France
I hope that it won't be too hard to add the transfer simulation.

I still didn't have the time to try the hb, my bad. I have to find time for it tomorrow!

Just a small question, does the hb show various hidden information on the screen? I was thinking that it would be useful to display informations like SID for eggs for example! (For people who don't know about it: if the SID is the same as the TID of the player, the Pokemon will hatch shiney. So when you breed a lot, and if you have the hardware for it, you can just check the SID of the eggs, and just do the steps for the egg that has the good SID)

Or it would be nice to show IVs and EVs maybe?

If it is already the case, sorry for my useless post, otherwise it is just an idea, I don't know if it is possible or if it is something difficult to put in place...

I'll try it tomorrow, I swear it. :grog:
 

Gocario

GBAFail'd
OP
Member
Joined
Sep 5, 2015
Messages
640
Trophies
0
Location
Bourg Palette
XP
804
Country
France
I hope that it won't be too hard to add the transfer simulation.

I still didn't have the time to try the hb, my bad. I have to find time for it tomorrow!

Just a small question, does the hb show various hidden information on the screen? I was thinking that it would be useful to display informations like SID for eggs for example! (For people who don't know about it: if the SID is the same as the TID of the player, the Pokemon will hatch shiney. So when you breed a lot, and if you have the hardware for it, you can just check the SID of the eggs, and just do the steps for the egg that has the good SID)

Or it would be nice to show IVs and EVs maybe?

If it is already the case, sorry for my useless post, otherwise it is just an idea, I don't know if it is possible or if it is something difficult to put in place...

I'll try it tomorrow, I swear it. :grog:
Nah it's not, I hope.
As for now, the draft top screen displays:
  • The species name
  • The TID & SID
  • The PID & PSV
  • The Moves IDs
  • A star if the Pokémon is shiny
But even if the Pokémon is an egg, the bottom screen will display the Pokémon sprite, not the egg sprite.
 

Gocario

GBAFail'd
OP
Member
Joined
Sep 5, 2015
Messages
640
Trophies
0
Location
Bourg Palette
XP
804
Country
France
Well, I said at some point, it is useful information and instead of showing that information as text in upper screen showing the propper sprite would be great. I know it adds to the filesize, but there aren't that many formes that can be stored in the box (well, 20 vivillion, 15 flabebe line, deerling/sawsbuck....schoolgirl pikachu also has its own sprites, etc...)

Anyway, about the memory information, I'm 99% sure this is how the bank does it (and trading is almost the same, but we are interested in bank)

Data changes when trade/bank RECEIVER is NotOT::
(The following data are relative to the trainer that is RECEIVING the pokemon)
Code:
0x78-0x8F    Name of NotOT is put here
0x90-0x91    Null Terminator
0x92        NotOT Gender (0 - Male, 1 - Female) is put here

0x93        Current Handler is set to 1 (NotOT)

0x94-0x9D    Geolocation Data: when the pokemon is transfered to a different game and the receiver is NotOT, the following happens:
    geolocation 4 is moved to geolocation 5 slot
    geolocation 3 is moved to geolocation 4 slot
    geolocation 2 is moved to geolocation 3 slot
    geolocation 1 is moved to geolocation 2 slot
    geolocation 1 is set to that of the new NotOT
    0x94-0x95    Geolocation 1 - (Region,Country)
    0x96-0x97    Geolocation 2 - (Region,Country)
    0x98-0x99    Geolocation 3 - (Region,Country)
    0x9A-0x9B    Geolocation 4 - (Region,Country)
    0x9C-0x9D    Geolocation 5 - (Region,Country)
0x9E-0x9F    Unused
0xA0-0xA1    Unused
0xA2    NotOT Friendship: this sets friendship to base friendship (depends on species: http://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_base_friendship)
0xA3    NotOT Affection: this is reset to 0
0xA4    NotOT Memory Intensity: all traded pokemon have this value set to 0x01
0xA5    NotOT Memory Line: this is set to 0x04 *Pokemon* became *Trainer*’s friend when it arrived via Link Trade at... *area*."
0xA6    NotOT Memory Feeling: randomly assigned, ranges from 0x00 to 0x09 when traded from pokemon bank (only 10 out of the 24 possible values are used when trading). This is the conclusion after checking about 200 bank transfered pokemon. Normal trades seem to range from 0x00 to 0x12 (19 possible values). I have yet to see the other 5 values being used
0xA7    Unused
0xA8-0xA9    NotOT Memory TextVar: for pokemon bank this is set to 0x0000 ("somewhere"). For normal trades that would be the player's location when the game was saved prior to trading (http://bulbapedia.bulbagarden.net/wiki/Memory_Girl#Locations) and feeling value
0xAA-0xAB    Unused
0xAC-0xAD    Unused
0xAE    Fullness: this is mantained, it's a global value for OT and NotOT
0xAF    Enjoyment:  this is mantained, it's a global value for OT and NotOT
Data changes when trade/bank RECEIVER is OT:
Code:
0x93        Current Handler is set to 0 (OT)

Yes, that's all that happens.

I made some things...
What do you think about the source code?
The friendship is set to 70 for all.
EDIT: I didn't even use the convert function. I'm so tired...
So I removed the false release!
 
Last edited by Gocario, , Reason: Removing binaries

TheDeKay

I call it research
Member
Joined
Feb 6, 2015
Messages
152
Trophies
0
XP
239
Country
Can i also just download multiples of this bank to get more space?
You can backup the bank data and use a clean one and then switch between bank A and B.
But the easier way would be to change up part of script and either increase or remove the Boxlimit and then rebuild it.
 

Arseface_TM

Board Game Dev
Member
Joined
Sep 16, 2015
Messages
331
Trophies
0
Age
32
XP
306
Country
United States
Already filled up bank. Also different Sets and shinys, formes, events, old events with old transfer moves
You can probably backup the database and swap it when you want to switch "banks". It should be the bank file in /pkbank.

I haven't tried it myself, but I only have a few boxes to store. Haven't even finished my dex.
 
  • Like
Reactions: Thunder Kai

JJTapia19

I fight for my friends.
Member
Joined
May 31, 2015
Messages
2,171
Trophies
1
Age
32
XP
2,438
Country
Puerto Rico
I noticed the .smdh had some corrupted characters on where the é goes. Here is a screenshot. I tested with other smdh editors just to make sure it was not the font from the homebrew launcher mod.

746sghm.png
Attached I'll leave a fixed version.:)
 

Attachments

  • PHBank_Fixed_Smdh.rar
    1.3 KB · Views: 119
Last edited by JJTapia19,

suloku

Well-Known Member
Member
Joined
Apr 28, 2008
Messages
883
Trophies
1
XP
877
Country
About multiple instances of PHBank, you could always hex edit the 3dsx file and change phbank.bin to phban2.bin...etc
Or holding a button at startup makes PHBank show a "Select bank screen" where you can select up to X banks and the file used is phbank1.bin, phbank2.bin... etc.
Still the same as official bank, just allowing multiple databases of it.

EDIT: I didn't even use the convert function. I'm so tired...
So I removed the false release!
lol, rest up man, there's no rush. Glad something came up and didn't get to test it though, I would have been puzzled.

I'm gonna make a lookup table for friendship using an u8 array so you don't have to do it. A more memory optimized way would be using only 3 bits for the information, but maybe 721 bytes of data aren't that much for 3ds and using an array .

Oh, and should the bank block hoopa and volcanion until they are released since you are trying to replicate official bank?
 
Last edited by suloku,

Gocario

GBAFail'd
OP
Member
Joined
Sep 5, 2015
Messages
640
Trophies
0
Location
Bourg Palette
XP
804
Country
France
I noticed the .smdh had some corrupted characters on where the é goes. Here is a screenshot. I tested with other smdh editors just to make sure it was not the font from the homebrew launcher mod.

746sghm.png
Attached I'll leave a fixed version.:)
The problem was the make, which don't care about my é... Thank you!

About multiple instances of PHBank, you could always hex edit the 3dsx file and change phbank.bin to phban2.bin...etc
Or holding a button at startup makes PHBank show a "Select bank screen" where you can select up to X banks and the file used is phbank1.bin, phbank2.bin... etc.
Still the same as official bank, just allowing multiple databases of it.

I'm gonna make a lookup table for friendship using an u8 array. A more memory optimized way would be using only 3 bits for the information, but maybe 721 bytes of data aren't that much for 3ds.

Oh, and should the bank block hoopa and volcanion until they are released since you are trying to replicate official bank?
Multiple-bank should be easy.
I did a 721 bytes array: http://pastebin.com/q0ZTF0bR, but didn't commit it.
I got Hoopa from a trade, isn't it bankable?!

--------------------- MERGED ---------------------------

What happens if:
  1. OT place a Pokémon in bank.
  2. HT retrieve this Pokémon from bank.
  3. HT replace the Pokémon to bank.
  4. HT retrieve again the Pokémon from bank.
The Geo (Region/Country) will be updated twice, right?
 
  • Like
Reactions: Margen67

suloku

Well-Known Member
Member
Joined
Apr 28, 2008
Messages
883
Trophies
1
XP
877
Country
The problem was the make, which don't care about my é... Thank you!


Multiple-bank should be easy.
I did a 721 bytes array: http://pastebin.com/q0ZTF0bR, but didn't commit it.
I got Hoopa from a trade, isn't it bankable?!

--------------------- MERGED ---------------------------

What happens if:
  1. OT place a Pokémon in bank.
  2. HT retrieve this Pokémon from bank.
  3. HT replace the Pokémon to bank.
  4. HT retrieve again the Pokémon from bank.
The Geo (Region/Country) will be updated twice, right?

Well, there goes my 721 bytes array :P, glad I used some search and replace from the bulbapedia page and got it in 5 minutes, and not manually typed it.
Glad to know you like the multiple bank idea, that would content those asking for more boxes.
Yes, I forgot hoopa is already released, the unbankable one is volcanion only I think, but I'll test.

About region updating, I'm gonna make some tests to find out that. HT data doesn't store any identifier for him, so my guess is that region is not updated if new region is the same as latest region (slot 1), since the pokemon is in the same region.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    Not even once, but 100's of times
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    My girlfriend at the time, she had me stay up with her all night because some how the crazy bitch had spent like 12 hours snorting 2 8 balls, didn't use any water (gotta clean your nose) so she had so much crusted in her nose I was sure she was gonna blow up her heart. I mean this was the stuff right off the boat so absolutely pure. ugghh so annoying
  • Psionic Roshambo @ Psionic Roshambo:
    Also doing like 320 dollars worth of coke in half a day lol damn it
  • Psionic Roshambo @ Psionic Roshambo:
    hmmm 360 even lol
  • Psionic Roshambo @ Psionic Roshambo:
    Well I was getting a discount so 320 is probably right
  • BigOnYa @ BigOnYa:
    That is cheap, I used to pay $100 for a tine.
  • Psionic Roshambo @ Psionic Roshambo:
    Tine? One gram?
  • BigOnYa @ BigOnYa:
    Sixteenth
  • Psionic Roshambo @ Psionic Roshambo:
    Also it was literally out of a kilo when I got it off the boat so absolutely pure
  • Psionic Roshambo @ Psionic Roshambo:
    Holy shiz that's a lot
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I was getting 3.5 Grams for 320 could have stepped on it and doubled my money easy lol
    +1
  • BigOnYa @ BigOnYa:
    I'd be afraid to it nowdays, my heart would explode prob. I just stick beers n buds nowdays.
  • Psionic Roshambo @ Psionic Roshambo:
    I would get to drive from tarpon springs to like Miami a thousand bucks lol do that twice a week and back in 92 that was good money
  • Xdqwerty @ Xdqwerty:
    @BigOnYa,
    @Psionic Roshambo what are you guys talking about?
  • Psionic Roshambo @ Psionic Roshambo:
    Blew it on women and muscle cars lol
    +1
  • BigOnYa @ BigOnYa:
    @Xdqwerty Hamster food, its pricey nowadays to keep PCs running.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    I don't do anything except cigarettes and gotta stop eventually lol
    +1
  • BigOnYa @ BigOnYa:
    I'd do shrooms again if could find, and I was outside camping/fishing, and had a cooler full of beer.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I wouldn't mind some LSD, laughing until my face hurt sounds fun lol
    +1
  • BigOnYa @ BigOnYa:
    You ever try soaper powder/qauludes? I did once and like a dumbass drank beer on top of taking, I woke up laying in my backyard in the pouring rain, it knocked me out. I have not seen it around in many many years.
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    No never tried a lot of things but never that lol
  • Psionic Roshambo @ Psionic Roshambo:
    I did pass out one time on a floor after taking a bunch of Ambien lol thought it would help me sleep and did it lol
  • Psionic Roshambo @ Psionic Roshambo:
    Girlfriend was working at a pharmacy and stole like 500 of them, was and still is the biggest pill bottle I have ever seen lol
    Psionic Roshambo @ Psionic Roshambo: Girlfriend was working at a pharmacy and stole like 500 of them, was and still is the biggest...