GithubHelp home page GithubHelp logo

aldelaro5 / gc-pokemon-rng-manipulation-assistant Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 8.0 790 KB

A program to aid RTA speedrunners to manipulate the starters in Pokemon Colosseum and Pokemon XD: Gale of Darkness

License: MIT License

CMake 2.43% C++ 97.57%
pokemon rng speedrun

gc-pokemon-rng-manipulation-assistant's Introduction

GC-pokemon-RNG-manipulation-assistant

Screenshot

Travis CI build Status AppVeyor build status

A program to aid RTA speedrunners to manipulate the starters in Pokemon Colosseum and Pokemon XD: Gale of Darkness. This manipulation involves using the random battle feature of each game to find the current seed and hitting the right frame when confirming the trainer name to get the desired starters RNG.

This program allows this manipulation technique to work as it assists the runner into all these steps with user-friendliness being a priority. The goal of having such a method is to reduce the amount of early resets required to start a run and to also open up new possibilities for having better than usual starters as this method makes it easier to see the different possibilities.

For binary releases of this program, refer to the "releases" page on the Github repository.

System requirements

Any x86_64 based system should work. For Windows, you must have the Microsoft Visual C++ Redistributable for Visual Studio 2017 installed.

For faster results, a CPU with high parallelism capabilities is recommended. This means that this program will benefit from having a CPU that has multiple cores/threads, especially if you are generating a precalculation file. Additionally, 500MB of free RAM is recommended (1.5GB if you are generating a precalculation file).

General usage

Download the precalculation file provided along the binaries release for the game you intend to use the manipulation and extract it into the program's directory. Then, select the game in the dropdown list and start the seed finding procedure by clicking on Find your seed. This will show a wizard to guide you through the process. If it succeeds, you will be able to see your starters prodictions depending on the amount of frames it takes to press A on the new game confirmation prompt and pressing A on the name confirmation prompt. Alternatively, you may set the seed manually by entering the seed in hexadecimal in the appropriate field and click Set Seed.

You can set the desired predictions you wish to get by configuring the filters in the settings and you can also reroll the predictions as many times as you want providing you generate another random battle team. You may also store the current seed to restore it later on if you wish to see if better options are available with more rerolls.

Once you are satisfied with a certain prediction, you are ready to start your run, but for the manipulation to succeed, you have to hit the right frame when confirming the trainer name which is a time span of 1/60th of a second. A program like FlowTimer or Eon timer can assist you by providing audio and visual cues for the timing. You may quickly verify the success of the manipulation by comparing the trainer ID of the starter with the trainer ID of the prediction you wished to get as well as the HP stat displayed next to the HP IV.

Alternatively, you may generate the precalculation file for the game yourself in the File menu, but this process will take a few hours depending on your CPU and threads count. For this reason, it is highly recommended to download the file instead since the file is the same for every usage of the program.

Finally, it is possible to have a pretty report of the stats of the starters as well as a way to predict the stats of the secondaries Pokémon using the Stats reporter part of the interface. You must select the row coresponding to the seed you wish to use during the run before using the stats reporter.

How to Build

Microsoft Windows

This repository provides a solution file for Visual Studio 2015 and later. The Windows SDK Version 10.0.16299.0 (Windows 10 Fall Creators Update) is required.

Before proceeding, ensure the Qt submodule is initialized by running git submodule update --init at the repository's root. The files should appear at the Externals\Qt directory.

Once complete, open the solution file Dolphin-memory-engine.sln located in the Source directory with Visual Studio. Select the build configuration and build it.

Windows SDK

The Windows SDK version 10.0.16299.0 comes with the C++ Desktop Development Workload of Visual Studio 2017 — other versions may work but are untested. To use a different Windows SDK you'll need to select it in the project properties window. Please note that this will change the vcxproj file, so if you plan to submit a Pull Request, make sure to not stage this change.

Mac OS

The Homebrew package manager must be installed, refer to the project's website for more information.

The CMake, Qt and libomp packages from homebrew must be installed. To install them, run the following commands into a terminal:

brew install cmake
brew install qt
brew install libomp

Additionally, for the build system to properly recognise Qt, some environements variables needs to be modified accordingly. One can do so by appending these lines to the ~/.bash_profile file:

export PATH="/usr/local/opt/qt/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/qt/lib"
export CPPFLAGS="-I/usr/local/opt/qt/include"

Once this is done, simply run the following commands from the Source directory to start the build process:

mkdir build && cd build
cmake ..
make

An application bundle will be built in the directory named build.

Linux

CMake and Qt 5 are required. Please refer to your distribution's documentation for specific instructions on how to install them.

To build, simply run the following commands from the Source directory:

mkdir build && cd build
cmake ..
make

The compiled binaries should appear in the directory named build.

License

This program is licensed under the MIT license which grants you the permission to do anything you wish to with the software, as long as you preserve all copyright notices. (See the file LICENSE for the legal text.)

gc-pokemon-rng-manipulation-assistant's People

Contributors

aldelaro5 avatar kaleidosium avatar theeonlyjuan avatar thurler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gc-pokemon-rng-manipulation-assistant's Issues

Issue generating precalc file on a mac

After choosing to generate the precalc file from File -> Generate the precalculation file for the chosen game it loads for about 45 minutes and then says that it's successfully generated the file but when I click 'Find your seed' it asks me to generate it again

having a problem with PAL version RNG

i've been trying to figure out how to RNG eevee on PAL version of pokemon XD but it always show one frame and it's not the right result either so....i tried searching online for guides or anything but there's nothing on how to do it :( i did do the US version and got it correctly but couldn't figure out on doing it for PAL version.

not sure where else to contact you so i figured to post it here if you have any idea on giving me steps? also if i were to try doing it on JPN version of XD which one do i use on the RNG? US or PAL version?

Seed Finder Wizard shows wrong number of threads

https://github.com/aldelaro5/GC-pokemon-RNG-manipulation-assistant/blob/master/Source/GUI/SeedFinder/SeedFinderPassPage.cpp#L38

Looks like it always displays the max number of threads instead of the user specified number of threads given by SConfig::getInstance().getThreadLimit(). Although it does have the possibility of returning 0 when the setting doesn't exist at first. Perhaps it should default to std::thread::hardware_currency() instead of 0.

Failure to find the seed in XD

First generation: Rayquaza, Latias. Second Generation: Deoxys 251, Blissey 636, Articuno 340, Swampert 341. Still getting no results on some attempts and I tried this one specifically multiple times and still no results.

Wrong shiny checking for Gales Seed Searching

The TSV value you use for Gales is wrong. Despite the fact that the game generates a TID/SID as you have documented here, the game uses the saves TID/SID. This is the case for both the enemy and your own party.

My starting seed is 0x317f9f7b. The generated values for TID/SID would be 0xc034 and 0xA574. But looking at the registers in dolphin we can see that is not the value being used. For reference register r27 holds the value of TID/SID. For completion r24 is gender, r25 is nature, and r26 is shiny. This gets used in the function at address 80141540. This TID/SID is actually the TID/SID of my save file.

image

The generation here appears to use a random TID/SID (where you advance the 1139 frames). And the generation here appears to use the TID/SID of the save file (the dummy team before the battle menu).

XD: Mismatch of reroll's seed between hardware and program

This issue is a frustrating and sneaky one. Essentially, after performing the correct number of rerolls in game and setting up the timer corrently, the Eevee frame you end up hitting... will not be found anywhere near the target frame in the program. This would lead the player to conclude they must have miscounted how many rolls they did, and while that is sometimes true, I was able to watch back the footage from my last stream and confirmed that on the FOUR occasions this issue happened, exactly ZERO of them were my fault. I did the exact number of rolls the program told me to do, and yet, the "hit Eevee" was nowhere near the "target Eevee."

By searching nearby rolls, however, I finally was able to locate the frames I hit on those four failed attempts. Here's what I found:

  1. Seed: 6516269F
    Target frame: 102 rolls
    Hit frame: 94 rolls (would've been frame perfect)

  2. Seed: 8973A8F3
    Target frame: 98 rolls
    Hit frame: 100 rolls (would've been frame perfect! Did not miscount...)

  3. Seed: 814F839F
    Target frame: 54 rolls
    Hit frame: 50 rolls (would've been 1 frame early)

  4. Seed: 6D8522C1
    Target frame: 97 rolls
    Hit frame: 93 rolls (would've been 1 frame late)

As I said, I checked the footage to be sure I did not miscount on any of these, and if need be, I can provide more info on the actual frames I was aiming for, so you can try these yourself.

Tutelarfiber has also confirmed he had this same issue happen to him. His "hit frame" was 4 rolls off of the one his "target frame" was on, but was exactly the right FRAME number (he was sad to discover this).

Tute's info:
Seed: 8766FC45
Target frame: 121 rolls
Hit frame: 117 rolls

Based on this data, it seems there is a definite problem with the way the Reroll Count is shown (or calculated?). The timing info seems correct, given that the "hit frames" were always equal or close to the "target frames", just on the wrong rolls.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.