• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Patch: [EM] Safe, fast and dynamic Pokemon Expansion

534
Posts
11
Years
  • Age 26
  • Seen Jul 24, 2023
I tried that, when I typed "Python scripts//expansion.py" it says "The filename, directory name, or volume label syntax is incorrect." But when I just type "expansion.py" it says:
"Traceback (most recent call last):
File "C:\Users\______________________\PokeExpansion-master\scripts\expansion.py", line 16, in <module>
new_pokes = x + 441 #x is the number of pokemon your adding, ignore that 441 it's for all the limbo slots; say you want to include gen 4, 5, and 6 that gives 335
NameError: name 'X' is not defined

Like I had said I'm still only starting out and have no clue what to do next.
Go to "PokeExpansion-master\scripts" then find 'expansion.py' open it with Wordpad or Notepad. (I assume you can do this even if you are just starting out.) Then find the line that says:
"new_pokes = x + 441 #x is the number of pokemon your adding, ignore that 441 it's for all the limbo slots; say you want to include gen 4, 5, and 6 that gives 335"
And like the comment denoted by '#', change 'X' to the Pokemon you want to add. Like for example, You want a total of 721 Pokemon in your game, delete 'X' and replace it with '335' so now, it would look like this:
"new_pokes = 335 + 441 #x is the number of pokemon your adding, ignore that 441 it's for all the limbo slots; say you want to include gen 4, 5, and 6 that gives 335"
There also other options in the 'expansion.py' it's just a few true or false statements so set it, save it, then compile it, and you're good to go. :)

If you have further questions, feel free to VM me or Dizzy. Let's not clutter up this thread. :)
 
16
Posts
6
Years
  • Age 28
  • Seen Aug 7, 2017
A problem about breeding.The pokes which have mega evolution but no one can evolve to them such as Mawile and Kangaskhan can't get an egg. The game will crash if I get an egg from the Day Care
 

Gamer2020

Accept no Imitations!
1,062
Posts
15
Years
Gamer2020's EmeraldRomBaseGenerator is kinda out of date so here's what you should do. Don't use Python to open the scripts. Run cmd in the directory then type "python scripts//expansion.py". The instructions to use this is actually in the 'README.md'. Just open it with Notepad or WordPad. :)
You're kinda out of date.
 

Trainer 781

Guest
0
Posts
How do I make each pokemon have its data in an offset other than the bulbasaur?

You need to edit the newly added slots manually in PGE. But I and MrDollsteak are planning to add data from Gen 1-7 in the expansion code itself.
 
75
Posts
9
Years
You need to edit the newly added slots manually in PGE. But I and MrDollsteak are planning to add data from Gen 1-7 in the expansion code itself.

For that I would have to put the data in a new offset, I would use FSF, but how many bytes would it take? PS: Sorry for my bad english ... Att. Google Traslate
 
8
Posts
12
Years
  • Seen Sep 8, 2019
I keep getting the errors that are listed below:

Errors/Result:
Spoiler:



I really need help with this.
 
Last edited:
247
Posts
6
Years
  • Age 25
  • Seen yesterday
I hate to post an error on top of an error, but I've got a few myself:

Traceback (most recent call last):
File "D:\Hack Rom\PGE\PokeAdder\scripts\expansion.py", line 319, in <module>
build_and_insert_code(offset)
File "D:\Hack Rom\PGE\PokeAdder\scripts\expansion.py", line 272, in build_and_insert_code
linker = open("linker.ld", 'r+')
FileNotFoundError: [Errno 2] No such file or directory: 'linker.ld'

D:\Hack Rom\Z Actual stuff\emerald hacking>"D:\Program Files\Python36\python" "D:\Hack Rom\PGE\PokeAdder\scripts\build"
DevKit does not exist in your Path variable.
Checking default location.
Devkit found.
C://devkitPro//devkitARM//bin//arm-none-eabi-ld: cannot open linker script file linker.ld: No such file or directory

Inserting data
C://devkitPro//devkitARM//bin\arm-none-eabi-objdump: 'build/linked.o': No such file
Traceback (most recent call last):
File "D:\Hack Rom\PGE\PokeAdder\scripts\insert", line 142, in <module>
offset = get_text_section()
File "D:\Hack Rom\PGE\PokeAdder\scripts\insert", line 39, in get_text_section
out = subprocess.check_output([OBJDUMP, '-t', 'build/linked.o'])
File "D:\Program Files\Python36\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "D:\Program Files\Python36\lib\subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C://devkitPro//devkitARM//bin\\arm-none-eabi-objdump', '-t', 'build/linked.o']' returned non-zero exit status 1.



I can tell it has something to do with the DevkitPro files, but I can't figure anything else beyond that. I've searched online, trying to find an answer to this error, but to no avail. Please help!
 

Trainer 781

Guest
0
Posts
I hate to post an error on top of an error, but I've got a few myself:

Traceback (most recent call last):
File "D:\Hack Rom\PGE\PokeAdder\scripts\expansion.py", line 319, in <module>
build_and_insert_code(offset)
File "D:\Hack Rom\PGE\PokeAdder\scripts\expansion.py", line 272, in build_and_insert_code
linker = open("linker.ld", 'r+')
FileNotFoundError: [Errno 2] No such file or directory: 'linker.ld'

D:\Hack Rom\Z Actual stuff\emerald hacking>"D:\Program Files\Python36\python" "D:\Hack Rom\PGE\PokeAdder\scripts\build"
DevKit does not exist in your Path variable.
Checking default location.
Devkit found.
C://devkitPro//devkitARM//bin//arm-none-eabi-ld: cannot open linker script file linker.ld: No such file or directory

Inserting data
C://devkitPro//devkitARM//bin\arm-none-eabi-objdump: 'build/linked.o': No such file
Traceback (most recent call last):
File "D:\Hack Rom\PGE\PokeAdder\scripts\insert", line 142, in <module>
offset = get_text_section()
File "D:\Hack Rom\PGE\PokeAdder\scripts\insert", line 39, in get_text_section
out = subprocess.check_output([OBJDUMP, '-t', 'build/linked.o'])
File "D:\Program Files\Python36\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "D:\Program Files\Python36\lib\subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C://devkitPro//devkitARM//bin\\arm-none-eabi-objdump', '-t', 'build/linked.o']' returned non-zero exit status 1.



I can tell it has something to do with the DevkitPro files, but I can't figure anything else beyond that. I've searched online, trying to find an answer to this error, but to no avail. Please help!

Make sure that you are running scripts from the root folder and make a user Environment Variable named Path and add an entry containing the path of bin folder of devkitARM
 
247
Posts
6
Years
  • Age 25
  • Seen yesterday
Make sure that you are running scripts from the root folder and make a user Environment Variable named Path and add an entry containing the path of bin folder of devkitARM

That worked! Thank you.......but now I have a new problem. The Pokedex successfully expanded, everything's working fine on that end. When I try to insert one of the added Pokemon into the wild on the game, none of the added Pokemon appear as a choice to insert. I'm sure I'm using the new ROM. I'm using AdvanceMap.
 
Last edited:
9
Posts
8
Years
  • Age 26
  • Seen Jan 21, 2023
Hi !
After upgrading the battle engine, i expanded the dex. However, when i select a new pokemon in PGE, i got an error(error:63) : "The recordvalue argument is not a valid value".
There is not problem with the first 386 pokemon.

Is there someone who got this error ?

EDIT : Problem solved !

EDIT : When i only try to expand dex, and not the battle engine, i don't have problem.
I also have another question about the number of evolution :
"- Change the lines commented out
(starting at free_space ending at evos_per_entry)"

The only "evos per entry" i saw is this :

"#if you didn't expand pokemon before, do not touch those values
expanding_again = False
old_pokes = 412
evos_per_entry = 5"

Is this "evos_per_entry" i have to edit ?
 
Last edited:
1
Posts
10
Years
I clearly messed something up, because whenever I try open expansion.py, a console opens up for a split second, then closes. I manged to take a screenshot of what the console said before it closed (after a few failed attempts) "Name Error: name 'X' is not defined". Any help?
 

Trainer 781

Guest
0
Posts
Hi !
After upgrading the battle engine, i expanded the dex. However, when i select a new pokemon in PGE, i got an error(error:63) : "The recordvalue argument is not a valid value".
There is not problem with the first 386 pokemon.

Is there someone who got this error ?

EDIT : Problem solved !

EDIT : When i only try to expand dex, and not the battle engine, i don't have problem.
I also have another question about the number of evolution :
"- Change the lines commented out
(starting at free_space ending at evos_per_entry)"

The only "evos per entry" i saw is this :

"#if you didn't expand pokemon before, do not touch those values
expanding_again = False
old_pokes = 412
evos_per_entry = 5"

Is this "evos_per_entry" i have to edit ?

https://www.pokecommunity.com/showpost.php?p=9718836&postcount=774 - for installing multiple hacks together

no you don't need to edit evos_per_entry if you are using Various Features Hack for eevelutions.
 
9
Posts
8
Years
  • Age 26
  • Seen Jan 21, 2023
Thank you and sorry, i didn't see your post :s
I'm editing some moves et i noticed there are moves without description(foul play for example, i forgot to note the other D: ) or wrong effect(i just saw Bone rush hits 2 times and steamroller can't flinch as its effect accuracy is 0 for the moment). Hope it can help if i didn't make something wrong !
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
There's a minor glitch regarding the regional dex and how much it displays in the "SEEN" and "OWN" sections - the max number it displays is one below the actual regional dex amount (for instance, the default Hoenn dex is 202. If you have a completed Hoenn dex with 202 Pokemon, the SEEN/OWN indicators will say 201 instead of 202).

To fix it, open up DexExpansion.c and scroll to line 210 and you should see the snippet below. Where it says "(u16 i = 1; i < HOENN_DEX_POKES; i++)", change it to "(u16 i = 1; i < HOENN_DEX_POKES+1; i++)" and that will fix the glitch.
Code:
u16 hoenn_pokes_count(u8 mode)
{
    u16 count = 0;
    for (u16 i = 1; i < HOENN_DEX_POKES[B]+1[/B]; i++)
    {
        count += get_set_dex_flags(hoenn_to_national(i), mode);
    }
    return count;
}

EDIT: Actually I'm starting to wonder if the starting index of the for loop should be 0 instead of 1 and the ending index kept the same. Kinda hard to test it with a completed Pokedex file... stay tuned.
 
Last edited:
23
Posts
11
Years
  • Seen Aug 29, 2019
Open the linker.ld and insert files. Replace 0xFA0000 with an offset of your choice to put the code there

I don't understand this step. What files am I supposed to be inserting into this document? also there is no 0xFA0000 in that doccument there is a 0xf98e70 however. Is the ofset I put here supposed to be the same, or different from the one in step 2?

Kind regards
 

Trainer 781

Guest
0
Posts
I don't understand this step. What files am I supposed to be inserting into this document? also there is no 0xFA0000 in that doccument there is a 0xf98e70 however. Is the ofset I put here supposed to be the same, or different from the one in step 2?

Kind regards

Just modify the offset in the Expansion.py file. The offset in the linker and insert.py will automatically be updated after running the expansion.py script.
 
87
Posts
8
Years
  • Age 29
  • Seen Feb 5, 2021
Hi, first of all congratulation for the entire project, I'm sure it was really a demanding and huge work.
I'm trying to run the engine on a clean rom but I keep on receiving the same problem on PGE, which is the one described by other users (error on new Pok?mon "The recordvalue argument is not a valid value".).
I followed all the tutorials I found different times but it still returns me that kind of error. Is the written procedure actually correct, right?
In particular I'm referring to this one (instructions to install all features):
Spoiler:


I also tried to use the expansion.py file which was in instructions.zip but it still didn't work. Could you help me, please?

This is my ini file anyway

Spoiler:


And this is the cmd part:


EDIT
I tested the new Pok?mons with a givepokemon script and it seems it works, so it looks like the problem concerns only PGE. Any ideas?
Moreover with some new Pok?mon (from Axew to Volcarona at least) no problem occurs.
 

Attachments

  • compilatore.png
    compilatore.png
    17.7 KB · Views: 16
Last edited:
Back
Top