Great finding!
I'll precise the structure, thanks

EDIT : New Structure, like the orignal (must just edit it to make him a bit field)


Code:

typedef struct{

   unsigned int personalityValue;
   unsigned int OTID; //Original Trainer ID
   unsigned char Nick[10];
   Language lang;
   unsigned char OTName[7]; //Original Trainer Name
   unsigned char Mark;
   unsigned short Checksum;
   Data data;
   unsigned char Status;
   unsigned char Level;
   unsigned char PKRUS_remaining;
   unsigned short HP_Current;
   unsigned short HP_Total;
   unsigned short Attack;
   unsigned short Defense;
   unsigned short Speed;
   unsigned short Sp_Attack;
   unsigned short Sp_Defense;
   
}PKMN;

typedef struct{

   Growth growth;
   Attacks attacks;
   Misc misc;
   Effort effort;
   //and you lost the GAME!
}Data;


typedef struct{

   unsigned short Species;
   unsigned short Item_Held;
   unsigned int XP;
   unsigned char PP_bonuses;
   unsigned char Happiness;
   

}Growth;

typedef struct{

   unsigned char attack[4];
   unsigned char PP[4];   

}Attacks;

typedef struct{

   unsigned char HP_EV;
   unsigned char Attack_EV;
   unsigned char Defense_EV;
   unsigned char Speed_EV;
   unsigned char Sp_Attack_EV;
   unsigned char Sp_Defense_EV;
   unsigned char Sp_Defense_EV;
   unsigned char Coolness;
   unsigned char Beauty;
   unsigned char Cuteness;
   unsigned char Smartness;
   unsigned char Toughness;
   unsigned char Feel;

}Effort;


typedef struct{

   unsigned char PKRus_status;
   unsigned char Location_caught;
   unsigned char Level_caught;
   unsigned char PKBall;
   unsigned char Trainer_Gender;
   unsigned int IVs;
   unsigned int Ribbons;

}Misc;
On thing is that you'll need to put your Data struct definition after all of the rest, since they must be predefined before you can use them. Other than that, looks good (though why so many unsigned chars and not some ints? full ints are much faster to work with)
I designed like the types like the Game's structure
You know, for pokemon purple, I have 56 elements in a list to handle 1 pokemon's stats. Each stat (attack, defense, speed, specials, health, etc) has a DV and XP. This is, of course, for Red/Blue/Yellow. Not sure if you are going for full clone of the original games or not.
Full clone of IIIrd Generation Battle Engine
Yeah, sounds like you are missing a great many stats to use for this. I made the same mistake as well, until I was able to gather more information on the subject. The equations are a pain in BASIC, I'd hate to see what it'd look like in C :S
tifreak8x wrote:
Yeah, sounds like you are missing a great many stats to use for this. I made the same mistake as well, until I was able to gather more information on the subject. The equations are a pain in BASIC, I'd hate to see what it'd look like in C :S
Would you be so kind as to share some of that information (if you have it around?). If not, I'd be happy to help facilitate Eiyeron's project by reading over your source and re-extracting the information. Of course, if you'd prefer not to share what you've learned, I can understand that too, since I'm sure it took a lot of effort for you to extract it all. Smile
I'm thinking about makin this project a community project, or not :S
It will take some digging. I have my stats list here, which would be a pain to write out so it might be better for me to just scan it in and post it as an image. Some of the stuff I have I got from Mathstuf, when he was still around. It's in a pdf somewhere in my projects flashdrive. I have other lists that I've found here there and everywhere online. I hope I have those links saved, somewhere..
tifreak8x wrote:
It will take some digging. I have my stats list here, which would be a pain to write out so it might be better for me to just scan it in and post it as an image. Some of the stuff I have I got from Mathstuf, when he was still around. It's in a pdf somewhere in my projects flashdrive. I have other lists that I've found here there and everywhere online. I hope I have those links saved, somewhere..
Thanks, tifreak, I'm sure that Eiyeron will appreciate that, and that the rest of us will appreciate it as a result. Smile
I didn't searched anything since my IRC deconnection, time issues, and other projects :/

BUt I don't give up.
I think I'll porbably start by the Damage gestion, and show the PV

EDIT: Becasue I lost my sprite converter, I'll write down here what I found for the battle workflow:


Code:

Battle start

Turn(while not finished)
-CHoose attacks
-Chose fastest pokémon
--Vérifiy If attack
---Attack
----Verify if opponment not ko
-----oppomnent Ko //TODO
------Choose pkm or end the combat
---else show why not attack
-Other pokémon's turn
...Same sh**

-Wheather update
-Status update
--ANother KO checking
---Another choose or end of combat
EndOfTUrn


It's a bit messy, but we have a little baby here :3
KermMartian wrote:
One of the solutions to the huge amount of data that the sprites take up might be to put the sprites in an external file, keep a pointer open to the file, and just seek around that file to pull out sprites as necessary. It would slow the drawing down very very slightly if you did that for every sprite, but you could even cache out the two Pokemon for battles if you wanted. I'd strongly recommend this approach.

You can do what my game engine does. All sprites are serialized (and compressed, possibly) into a file. You just read the file in to the stack space and you are done. You can load up to 500KB of data safely, in addition to the memory available with malloc.
AHelper wrote:
KermMartian wrote:
One of the solutions to the huge amount of data that the sprites take up might be to put the sprites in an external file, keep a pointer open to the file, and just seek around that file to pull out sprites as necessary. It would slow the drawing down very very slightly if you did that for every sprite, but you could even cache out the two Pokemon for battles if you wanted. I'd strongly recommend this approach.

You can do what my game engine does. All sprites are serialized (and compressed, possibly) into a file. You just read the file in to the stack space and you are done. You can load up to 500KB of data safely, in addition to the memory available with malloc.


Which stack are you using, the System stack at 0xA80F0000, or add-in stack?
Ashbad wrote:
AHelper wrote:
KermMartian wrote:
One of the solutions to the huge amount of data that the sprites take up might be to put the sprites in an external file, keep a pointer open to the file, and just seek around that file to pull out sprites as necessary. It would slow the drawing down very very slightly if you did that for every sprite, but you could even cache out the two Pokemon for battles if you wanted. I'd strongly recommend this approach.

You can do what my game engine does. All sprites are serialized (and compressed, possibly) into a file. You just read the file in to the stack space and you are done. You can load up to 500KB of data safely, in addition to the memory available with malloc.


Which stack are you using, the System stack at 0xA80F0000, or add-in stack?

Add-in stack
Might I inquire where the add-in stack safely begins (I know it grows down towards static add-in RAM, but I'm not sure what a good, safe starting address is)
No idea right now, it is documented in Simon's chm. You don't need the address to use it with the PrizmSDK. Modify the .ld file and bump up the RAM size.

Sorry for a detailless post, busy.
the pokemon-online wiki is also a great place to look for data, and, unlike other things, it focusses solely on the games.

EDIT: check the game mechanics page first
I already thought about deferents files for different content: one for pokemons sprites for example.
Pokemons sprites have all the same size, that'll give me some help to read them
Sorry I couldn't tell from earlier posts, is this:
-Just a battle simulator
-Actual overworld game
Either way, good job so far and good luck.
For the moment, I'll concentrate myself on a battle simulator, but sure I'll do it to easily adapt it into a full game!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 3
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement