1. Welcome to Smogon Forums! Please take a minute to read the rules.
  2. New to the forums? Check out our Mentorship Program!
    Our mentors will answer your questions and help you become a part of the community!

Programming TurboRNG - A new lightweight, cross-platform RNG abuse tool

Discussion in 'Technical Projects' started by Fishaman P, Oct 10, 2012.

?

What should I implement next?

  1. Gen I

    6 vote(s)
    10.0%
  2. Gen II

    7 vote(s)
    11.7%
  3. Gen IV

    3 vote(s)
    5.0%
  4. Gen V

    37 vote(s)
    61.7%
  5. Researcher

    1 vote(s)
    1.7%
  6. Automatic VBM export (would take a while)

    2 vote(s)
    3.3%
  7. lol why would anyone use this

    4 vote(s)
    6.7%
  1. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    It all started when my friend wanted to learn 3rd Gen RNG abuse. PPRNG wasn't an option, and RNG Reporter refused to run under Mono. Eventually, we got fed up and installed RNG Reporter into a virtual machine, but it was painfully slow.

    But no more! I have written a cross-platform, lightweight RNG abuse tool in C. Its memory use is minimal (unlike RNG Reporter) and supports Gen 3 (unlike PPRNG). I give you...

    TurboRNG!

    Features:
    Methods 1, 2, 4, and GC! (Also known as Method Colosseum/XD)
    LCRNG, GCRNG (XDRNG), GRNG, ARNG, and ELCRNG researcher!
    User-friendly command-line interface!
    Optional complete automation with command-line arguments!
    Over 500,000FPS with a 3GHz Core i3 and a 7200RPM hard drive!

    Changelog:
    Show Hide

    v2.6 beta (unreleased, latest work 2/2/14)
    [*] Significant code cleanup, which should speed things up a bit
    [*] Better error-handling for command-line arguments
    [+] Fixed Method GC abilities (hah, take that RNG Reporter!)

    v2.5 alpha (3/1/13)
    [*] Near-complete rewrite
    [*] Fixed quite a few bugs
    [+] Reverse RNG support

    v2.0 (11/1/12)
    [*] Method entry now accepts extra characters (e.g. "123" will be registered as Method 1)
    [*] TurboRNG no longer asks for useless info (e.g. it no longer asks for TID and SID when using the Researcher)
    [-] Removed 87.5% F Gender ratio; it was useless anyway since no Gen is supported that uses it
    [+] Command-line arguments! Run TurboRNG without any (or with incorrect ones) to see the usage.

    v1.2 (10/24/12)
    [*] Frames can now exceed 4294967295 (maybe you wanna prove there's 0x100000000 iterations, I dunno)
    [+] Optional CSV output
    [+] GRNG, ARNG, and ELCRNG research

    v1.1 (10/19/12)
    [*] Performance and size optimizations
    [+] LCRNG and GCRNG researcher

    v1.0 (10/15/12)
    Initial release


    Upcoming features:
    Gen III breeding!
    R/S TID abuse!


    Downloads (v2.5 Alpha)
    Windows 32-bit
    Windows 64-bit
    Linux 32-bit
    Linux 64-bit
    Mac OSX (courtesy of chiizu)

    Downloads (v2.0)
    Windows 32-bit
    Windows 64-bit
    Linux 64-bit


    Old downloads:


    Current Status

    I am currently cleaning up the code and considering open-sourcing it.
    Besides that, I am now in the late planning stages for the TurboSearch module.
    At first, it'll only parse TurboRNG-formatted output for IVs, natures, shininess, etc.
    At a future date, it will be able to filter results as TurboRNG generates them.
    Last edited: Feb 2, 2014
  2. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    Just an update: I don't know how to change the poll, so bear with it for the moment.

    RBY abuse will HAVE to be done on an emulator. In addition to the current RNG value, the next value of the RNG also depends on the the buttons you are pressing, and it's not predictable without memory watching.

    And really, builds ARE coming; it now runs flawlessly, and all I have to do is compile for every single platform! YAY!
  3. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    v1.0 released for Linux 64-bit!
    Check back daily for new platforms and versions!
  4. Bond697

    Bond697 Dies, died, will die.
    is a Pokemon Researcher

    Joined:
    Jun 20, 2010
    Messages:
    307
    adfly? really?
  5. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    I just need $5 or so; that means standard links after ~1500 downloads.

    On another note, new version coming soon, with a smaller executable and faster speed!
  6. Slashmolder

    Slashmolder 'Ello Governor
    is a Programmeris a Pokemon Researcher

    Joined:
    Mar 27, 2011
    Messages:
    278
    RNG Reporter will have full Linux Support under Mono at the same time as we get a Windows XP version out. Just wait for it to settle down and it'll be there I promise.
  7. Philderbeast

    Philderbeast

    Joined:
    Jun 18, 2006
    Messages:
    205
    I'm also working on a new GUI with Chiizu for pprng that will make it cross platform...
  8. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    Yeah, but neither RNGReporter nor PPRNG have CSV output (at least not to my knowledge), and they both lack 1st and 2nd Gen support, which I have planned.
  9. Agonist

    Agonist You were my last great war, you were my heaven ablaze
    is a Forum Moderator
    Moderator

    Joined:
    May 22, 2010
    Messages:
    4,133
    in all honesty, who the hell cares about RNGing on Gen 1 or 2?
  10. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    According to the poll, at least 7 people do, and that's enough for me.
  11. chiizu

    chiizu PPPPPPPPPPPPPPPPP RNG
    is a Programmeris a Pokemon Researcher

    Joined:
    Nov 12, 2010
    Messages:
    407
    PPRNG has CSV output, actually. I'm pretty sure RNG Reporter has it as well. Neither has it accessible from a command line, though.

    Good luck with the tool.
  12. Slashmolder

    Slashmolder 'Ello Governor
    is a Programmeris a Pokemon Researcher

    Joined:
    Mar 27, 2011
    Messages:
    278
    RNG Reporter had CSV output support. It was recently switched to txt files though it's basically the same. Can't speak for PPRNG. Still it'll be cool to see someone actually research Gen 1-2 RNG though I hope you've seen this post http://www.smogon.com/forums/showthread.php?p=3678072#post3678072
  13. Aiyumi

    Aiyumi

    Joined:
    Oct 17, 2012
    Messages:
    4
    Yes, yes, yes! Finally a command line RNG tool!

    I was very excited over this... But currently there's only a 64-bit version. Sadly my machine is 32-bit. Will it have a 32-bit version?

    Is there any chance of TurboRNG becoming open source? If the source code was available, I could compile it for my machine myself, as could people using other platforms...

    Added my vote for Gen IV RNG support.
  14. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    Wow, that really helps actually! Now I don't have to wade through RAM searchers!

    Yes, there will be both 32-bit and 64-bit versions. In fact, I have successfully built TurboRNG v1.0.1 on Linux x64, Linux x32, Windows x64, and Windows x32!

    As for the open-source part... the project is too small right now for that to be helpful. At its current stage, I think more coders would just slow the pace. On the other hand, if someone can build 32-bit and 64-bit binaries for Mac using Xcode, I would gladly share the source (privately) to spread the love!
  15. chiizu

    chiizu PPPPPPPPPPPPPPPPP RNG
    is a Programmeris a Pokemon Researcher

    Joined:
    Nov 12, 2010
    Messages:
    407
    The point of open source is not (necessarily) to recruit other coders. As you can see, making it open source will allow others to build the code themselves for their own platforms rather than you needing to find people willing to build it for you. This will only serve to increase the user base of your tool.

    Anyway, I can compile Mac versions if you would like.
  16. saphiren

    saphiren

    Joined:
    Apr 20, 2011
    Messages:
    4
    What's this written in? I can't run it cause I run windows, but it sounds like something that would be great in Java. If at any point this project comes near java, please tell me ;)
  17. Aiyumi

    Aiyumi

    Joined:
    Oct 17, 2012
    Messages:
    4
    @saphiren: it's in C. And the author said to have compiled it in Windows, so a Windows version should be coming.
  18. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    v1.1 released for Linux x64, Win32, and Win64!
    Generally performance and size optimizations.
    Also, I added basic research functionality.

    EDIT: @saphiren: funny you mention Java. This was first written in Java as RNJava, but it only got 3,000 frames per second on my Core i3 (less than 1/3 the performance of TurboRNG), and that was even before Hidden Power and genders were implemented!
  19. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    v1.2 released with CSV output (FINALLY!)
    Right now it's in user input like the rest of the options, but rest assured I am working on implementing command-line arguments!
    Also some additions to the researcher, as well as adding the ability to enter frames above 4294967295. On a related note: entering 4294967296 frames no longer exits the program.
  20. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    v2.0 released with command-line arguments (FINALLY!)
    For output, you can use the -o switch, but you can also omit it and specify a filename when it asks.
    Also some common sense things, like not asking for TID and SID when using the Researcher, and also the removal of the (currently) useless 87.5% female gender ratio.
  21. Misdreavus

    Misdreavus

    Joined:
    Feb 27, 2009
    Messages:
    1,210
    I'm definitely going to have to check this out once I get my new computer. I'm a C programmer myself (though not too advanced), so perhaps I could even help out.

    I look forward to seeing what the future holds for TurboRNG! Keep up the great work!
  22. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    Thank you!


    EDIT: I haven't abandoned this project.
    Once I have my error-checking fully implemented (which might even be right now!), I will get to work on...

    BLACK AND WHITE!

    The algorithms are well-documented, so it won't take long at all.
    I'll be working on Pokemon Crystal in the meantime, as well.


    EDIT2: Looks like v2.1 will be finished soon!
    After that's done, I plan to add Gen 3 breeding, at least for IVs.


    EDIT3: v2.1 will be skipped. v3 will come instead, with a much better code base!
  23. Misdreavus

    Misdreavus

    Joined:
    Feb 27, 2009
    Messages:
    1,210
    Is B/W going to be implemented in v3? If so, will you be including a feature for Unova Link calibration and/or support for Dream Radar abuse?
  24. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    B/W is going to be implemented if things are going as they should be (which they are), but it'll only be standard IVs at first. Console apps aren't as suited to calibration and that kinda stuff as GUI apps are, but I'll consider it when life gets less busy.
  25. Fishaman P

    Fishaman P

    Joined:
    Sep 29, 2010
    Messages:
    139
    Finally, my latest work is released: v2.5 alpha is here!

    Please note that there are some shenanigans going on with GRNG (sometimes off by 0x80000000) and that ELCRNG is currently broken on 32-bit for an unknown reason.

    Also, method J is completely wrong besides the abilities, method K only outputs a mass of "not done yet!", and both RSInherit and EmInherit will cause a fatal error. (Don't worry though, it's not memory corruption, I specifically handle the error)

    EDIT: v2.5a is now released for Mac OSX, thanks to chiizu! Even though this is an alpha version, the improved speed, higher stability, and vastly improved features make this the recommended release over v1.1. If you are still running v1.1 or are thinking about giving TurboRNG a whirl, please use v2.5a!

Users Viewing Thread (Users: 0, Guests: 0)