Jump to content

greentea

Member
  • Posts

    69
  • Joined

  • Last visited

Everything posted by greentea

  1. FE was supposed to be Fateful encounter part is : 02 00. As you can probably see, I'm not that great with bits and bits, and all this stuff, even though I know what they are. Since you guys stated that I can check the gender based on the FE, I'd do that. I already have code that does work for the alternate forms and FE ticked or not, I just need to check the gender this way. The part we're checking is two bytes long, so in my case of 02 00, I only get a 2 bit answer. How exactly do I deal with that? 02 00 becomes 00 02 in little endian. Converted to binary, that's only 10. Where do I place the extra 0's, how do I do this? It's a Chansey with no FE, so it basically has to be 010 etc according to what Codemonkey posted.
  2. It's not it is too much, I just didn't expect it to be this much. It is coming along well at least. I know it's all stored in binary, but I have no idea how to print the appropriate extra 0's. I don't know if they are trailing 0's even. Like the file I checked, it was a Chansey with FE 02 00, so 0002. Comes up with 10 obviously in decimal. According to the information, it has FE ticked and is male, unless I'm doing something wrong. I'll likely be taking more programming courses in university. I've taken 3 computer courses so far, one that was basically an intro, we did flow chart programming, Flash Action Script programming to make games like Tetris and Pong, overview of computer parts and circuitry. I took the CS one where we did VB Express, and then a comp. eng. where we learned about all the parts and how to put computers together, reformat and stuff like that. I did get proficiency in all 3 courses (1 was in g10). The main thing is syntax between programs, and AS was based on C. I will be reading that book though, but I wanna finish this first tbh.
  3. I have been asking help on VB forums throughout the program, so I'm not going to redo some code I don't have to. And "Don't go reinventing the wheel" was a phrase my tech teacher used to use a lot. I'm glad everyone is so helpful. Ya know, I didn't expect it to be this much work when I started, I'm nearing the end of it though. There's only a few things left, and this is half of it. I have like OT gender and moves after this. I asked for a code on integer (long in this circumstance) to binary, since I couldn't google one that works, nor did by attempts work. I think if I have it in binary, it will be easier to work with. The way I display alternate forms right now does work though, but for gender, it will be better. I also have a C++ book sitting beside me because I plan to learn it. I am actually planning on a Comp. Eng. program post secondary, I thought it would be useful to learn a popular language instead of VB.NET that sucks. Once I finish this program or the bulk of it at least, I'll be using that book. I still have another year of HS so I have time to learn it. So I make sure, when I convert the FE to binary. I convert it in little endian, so 41 then 40, and then I print the leading or trailing zeros?
  4. I guess I gotta review some stuff about bits and bytes. From what I understand though, I just need to access the first 3 parts of the binary to check. I guess it's simple enough as long as I understand the bits and bytes, haha. And I guess I can assume non-female, non-genderless is male. You guys always come to my rescue. This is what happens when you take a mixed (in between college level and university level) CS course. That you ace (with 100%) and do nothing half the time cause you're done (and everyone but one aren't) because they're stupid. Did I mention the class average was 68% and my teacher knows C/C++ and never did VB? If I had learned any of this... hahaha
  5. Actually, the way I was currently checking, it was using the FE. When I programmed it, I saw the part about male and female so I did that. However, I ran into a slight problem. For the few pokemon that have alternate forms, their FE doesn't respond to male or female. What of those few?
  6. I'm a little stuck on the gender now, and the shiny or not part. First off, ability and nature were pretty easy. I'll use a text file for the abilities, nature I coded straight in, there's only 25. With gender, I have a Charizard I was checking. Charizard, according to Serebii, is 87.5% Male (which makes sense). It returned 189 with my code. Since the value is 31, we know it is male, which it is. However, I went and used a Lugia. It returned 166. We know Lugia to be genderless, so the site says it should return 255. Pokesav shows it as genderless. The code I am using is: gender = PID mod 256 which is just what the site says "essentially p % 256" which is easier to code than whatever other stuff they were talking about (clearly I didn't get it). Secondly, we get to shininess. This Lugia I am using, it has a PID that is 9 digits long, so in binary, it is only 27 digits long. These are 32 bit binary numbers, so do I assume the first 5 are 0? Or how else should I go about this. The rest of that code makes sense to me. I know truth tables and all, I understand XOR logic. The code is there and easy enough to do.
  7. Figures I wouldn't think to look on Bulbapedia for this. Thanks, it looks like I'll be able to code it from that, hopefully.
  8. The offsets are hex. That value does indeed produce a hex. I am using String.Format. X makes the value a hexadecimal. C0 70 FE 00 is the hex 38-3B for this particular file. Using the way I wrote it, in little endian. txtIV.AppendText(IV) returns "00FE70C0" NEVERMIND. I got it to work this way. I was using the wrong offsets hahaha. Now, I've got another couple of questions. Ability and moves, do they follow regular patterns or do I have to just make a chart of them. I'm asking because you had the chart last time, maybe you have more for this =P. And for gender, nature and shiny, I didn't see any info for it, so I'm kind of in the dark here how to figure it out.
  9. That's basically what I had, but it doesn't work. 'IV is the hex value of hex offsets 38-3B in little endian IV = String.Format("{0,2:X2}", data(41)) + String.Format("{0,2:X2}", data(40)) + String.Format("{0,2:X2}", data(39)) + String.Format("{0,2:X2}", data(38)) 'value2 is IV converted to integer Dim value2 As Integer = Integer.Parse(IV, Globalization.NumberStyles.HexNumber) 'exactly what you have, I sometimes use And Binary where Binary is int 31 DEF_IV = ((value2 >> (10)) And &H1F) When it is in little endian format, I constantly get 0's for any IV. If I do it in big endian, I get wrong answers. This particular file has the IVs: HP = 0, Attack = 6, Defense = 28. When I print the 3 IVs in big endian (as little returns all 0's), I get 0, 8 and 26.
  10. Oh yea, I'll definitely have a couple more questions. The other VB board I'm getting help on, I think they're starting to get annoyed at me asking questions, but those were all issues with me not knowing how to code it because how much can you learn in one year with a bad class (by bad, I mean stupid, the avg was 68% and I got 100...). For moves, is there a pattern to them, or do I just have to say "XXXX" is the move Fire Blast for instance? I would have asked the same for ability, but it's just one offset so I could figure that myself. Dim HP As Integer = 0 Dim Attack As Integer = 1 Dim Defense As Integer = 2 Dim Speed As Integer = 3 Dim Special_Attack As Integer = 4 Dim Special_Defense As Integer = 5 Dim IV As String Dim Binary As Integer = 31 'sets IV equal to the 4 IV offsets IV = String.Format("{0,2:X2}", data(41)) + String.Format("{0,2:X2}", data(40)) + String.Format("{0,2:X2}", data(39)) + String.Format("{0,2:X2}", data(38)) 'converts IV from hex to integer Dim value2 As Integer = Integer.Parse(IV, Globalization.NumberStyles.HexNumber) 'in the IV text box, evaluates a rightwards shift of 5, then And 11111 txtIV.AppendText((value2 >> (Attack * 5)) And Binary) Regardless of whether I convert or not, I do not get the correct number.
  11. Alright, I'll have a good stab at programming it some time today. In VB.Net, & is used to assign a second item to something, it's almost like another + sign without physically adding them. I have done truth tables before, so I do understand that.
  12. iv = 3B + 3A + 39 + 38 'like I described, using the string format method below 'these are to be used for the s value HP = 0 Attack = 1 Defense = 2 Speed = 3 Special_Attack = 4 Special_Defense = 5 1F = String.Format("{0,2:X2}", data(31)) 'this would be the hex value of the hex offset 1F (IV >> (s*5)) & 1F So that is basically what I should use? Just double checking, I'm not going to be working on it in the next few hours anyways, so I might as well. The program I'm making is fairly far into production actually. I have IV, moves, ability, gender, shiny and OT gender left to code (where I already programmed name, OT, SID, ID, FE, country, hometown, PID). I'm not looking to code something like a relationship, just display the data much like Pokesav does. I might do a couple of things with the data once it's all displayed, but displaying it is what I need for now.
  13. What a champ Jiggy. And same for Monkey. You guys rock. Next is the PID, but you guys have a page on that, I think I can try to understand that. You know if Visual Basic Express supports this? I'm hearing it doesn't support Unicode. Nevermind, I can't do it in console version, but I can in form apparently. I just wanted to thank you guys again for your help. My program can now read in that information and display the OT for any pokemon correctly. It took me a while to do, had to change from console to form, had to figure out a browse button, how to display it on form, etc., but at last, it works (I mainly used console in school). I don't know of what concern this is, but I only really use two pieces from those 4 columns. Just the pkm file hex value and the character. Skip the change value, since I read it in to an array, both indexes are the same. I have some trouble understanding the PID information in the guide by SCV. http://projectpokemon.org/editingresearch/guidepidiv.php I understood the PID part, and I printed the PID. But I can't understand the IV part. iv1= 0x03F2FDE1 & 0x7FFF; therefore iv1 = 3B + 3A + 39 + 38 ^The values of those offsets But what is 0x7FFF supposed to be? I guess I am to assume it's a decimal constant 32767? And then in iv2 ( iv2= (0x03F2FDE1 >>0xF) & 0x7FFF; ), I guess >>0xF is a 16 bitshift rightwards? So I'm going to have to convert iv2 to binary and do a bitshift, then convert back to decimal and add the constant 7FFF? And in HP or Attack for instance, the and value is again a constant I would assume? Sorry to bother with something that may not be so confusing, but I am definitely confused. I never learned bitwise operands in programming. We covered AND, OR etc in circuitry, but I still never did a bitshift (though from reading the wiki it sounds easy enough). It's also because it's written in an unfamiliar language to myself (VB.NET does everything a lot different than other languages), and the fact that he used "0x03F2FDE1" as an example from the hex, but other things like "0xF" or "0x7FFF" don't occur in the displayed hex.
  14. Thanks for that list, I'll check it out. I got it sorted out and understand it now, thanks a lot for that table, it really helps. What is the best way to do this is what I need to figure out. If I can find a text file with Unicode values and the corresponding character, that would work, I may go look for it. If not, I think I'll have to manually input the character in. Oh, and sorry for not being specific. I normally am fairly specific with this stuff. I had to go to dinner like ASAP though.
  15. Thanks for moving it, I wasn't sure if it was in save or not since it only has to do with a pkm not a sav. Well, you obviously converted it in your program, so you figured out just exactly how to convert and display the OT. I know how to convert the information somewhat, I've been converting it to decimal a few times already. But what if I convert to Unicode? Will it display the OT or what? Exactly how your program displays the OT (except mine is still in a console form like legal.exe since it's easier to program), I want to display mine. I need to know if it converts properly to Unicode or something. I assume it's not ASCII cause we've got Korean and Japanese to deal with. Like, what values convert to what letters, stuff like that.
  16. As I said in my intro, I learned VB Express in school, and did really well. I decided to try to make a pokemon program. Anyways, I got up to displaying the OT, but I'm lost now. I know where the OT is in regards to the offset, but I'm stumped how I would convert it. For one, I have no clue what it converts to, maybe Unicode or ASCII. So if someone could help me with that, I'd be grateful.
  17. I am confident that someone got one of these Metagross I have themselves. There's something else I've been meaning to ask. I have some friends that cannot seem to get Applocale working, they don't have the extra languages installed or something, so when they deal with foreign pokemon like Japanese or even Korean which I've seen lately, it always comes up with those stupid characters rather than the Japanese ones. I was hoping to make a program in Visual Basic that could convert the hex of a .pkm file into viewable information. I'm hoping to start with translating the OT, and then maybe move to ID and maybe even include PID information. Does anyone have a link or something to get me started on trying to translate the OT?
  18. I have this pokemon I got from a friend, a new Pichu thing from down in Japan. My friend went to place himself, and gave me a copy of it. However, I checked it in legal and it comes up as a hack. I trust me friend, and this program isn't working. The same thing happened to some Metagross my friend gave me as well. I think it was like Red Metagross or something like that. They all come up as Type: Hacked Pokemon. How can this be incorrectly checking my pokemon?
  19. Hey man, a buddy told me 'bout this site, looks pretty cool. I used pokesav before but I had no idea you guys had such a cool site. So many cool stuff on this site, PokeMod looks interesting, Legal.exe looks nice, a bunch of stuff I can download, really cool yo. Hey, I got a bit of coding experience too ya know, I took a course in school on it, didn't do too bad, I did ace the course, literally. Maybe I could try programming my own thing, looks like there's some talented people here who could help. Does anyone know VBE? :grog: to this site mates, can't wait to get jumping around.
×
×
  • Create New...