|
|||||||
![]() |
|
|
Thread Tools |
|
|
#251 | |
|
Join Date: Jan 2009
Posts: 659
The AI is catching on....
|
Quote:
So yeah, the guide will most likely be written sometime, most likely after the 3rd gen RNG reporter at least has a beta version (which could take a while, depending on what it needs to include), so I wouldn't be expecting it to come "soon", although I should have the program finished before summer's end.
__________________
We like 'em RARE! [Trade Shop]
ZariGS on FanFiction.net Soul Silver (Trades): 2709 5214 9088 White2 (trades/battles): FC Pending |
|
|
|
|
|
#252 |
|
Join Date: Apr 2010
Posts: 15
Philippines
|
hello guys! I already RNG in HGSS. So I was wondering if its all the same RNG'ing with FR/LF? I have a LG as the moment. So I'm trying my chance to catch the other Pokemon that is not available to my SS.
__________________
Pokemon SS FC: 2321-8588-6102 Add me up guys! New here ^^ |
|
|
|
|
#253 | |
|
It's a ninja bug!
![]() ![]() ![]()
|
Quote:
The most important and helpful thing you can do at the moment is read the OP, then scan the rest of the pages after that. MattJ's work is really where it starts coming together, and that's the info you should focus on. 11 pages seems like a lot, but its worth a read and its the only way you'll truly become familiar with this. Also, you should learn how to rng in emerald, as that is a simplified version of fr/lg's rng. Most of all, thanks for checking this out. We are nearing the end, but there's still a lot of hands on testing that needs to be done. If you are able to get your hand on this and a gamecube controller with a turbo function, you can start doing mattj's experiments. We are pretty much past that stage of research, so you should check out the math on the previous pages and see if you understand zari's material on tempo/beats to choose seeds.
__________________
![]() Last edited by NixHex; Jul 1st, 2010 at 11:46:57 AM. |
|
|
|
|
|
#254 |
|
It's a ninja bug!
![]() ![]() ![]()
|
Guys, I have started to lose hope. MattJ brought up a huge concern a few months ago (a few pages back) about the tremendous speed of the clock that determines the seed. Let's say we decide to hit A (select the seed) several T's from 0 (T=n/256). I hit seeds f4e0 and f4e1 a scary amount of times, making my supposed reaction time 1/(25536*256) = virtually 0.
Compare this to my delay range for a 60 frames/sec rate for hgss, which I can usually narrow down to 2 or 4 frames if I use pikatimer. that's 2/60 and 4/60 respectively, or 33.33 ms / 66.66 ms (forget the fact that the 4th gen games pretty much lock onto odd or even values depending on your cartridge, making pinpoint accuracy even less necessary). This all just doesn't mesh. How are we getting such close results on a huge clock, yet it takes most beginners a long time to calibrate for a frame on a 60 fps clock? This is the only reason that I question the tempo/beat theories, because human error is still a huge issue. Then again, flovv supplied the proof that the seed is copied from an internal clock at or around the time you press A, so that has to be how it is generated. I'm starting to wonder if certain blocks of seeds, such as those shown in mine and MattJ's data, are available based on the amount of clock cycles (T's) you wait, or something. Unfortunately, I've had 0 time to work more on this, and I also wanted to bump this thread to see if anyone was interested in this anymore. The only reasons I see that it is necessary to RNG abuse on FRLG is to obtain the exclusive Selfdestruct Mewtwo, and for sheer completeness. I hope this is motivation enough to keep this cause going. |
|
|
|
|
#255 |
|
blatant Nintendo fanboy
Join Date: Mar 2009
Posts: 4,323
your mom sucked at e3
|
Believe it or not, I'm going to start back up on this now that the VGCs are over for me this season. Depending upon a million factors we don't know yet, they probably will allow Uubers next year just because of how much faster 99.9% of the matches went (DARN YOU LEN AND YOUR STALL BLISSEY) so there's a good chance Mewtwo will be allowable next year IMO. Now would be a good time for me to focus on this once again.
__________________
|
|
|
|
|
#256 |
|
It's a ninja bug!
![]() ![]() ![]()
|
In the meantime, I'm learning how to program in Objective-C, which is the primary language for iPhone/iPod Touch/iPad and Mac OS X development. I know zari is pretty busy right now with LC and hasn't had much time to work on the seedfinder, but I thought I would at least build a mac compatible program, just to have SOMETHING. The reason we stopped using Java is because it does not handle unsigned 32 bit integers (which is what all seeds and pid's are) without the clumsy and memory intensive use of 64 bit signed integers. So, we lose multiplatform compatibility (at the moment until I become more proficient or until Zari finishes) for performance.
In essence, what the program will be is sort of a subset of PokeRNG that instead limits itself to 2-byte starting seeds, with a gui resembling a very stripped-down RNG Reporter, allowing for search of spreads within a user defined delay range. This will intially only be used to find spreads -- metronome implementation will come much later. |
|
|
|
|
#257 | |
|
Join Date: Feb 2009
Posts: 1,210
Orlando, FL
|
Quote:
__________________
My other Rotom is a washing machine. |
|
|
|
|
|
#258 |
|
It's a ninja bug!
![]() ![]() ![]()
|
As long as I stick with command line, I can make do without the Cocoa libraries (which is THE library for GUI development for everything Apple). Last night I was able to finish my pRNG class. I'm not on my main computer but from the top of my head, here's a break down of what I have. Notice how weird this syntax is compared to C++ or Java.
Code:
// pRNG.h
#import <Cocoa/Cocoa.h>
@interface pRNG : NSObject // pRNG inherits from NSObject
{
unsigned int seed;
}
@property unsigned int seed; //this makes a setter for the variable seed
-(void) advance;
-(void) reverse;
@end
Code:
//pRNG.m
#import "pRNG.h"
@implementation pRNG
@synthesize seed;
-(void) advance //from the PID/IV creation guide, thanks to X-Act
{
seed = ( 0X41C64E6D*seed + 0X6073 ) % 0X100000000;
}
-(void) reverse //from page 2 of this thread, thanks to X-Act
{
seed = ( 0XEEB9EB65*seed + 0XA3561A1 ) % 0X100000000;
}
@end
Code:
//TestRNG.m
#import <Cocoa/Cocoa.h>
#import "pRNG.h"
int main(int argc, char *argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
pRNG * p = [[pRNG alloc] init];
[p setSeed:0XF4E0]; //one of the seeds I hit frequently
NSLog(@"Initial Seed: %X", p.seed); //show in hex format in caps
[p advance]
NSLog(@"Current Seed: %X", p.seed);
[p advance]
NSLog(@"Current Seed: %X", p.seed);
[p reverse]
NSLog(@"Current Seed: %X", p.seed);
[p release];
[pool drain];
return 0;
}
Here's what the test program TestRNG.m does:
Code:
...
int n;
NSLog(@"Forward");
for (n=1; n<=20; n++) {
NSLog(@"Frame %i: Seed: %X",n,p.seed);
[p advance];
}
NSLog(@"Reverse");
for (n=20; n>=1; n--) {
NSLog(@"Frame %i: Seed: %X",n,p.seed);
[p reverse];
}
...
What I plan to have next is a class that extends pRNG called PkmnGen that contains PID, genderNumber, nature, ability, TrainerID, and SecretID, and methods that calculate these values. Since I got all this done from scratch last night, I'm hopeful that I'll be able to implement the PkmnGen class rather soon, so we can get started with the real work. EDIT: I'm keeping this here for the time being. This is the incomplete PkmnGen class. It does not yet generate IVs, and I haven't tested this yet. As stated in the code, this will only work for Method 1. I'm assuming the demand for methods 2, 3, and 4 (especially 3) is pretty low, so implementing them is of absolute lowest priority, almost to the point that if I were to implement them, it would only be for completeness.
PkmnGen.h
PkmnGen.m
__________________
![]() Last edited by NixHex; Jul 19th, 2010 at 6:14:49 PM. Reason: added PkmnGen class files |
|
|
|
|
#259 |
|
Join Date: Feb 2009
Posts: 1,210
Orlando, FL
|
Great work! The syntax does look to be much different... as someone who's familiar with C and Java, the only lines of code that I'm familiar with are the math and the "for" loops.
__________________
My other Rotom is a washing machine. |
|
|
|
|
#260 |
|
Join Date: Jan 2009
Posts: 659
The AI is catching on....
|
I am busy with LC and all, but if need be I can post the code here if others want to work/adjust/test stuff with it. One thing that has distracted me from my work on the tempo beat stuff, is figuring out that if you skip the intro/ charizard or venusaur flash entirely, you get remarkably consistent seeds (I was able to hit the same seed within 11 tries, and obtained many, many duplicates thereafter) The only problem with that is that a. it requires tremendously fast button mashing and b. so far I have only been able to hit certain ranges of seeds.
Right now the code I have is just basic RNG spitting out (aka primitive RNG reporter), because I don't have neosyrex's code for the FR/LG seed finder (can you get that from the download?) If people want it, I'll edit the code into this post so others can work on it/etc. EDIT: Code:
import java.util.*;
import java.io.*;
import java.lang.*;
public class Prng32 {
private long seed;
private final long Af = 0X41C64E6D; //going forward
private final long Cf = 0X6073;
private final long Ar = 0xEEB9EB65; //reverse
private final long Cr = 0xA3561A1;
public long getSeed() {
return seed;
}
public Prng32 (long s) {
seed = s;
}
private long getNext(long s) {
long bitmask = 0xFFFFFFFFL;
seed = (Af*s + Cf) & bitmask;
return seed ;
}
public long next() {
return getNext(seed);
}
private long getPrev(long s) {
long bitmask = 0xFFFFFFFFL;
seed = (Ar*s + Cr) & bitmask;
return seed;
}
public long prev() {
return getPrev(seed);
}
public static void main (String [] args) {
long s0 = 0;
long sF = 0x10000 - 1;
//int s = 0x9d08ff08;
//int s = 0x0000a14a;
long s = 0x6073;
long bitmask = 0xFFFFFFFFL;
Prng32 P = new Prng32(s);
PidGen Mewtwo = new PidGen(s);
for (int i=0; i<65536; i++) {
//long t = s ^ 0xFFFFFFFFL;
//System.out.println( " Frame: "+i+" seed: "+Long.toHexString(s & bitmask)+" "+Long.toHexString(t & bitmask)/*+Mewtwo.getNature(s)*/);
// System.out.println(" Frame: "+i+" seed: "+Long.toHexString(s & bitmask));
// s = s + 0x41C64E6D;
//s = P.next();
//Mewtwo.next();
}
/*System.out.println( "Frame: 1 Seed: "+Integer.toHexString(s) + " "+ Mewtwo.getNature() );
s = P.next();
System.out.println( "next seed: "+s+" "+Integer.toHexString(s) );
//Mewtwo.setNext(s,1);
Mewtwo = new PkmnGen(s,1);
System.out.println( "Frame: 2 Seed: "+Integer.toHexString(s) + " "+ Mewtwo.getNature() );*/
}
}
Code:
import java.util.*;
import java.io.*;
public class PidGen extends Prng32 {
private long seed;
private final long Af = 0X41C64E6D; //going forward
private final long Cf = 0X6073;
private final long Ar = 0xEEB9EB65; //reverse
private final long Cr = 0xA3561A1;
String nature;
Long PID, n;
long s;
String[] IVs = { "HP", "Atk", "Def", "SpA", "SpD", "Spe"};
private final String[] natureList =
{"Hardy","Lonely","Brave","Adamant","Naughty",
"Bold", "Docile","Relaxed","Impish","Lax",
"Timid","Hasty", "Serious", "Jolly","Naive",
"Modest","Mild","Quiet","Bashful","Rash",
"Calm","Gentle","Sassy","Careful","Quirky"};
public PidGen(long s) {
super(s);
seed = s;
}
public String getNature(long s){
seed = s;
calcPid(s, 1);
n = PID % 25;
Integer N = new Integer(n.intValue());
String nature = natureList[N];
return nature;
}
public long getSeed() {
return seed;
}
private long getNext(long s) {
long bitmask = 0xFFFFFFFFL;
seed = (Af*s + Cf) & bitmask;
return seed ;
}
public long next() {
return getNext(seed);
}
private long getPrev(long s) {
long bitmask = 0xFFFFFFFFL;
seed = (Ar*s + Cr) & bitmask;
return seed;
}
public long prev() {
return getPrev(seed);
}
public long setNext(long s) {
return s;
}
public void calcPid(long s, int method) {
switch (method) {
case 1: method1(s); break;
case 2: method2(s); break;
case 3: method3(s); break;
case 4: method4(s); break;
}
}
private void method1(long s) {
//do method 1 stuff
long Lid = s / 0x10000; //rng call 1
s = getNext(s);
long Hid = s / 0x10000; //rng call2
PID = Hid*0x10000 + Lid;
String Pid = Long.toHexString(PID);
System.out.print(" PID: "+Pid);
s = getNext(s);
long IVsHigh = s / 0x10000; //rng call 3 --> Defense, Attack, HP
s = getNext(s);
long IVsLow = s / 0x10000; //rng call 4 --> Speed, Special Attack, Special Defense
setIVs(IVsHigh,IVsLow);
}
private void method2(long s) {
//do method 2 stuff
}
private void method3(long s) {
//do method 3 stuff
}
private void method4(long s) {
//do method 4 stuff
}
private void setIVs(long high, long low) {
Long HP = high % 32;
high = high/32;
Long Atk = high % 32;
high = high/32;
Long Def = high % 32;
Long SpA = low % 32;
low = low/32;
Long SpD = low % 32;
low = low/32;
Long Spe = Math.abs(low % 32);
IVs[0] = Long.toString(HP);
IVs[1] = Long.toString(Atk);
IVs[2] = Long.toString(Def);
IVs[3] = Long.toString(SpA);
IVs[4] = Long.toString(SpD);
IVs[5] = Long.toString(Spe);
System.out.print(" "+IVs[0]+" / "+IVs[1]+" / "+IVs[2]+" / "+IVs[3]+" / "+IVs[4]+" / "+IVs[5]);
}
public static void main(String [] args) {
PidGen P = new PidGen(0xe2cca5ee);
}
}
__________________
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; Jul 19th, 2010 at 8:02:15 PM. Reason: added codes |
|
|
|
|
#261 |
|
It's a ninja bug!
![]() ![]() ![]()
|
I would love to see the code you have. How is the R/S stuff going? Also, what exactly do you mean skipping the flash entirely?
|
|
|
|
|
#262 |
|
It's a ninja bug!
![]() ![]() ![]()
|
Is that the same java code we worked on way back? Did you ever decide if you were going to stick with java or go with c instead?
|
|
|
|
|
#263 |
|
It's a ninja bug!
![]() ![]() ![]()
|
Hey guys, last night i worked on this a lot more and finally got the PkmnGen class ready! Here are some screenshots. If you are thinking that this is a poor man's RNG Reporter, you are right, but remember that this is no where near the final goal. As long as I have a program that's able to list spreads, I can be on my way to making it searchable. Also, IVs have not been implemented -- this just shows the PID and all the useful info contained in the PID.
PS. I'm running RNGReporter on Mac =)
Setting the seed to 0 (emerald), alongside RNG Reporter
Running the program in console
Shiny spread along side RNG reporter
|
|
|
|
|
#264 |
|
Join Date: Jul 2010
Posts: 1
|
Okay, so as you see you people caught my interest enough to actually register here. I'm a complete newb to RNG abuse, and I admittedly haven't read the 11 pages completely, but this seems to be interesting.
Right now, I'm playing with what I've read about the initial seed generation a bit. I have no experience with debugging console games at all, but I am interested in assembly, so this could be fun. If I do find out something, I'll share my results. |
|
|
|
|
#265 | |
|
It's a ninja bug!
![]() ![]() ![]()
|
Quote:
|
|
|
|
|
|
#266 |
|
Join Date: Jul 2010
Posts: 7
|
Can you rng shinies in lg/fr using only a nintendo ds and rng reporter?
|
|
|
|
|
#267 |
|
sometimes experimentation begins with "let's multi battle strip pokémon"
![]() ![]() ![]()
Moderator
Join Date: Aug 2006
Posts: 3,691
|
|
|
|
|
|
#268 |
|
blatant Nintendo fanboy
Join Date: Mar 2009
Posts: 4,323
your mom sucked at e3
|
Yeah shinyness isn't really even on any of our agendas at the moment. Maybe after we get IVs ironed out, but maybe not even then.
__________________
|
|
|
|
|
#269 |
|
It's a ninja bug!
![]() ![]() ![]()
|
Thank you mattj. In light of the never-ending shiny infatuation (and its overall irrelevance in this project), I want to clarify, at least to myself, the overall goal here. Let's face it: due to Platinum and now HG/SS, abuse of FRLG legendaries is all but unnecessary, save for one: Mewtwo. He seems to be the main Pokémon on our minds because, for research's sake, he comes at such a high level that it's easy to verify its IVs. More importantly, only the Generation 3 Mewtwo can learn Selfdestruct (through XD move tutor). Articuno, Zapdos, and Moltres don't learn much of consequence, though the purified ones from XD get some interesting moves (Baton Pass Zapdos, Heal Bell Articuno), but that is a completely different subject. The legendary beasts are all generated with four 0 IV's, and aren't worth discussing. Anything else can be bred in emerald with relative ease with an everstone.
As for shinies, my Seed Finder program can find shiny spreads, but abusing for shinies is really a small subset of RNG abuse. As mattj said, shininess really isn't important at this point. I fear a lot of things with Generation 5 at our footsteps, but one of my biggest fears is Mewtwo somehow getting Selfdestruct/Explosion, essentially negating all of this work. If this happens, this project will basically become a thing of "completeness." However, I find this unlikely of happening. In other news, my program is able to list IVs, so the ability to search for spreads and seeds is upon us! For an alpha version, I think I will only implement ">=" and "==" searches, with more advanced searches (Hidden Power) and more obscure searches like "<=" for Trick Room, being left until later. I have been unable to work on this in the past few days due to a tremendously exhausting trip to San Francisco for a 5k/marathon, but hopefully I can get started on this again tonight. |
|
|
|
|
#270 |
|
blatant Nintendo fanboy
Join Date: Mar 2009
Posts: 4,323
your mom sucked at e3
|
That program sounds really nice! Can't wait till its up and going!
Yeah, but to be honest bro... I totally DO hope Mewtwo gets SD in Gen 5 :x Just so I can be done with this @_@
__________________
|
|
|
|
|
#271 |
Join Date: Oct 2006
Posts: 869
|
Just so you know, NixHex, if your program effectively replaces NeoSyrex's (which it sounds like it will), I will put it as the attachment in the first post when it is released. That way you don't have to worry about what file uploading site to use so that the most users can download it, it doesn't go down for no reason, and so on. If you'll notice, Syrex's original link is down, and there were some problems in the old Emerald thread as well, so these issues can be resolved by tethering it to the first post.
|
|
|
|
|
#272 |
|
It's a ninja bug!
![]() ![]() ![]()
|
I really don't like those mega upload sites, so that would be awesome. However, I do not mean to replace NeoSyrex's program because it's not really the same thing (though my pRNG class has the reverse method thrown in there, so it is easy to rewrite his program, though unnecessary). The only problem, again, is that for now it is Mac only, until I discover how to compile it for Windows. Misdreavus and I are working on that, so we should hopefully have it done soon.
|
|
|
|
|
#273 | |
|
Join Date: Apr 2010
Posts: 126
|
So I just finished reading about all the information thus far in this thread, and I have a question about using a metronome to hit a desired seed.
Say I wanted to use a tempo of 225 bpm to hit a certain seed. Quote:
I found that using a tempo of 185 bpm would help me get close to hitting the seed 01ca, but I don't know the number of beats it will take for this seed to repeat. |
|
|
|
|
|
#274 | |
|
It's a ninja bug!
![]() ![]() ![]()
|
Quote:
In other news, I'm getting close to a fully functional, searchable program. Here's a screenshot: EDIT: I noticed there's a one off error with the frame. I'll have to work it out later but it's really inconsequential for now. For example, the frame for that beautiful Naive spread in RNG Reporter is 779, but my program says 780.
...
and, the code.... it doesn't want to do my indentations, so it's gonna look messy:
...
__________________
![]() Last edited by NixHex; Jul 27th, 2010 at 10:36:54 PM. |
|
|
|
|
|
#275 | |
|
Join Date: Jan 2009
Posts: 659
The AI is catching on....
|
Quote:
I'll try to put this as simply as I can. "Cycles" occur 256 times a second, since that is the speed the game moves at (256 Hz). the formula for determining how far through the cycle the game is at a particular beat/tempo is: c = 256*60*n / T Where n is the # of beats that have passed after the first beat, c is the cycles amount, and T is the selected tempo. Basically, to figure out how many beats it takes to repeat, keep that equation in fraction form and simplify it. With your 185 BPM tempo, it would work like this: 256 * 3 * that leaves us with 3072 *n / 37 now what you would do is MOD this equation (MOD = divide until there is a remainder, then take that remainder as the answer) while simultaneously removing the "n" variable; think of it as (3072 MOD 37) *n. what is left is 1, or more technically (1 / 37) * n, or when simplified, n / 37. The goal now is to make the equation we just got equal to 1; essentially when the cycle restarts. In this case, 37 beats after the first at 185 BPM, the cycle would restart. Admittedly, this is very hard to pull off, both because of finding AND starting the metronome at the exact location where the game starts seeding. In theory, however, this should be accurate. there really isn't any way to talk about this without involving math/numbers sadly :/
__________________
We like 'em RARE! [Trade Shop]
ZariGS on FanFiction.net Soul Silver (Trades): 2709 5214 9088 White2 (trades/battles): FC Pending |
|
|
|
![]() |
| Thread Tools | |
|
|