|
|||||||
![]() |
|
|
Thread Tools |
|
|
#276 | |
|
Join Date: Apr 2010
Posts: 126
|
Quote:
Last edited by GoldenBanana; Jul 27th, 2010 at 11:55:44 PM. |
|
|
|
|
|
#277 | |
|
Join Date: Jan 2009
Posts: 659
The AI is catching on....
|
Quote:
divide 15360 by T until you get a remainder, then place that remainder over T. This number is how far through the cycle the game is after 1 beat from the starting point (which is 0x0000 upon the VERY first beat). now what we have to do is make that number equal to one, two, or any other whole number. I guess I wasn't specific enough in my previous post; all we need is for 15360 mod T /T * n to be a whole number, and therefore a set of complete cycles. n doesn't have to make 4 / 15 = to 1; It can make it equal to four, by making n=15, thereby: 4 / 15 * n, 4 * 15 / 15 = 4 = 4 complete cycles, thus beginning the decimal cycle over again. Sorry about that ;>_> I've been away from this stuff off and on and I forget where everyone is at in their level of understanding :(
__________________
We like 'em RARE! [Trade Shop]
ZariGS on FanFiction.net Soul Silver (Trades): 2709 5214 9088 White2 (trades/battles): FC Pending |
|
|
|
|
|
#278 |
|
Join Date: Apr 2010
Posts: 126
|
Oh! Okay I think I've got it now. So I was wrong before. The beats where the seed repeats for 225 BPM are 1, 16, 31, etc. So it's like polar graphs then, right? Where one cycle is 2pi, so 5pi/2 is equal to pi/2. Similarly, one cycle for 225 BPM would be 15, so 16 beats yields the same seed as 1 beat. So basically, once I find n, I add that number to 1, and each additional term in the arithmetic sequence, getting 1, n+1, 2n+1, and so forth.
Last edited by GoldenBanana; Jul 28th, 2010 at 10:05:25 PM. Reason: can't add |
|
|
|
|
#279 |
|
blatant Nintendo fanboy
Join Date: Mar 2009
Posts: 4,327
your mom sucked at e3
|
For all you crazy amazing programmers working on this out there too. Something that I've looked and looked and looked for, but haven't been able to find is a multi-stage timer with more than 1 beeping countdown. Kind of like Emloop, Kind of like Pikatimer, but with a full beeping countdown for the "pre-timer" too. I personally have a terribly hard time synching with the pre-timer for this FR/LG stuff with no good beeping countdown.
__________________
|
|
|
|
|
#280 |
|
Nets many surprise KOs.
![]() ![]() ![]()
|
Yeah, I've been procrastinating on actually trying to hit spreads for that exact issue. I bet it would be terribly easy to modify the pre-timer in Pikatimer to beep for all counts. If I have time, I'll ask for the source code and edit it myself. For now, though, I'm juggling between endless breeding and working on this project, so it'll have to wait. There really isn't much out there as far as multi-stage timers go :/
|
|
|
|
|
#281 |
|
Join Date: Aug 2009
Posts: 580
Los Angeles
|
Sorry for interrupting and changing the subject, but in this post, I'll put the stuff I find about ID and SID creation in FrLg.
-Seed 1 is created after pressing A on the Venusaur/Charizard Screen -Seed 2 is created when you press OK after you have typed your name. -By saying No, and therefore retyping your name, you can redo the seed. -Seed 2 is your TID(converted to decimal) -Seed 2 appears to overwrite Seed 1(or that's my explanation for it) If you guys already knew this, tell me now so I don't make a fool of myself. Also, a quick double check, if I'm on VBA, I can check the seed using Memory Viewer. If I recall correctly, it's location is 02020000 right?
__________________
Black FC: 1077 2076 6240 Soul Silver FC: 1978 2404 4146 The Pedarsag's Palace(Trade Thread) Last edited by imapedarsag; Jul 28th, 2010 at 8:24:24 PM. |
|
|
|
|
#282 |
|
Nets many surprise KOs.
![]() ![]() ![]()
|
I for one didn't know that imapedarsag, so thank you for bringing that to our attention. As far as the memory location, I really do not know. User flovv was the one who found out that the seed is generated from the internal clock, since he was the one who ran the debugger.
Also, I need to make a huge correction. Apparently, the frame still advances whether you're in a menu or in any battle. Here's how I firgured that out. First, I used the Turbo controller normally, holding A from soft-reset until the Mewtwo encounter. I caught Mewtwo and checked its seed: 0x9A9A Frame 571 Next, I soft-reset as usual, but before encountering Mewtwo, I opened up the main menu for a few seconds, then closed it and caught Mewtwo: 0x9A91 Frame 973 Finally, I soft-reset as usual, but before encountering Mewtwo, I ran around and very quickly encountered a Ditto. I let the game run a bit, then killed it. I then encountered Metwo, and found: 0x9AA0 Frame 3131 This huge variation in delay can only be a result of time spent in the menu. Therefore, we must go back to my old method of seed verification. I'll repeat it here so you don't have to go back a few pages. Hopefully Arseus will edit the OP to include the original method. Here it goes. Requirements:
Calibration:
Now, make sure that your target frame satisfies: Code:
Eq. 1 TF >> TCheck (in seconds) * 60 Now, let's say, completely hypothetically, I start the stop watch as the game seeds, use Sweet Scent, catch, say, a Wobbuffet, and check its IVs. As soon as I find my seed from FRLGSeedFinder, I hit STOP. Let's say this time is 5:45. Converting to seconds, I get 5*60 + 45 = 345 seconds. Now, I go back to Equation 1. TF >> 345 * 60, or TF >> 20700 In other words, this method can only be used for HIGH frames. In fact, it wouldn't even be worth it to use this method for lower frames, as you would probably overshoot your target frame just by doing the calibration. Now that we're done with that, we can get to the cool part. Let's say you can consistently hit the seed 9AA0. So, you decide to search the frames on this seed and you find this admittedly lame spread: Frame 44586 Brave 30/30/14/30/25/30 Is this frame high enough to warrant using this method? Plugging 44586 into equation 1 yields 44586 >> 20700, which is obviously true. Now we're set.
|
|
|
|
|
#283 | |
|
Let the music play!
Join Date: Dec 2004
Posts: 3,730
|
I have a few questions that you might be able to answer. Is it possible to determine what frames wild encounters occur, assuming you are not using Sweet Scent - and therefore is it possible to determine when you can avoid wild encounters and when you can trigger them (assuming I'm working on emulator)? Is the RAM address that determines when a wild encounter happens known?
__________________
Quote:
|
|
|
|
|
|
#284 |
|
Nets many surprise KOs.
![]() ![]() ![]()
|
You mean, just by walking from one tile to the next? I have no clue how it happens in FR/LG, but I have a feeling that in the 4th gen games, since the frames advance as you walk through grass, it may have to do with encounter slots. As far as the lower level stuff like assembly, debugging, and ram addresses, I really have no clue (though I should, but it wasn't my focus as an Electrical Engineering student lol). I've tried working in Dsmume in debugger mode, and there's just too many damn values to keep up with.
|
|
|
|
|
#285 |
|
blatant Nintendo fanboy
Join Date: Mar 2009
Posts: 4,327
your mom sucked at e3
|
Yeah, Flovv's the guy to contact about that, or maybe Negator or Syberia too. The rest of us just go straight off the cart.
__________________
|
|
|
|
|
#286 | |
|
Let the music play!
Join Date: Dec 2004
Posts: 3,730
|
Ok, I sent Flovv a PM, the other two I can find on IRC. Thanks mattj
__________________
Quote:
|
|
|
|
|
|
#287 |
|
Nets many surprise KOs.
![]() ![]() ![]()
|
Update (8-3-2010):
The program is fully operational but I'm getting some memory management errors sometimes. I was not receiving these errors when it could only search for IVs, so this probably lies in String conversion (converting Objective-C's NSString * class to regular old C's char * type). I'm creating a few variables that are probably unnecessary and aren't getting cleaned up (insert more technical jargon that I don't fully understand here). The program takes a very long time to cycle through the seeds, which is understandable, and I'll explain why. First, it chooses a seed, then advances the RNG until it reaches fmin. Next, it searches every seed after fmin to fmax. Taking all 65536 seeds into account: Total pre-advancements = fmin*65536 Total searches = (fmax - fmin)*65536 Finally, here are some screenshots of some successful and failed search attempts. Success! ![]() Failure... ![]() ![]() Every day I work on this I get closer and closer. Once I get these annoying memory management problems fixed, we can finally have a close-to-usable program. The next goal is to get the Zari's metronome stuff ironed out and hopefully have it in code format to integrate into this program. Outdated Screenshots:
...
__________________
![]() Last edited by NixHex; Aug 3rd, 2010 at 5:15:31 AM. Reason: New screenshots/Info |
|
|
|
|
#288 |
|
Join Date: Feb 2009
Posts: 1,210
Orlando, FL
|
Looks good! I'm guessing the String you're having trouble converting is for the nature? Again, I'm not familiar with Objective-C, nor am I familiar with programming anything on this large of a scale in any language, but are you sure that you need to convert from String to char*?
Just out of curiosity, what kind of linked data structure (linked list, stack, queue, AVL tree, binary search tree, etc.) are you using for the spreads?
__________________
My other Rotom is a washing machine. |
|
|
|
|
#289 |
|
Nets many surprise KOs.
![]() ![]() ![]()
|
1. The return type for the nature from the pkmnGen class is NSString * but the input from the console is of type char *. I can only compare two C strings to see if there's a match.
2. I don't know any search algorithms like that, but I do brute force. It's a loop that goes from 0 to 65536, with a nested loop that cycles through the frames specified by the user and checks for a match. If there's a match, it simply outputs the spread info to the console, then the pkmn on that frame is released from memory completely. |
|
|
|
|
#290 | ||
|
Let the music play!
Join Date: Dec 2004
Posts: 3,730
|
Quote:
Also I started doing some research into the combat system, more specifically I wanted to find out if critical hits were easy to manipulate. I entered the first rival battle, and couldn't get a crit to occur within the first 40 or so frames. I found this a little odd, since 1/16 should on average give a crit 4 times a second (a bit less, but for safety's sake 3-4 is about right). Has anyone looked into when move hit/crits are determined in each round? I might be trying things a little wrong, since I was working from after when the Fight option is selected, it might be what frame you choose Fight that determines when a crit etc occurs.
__________________
Quote:
|
||
|
|
|
|
#291 |
Join Date: Oct 2006
Posts: 869
|
Toothache, I am afraid that nobody has done any research into battle mechanics, as far as I am aware; at the very least, nobody has posted anything about them in this thread. Are you sure that critical hits are determined after selecting "Fight" rather than a specific move? If the RNG is constantly running, I would imagine it would just make a call after a specific move is chosen. This would mean that there would be no need to discard a "critical hit check" if say, Protect is chosen; I'm not a programmer however, so I really have no idea how this works! As I'm sure you've noticed, this thread is more concerned with capturing Pokémon, so I apologize in advance if you can't find the answer you're looking for here.
On another note, NixHex has released his BeatFinder program, which has been attached to the main post. However, please know that at the moment, it will only work on Mac OS X computers. I have tested the program myself, so I can attest to the fact that it works, and I have also dedicated a section of the original post for this new development. Thanks to NixHex for developing BeatFinder; I'm sure many users will appreciate your efforts! |
|
|
|
|
#292 |
|
Nets many surprise KOs.
![]() ![]() ![]()
|
Give thanks further to Zari for developing the insane idea in the first place!
|
|
|
|
|
#293 |
|
Join Date: Jan 2009
Posts: 659
The AI is catching on....
|
Yo, it's been far too long since I last posted here, but I've got a new goody that everyone can play around with: n!
Here's the magic formula: n = (256t * T) / 15360 + 1 where t is the time desired, T is a tempo (IE a varying value variable), and n is the number of beats. I finally managed to remove the annoying fractional function!!! Here's how:
MAGIC
I know I haven't been the greatest contributor here in the last few months, but I wanted to let everyone know that I still care about this :) note: the new formula also reduces the amount of searching we have to do through tempos/beats; I bet you can all guess why too :) EDIT: for those, who noticed the new formula doesn't incorporate the seed, tMIN (smallest t value possible) is equivalent to s / 65536, so that is how it is incorporated in the formula ;)
__________________
We like 'em RARE! [Trade Shop]
ZariGS on FanFiction.net Soul Silver (Trades): 2709 5214 9088 White2 (trades/battles): FC Pending Last edited by Zari; Aug 27th, 2010 at 2:44:31 AM. Reason: seed incorporation |
|
|
|
|
#294 | |
|
Let the music play!
Join Date: Dec 2004
Posts: 3,730
|
Ok, bit of an update, I found that it was only the very first attack (where Oak is all "Inflicting damage is the key to battle") that is rigged not to crit. Every other attack so far has been possible to crit just by hitting the correct frame. I would therefore assume critical hits are only set when you hit the A button on your move, and as such can be easily manipulated using frame advance.
Wild encounters seem to be another issue though. It seems that you have a fixed number of steps before a wild encounter occurs. Through careful input manipulation I was able to delay this by 1 step in the grass, but I'm not completely sure how I managed it and wasn't able to replicate it so far. In short, I doubt wild encounters are manipulable at all, instead have fixed occurance. What determines the number of steps before the next encounter? That is something I want to work on next. It might be something to do with when the previous battle finishes, it sets the number of steps before the next encounter is set to occur. It will require some further testing, but I do have a couple of RAM addresses that appear to be related to this, so I have something I can watch and analyse.
__________________
Quote:
|
|
|
|
|
|
#295 |
|
Join Date: Jan 2009
Posts: 659
The AI is catching on....
|
Some more formulae to make everyone's life easier:
Seed to Time [spent at menu]: s = 0x1000000 * t & 0xFFFF Seed to Beat/Tempos: s = (0x3C000000L * (n - 1)) / T & 0xFFFF Basically, I figured out that in this case the fractional function can also be expressed using the bitwise operator "&", limiting it to 0xFFFF, or the largest seed # possible. This version is a lot cleaner than the ugly fractional one ^^ (and should be much easier to put into code too!) Additionally, I found what I did in my last post was nothing more than proving what we already knew, that: n = t * T / 60 + 1 which in itself is still useful, but :x the new seed formula should cut down the amount of code required by a LOT :D
__________________
We like 'em RARE! [Trade Shop]
ZariGS on FanFiction.net Soul Silver (Trades): 2709 5214 9088 White2 (trades/battles): FC Pending |
|
|
|
|
#296 | |
|
Nets many surprise KOs.
![]() ![]() ![]()
|
Quote:
Have you done any more metronome/beat testing? If I get over laddering tonight I'm going to take a few shots at hitting that seed Arseus chose to use in the screenshots, 0xC28F, since it yielded an integer tempo (125.0 BPM) and a low beat counts (3, 28, 53, ..., 3 + 25m). If I can hit that seed, it will seriously be groundbreaking. In fact, I think that when we start hitting desired seeds, Arseus should write up the formal guide so we can eventually get this on site. It would be cool to have an article about Gen III on site before Gen V comes around. Let's pray this works. Something else I'm going to do is write up the BeatFinder in Java. It is such an easy program to write, especially with those formulas, that there really is nothing exclusive to the Mac OS 10.5* Foundation framework that I can't do in Java, thus making it multiplatform. * Oh yeah, I tried downloading my program at work where I'm running 10.4, and it didn't load. I hope the program isn't only compatible with Leopard. It obviously worked for Arseus as you can see in the screenshots, and he is running Leopard. |
|
|
|
|
|
#297 | |
|
Let the music play!
Join Date: Dec 2004
Posts: 3,730
|
By using the RAM Search feature, I was able to find addresses that appear to be related to the x and y positions of Red. These are, respectively, 0202065C and 0202162C. I notice they advance every frame rather than every step, which probably gives a good indicator of how wild encounter locations are worked out.
I am also very curious about the behaviour of address 02021658. As far as I can tell, every two steps through grass, it advances between values of 0 and 8, and increases by 1 each frame, resetting to 0 after it gets to 8, for exactly 50 changes. I also notice when a wild encounter is trigger it reaches a value of 9. So I guess this has something to do with wild encounters, but I'm not exactly sure what. Anyone with more familiarity with this sort of thing? I'm only just getting to grips with this, so anyone with more knowledge and experience might be able to shed more light on wild encounter behaviour All of these values are 2-bytes, signed.
__________________
Quote:
|
|
|
|
|
|
#298 |
|
Nets many surprise KOs.
![]() ![]() ![]()
|
From now on, I will be using this post as an info dump, updating it whenever something new comes up, be it data or other information.
9/20-21/10 Well, I was glad to see Zari on #frlg today. We discussed his fast tapping method that has yielded very consistent results, without a Gamecube controller! I eliminated any irrelevant text. Fast tap method is hilighted in red, important final notes in bold. At least read the red text.
Informative IRC convo!
About an hour later, I was finally able to sit down with my LG and do some hunting on my own. The results I got were, like Zari's, very consistent - I even hit some of his exact seeds, which, to my knowledge, has not been accomplished by two separate players, even with a GCN Turbo controller! Here are my results:
My Seeds!
Many of these results coincide with Zari's results, and as he has stated many times, the seeds come in groups. These seeds were not found in this order; this is a rearranged list. ___________Older Updates___________
9-18-10 - Meh.
9/15/10 - Convo with Toothache regarding in-game mechanics
9/13/10 - failed tests
9/8/10 - How to modify your tempo
__________________
![]() Last edited by NixHex; Sep 21st, 2010 at 6:06:54 AM. Reason: Huge update |
|
|
|
|
#299 |
|
Nets many surprise KOs.
![]() ![]() ![]()
|
I wanted to avoid unnecessary postcount++, but I figured a new post would garner more attention and interest. A new IRC channel is availabe: #frlg
This is for the discussion of our research including seed generation and battle mechanics in FireRed and LeafGreen. Please keep the discussion related to these topics; this isn't the place for asking how to hit your target frame in Emerald or any 4th Generation game. Try to refrain from bringing outside topics unless they relate to FR/LG Research. The previous post will remain my info dump, so look to that for updates.
__________________
![]() Last edited by NixHex; Sep 14th, 2010 at 11:57:00 AM. |
|
|
|
|
#300 |
|
Join Date: Apr 2010
Posts: 126
|
Despite the fact that it is competetively pointless to find out when the legendary dogs in FRLG are generated, I am going to continue this research anyway whenever I have time for the sake of completion.
================================================== 12-10-10 I have completed one more trial:
Data
Since it looks like the 5th line has appeared in every trial, I'm going to start trying to hit a desired seed using the information from my trials. So far, it looks like the last input when talking to Celio before Entei is generated is pressing 'A' when he says 'Thanks to you, my dream came true...'. 11-26-10 So I started testing again today, and I have more results to post. But before that, I have made changes to my procedure, which has helped me to easily deduce my initial seed. Instead of catching waiting until after catching Entei to get pokemon to check my seed, I catch a single Tentacool at any level and record the time it appeared immediately after generating Entei. After catching Entei, I level up the Tentacool to a Lv.55 Tentacruel and then check its IVs with Metalkid's IV calculator. This way, rather than looking through several seeds outputted by Seed Finder with high frames, I can pick out the seed with the lowest frame and be certain that it's my initial seed. Also, in response to NixHex's new findings for when the frames start advancing, I wait until the white screen fades out/the continue screen fades in to start the timer. For a more formal change:
New Method
I'm fairly certain about the data for trials 1 and 4, since I was able to deduce my initial seed. I wasn't for the other two, so that data isn't entirely reliable. I know that it seems like Entei is generated after the very last line of text, but nothing is certain until I actually have my Shiny Entei. 10-27-10 Progress!!! I was finally able to deduce my initial seed! In the past, when I would use NeoSyrex's FRLG Seed Finder application, none of the initial seeds that I found using one pokemon's spread matched the initial seeds found using the other pokemon's spread (I catch two pokemon to check my seed because Entei can only be identified by his HP IV and very rarely his Attack IV). Today, however, I found one matching pair, so I assumed that that must be my initial seed. I don't know if this was random, but hopefully this will be happening a lot more in the future. I will start posting my data, which will refer to the background information from the previous post, but for convenience's sake, I'll paste it along with my data. I will list the trial number, and the possible line numbers at which Entei was generated. A number with a "(x2)" after it means that it is possible that the Center is a Noisy area and the frame Entei was generated at was double the time of the indicated line number. 10-26-10 What makes this research particulary challenging is that in order to find out when Entei is generated when fixing Celio's machine, I need to correctly identify both, the seed that I'm on, and the frame Entei was generated on. This can be ambiguous though, since, most of the time, the only way to identify the frame is by looking at Entei's HP IV, and more than often, I am not certain about the seed. My method is listed below:
Old Method
10-23-10
Objective
Last edited by GoldenBanana; Dec 10th, 2010 at 5:06:07 PM. Reason: more trials |
|
|
![]() |
| Thread Tools | |
|
|