Giter Site home page Giter Site logo

kwsch / pk3ds Goto Github PK

View Code? Open in Web Editor NEW
386.0 33.0 147.0 5.41 MB

Pokémon (3DS) ROM Editor & Randomizer

Home Page: https://projectpokemon.org/forums/forums/topic/34377-pk3ds-xyoras-rom-editor-randomizer/

License: Other

C# 99.94% Makefile 0.06%
pokemon nintendo-3ds rom-hacking toolkit nintendo-hacking

pk3ds's People

Stargazers

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

Watchers

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

pk3ds's Issues

SMTE Ball editing

Seeing as trainers can now use balls other then the default pokeball, is there a chance this will be added?

Personal Stats editor abilities

Hey, thanks for your fix on the personal stats editor. Changing the types of Pokemon seem to work now, but abilities do not. They still reset sadly.

Missing image.cs file in tools folder...

Not sure what purpose this file had, but pk3ds.csproj references this file (specifically at line 207). However it's not available from this github and thus as a result it will not compile till I remove the reference to it from the project file. Please correct this oversight. :D

I don't know if this has any impact on functionality of the program. It seems to compile fine after I removed the reference to it. If there is a feature you made that uses code in that file, it's currently broken.

Rebuild Rom Pokemon Sun/Moon

I modified my rom S/M with pk3ds but now I want to know how rebuild my rom and if i can use this rom with gateway (o3ds 4.2).

thanks

Randomize button on Move Stats doesn't do anything

As the title already says, when pressing the randomize button on Move Stats screen literally nothing at all happens. At first I thought it was simply not yet implemented or something but when someone told me he had randomized move types (and thus move stats) on an older version I realized this must be a bug.

Edited: I'm an idiot. nevermind.

Starter Pokemon Location/Totem Pokemon location

Just wanted to leave a heads up about what I've found so far that could possibly be implemented, this is all from the a/1/5/5 garc file.

0.bin contains some static "gift" Pokémon, this contains the 3 starters and fossil Pokémon, there's 20 Blocks here and each of them is 0x14 in size, with the first two bytes being the Pokémon's ID, the order for this file is;
The 3 starters;
Omanyte, Kabuto, Aerodactyl, Lileep, Anorith, Cranidos, Shieldon, Tirtouga, Archen, Tyrunt

A small example of this being edited is here.

1.bin contains a few important wild encounters, notably the Totem Pokémons, some of the Pokémon fought within the trials, and other key encounters such as the Ultra Beast, or the very first Pikipek the player finds.

Each block is 0x38 in size and there's roughly about 137 blocks in here.
I did a small data dump that can be found here.

I may be wrong about some values, but from what I've seen it's usually;
Pokémon ID (2 bytes), - Form (1 byte) , - Level (1 byte) , - Held Item (2 bytes), - 6 bytes that I skipped because I don't know what they are for now, - moves (2 bytes each), - Nature (1 byte), - IVs (1 byte each)
There's still a lot of bytes that I haven't figured out, but this was enough to get a good rough idea for the blocks.

In 4.bin, it seems to have blocks that are 0x34 in size, but I don't really know what data they contain.

The other files is just data that I don't know what it is, but 0 and 1 are at least very useful.

Crashes when trying to repack a/0/9/4 GARC for Pokémon Moon (runs out of ram for 32 bit process)

Tried to use the folder repacker part of the garc tool to repack the a/0/9/4_g folder.

however it crashes with this:

Problem Event Name: CLR20r3
Problem Signature 01: pk3DS.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 583df1f2
Problem Signature 04: mscorlib
Problem Signature 05: 4.6.1055.0
Problem Signature 06: 563c0eac
Problem Signature 07: 157f
Problem Signature 08: 1d7
Problem Signature 09: System.IO.IOException
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

EDIT: After further testing it appears pk3DS failed to exit properly a few times and caused the folder to be inaccessible to further instances of pk3DS which caused the crash. I had to manually kill the duplicate processs with task manager before it would pack.

EDIT2: It appears that the first couple times I attempted it, I didn't notice that it was actually packing the folder (as the progress bar appeared). But it doesn't disable any other controls while it's doing this hence why I encountered wierd bugs/crashes trying to pack it a second time. Controls should probably be locked out until it finishes packing a folder.

Encounter Tab in Sun and Moon

Whenever I click on the Wild Encounter Tab, pk3DS loads, but before it finishes, it freezes and says pk3DS stopped working. I downloaded and rebuilt the source code at around 11:55 P.M on 11/21/16 EST. Here is the problem log.

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: pk3DS.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 5833cfdf
Problem Signature 04: pk3DS
Problem Signature 05: 1.0.0.0
Problem Signature 06: 5833cfdf
Problem Signature 07: 243
Problem Signature 08: 34
Problem Signature 09: System.ArgumentException
OS Version: 6.3.9600.2.0.0.768.101
Locale ID: 1033
Additional Information 1: 5861
Additional Information 2: 5861822e1919d7c014bbb064c64908b2
Additional Information 3: 1318
Additional Information 4: 13181ae637ac2592fac0ca2dd662cdcc

Wild Encounters becoming disabled

Hey so last night I was able to successfully edit the wild encounters and see them in game. However, now when I updated the tables some more, no wild Pokemon appear whatsoever.

Save config between form closes

With projectpokemon down, I posted this and asked if you'd add that PK3DS save what's been checked between each forms when you open/close them. If you close out of any form atm that has had it's checkboxes changed, it always reverts to the default. Can be quite a nuisance if you're changing things a lot and forget to untick something like "types" change for pokemon and then randomize on accident. or if your current loaded randomized rom didn't have certain features checked in the first place for when you initially did them.

Also, any idea what's up with the website? :P

Latest commit causing crashes after randomizing encdata

Used to work totally fine as of commit 02a8ed0, but after updating to latest commit I constantly get crashes when setting encdata. I've tried both Sun and Moon, using completely fresh and unedited GARCs from my own personal dumps (/a/0/8/2 in Sun, /a/0/8/3 in Moon), but to no avail.

image

X/Y Starter Modification Issue

I recently encountered the fact that when changing the starters in X and/or Y, the models when you select the starter Pokemon do not change. For example, I modified the starters to have the following:

Chespin -> Aegislash
Fennekin -> Cinccino
Froakie -> Volcanion

When I go to select my starter, the models still show Chespin, Fennekin, and Froakie. However, when I actually pick the starter (in my case, Froakie), the dialogue box says, "Matt received Volcanion!" and there actually is a Volcanion in my party.

I'm not sure if that's a problem with pk3DS or X and Y themselves (as I've modified starters in OR/AS and it works like a charm), but it's something I thought I'd bring to your attention. Perhaps if it is a problem with the games, add a prompt that informs the user about it? I dunno haha.

P.S. Sorry for all of the recent issues haha, not my intention to seem needy. I'm just an avid fan of modding the Pokemon games and pk3DS is really just an awesome tool :)

Gen 6 editing broken on master

Just to bring attention if this isn't already known about. The latest stable release has no issues with XY/ORAS so this isn't a priority.

Seems trying to save some files in Gen 6 causes a "division by zero" error on line 626 in GARC.cs:
while (GARCdata.Length%garc.ContentPadToNearest != 0).

I've seen it occur upon closing some of the editors such as the level up moves, trainer and item editors (though not the wild editor, different type of GARC possibly?). Also occurs on trying to close PK3DS.

Repacking gives smaller size in sun/moon

Repacking most things after editing gives smaller size. Repacking the game after editing gives around 7mb smaller than untouched repack. Causes game to not load.
Cia installs fine but the game doesn't load.

Feature Request(s): Special Mart Inventory Randomizer & Pickup Randomizer

On the official pk3DS thread on ProjectPokemon, it mentions that there is a Special Mart Inventory Randomizer at the very bottom of "Randomizers available" (http://i.imgur.com/BadpGzp.png). I began looking for said randomizer, but I can't seem to find it anywhere within pk3DS.

Another neat feature would be the ability to randomize Pickup items. Since field items (from what I know) currently can't be modified, it would be nice to see some more item variation through Pickup.

It would definitely be nice to see these added in if possible. No rush either, of course :)

Feature request regarding Gift Lucario in X/Y

So I'm doing a nuzlocke of an X Randomizer I built a few days ago, and one of the things I randomized was Gift Pokemon. The Lucario you battle Successor Korrina with is one of the Pokemon that can be edited, and was randomized into a Roggenrola with Lucarionite.

Sounds normal so far, right? I thought the same until I actually got through the battle. Regardless of if I win or lose, after the battle, Korrina suggests that Lucario "gets the chance to Mega Evolve" in battle and rematches me, yet it's basically impossible for me to Mega Evolve a Roggenrola.

I learned this the hard way lmao, so there could be two possible fixes for this:

  1. Have the randomizer change everything EXCEPT for Lucario
  2. Randomize everything, but change Lucario into another Pokemon that can Mega Evolve, as well as the Lucarionite into the randomized Pokemon's appropriate Mega Stone (e.g. Lucario is randomized into Venusaur, Lucarionite is then changed to Venusaurite)

Changing Evolution Methods

Is Pangoro's "Level Up with Dark Type in Party" hardcoded specifically as such in the game, or is it possible to change what type like with Sylveon's method? And is "Level Up Female (SetForm 1)" specific to Espurr or would it work with any Pokemon that has an alternate forme?

Similarly, it is possible to inverse the Ninjask/Shedinja situation, so that rather that it gives you two Pokemon from one evolution, using up a space in your party and a PokeBall, is there a way to have one evolution essentially "consume" (delete as opposed to create) a second Pokemon? The only practical use for this would be Slowpoke, so I'm assuming it's not likely.

Also, the notes say

           1, // 28 - Dark Type Party
           6, // 29 - Affection + MoveType
           1, // 30 - Dark Type

But only one of these is actually a new method. Is 30 meant to be the Inkay method?

Separate Backup Folders for Separate Games

Would there be a way to code in backups being put in their own folder based on the SMDH of the icon.bin? I was going between X and Y, and EX and WY, and altering small things between them, but was dismayed that it only retained the most recent set of backups between X/Y and OR/AS.

Instead of:

    private static void backupGARCs(bool overwrite, params string[] g)
    {
        if (!Directory.Exists("backup")) Directory.CreateDirectory("backup");
        foreach (string s in g)
        {
            string GARC = getGARCFileName(s);
            string dest = "backup" + Path.DirectorySeparatorChar + s +
                          $" ({GARC.Replace(Path.DirectorySeparatorChar.ToString(), "")})";
            if (overwrite || !File.Exists(dest))
    File.Copy(Path.Combine(RomFSPath, GARC), dest);
            }
    }
    private static void restoreGARCs(params string[] g)
    {
        foreach (string s in g)
        {
            string dest = Path.Combine(RomFSPath, getGARCFileName(s));
            string src = "backup" + Path.DirectorySeparatorChar + s +
                         $" ({getGARCFileName(s).Replace(Path.DirectorySeparatorChar.ToString(), "")})";
            File.Copy(src, dest, true);
            if (s == "personal" || s == "gametext")
                Util.Alert("In order to restore " + s + ", restart the program. While exiting, hold the Control Key to prevent writebacks.");
        }
        Util.Alert(g.Length + " files restored.");
    }

Would it be possible to do something like:

    private static void backupGARCs(bool overwrite, params string[] g)
    {
        if (!Directory.Exists("backup")) Directory.CreateDirectory("backup");
        foreach (string s in g)
        {
            string GARC = getGARCFileName(s);
            string BAKPATH = (Path.Combine("backup", SMDH.AppInfo[1].ShortDescription));
            string dest = BAKPATH + Path.DirectorySeparatorChar + s +
                          $" ({GARC.Replace(Path.DirectorySeparatorChar.ToString(), "")})";
            if (overwrite || !File.Exists(dest))
    File.Copy(Path.Combine(RomFSPath, GARC), dest);
            }
    }
    private static void restoreGARCs(params string[] g)
    {
        foreach (string s in g)
        {
            string dest = Path.Combine(RomFSPath, getGARCFileName(s));
            string BAKPATH = (Path.Combine("backup", SMDH.AppInfo[1].ShortDescription));
            string src = BAKPATH + Path.DirectorySeparatorChar + s +
                         $" ({getGARCFileName(s).Replace(Path.DirectorySeparatorChar.ToString(), "")})";
            File.Copy(src, dest, true);
            if (s == "personal" || s == "gametext")
                Util.Alert("In order to restore " + s + ", restart the program. While exiting, hold the Control Key to prevent writebacks.");
        }
        Util.Alert(g.Length + " files restored.");
    }

Similarly,

    string CROBAKPATH = Path.Combine("backup", "DLL_" + count);

would become:

    string CROBAKPATH = Path.Combine(BAKPATH, "DLL_" + count);

Not sure if using "SMDH.AppInfo[1].ShortDescription" is correct or if you can just slap it in there. Not really a history-backup so much as a different version backup feature/a backup that doesn't use a single dynamic folder — the original files of that specific game (they're different enough to have the SMDH changed) will always be available.

On a similar note, I realize it's easy enough to drag and drop, but could a restore cros feature be added to complement backup cros?

Thanks!

SMTE error upon compiling (but build succeeds)

1>------ Build started: Project: pk3DS, Configuration: Release x86 ------
1>D:\3DS\pk3DS-master\pk3DS\Subforms\SMTE.cs(225,22,225,29): warning CS0414: The field 'SMTE.loading' is assigned but its value is never used
1> pk3DS -> D:\3DS\pk3DS-master\pk3DS\bin\Release\pk3DS.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

pk3ds is blocked

i keep getting this message from norton family security that i cant download this. Is there any way to fix that?

Trainer Randomization:New Pokemon get Level 0

For example: On the first Hau fight he has one lv5 starter. But if you use the randomizer to set every trainer to 6 Pokemon every new pokemon that gets added into Hau's Team has Level 0.... and not just Hau. the same goes for every trainer :/

Edit: when i go out of pk3ds and then try to to open the trainer randomization window again pk3ds crashes

Height/Weight Reading changes values upon directly viewing entry

Like #32 , but it will dump correctly the first time. (On the latest build.)

Three dumps were done: pk3DS 1.0.3 dump and pk3DS latest's first dump were identical.

Discovered after initial latest build dump that Bulbasaur and Eternal Flower's values had changed, due to starting and ending on them.

Scrolled through every single entry and back to see what would read incorrectly afterwards.

The result is this: https://www.diffchecker.com/JHD7wMog

There still seems to be an issue with decimal points despite 36eba31 and 9b327db being meant to handle this.

Building commit fd7ecad gives error in TrainerRand.cs

Hey Kaphotics,
I just rebuild the latest commit of PK3DS and it gave the following warning upon doing so:

Accessing a member on 'pk3DS.Subforms.MapPermView.DrawMap' may cause a runtime exception because it is a field of a marshal-by-reference class

Random Held Items for All Wild Pokemon?

Currently in pk3DS, it is possible to randomize the Held Items of certain Pokemon (I believe you refer to them as 'relevant entries' within the program) in the Personal form.

What this does: modifies the potential Held Items of a Pokemon that can currently be found holding an item in the actual game. For example, Pelipper can be found in the wild holding either a Pretty Wing (50% chance) or a Lucky Egg (5% chance), while a Pokemon like Cascoon has no chance of holding any item when found in the wild.

What I would like to know is if it's possible to not only modify relevant entries' Held Items, but also every entry in the list (798 entries in X/Y & 825 in OR/AS) to have a 50% chance, 5% chance, and 1% chance Held Item. I was considering simply editing all Pokemon to have three possible Held Items, but going through 790+ entries just wasn't what I wanted to spend my time doing lol.

If possible, I was thinking that this could be done through a checkbox (area defined with the red outline) asking if the user would rather have it modify only relevant entries or all entries (checked for only relevant, unchecked for all).

Hopefully this was clear enough to understand and that it is implemented in some form :)

screenshot_1

Static Encounter Editor feature requests (S/M)

It'd be cool to have a randomizer for all Gifts, Encounters, and Trades, rather than just the starters.

Also not sure if it's implemented already or not, but perhaps allow the randomizer to also potentially have an Alola Form pop up? As far as I'm aware, every time you randomize the starters, it always stays at Form 0, meaning that only Kantonian variants would show up instead of a 50/50 between Kantonian and Alolan.

Form 0 for most Pokemon
Form 1 for alternate forms such as Alola Forms or Totem Pokemon
Form 2 for an Alola Form Totem Pokemon such as Raticate

In the case of Raticate:
Form 0 = Kantonian Raticate
Form 1 = Alolan Raticate
Form 2 = Totem Alolan Raticate

Rare exceptions would be Pokemon with a lot of different forms, such as Deoxys, Rotom, Arceus, Furfrou, Silvally, etc.

EDIT: turns out that there are unique forms of every single Totem Pokemon, which would explain why they grow in size during battle and are listed as entirely separate forms. These Pokemon are Gumshoos (Sun), Alolan Raticate (Moon), Wishiwashi, Salazzle, Lurantis, Vikavolt, Mimikyu, and Kommo-o. Funny enough, the data for both Gumshoos and Raticate are available in both versions.

Tutorial how to Build.

I keep running into issues like my VS saying "error MSB3577: Two output file names resolved to the same output path" which usually means a resx conflict so it'd be nice to have a guide to follow building on either Windows Mac or Linux.

Evolution Method Dropdown Error

There are two methods listed as "Level Up (@) at Night"; the first one should say "at Morning".

Also, do "Level Up at Morning"/"Level Up at Night" have high friendship built in, or is that coded separately for Umbreon/Espeon?

Handle more "Edge" cases if not done already.

TwitchPlaysPokemon would like to eventually do a Gen 6 randomizer run, but we need to know if stuff like "does it handle edge cases? like getting a garbage starter? or other progress inhibiting situations?" is handled.

Example, Magikarp with Splash is chosen as a starter, which is a junk starter. Or suddenly Gym 1 has an Arceus on its team.

Reference Universal Pokemon Randomizer ( https://github.com/Dabomstew/universal-pokemon-randomizer ) for its flexibility. I actually filed a issue with his tool for Gen 6 support since I liked how flexible his tool was, but didnt offer Gen 6 support.

Latest build either corrupts or fails to commit general info changes to personal

The only things that stay changed are base stats, EXP group, catch rate, gender, hatch cycles, base EXP, friendship, and color. EV SpA can be changed, sort of - it shifts the value to EV HP next time you view it, and the next time after that, EV HP has reset to 0.

Furthermore, some heights and weight forms return only the whole numbers, and show a zero after the decimal for those entries, and upon re-opening with the stable build, the actual values have been overwritten. Same with EVs.

EDIT: Here are dumps from before I switched to the latest build and after I reopened it with the stable build.

OR https://www.diffchecker.com/QRXONPq9

AS https://www.diffchecker.com/5D6b75fA

Personal Stats editor

Hey, everything works just great in the Personal Stats editor except for 2 things:

  1. When changing an ability, it does not save.
  2. When changing a type, it does not save either.

Level 0 moves automatically changed to Level 1 in SM

As the title says, any attempts to set level up moves to level 0 (making them evolution moves) will automatically change them to level 1. It also affects any existing Level 0 moves if you happen to view them (just scrolling through the list of pokemon is enough to change them).

Rebuild Sun Moon

Im very sorry, but i rebuilt my rom with 3dsbuilder but when I launch this rom with my gateway, my nintendo 3ds freeze, the logo dont appears.

can you help me ? please

S/M starter randomization question/suggestion

I've tested out the latest commit and the starter randomizer works great. Only downside to it is that when you actually go to pick your starter, none of the models or names change in accordance to what was randomized. This makes choosing the starters a guessing game and isn't exactly the most ideal way to differentiate them without having to go back into pk3DS to check.

For my question, I was wondering if it were possible to change the models shown in the cutscene to match those of the randomized starters? (I feel this will be the less likely of the two)

And for my suggestion, what I feel would be the more likely scenario: I was curious to see if it would be possible that after the starters get randomized, pk3DS would also change the story text to match that of the first Type and name of the Pokemon of the randomized starters?

For reference, the following text is located under Story Text (Text File 41, Lines 1-3)

image

So for example... the original starters are shown off as this in the games:
The Grass-type Rowlet
The Fire-type Litten
The Water-type Popplio

If Rowlet became Shinx, if Litten became Umbreon, and Popplio became Mudsdale, the text would change to:
The Electric-type Shinx
The Dark-type Umbreon
The Ground-type Mudsdale

I understand that this could be tedious (or even impossible to do, that I'm not so sure of), but it's worth a shot asking :)

Feature request regarding TM randomization (S/M)

Currently when randomizing TMs, possible moves also include Z-Moves. Any chance you could have a checkbox that enables/disables the inclusion of Z-Moves? Thanks again for all your hard work!

Edit: TM76 Fly, TM94 Surf, and TM98 Waterfall also remain untouched despite them not having any overworld use in S/M. Perhaps that could also be tweaked for S/M only :)

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.