Giter Site home page Giter Site logo

skeli789 / dynamic-pokemon-expansion Goto Github PK

View Code? Open in Web Editor NEW
234.0 24.0 186.0 28.55 MB

A tool to ease the process of expanding the number of Pokemon in Fire Red. It is meant to be used alongside the Complete FireRed Upgrade.

License: Other

C 98.31% Python 1.46% Assembly 0.23%

dynamic-pokemon-expansion's Introduction

Dynamic-Pokemon-Expansion [FR]

What is this:

A dynamic data insertion tool for expanding Pokemon data in FireRed.

Features:

  • Dynamic insertion, meaning no worrying about repointing ever!
  • Support for as many different Pokemon (regular Pokemon, forms, etc.) as you'd like.
  • Support for different gendered forms.
  • Support for different form Pokedex entries like in Sun/Moon.
  • Support for up to 999 different Pokedex entries (not including alternate forms).
  • Support for FRLG habitats.
  • Support for Pokemon sprite and icon insertion.
  • Support for cry insertion.
  • Support for up to 128 TM/HM's and 128 Move Tutors

NOTE It is highly recommended to apply the Complete Fire Red Upgrade following the insertion of this hack. Otherwise, make sure to comment out the line #define EXPAND_LEARNSETS in the defines file or your game will crash (unless you have expanded movesets manually). Additionally, if you're not using the Complete Fire Red Upgrade, in bytereplacement, find the changes for the seen and caught flag ram, and change it to some free save space. Make sure to apply a saveblock hack first and a TM/Tutor expansion first, though.

Installation Instructions:

1. Download devkitpro. Follow the instructions.
(Note: you can only install devkitARM)
For Windows users, follow steps 4-6 from this tutorial:
https://www.pokecommunity.com/showpost.php?p=8825585&postcount=96

2. Download the latest version of python (3.7.2).
After downloading and before proceeding to install make sure that the 'add to path' 
checkbox is ticked, otherwise you'll have to add the python path in the environment 
variables manually.

**NOTE**: If a python version lower than 3.6 is installed, you'll need to uninstall it and manually
remove it from your path before installing the newer version of Python.

3. Download the master folder from this github page.
(click 'Clone or Download', then 'Download Zip')

4. Get your ROM, rename it BPRE0.gba and 
place it the main (master) folder.

5. To decide the offsets where you want to insert the code:

a) In the 'make.py' file in the folder 'scripts' change OFFSET_TO_PUT=YYY to the location 
   you want to insert the data (let it be X). Don't worry about changing 'insert.py' also.
   'make.py' automatically updates the 'insert.py' file and linker file.
 
7. Run cmd.exe in the main folder. You can do this by typing 'cmd' and hitting enter in the 
url address or selecting 'run command prompt from here' from right clciking on empty space 
while holding the shift key.

8. Only if you would like to use the data extractor, in command prompt window,
type 'python scripts//data_extractor.py' This extracts the graphics data from 
BPRE0.gba and places it in the directory *extracted*. Make sure to update the
files in *src* with this extracted data. Do not overwrite the files in *src*.
Only replace Pokemmon that are in your hack. Leave the expanded graphics data alone.

9. Once you're done editing the source files to your liking, in the command prompt window, 
type 'python scripts//make.py'. If you have never compiled before, the first time
compilation will take a few minutes. However, as long as you don't clean the build
data, all following compilations will be much quicker.
  
A new gba file will appear named as test.gba and an offsets.ini file.
That is your resultant file.

About TM/HM & Move Tutors

When looking in the src directory, you will notice two subdirectories, tm_compatibility (for modifying TM/HM data) and tutor_compatibility (for modifying Move Tutor data). Contained within these directories are files corresponding to each TM/HM and Move Tutor. Unlike most tools and expansions, this engine allows modification by TM/HM and Move Tutor number, as opposed to by species. To give a species a certain TM/HM or Move Tutor, simply add the species name to the appropriate file. If you want to change one of the pre-defined TM/HM's or Move Tutors, simply change the name of the file (leaving the number the same), and update the corresponding data in the files include/tutors.h and/or src/TM_Tutor_Tables.c.

Extracting Old Data:

When using this expansion, you may wish to keep using the sprites already inserted in your rom. If so you will need to extract the original graphics data pointers from your rom. To do this, overwrite the BRPE0.gba file in the root with this rom that has the graphics data (always make a backup first!). Then, open scripts/data_extractor.py and change the line NumberOfPokemon to the number of species graphics data you wish to extract from your rom + 1. Go back to the root, open the command line, and type python scripts//data_extractor.py. Extracted graphics data will be pulled from your rom and placed in a new folder extracted. Copy the contents of the tables found in these files and overwrite the tables found in the equivalent files found in src. Once the extraction is complete, make sure to either add (void*) to the beginning of each pointer in these extracted files, or open include/graphics.h and replace any relevant instances of const u8* with u32. This will allow the files to compile warning free. Now, the next time you insert this hack, all of your graphics pointers will remain unchanged, allowing you to make changes to things such as the Pokedex data and level-up movesets without worrying about repointing anything.

dynamic-pokemon-expansion's People

Contributors

deadaccountld avatar garfieldthelightning avatar intrigus avatar profleondiasbackup avatar skeli789 avatar

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

dynamic-pokemon-expansion's Issues

Gen 8 Sprites

Hi Skeli, first of all I wanted to thank you for this amazing project.

I wanted to ask if Gen 8 sprites are going to be added, because in my spare time I can help getting some of them done.
I just don't want to start doing something that won't be added in the first place.

There was an error compiling the engine: [Errno 2] No such file or directory: 'mid2agb'

When running scripts/make.py, I get the error There was an error compiling the engine: [Errno 2] No such file or directory: 'mid2agb'. I cant find a package or anything for mid2agb on the internet, unlike with wav2agb. If someone could help point me in the right direction, I'd be grateful.

Full output:

Warning! Python 3.8 may not be able to build this engine.
Please downgrade to Python 3.7.4
Compiling Music
There was an error compiling the engine: [Errno 2] No such file or directory: 'mid2agb'

I might just be dumb, but...

So I'm pretty new to this stuff, but I went through all the steps, went through the trial and error, and finally it seemed like the whole thing compiled, but when everything finished, no new .gba file was created. The instructions said that a file named "test.gba" would be the result of the process, but no such file appeared in the master folder. Am I doing something wrong here, or am I missing something because I'm an idiot?

Wondering where to look with regards to changes made to the save format.

Hello,

I'm attempting to write an external tool to track my Pokedex progress in Pokemon Unbound. I would like to parse the save file to see which Pokemon I've seen.

However while attempting to follow this documentation: https://bulbapedia.bulbagarden.net/wiki/Save_data_structure_in_Generation_III on BulbaPedia. I've found that the save file format has been changed. I would assume that this change stems from the addition of all the new Pokemon coming from Dynamic Pokemon Expansion.

Would you have any resources / bits of code to look at regarding the changes made to the save format to accommodate the extra Pokemon?

I see the GetSetPokedexFlag method in updated_code.c but I'm having a hard time following it to where those changes are applied.

Any help would be greatly appreciated.
Thank you.

Cannot assemble after setting up

Whenever I try to set up my ROM, this error occurs:

Warning! Python 3.8 may not be able to build this engine.
Please downgrade to Python 3.7.4
Assembling ./assembly\main.s
Error! The assembler could not be located.
Are you sure you set up your path to devkitPro/devkitARM/bin correctly?

No clue why this happens, I'm not an expert at this. Please help!

"End of file reached" message with a clean ROM

Yo. I was just trying to inject the DPE in a ROM of Pokémon Fire Red out of boredom, and I noticed that even I set SEARCH_FREE_SPACE to True I get this message on my shell:
"End of file reached. Not enough free space."
DPE

Which is weird, because I'm using a clean v1.0 ROM of Pokémon Fire Red.

I didn't change any other setting either. I mean, I did specify an offset just in case it was required, but that's basically it, and the offset begins with a huge lot of free space (0x71A250).

Grit not compiling images

Due to the large amount of files in this engine, Pokemon sprite graphics are combined in 41 different .s files which are then compiled. However, on some PCs it has been noted that grit is not compiling several images into one file and is thus leading to linker errors.

TM/Tutor text files issues

Trying to add DPE to a vanilla rom without changing anything and I get the following errors:

...
Processing TMHM Data.
Ignoring file: "src/tm_compatibility/1 - Focus Punch.txt"
Not valid TM file.
...
Ignoring file: "src/tm_compatibility/99 - Wild Charge.txt"
Not valid TM file.
Processing Tutor Data.
Ignoring file: "src/tutor_compatibility/1 - Fire Punch.txt"
Not valid TM file.
...
Ignoring file: "src/tutor_compatibility/99 - Breaking Swipe.txt"
Not valid TM file.

Strange error related to arm-none-eabi-nm.exe

So, I was injecting the DPE in a clean ROM of Pokémon FireRed v1.0 to check some things out, and as the process was reaching its end, I got the following error twice:
Untitled5640

While a test.gba ROM was generated successfully, I gave it a quick test run and the game freezes as I'm about to receive my starter in Oak's Lab.
I have Python v3.7.9 and a fresh install of Windows' version of devkitPro, meaning that by extension I'm using devkitARM r56. Dunno if that changes anything.

This was working fine the last time I tried it almost 2 months ago.

Struggle move

After applying CFRU and DPE to a clean squirrels rom, I made it possible for a wild level 3 sewaddle appear on route one. So after I did that, all it had was struggle. That also happened for a wild necrozma. So then, I made the necrozma level 67, then it had a move. Only one. And that one move didn't affect my level 6 bulbasaur. and I beat it. Will you fix the moveset issue? or is it my problem?

Evolutions dont work

Im using a Vanilla Squirrels Rom, and i only put DPE (without modifyng nothing) and CFRU (without modifyng nothing)

But Bulbasaur Dont Evolve even after level 16, Thats so weird, i forget to Edit something?, im not the best reading english so i probably forget something

Weird error

When trying to compile it, I get this error:
DevKit does not exist in your Path variable.
Checking default location.
Devkit found.
std lib error:
ERROR: chunk goes beyond end of file

Inserting code.
C://devkitPro//devkitARM//bin\arm-none-eabi-objdump: 'build/linked.o': No such file
Error: The insertion process could not be completed.
The linker symbol file was not found.

TMSHMS and Moveset problems

*TMSHMS

  • in defines.h:
    //#define NUM_TMSHMS 128
    //#define NUM_MOVE_TUTOR_MOVES 128
  • in cmd:
    ./src\TM_Tutor_Tables.c:4:22: error: 'NUM_TMSHMS' undeclared here (not in a function)
    4 | const u16 gTMHMMoves[NUM_TMSHMS] =
    | ^~~~~~~~~~
    ./src\TM_Tutor_Tables.c:136:27: error: 'NUM_MOVE_TUTOR_MOVES' undeclared here (not in a function)
    136 | const u16 gMoveTutorMoves[NUM_MOVE_TUTOR_MOVES] =

*Moveset:

  • in defines.h:
    //#define EXPAND_LEARNSETS
  • in cmd:
    Symbol missing: gLevelUpLearnsets

Relocating the addresses in memory for the players party

I've had a LOT of people asking me to add support various rom hacks, for Pokélink but the data in memory seems to have all changed (which is what we used to represent the user's team live on their layout).

From what I can gather, with your help and using some of the code on in this repo - I can find the party data in memory and add support for rom hacks and help the poke-streaming community.

Would be great to work with you, even if just to get an idea of where to look, any struct changes, etc.

Hope you're having a good Holiday season!

Cheers

Assembler Cannot be Located

Hello! I'd just like to start with saying how awesome this tool is and that I'm excited to give this a try. I'd like to at least start with a simple FireRed ROM hack with a somewhat casual feel and some added features.

However, before I can start, I have his a bit of a roadblock. I've seen this issue before and tried to look up where I'm going wrong, but I'm hoping I could speak to you about the issue directly. I've installed both Python 7.8.6 and the DevPro GBA kit to assemble the expansion and added the file to the variable paths as per the instructions. While the command prompt successfully generates at the beginning, I receive an error afterward saying the "Assembler Cannot be Located". I was wondering if you could take a look at the pictures attached and guide me to see if you could find where I went wrong or direct me to someone who might be able to help. I understand this might be a common issue, but I'd be grateful for your help.

cmderror

devkitlocation

envvar

paths

Error! The assembler could not be located.

I don't think I've done anything wrong. I've tried on three different python versions (3.7.0,3.7.2 and 3.7.6) with all my path directories set up to go to C:\devkitPro\devkitARM\bin. It gets through the loading sprites,hmtm etc. until it gets to assembly.

Assembling ./assembly\hooks.s
Error! The assembler could not be located.

^that is what happens. I've looked at the hooks.s folder, but I'm not sure what's wrong with it. Am I doing something wrong? thank you.

[Question] Pokédex data

How do you edit the pokedex data such the heigh or the weigh in the aditional dex entries? Or if creating a new one, how to add this data?

Symbol missing: gTMHMLearnsets

details:

El sistema no puede encontrar el texto del mensaje para el mensaje número 0x2350 en el archivo de mensajes para Application.

(c) 2019 Microsoft Corporation. Todos los derechos reservados.

C:\Users\jamir\Desktop\Rom Base\Dynamic-Pokemon-Expansion-master>python scripts//make.py
DevKit does not exist in your Path variable.
Checking default location.
Devkit found.
Processing Tutor Data.
Assembling ./assembly\hooks.s
Assembling ./assembly\pokedex_hooks.s
Assembling ./assembly\thumb_compiler_helper.s
Assembling ./assembly\generated\backsprites.s
Assembling ./assembly\generated\castformsprites.s
Assembling ./assembly\generated\frontsprites.s
Assembling ./assembly\generated\iconsprites.s
Assembling ./assembly\generated\tm_compatibility.s
Assembling ./assembly\generated\tutor_compatibility.s
Compiling ./src\Back_Pic_Coords_Table.c
Compiling ./src\Back_Pic_Table.c
Compiling ./src\Base_Stats.c
Compiling ./src\Cry_Table.c
Compiling ./src\Cry_Table_2.c
Compiling ./src\Egg_Moves.c
Compiling ./src\Enemy_Elevation_Table.c
Compiling ./src\Evolution Table.c
Compiling ./src\Footprint_Table.c
Compiling ./src\Front_Pic_Coords_Table.c
Compiling ./src\Front_Pic_Table.c
Compiling ./src\Habitat_Table.c
Compiling ./src\Icon_Palette_Table.c
Compiling ./src\Icon_Table.c
Compiling ./src\Item_Animation_Table.c
Compiling ./src\Learnsets.c
Compiling ./src\Palette_Table.c
Compiling ./src\Pokedex_Data_Table.c
Compiling ./src\Pokedex_Orders.c
Compiling ./src\Shiny_Palette_Table.c
Compiling ./src\Species_To_Pokdex_Table.c
Compiling ./src\TM_Tutor_Tables.c
Compiling ./src\updated_code.c
Building Strings ./strings\Pokedex_Data.string
Building Strings ./strings\Pokemon_Name_Table.string
Compiling Audio
Assembling special_inserts.asm
Built in 0:01:50.178182.
Inserting code.
Symbol missing: gTMHMLearnsets
Inserted in 0:00:21.756218.

I don't think I am fully understanding this

Hi Skeli
I tried to use this dyamic expansion and cfru but I am getting problems:
first of all I'm going to tell you exactly what I did

I took a blank fr rom
I compiled in this dynamic pokemon expansion (leaving every setting as it was before)
I compiled in cfru, still leaving every setting as default

now I wanted to start editing a map, so i opened Advancemap, but the wild pokemon list is blank and I'm not sure if this is a AM problem, or if I should edit the settings in some way.

Anyway, I appreciate very much your work, thanks

Errors

When I tried to do the make command, it told me that I was missing freeimage.dll and libwinthread.dll. after adding them this came up.
Linker

There was an error compiling the engine

Hi Skeli,

every time i trye to compile it i get this error.

C:\Users\VaVoo\Dynamic-Pokemon-Expansion-master>python scripts//make.py
Assembling ./assembly/hooks.s
Assembling ./assembly/thumb_compiler_helper.s
Assembling ./assembly/generated/backsprites.s
Assembling ./assembly/generated/frontsprites.s
Assembling ./assembly/generated/iconsprites.s
Assembling ./assembly/generated/tm_compatibility.s
Assembling ./assembly/generated/tutor_compatibility.s
Compiling ./src/Back_Pic_Coords_Table.c
Compiling ./src/Back_Pic_Table.c
Compiling ./src/Base_Stats.c
Compiling ./src/Cry_Table.c
Compiling ./src/Cry_Table_2.c
Compiling ./src/Egg_Moves.c
Compiling ./src/Enemy_Elevation_Table.c
Compiling ./src/Evolution Table.c
Compiling ./src/Footprint_Table.c
Compiling ./src/Front_Pic_Coords_Table.c
Compiling ./src/Front_Pic_Table.c
Compiling ./src/Habitat_Table.c
Compiling ./src/Icon_Palette_Table.c
Compiling ./src/Icon_Table.c
Compiling ./src/Item_Animation_Table.c
Compiling ./src/Learnsets.c
Compiling ./src/Palette_Table.c
Compiling ./src/Pokedex_Data_Table.c
Compiling ./src/Pokedex_Orders.c
Compiling ./src/Shiny_Palette_Table.c
Compiling ./src/Species_To_Pokdex_Table.c
Compiling ./src/TM_Tutor_Tables.c
Compiling ./src/updated_code.c
Building Strings ./strings/Pokedex_Data.string
Building Strings ./strings/Pokemon_Name_Table.string
Compiling Audio
There was an error compiling the engine: [Errno 2] No such file or directory: 'wav2agb': 'wav2agb'
Error: Could not find source rom: "BPRE0.gba".
Please make sure a rom with this name exists in the root.

Bulbasaur makes the game crash

Not sure if this is a known error,but after applying the Dynamic Pokemon Expansion, and before CFRU, whenever a bulbasaur is involved, the game crashes

Black screen after title screen.

So I have been trying to use this for several hours with CFRU. If I use my BPRE0.GBA with CFU no issue. If I use the same for this project --- even with options enabled as if I am not using CFRU I see the pokemon title screen, press a button and then I am instantly hit with a black screen. No errors upon compiling, very confused but also don't know where to start with this issue.

I'm using python 3.76
I have my paths set
I'm commented out sections as if I do not play on using CFRU and still get the same issue.
I've tried restarting, I've tried a different copy of the game, I've tried a different emulator, ive looked over the readmes for both projects. I cannot get this to work no matter what.

but doing CFRU solo works....

undefined reference

same with CRFU on linux
python3.7 scripts/make.py

Processing Icon Sprites.
There was an error compiling the engine: [Errno 2] No such file or directory: 'grit': 'grit'

Mega-Diancie

Mega-Diancie backsprite is wrong placed, a little bit over the battle text box.

libwinpthread-1.dll is missing

Title.

I downloaded the latest master folder of this repository, throwed in a Pokémon Fire Red v1.0 USA ROM named BPRE0.gba, opened up a CMD in C:\Users\Lunos\Desktop\Dynamic-Pokemon-Expansion-master and used python scripts//make.py (I skipped python scripts//data_extractor.py as the README implies it's an optional command.),

The result? I got this error right here.
cmd-2019-12-17_20-41-15

It may have to do with the specific versions of the required tools that I have, or maybe it's my PATH Environment Variable.
Right now, I'm using Python v3.7.3 and devkitARM r53.
I have the Environment Variable that devkitPro's installer creates by default for devkitARM, and for Python I have links to C:\python37\ and C:\python37\Scripts\ in my PATH Environment Variable.

If there's any other useful information I can/must provide, let me know.

How do you use this?

There's no tutorials anywhere and all the thing in the read me says is "Once you're done editing the source files to your liking...".

Adding gen8 sprites myself

i can seem to add them properly. i have the images and i put them in thier respective graphics folders with the right name and build it. when i play it though the sprite is a black square with a transparent pkmn in it. i think its a pallet issue any ideas?

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.