In current pokemon info, could show the nature and moves to distinguish a pokemon from another same?
Supercarotte is right, it prompts IDs of moves.In current pokemon info, could show the nature and moves to distinguish a pokemon from another same?
I'm not sure the last commit works well. I added binaries as attachment for thoses who can make their own test.Latest github changes will allow to access ALL the data in the pk6 file, and Gocario already stated he wants to make some kind of full info view for pokemon in single selection mode.
The hard work for the bank is already done from my point of view, what "remains" are many many tweaks and enhancements, which well, will take hard work when grouped, and well, a graphical UI will be hard work too.
Maybe gocario has another perspective, I don't know how he'd want the final product to be, but if he wants to also replicate official bank filters, tables, etc... that'd take a fair amount of work too.
What's the exact problem?I'm not sure the last commit works well
When loading the game I got eggs (probably bad) in my PC.What's the exact problem?
I saw that commit, I'll check and see if I can find a reason why function call order produces that behaviour and if that really fixed it. I've become quite familiar with the pk6 structure from all the pokemon link testing.When loading the game I got eggs (probably bad) in my PC.
I changed the order of function calls. I didn't get that problem again.
But I don't sure it works like it should.
As long as you like them, we'll work it out at some point, I'm glad you like it. I'm just finishing documenting how pokemon link data works. Well, I aactually finished, but I found strange behaviour with eggs and setting the majority of its data to FF, and I'd like to know if this is supposed to happen or what, but at a practical level it really doesn't matter.Btw, I read your message, it was interesting. Ideas are good I am really loving them, but I don't know what answer! :c
Great news about sftdlin! I'd go for a whatever fixed space font that looks fine.
Also, I've been checking the source and noticed something in pokédex data: for pokemon X/Y there's extra pokédex data, it works like this:
If the pokemon is region VI, the owned flag is set.
If the pokemon is region < VI, the foreign flag is set.
The foreign flags are apparently stored here (taken from PKHex code):
Array.Copy(foreigndata, 0, sav, Main.SaveGame.PokeDex + 0x64C, 0x52);
But I think you are aware of this since you only update Dex for ORAS...
Also, why do you call this in movePkm?
if (!srcBanked && dstBanked && !isPkmEmpty(dst))
convertPkmTrainer(dst);
If I correctly understand, you are adding the trainer data when moving INTO the bank, convertPkmTrainer will do nothing since if the handler is 0x00 the save's trainer is OT, and if it is 0x01 the save's trainer name will be the same as notOT name.
I'm gonna try to reproduce the order problem with the eggs and see if I can find the reason why, it happened prior to this commit right?: https://github.com/gocario/PHBank/commit/22fde0deeb21b4add9a82b7c1eaec5252a3a142e
EDIT:
I forgot to mention the following: I think pokemon data should only be modified prior to writing. This can be done in the following way:
- Rename ismodified to ismoved
- When the pokemon is moved from save to bank or viceversa toogle the ismoved bool.
- Prior to saving, iterate trough all pokemon slots in savegame and if the ismoved bool is set to 1, update trainer information, then add the pokedex entries.
This way pokemon that were in the bank at boot, were moved to save, then returned to bank in the same session remain untouched.
Reason why this should be done: say someone trades me a pokemon to my Y game and I teach it "return" (a move which attack's power is based on friendship) and max its friendship. Then I store it in bank. If by any mistake I enter the bank with my OR, then move it to OR boxes, notice that and return it to the bank, trainer information will already be that of OR (also, OR would have the pokedex entry for that pokemon even if I didn't want to transfer it to OR).
Same could be said for affection/friendship based evolutions.
Also, this is what official bank does. In fact official bank rewrittes all boxes (and updates pokedex entries) even if no modifications are made (if you save, of course)
OK, didn't know it had different structure.X/Y is strange!
I'm not gonna work on XY-dex now.
if (srcBanked && !dstBanked && !isPkmEmpty(src))
convertPkmTrainer(src);
if (!srcBanked && dstBanked && !isPkmEmpty(dst)) //<-- This one
convertPkmTrainer(dst);
OK, didn't know it had different structure.
Also, what about that function call?
Code:if (srcBanked && !dstBanked && !isPkmEmpty(src)) convertPkmTrainer(src); if (!srcBanked && dstBanked && !isPkmEmpty(dst)) //<-- This one convertPkmTrainer(dst);
I don't know, it seemed good once modified. D:
I did this small changes:
Code:typedef struct pkm_t { ek6_t* ek6 = NULL; // Pointer to MainBuffer pk6_t* pk6 = NULL; // Pointer to OwnBuffer bool moved : 1; bool modified : 1; unsigned : 0; u8* species; u8* item; bool isShiny; u16 speciesID; u16 itemID; // T O D O !! pkm_t() : moved {false}, modified {false} {} } pkm_t;
Code:void PKBank::movePkm(pkm_t* src, pkm_t* dst) { pkm_t tmp; tmp.pk6 = dst->pk6; dst->pk6 = src->pk6; src->pk6 = tmp.pk6; src->moved = true; dst->moved = true; loadPkmPk6(src); loadPkmPk6(dst); }
Code:void PKBank::savePkmPk6(pkm_t* pkm) { if (!pkm || !pkm->pk6) return; if (pkm->moved) { convertPkmTrainer(pkm); Pokemon::computeChecksum(pkm); } }
void PKBank::movePkm(pkm_t* src, pkm_t* dst)
{
pkm_t tmp;
tmp.pk6 = dst->pk6;
dst->pk6 = src->pk6;
src->pk6 = tmp.pk6;
loadPkmPk6(src);
loadPkmPk6(dst);
if (!isPkmEmpty(src))
src->moved = true;
if (!isPkmEmpty(dst))
dst->moved = true;
}
voidPKBank::movePkm(pkm_t* src,pkm_t* dst){
pkm_t tmp;
tmp.pk6 = dst->pk6;
dst->pk6 = src->pk6;
src->pk6 = tmp.pk6;
if(!isPkmEmpty(src))
src->moved =true;
if(!isPkmEmpty(dst))
dst->moved =true;
loadPkmPk6(src);
loadPkmPk6(dst);
}
EDIT: about picture: looking great! Are you asking about the font used though? Is that pokemon GB font?
BTW, did you just introduce a db for all species base stats to calculate the pokemon stats?
sftd_draw_text(font, x+1, y+1, RGBA8(0x00, 0x00, 0x00, 0xFF), 8, buffer);
sftd_draw_text(font, x, y, RGBA8(0xFF, 0xFF, 0xFF, 0xFF), 8, buffer);
static uint8_t* abilities(uint32_t ability);
static uint8_t* items(uint32_t item);
static uint8_t* moves(uint32_t move);
static uint8_t* natures(uint32_t nature);
static uint8_t* species(uint32_t species);
This looks like the status screen on XY, what's the problem?I don't know how to place things...
STAT Value IV EV
______________________
HP 150 27 235
Attack...