Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.

Reply
 
Thread Tools
  #1    
Old October 12th, 2016 (7:30 AM). Edited October 15th, 2016 by DizzyEgg.
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 19
Gender: Male
Nature: Quiet
Posts: 447


Hello.
As you probably know, there is a tutorial on how to expand pokemon. I've recently made a post there that the byte changes done in steps 7-10 mess with data it shouldn't touch causing unexpected behavior(aka bugs). The method depicted there also allows to expand the dex to only 740 slots. So I decided to take matters into my hands and create a not-buggy and complete pokemon expansion.

As some of you know, I'm a C hacker using Python scripts to compile the code. It was not different this time, though there's one additional script for repointing tables. Link to code.

Download the repository and follow the instructions in the readme file. I've also provided a more detailed description to make sure everything's clear.

Info
Spoiler:

Ram Space for pokedex seen/caught flags:
Spoiler:
A new saveblock has been created. The offset of it is present in BPEE.ld file and can be changed to whatever location you want. I chose 0x0203CF64, because I'm 95 percent sure it's the starting point of un-used RAM in EM.
Seen flags are appended at beginning, then go caught flags. Again, everything's read dynamically here, so the locations will change depending of your number of dex slots.


New saveblock:
Spoiler:
It can hold maximally something about 3700 bytes, I don't remember exactly but it's the highest possible value that can be used without changing all game save funtions and disabling having two games saved. I did not use the method in the previous tut, because it was taken from a hack and I found the byte changes unreliable.


Max Pokemon No:
Spoiler:
There's no limit on pokemon in general. When it comes to dex, 'max' you can go is 999. It's just 1000 and above numbers are four-digits and would require to change the position of numbers in dex. I didn't find it necessary as I think 999 is more than enough, but if someone wants to go even higher, be my guest. (and change the number display )


Installation problems:
Spoiler:
Hope readme explains it clear enough



If you find a bug, please either report here or make an issue on GitHub. As I said at the beginning this is supposed to be free of any bugs.
Reply With Quote

Relevant Advertising!

  #2    
Old October 12th, 2016 (12:30 PM). Edited October 12th, 2016 by Lunos.
Lunos's Avatar
Lunos Lunos is offline
Uruguayan Random Guy
 
Join Date: Oct 2008
Posts: 669
Holy mother of everything incluiding the existence itself!
I'M SO. GOING. TO MAKE. A PERSONAL. PATCH.
Thank you so much Dizzy, I'm gonna put it to test <3

EDIT: The readme inside the master folder is a mess though, copying and pasting the instructions written in the GitHub's repository main page is easier and looks perfectly fine, I'm assuming they're the exact same thing since overall they looked like it xD

EDIT2: Hey @DizzyEgg I forgot to ask, can I safely replace the 0xFA0000 in linker.ld with 0x118740 or expanded space could cause troubles later on? (I went Full Paranoic Mode and decided to expand and pick a random offset to avoid space problems, lol)
__________________
I've tried to support so many hacks, that i've broken up the rules, i'm such an awesome fan D:
Reply With Quote
  #3    
Old October 12th, 2016 (1:27 PM).
BluRose BluRose is online now
¿cómo se dice cabrón?
 
Join Date: Apr 2014
Location: phenac city
Age: 15
Gender: Male
Nature: Timid
Posts: 435
*praying for moveset expansion*

nice job dizzy! always nice to see things from you tbh, it almost makes me think of the days where all we did was make a table for fbi's battle engine </3
__________________
- - - - - - - - -
please note that when/if i answer questions i am likely doing it from an ipad on which i do not actually have a rom dump of any game/ways to check out the data <3
Reply With Quote
  #4    
Old October 12th, 2016 (7:53 PM).
KDS's Avatar
KDS KDS is offline
 
Join Date: Jul 2013
Age: 22
Gender: Male
Posts: 350
Quote:
Originally Posted by DizzyEgg View Post
--super stiuff--.
Good job! Son, you made me proud!

Quote:
Originally Posted by BluRose View Post
*praying for moveset expansion*

nice job dizzy! always nice to see things from you tbh, it almost makes me think of the days where all we did was make a table for fbi's battle engine </3
Moveset expansion is already covered in the Emerald Battle Engine.
Reply With Quote
  #5    
Old October 13th, 2016 (9:22 AM).
Tetra's Avatar
Tetra Tetra is offline
Fumes Of Fury
Crystal Tier
 
Join Date: Sep 2009
Gender: Male
Nature: Lax
Posts: 1,076
Sweet! The thread's up. This expansion is so much reliable than the former one. No more unexpected faults and glitches ;)
Reply With Quote
  #6    
Old October 13th, 2016 (2:59 PM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 21
Gender: Male
Posts: 777
How this doesn't have more replies I'm not sure. Huge breakthrough!
Great work Dizz!
__________________
Reply With Quote
  #7    
Old October 13th, 2016 (4:27 PM).
Lost Heart's Avatar
Lost Heart Lost Heart is offline
Moderator PokéCommunity Daily Staff
 
Join Date: Mar 2010
Location: Ohio
Age: 19
Gender: Male
Nature: Relaxed
Posts: 3,592
Really great work! This is awesome and so much better than using an expander via a tool. Very well commented and super easy to use.
__________________
mod github pair
Reply With Quote
  #8    
Old October 13th, 2016 (11:38 PM). Edited October 13th, 2016 by Lunos.
Lunos's Avatar
Lunos Lunos is offline
Uruguayan Random Guy
 
Join Date: Oct 2008
Posts: 669
Hey DizzyEgg, gave it a try after my previous edit. I'm getting frozen during Birch's introduction.
I probably made some silly mistake when filling the diferent information in the files pointed at in the master folder's readme, so I'll leave in a spoiler all of that.

Spoiler:
Expansion.py:
Spoiler:
##################################################################
#those values should be configured according to user
free_space = 0xF50000 #location to start looking for free space
new_pokes = 424 + 441 #X is the number of pokemon you're adding, ignore that 441, it's for all limbo slots; say you want to include gen 4, 5 and 6 that gives 335
dex_pokes = 699 #amount of pokes you want to have in national dex; max you can currently go is 999
clear_repointed_data = True #if True clears old tables, if False doesn't touch them
Movesets_repoint = True #set to False if you don't want to repoint learnset table, (if you're using Emerald's battle upgrade set to False)
TmHmComp_repoint = True #set to False if you don't want to repoint tm/hm comp tables; for example: you expanded tms
MoveTutorComp_repoint = True #same as above but movetutor tabl e
evos_per_entry = 8 #amount of evolutions avaiable for each pokemon
##################################################################


defines.h:
#define DEX_POKES 699

hooks.s:
.equ DEX_POKES, 699

linker.ld:
ORIGIN = (0x08000000 + 0xFA0000)


After that I just did Steps 4 and 5 normally.

EDIT: Also tried replacing "0xFA0000" in the linker.ld for a "0x800000" and then executed the 3 commands again but didn't worked, got the same freeze, so it probably wasn't the ROM's size expansion fault.
__________________
I've tried to support so many hacks, that i've broken up the rules, i'm such an awesome fan D:
Reply With Quote
  #9    
Old October 14th, 2016 (9:49 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 19
Gender: Male
Nature: Quiet
Posts: 447
Quote:
Originally Posted by Lunos View Post
stuff
Set evos_per_entry to 5. I should have probably mentioned that this doesn't expand evolution slots, but correctly expands in case you had expanded before. So, if you have 5 slots, type 5.

Also, I've been trying to dumb down the process, so you don't have to change the defines in all files, but well it didn't exactly go as planned.
I'll try to get it done in a few days as well as provide an ini dumper for Pokemon Game Editor.
Reply With Quote
  #10    
Old October 14th, 2016 (1:11 PM). Edited October 14th, 2016 by Lunos.
Lunos's Avatar
Lunos Lunos is offline
Uruguayan Random Guy
 
Join Date: Oct 2008
Posts: 669
Quote:
Originally Posted by DizzyEgg View Post
Set evos_per_entry to 5. I should have probably mentioned that this doesn't expand evolution slots, but correctly expands in case you had expanded before. So, if you have 5 slots, type 5.

Also, I've been trying to dumb down the process, so you don't have to change the defines in all files, but well it didn't exactly go as planned.
I'll try to get it done in a few days as well as provide an ini dumper for Pokemon Game Editor.
Done, now it doesn't freeze anymore :'D ... it just throws me a black screen whenever I want to browse through the Pokédex ... </3

EDIT: Oh, wait, are the expanded slots counted as Bulbasaurs by default? If not, that's probably it.
I'll give it a try once the PGE INI Dumper is done xD
__________________
I've tried to support so many hacks, that i've broken up the rules, i'm such an awesome fan D:
Reply With Quote
  #11    
Old October 14th, 2016 (1:24 PM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 19
Gender: Male
Nature: Quiet
Posts: 447
Quote:
Originally Posted by Lunos View Post
Done, now it doesn't freeze anymore :'D ... it just throws me a black screen whenever I want to browse through the Pokédex ... </3

EDIT: Oh, wait, are the expanded slots counted as Bulbasaurs by default? If not, that's probably it.
I'll give it a try once the PGE INI Dumper is done xD
Probably inserted the code in a location that overwrote something. Anyway, I'll soon simplify the process, so it will be easier to insert it. All expanded slots have same data of second pokemon that happens to be Bulbasaur, if that's what you meant.
Reply With Quote
  #12    
Old October 15th, 2016 (2:12 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 19
Gender: Male
Nature: Quiet
Posts: 447
A little update.
Now you can just edit the expansion.py file and it will do all the work for you. If there are problems however, you can still do it all manually.
Also, dex search tables get repointed and you can change the amount of pokemon in the regional hoenn dex.
__________________
Make Emerald Great Again

My works:
Battle Engine Upgrade
Pokemon Expansion
Items/TMs/Tutors Expansion
Levels past 100
Reply With Quote
  #13    
Old October 15th, 2016 (12:26 PM).
Marky Vigoroth's Avatar
Marky Vigoroth Marky Vigoroth is offline
...I just liked the Scyther icon.
 
Join Date: Aug 2015
Location: Puerto Rico
Gender: Male
Nature: Naive
Posts: 59
...how do I use this after your Pokémon Engine? I used your engine; the resultant ROM worked fine, but using this on the resultant ROM (even after pointing to blank space) would only lead to a blank, soundless screen after the copyright dates.
__________________
Hack-player; hack-maker.
Reply With Quote
  #14    
Old October 15th, 2016 (1:05 PM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 19
Gender: Male
Nature: Quiet
Posts: 447
Quote:
Originally Posted by Marky Vigoroth View Post
...how do I use this after your Pokémon Engine? I used your engine; the resultant ROM worked fine, but using this on the resultant ROM (even after pointing to blank space) would only lead to a blank, soundless screen after the copyright dates.
I'm not really sure why that would happen. Script sure automatically find free space, so it shouldn't be an issue. Try deleting the .sav file. If it still doesn't work, try applying it to a clean rom. If clean rom also doesn't work, it means you incorrectly modified the expansion.py file.
Reply With Quote
  #15    
Old October 16th, 2016 (2:27 PM).
Marky Vigoroth's Avatar
Marky Vigoroth Marky Vigoroth is offline
...I just liked the Scyther icon.
 
Join Date: Aug 2015
Location: Puerto Rico
Gender: Male
Nature: Naive
Posts: 59
Quote:
Originally Posted by DizzyEgg View Post
I'm not really sure why that would happen. Script sure automatically find free space, so it shouldn't be an issue. Try deleting the .sav file. If it still doesn't work, try applying it to a clean rom. If clean rom also doesn't work, it means you incorrectly modified the expansion.py file.
...even after a clean ROM (and fresh install), I still got the black screen. All the changes I did were these:

Quote:
new_pokes = 114 + 441 #X is the number of pokemon you're adding, ignore that 441, it's for all limbo slots; say you want to include gen 4, 5 and 6 that gives 335
dex_pokes = 500 #amount of pokes you want to have in national dex; max you can currently go is 999
__________________
Hack-player; hack-maker.
Reply With Quote
  #16    
Old October 17th, 2016 (1:01 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 19
Gender: Male
Nature: Quiet
Posts: 447
Quote:
Originally Posted by Marky Vigoroth View Post
...even after a clean ROM (and fresh install), I still got the black screen. All the changes I did were these:
That's very strange. Make sure you've got the latest version, so check Github and download it. Your python file should look like this:
http://hastebin.com/keranizojo.py
I tested it and it works fine. The last time I've seen someone get a black screen was when he made the evos_per_entry equal to 8, not 5.

Quote:
Originally Posted by Lunos View Post
Oh, wait, are the expanded slots counted as Bulbasaurs by default? If not, that's probably it.
I'll give it a try once the PGE INI Dumper is done xD
Good news everyone. Gamer2020 made his ini creator tool. All you have to do after the expansion is open the Pgeinicreator.exe and all offsets will get updated, so you can use PGE with your new expanded rom.
Reply With Quote
  #17    
Old October 18th, 2016 (7:18 AM).
Marky Vigoroth's Avatar
Marky Vigoroth Marky Vigoroth is offline
...I just liked the Scyther icon.
 
Join Date: Aug 2015
Location: Puerto Rico
Gender: Male
Nature: Naive
Posts: 59
I got the latest version; I used both the latest expansion.py and had the python file similar to keranizojo.py.
I still get that black screen.
__________________
Hack-player; hack-maker.
Reply With Quote
  #18    
Old October 18th, 2016 (9:48 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 19
Gender: Male
Nature: Quiet
Posts: 447
Quote:
Originally Posted by Marky Vigoroth View Post
I got the latest version; I used both the latest expansion.py and had the python file similar to keranizojo.py.
I still get that black screen.
Alright, the reason was because I wast testing it on a rom with a save file and now that I checked again, you were right. On a rom with no save file, this indeed did happen(infinite loops yay).
Sorry for the inconvenience. I updated the github and it should all work fine.
Reply With Quote
  #19    
Old October 19th, 2016 (7:27 PM).
im_mega's Avatar
im_mega im_mega is offline
Some guy on the internet.
 
Join Date: Nov 2014
Gender: Male
Posts: 24
Is there any way for me save all the offset changes into an ini for use with G3T? (also using your Battle Engine.)
Reply With Quote
  #20    
Old October 20th, 2016 (12:07 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 19
Gender: Male
Nature: Quiet
Posts: 447
Quote:
Originally Posted by im_mega View Post
Is there any way for me save all the offset changes into an ini for use with G3T? (also using your Battle Engine.)
You're asking if there's a tool that updates the G3T's ini? If so, then no. You'll have to make those changes yourself, but it shouldn't take long as G3T uses dynamic offsets, so you'll only need to change number of pokemon and such.
Reply With Quote
  #21    
Old October 22nd, 2016 (1:30 PM).
Nylon Nylon is offline
 
Join Date: Aug 2008
Gender:
Posts: 69
Will this method be included into the Emerald Battle Engine Upgrade (if it isn't already)?
Reply With Quote
  #22    
Old October 22nd, 2016 (3:44 PM). Edited October 22nd, 2016 by Marky Vigoroth.
Marky Vigoroth's Avatar
Marky Vigoroth Marky Vigoroth is offline
...I just liked the Scyther icon.
 
Join Date: Aug 2015
Location: Puerto Rico
Gender: Male
Nature: Naive
Posts: 59
'Well, this is embarrassing.' —Firefox

I used both this expansion and your engine (having them point to different free space in my expanded ROM). The game works in mgba. I can edit Pokémon in Pokémon Game Editor. However, when I try to edit moves or abilities in the the same PGE, I get an error that says 'Error: 5; Unable to read beyond the end of the stream.' The unhandled exception was: 'Input string was not in a correct format.' If I decide to continue and try t even select a different move/ability, PGE says that another process is already using my ROM—error #75.
__________________
Hack-player; hack-maker.
Reply With Quote
  #23    
Old October 22nd, 2016 (9:54 PM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 21
Gender: Male
Posts: 777
Quote:
Originally Posted by Nylon View Post
Will this method be included into the Emerald Battle Engine Upgrade (if it isn't already)?
They're compatible, but are treated as separate projects. This allows people to pick which features that they want. Hidden Abilities are going to be done in this way too.
__________________
Reply With Quote
  #24    
Old October 23rd, 2016 (1:02 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 19
Gender: Male
Nature: Quiet
Posts: 447
Quote:
Originally Posted by Marky Vigoroth View Post
'Well, this is embarrassing.' —Firefox

I used both this expansion and your engine (having them point to different free space in my expanded ROM). The game works in mgba. I can edit Pokémon in Pokémon Game Editor. However, when I try to edit moves or abilities in the the same PGE, I get an error that says 'Error: 5; Unable to read beyond the end of the stream.' The unhandled exception was: 'Input string was not in a correct format.' If I decide to continue and try t even select a different move/ability, PGE says that another process is already using my ROM—error #75.
Make sure the offsets in the ini are correct. Something stupid like one move less or more can use it to crash like that. Also make sure to use Jambo's Learnset Hack or whatever it's named there. As for the different process using your rom, make sure you don't have it opened in A-map or a hex editor(open for reading is fine, but modifying the file may throw that error in PGE)

Quote:
Originally Posted by Nylon View Post
Will this method be included into the Emerald Battle Engine Upgrade (if it isn't already)?
As Dollsteak said, they're separate projects, but fully compatible with each other.
Reply With Quote
  #25    
Old October 23rd, 2016 (12:38 PM). Edited October 23rd, 2016 by Marky Vigoroth.
Marky Vigoroth's Avatar
Marky Vigoroth Marky Vigoroth is offline
...I just liked the Scyther icon.
 
Join Date: Aug 2015
Location: Puerto Rico
Gender: Male
Nature: Naive
Posts: 59
Quote:
Originally Posted by DizzyEgg View Post
Make sure the offsets in the ini are correct. Something stupid like one move less or more can use it to crash like that. Also make sure to use Jambo's Learnset Hack or whatever it's named there. As for the different process using your rom, make sure you don't have it opened in A-map or a hex editor(open for reading is fine, but modifying the file may throw that error in PGE)
That was the problem! The offending offsets were, say '01017C38' instead of '1017C38'! Thank you!

Right now, I am checking the number of moves. 1025 and 1024 do not seem to be working so far...
__________________
Hack-player; hack-maker.
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 4:41 PM.