Tigerseye Posted March 16, 2011 Share Posted March 16, 2011 Hi all, First off, I am really sorry if this is in the wrong forum; I wasn't quite sure where to put it ^^" I am currently writing a .pkm-editing program as a personal project. Through research and reading through helpful websites I have managed to tack together functions that create a PID from IVs, extract data from the PID and IVs and finds sets of IVs for PIDs. However, I have hit a dead end. My next task is to write functions that a) calculate the Pokémon's level from its experience points and vice-versa, and b) calculate the max stats from base stats, level, EVs and IVs. I am aware that for the former the growth rates are different for each Pokémon - however, two forumlae are undetermined (fluctuating and erratic, I believe). For the latter, I'm really not sure how the max stats are calculated as a Pokémon is levelling up. What I'm really asking is: can anyone provide information on either of these issues? How does Pokésav calculate experience and level? Does it have a built-in database of all the Pokémon species? And how does it calculate the max stats? Again, does it have all the Pokémon species' base stats built in?And how are the stats calculated at different levels? Do I need to emulate the environment of the actual game to calculate these? Sorry; long post is long :3 Any help would be much appreciated. Thanks in advance. Link to comment Share on other sites More sharing options...
KazoWAR Posted March 17, 2011 Share Posted March 17, 2011 Experience groups and formulas. http://bulbapedia.bulbagarden.net/wiki/Experience Stats formulas. http://bulbapedia.bulbagarden.net/wiki/Stat#Determination_of_stats Link to comment Share on other sites More sharing options...
Tigerseye Posted March 17, 2011 Author Share Posted March 17, 2011 Experience groups and formulas.http://bulbapedia.bulbagarden.net/wiki/Experience Stats formulas. http://bulbapedia.bulbagarden.net/wiki/Stat#Determination_of_stats Thank you for the prompt reply, KazoWAR. I'm not that familiar with Bulbapedia yet so it's helpful to have those direct links A little light reading for me then PS I am guessing this means that I need to have some sort of database in my program containing data on EXP growth type and base stats for each species of Pokémon? Link to comment Share on other sites More sharing options...
xfr Posted March 18, 2011 Share Posted March 18, 2011 To compute the level of a pokemon from its experience, you can use this file to give you the thresholds for each level for every exp growth rate, and this file to give you the growth rates of every evo line. You can thank Eevee from veekun.com for extracting those Link to comment Share on other sites More sharing options...
Tigerseye Posted March 18, 2011 Author Share Posted March 18, 2011 To compute the level of a pokemon from its experience, you can use this file to give you the thresholds for each level for every exp growth rate, and this file to give you the growth rates of every evo line. You can thank Eevee from veekun.com for extracting those Thanks for that link, xfr What do you mean by the growth rates of every evolution line? Link to comment Share on other sites More sharing options...
xfr Posted March 19, 2011 Share Posted March 19, 2011 There are 6 differents growth rates, and the level of a pokemon is a direct function of the growth rate and experience. The first link I posted is basically how to compute the level from the growth rate and experience. To compute the level of a pokemon you will thus need to know what is its growth rate. The second link I posted gives you growth rates for every evolution line (the growth rate is the same among members of the same evo line); to use that data you must use this file to find out the id of the evolution chain of the pokemon of which you want to know the level, then the two previous files can be used to compute the level. Link to comment Share on other sites More sharing options...
willaien Posted March 19, 2011 Share Posted March 19, 2011 What language are you writing this in? I have a .net dll that can handle a lot of that, but needs a bit of work on the level/exp functions (they're, uhh, wrong - off by a bit and I haven't bothered to fix it), but has a DB of growth rates, etc. Link to comment Share on other sites More sharing options...
codemonkey85 Posted March 20, 2011 Share Posted March 20, 2011 Tigerseye: I assume you saw in that article then that the games use data tables for EXP and growth to calculate levels, and not the actual formulas. That's what I do in my library as well. Unfortunately my library is not up to date for Gen V, but feel free to use it as a starting point (it's open source). Link to comment Share on other sites More sharing options...
Tigerseye Posted March 20, 2011 Author Share Posted March 20, 2011 What language are you writing this in? I have a .net dll that can handle a lot of that, but needs a bit of work on the level/exp functions (they're, uhh, wrong - off by a bit and I haven't bothered to fix it), but has a DB of growth rates, etc. I am actually writing this in .NET (well, I'm using VB Studio 2010) That might be extremely helpful to have a look at actually - I may not use any of the code directly but I am always up for new ways of doing things. My program is a bit inefficient at the moment (it's a little slower than Pokésav, etc. - due to me being a novice programmer!) so I'd love to see how other people write things. Thanks for the explanation on that, xfr. I might stick to just computing the growth rate and experience separately for each Pokémon - this will work best with the database structure I have going. Cheers for the help Link to comment Share on other sites More sharing options...
Tigerseye Posted March 20, 2011 Author Share Posted March 20, 2011 Thank you, Codemonkey That's interesting to know - I guess it improves performance, not having to calculate it with a formula. So they use tables like the ones on Eevee's site that xfr linked to? Link to comment Share on other sites More sharing options...
willaien Posted March 20, 2011 Share Posted March 20, 2011 (edited) http://dl.dropbox.com/u/17115146/Pokehack.zip Here's what I have. It's in C# If you don't have Visual Studio Professional, you'll have to download C# express, compile it and then reference it in your project. Otherwise, you can reference it in. Sample usage: Dim pkm As Byte() = File.ReadAllBytes(pathtopoke) Dim poke As New PokeHack.Pokemon(pkm) poke.HeldItem = PokeHack.Pokemon.ConvertStringToItemID("Master Ball") poke.Level = 100 Edited March 21, 2011 by willaien Link to comment Share on other sites More sharing options...
codemonkey85 Posted March 22, 2011 Share Posted March 22, 2011 Hmm, hey willaien, instead of converting a string to the item you want, why not just call upon an enumeration populated with the item names? For instance, in my library it's: Dim pkm As New Pokemon pkm.Item.Value = Items.Master_Ball Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now