Jump to content

greentea

Member
  • Posts

    69
  • Joined

  • Last visited

Everything posted by greentea

  1. Yea, it's probably going to output information to a text file, it will be useful for making lists of your pokemon I suppose. I'm not sure exactly where it's going to go.
  2. Just wanted to tell you that I produced a beta version of this. I plan to add a lot more to it later on, but the things I plan on doing, I am capable of doing them myself, it's mostly simple checks and an output to a file. Thanks for all of your help, without it, I would not have been able to create this program.
  3. Thanks yet again you guys, after getting all the text files and a few hours of programming (because it took a while just to put all the information in), I've got the stats up =P
  4. Well, either way. It's going to take a while, well actually, I've been getting people to do them for me all along so yea =P.
  5. So then I can take http://www.upokecenter.com/games/rs/guides/exptable.php and code it, likely as a record of arrays from an input txt file. Then check the exp, 0x10-0x13, and convert it to long. Check where it lies on the chart and determine the level. Sites like Serebii have the info for which exp one they use. Sounds good to me. Point of scaring me with those formulas?
  6. So basically I'm going to have to understand those formulas =(. Confusing enough, this is gonna take some time. I'm pretty much lost with the formula. But aside from understanding it, I check to see which formula the pokemon uses, return the value, and check in a table of exp values.
  7. I ran into a problem. The file I'm mainly working with, the hex goes up to 0x87. That code relies on myself having the level of the Pokemon, which is 0x8C. I'm currently programming it to work on the met at level but I'll definitely run into touched stuff.
  8. I think math.floor will round the answer if you place it there. You need to round several times during the equation. It seems to me as though they would have already tried that.
  9. OK, I wasn't sure about floor. I remember seeing a similar formula when I first started, and I know about the increase stats.
  10. So if stat is HP, X = 0? And What exactly is N? And I'm not so familiar with math programming, like floor and ceiling stuff. Care to explain what floor is here?
  11. I'll check it all out later when I'm working on it. I don't mind if I have to do it Serebii style, it's not that hard really. I guess the simplest way is probably just another text file with some simple code like this. I will manipulate your part and a part to determine which IV largest is, but still not that hard honestly. For counter = 0 to 31 if largest = characteristic(counter).attack_number txtCharacteristic.text = characterstic(counter).char Exit for I guess I was wrong, it just seemed to go that way for every file I tested with. But I'm glad I got you to show me the real way. Just a question, but I don't suppose I can show the stats can I? HP is offset 90 and a lot of files don't go that high in their hex. If it's possible, and not too hard, I wouldn't mind knowing some of that, stats would be useful.
  12. Hey, been a few days, but everything so far is sorted out. I want to do the characteristics now and I saw http://www.serebii.net/games/characteristics.shtml. Is that accurate enough? I'm a little curious about what happens with ties, maybe I can get someone to check it. I did some testing and found that there's a specific order they go in if they are tied. It goes in the normal order they are except HP goes to the bottom.
  13. The array is a byte array. The way I access the offsets, I just say which number it is in the array. I have to name the offset in decimal not hex, but it's fine by me, it's never been a problem. I got the ability up and someone already finished a list of the moves for me, so I'll try doing that sometime soon.
  14. OK, the .pkm file is read in byte by byte into a large array. The information I am using, the Unicode values, the pokemon names, pokemon abilities etc are all in plain .txt files and read in line by line into record of arrays. The point of converting is this. The array that stores the .pkm file stores it in hexadecimal. The file that I plan to have for the moves will list the moves by number. That number is in decimal format. What will happen is I will take the value of the move from the array that stores the .pkm file information, and search for it in my record of array for the move. Just for example, if I search A3, it would error because A3 doesn't exist, or 66 would bring up 66 instead of the other value it is supposed to. A simple conversion so they are the same format will work, and it's not hard, nor am I worried about it. The other thing is that I will be constantly updating certain information in the program. I'll likely devise a format for it and allow others to help me. Text files are simple and make sense. Other parts might be easier, but I understand working with text files this way.
  15. I am going to read in the numbers in decimal. However, the number in the array of hex will be in hex. 100 decimal is not 100 hex. So if I did a search, I'd be searching say 42 in hex in my file and it will not get 66 dec like it should. I need to do a conversion at some point to a number so they're in the same format. It's two lines, I'm not worried.
  16. OK, I didn't realize why they were listing Pound as 1, but that makes sense now. I will have to get someone to do that for me as well, someone is already doing the ability part. It should prove easier, there are less and all the moves are on one page, not like search for abilities. Of course, I'll have to do a hex conversion or something, but it will be fine. It says it is stored in bit 7, for the OT gender. So I guess I can assume I convert to binary and look at the 7th bit? Correct me if I'm wrong, but I take it, do a left bit shift of 7 and use the number there. Example: Female, hex is C6, that's 1100 0110 in binary. 8 digits long, counting from 0 at the right, so 7 is the first 1, and female. Male, hex is 46, that's 100 0110 in binary. Since it only goes up to an upperbound of 6, 7 is 0 and thus male. EDIT: I just did a bit of checking with it and I see how it works. Convert it to decimal to get the value. If it is female, then you must get rid of the leftmost value in binary. Thanks again codemonkey.
  17. Haha, I got it all sorted out. Convert.Int32, and you already told me about it. Oh well, it works now, so no harm. I'm going to get someone to work on a list of Pokemon and their ability for me. I could not find a list of moves on the site you gave me CodeMonkey. Every one I found listed too much information, I would likely be sitting here for ages trying to remove it all. If you don't have it or anything close, don't bother, I can get someone to do it for me probably, but if you do, I only need the name and the hex value of it so I can read it in and translate. The PP would be nice, but I can easily do that myself or have someone do it. Oh, and while I'm at it, anyone have any idea on coding the OT gender? I don't seem to see any information on it documented here, bulbapedia or by anyone I know outside of the two.
  18. Hey guys, I hope someone can help me with this. I have a problem and for the life of me, I don't know why it does this. What this code does is check for the shininess. There is some other coding that is unnecessary. Before coding this, I did testing manually and I am sure it should work. E returns the value it is supposed to, I can tell you that much. But F does not. I am positive that p1 and p2 are assigned correctly. Here is a spoiler with some values Putting the PID into calculator, it returns the PID in binary. I had to add the lead 0's manually, it still produces the correct PID like it should. I split the PID into p1 and p2 correctly, I printed to make sure the values were the proper ones. When it gets to p1 xor p2, it somehow messes up. p1 xor p2 in calculator produces 25,852. However, in my program, it produces 109990702240972. Manual testing proves this. Any ideas? ---------- Post added at 03:17 PM ---------- Previous post was at 03:08 PM ---------- Oh snap, I think I just figured it out. It treats the two numbers as decimals and converts them to binary to use. I need to convert those binary values into decimal, but know how I do not.
  19. Hey, haven't worked on it in a few days. But I figured out where I was going wrong. I did some manual stuff, writing it all down, converting with calculator and so forth. What was wrong was reversing it and not adding the extra 0's. I had to do it the hard way to figure it out, but I'm sure of the problem now, or at least, pretty sure, it worked on the file I tested yielding 2 for shininess. Coding it may take some time, I probably won't do it today and I'll have to think about how I'm doing it, but at least I got it sorted out.
  20. Yes, I agree. I put a spoiler for all the values I was producing, and I'm likely producing an error on the p1 or p2 values. I just explained how it works, so we need to figure out why I'm assigning it an incorrect value.
  21. Let me try and help out my own cause by explaining what I did and how I did it. Hopefully we can get to the bottom of this. First off, all my conversions have been tested and work. There is nothing wrong with them. I know there are possibly better ways to do it, but as it stands, I really don't care since it works fine for me. The long one, it works to convert hex to long, integer etc., and I've displayed info accurately. The binary one, I made myself the other day and I tested it out to make sure it converts properly, and it does. The reason I converted to binary was because of how Bulbapedia explained it all. They coded F as p1 and p2. They were separate parts of the PID in binary form, so I decided it would be easier if I did that. The way it was assigned into the char array, the highest index stores the highest value of the binary (ie the most left value). I did not add any leading or trailing 0's to the binary however, which may cause it to be the way it is. p2 is 0 to 15, so the latter 16 digits of the binary (the lower values), and then p1 becomes the higher values minus leading 0's that I didn't bother with. ID Xor SID produces a 4 digit integer while p1 Xor p2 produces a number I believe I had to use long to store, it was very large, as was the outcome of E Xor F.
  22. I know all my conversions in that code work, I tested them out. The binary one, I actually ended up making from scratch, but I did test it, and the long one already works to display the PID. The likeliest place for an error is when I'm assigning the values of F.
  23. I had to convert the PID to binary so I could access it properly. Bulbapedia works with it in binary, and it splits it in half, so I did that conversion. I just decided to convert to make it easier for me to understand, that is, for the other values. Does it really matter which way I convert it? It works either way.
  24. First off, been busy for a few days, family reunion and stuff, but I'm back now. I got the gender working fine yesterday. But now I'm stuck with the shiny part. Here's the code I have so far (sorry it's a little messy). The F value is what messes up, at least I think. As you can see, it returns a really big number, even when I use a shiny pokemon. I obviously did something wrong somewhere, but knowing me, I can't figure it out.
  25. I think I'm totally confused now. My understanding of little endian was it was in reverse of things. I was doing the higher offsets came first. If that's the little endian format, then it's going offset 40, offset 41, in that order to make it little endian. I think I thought about just adding 0's statically, but how does it work if the number I'm using is still in some sort of non-binary form? So lets get this straight then. If I use it in big endian, it's 0002, and then it produces 10 in binary. Then I put it into little endian from there, so I get 010000 etc and have flag off, female, rest 0's. And then If I use a Lugia that is 0400, I make it 0004, and it produces 100 in binary. I flip that around and get 001, which is flag off, no female, genderless.
×
×
  • Create New...