StarsMmd Posted May 10, 2015 Posted May 10, 2015 (edited) **The first part of my tutorials is here if you're looking for it - -hacking-tutorial-part-1-File-decompression-recompression'>http://projectpokemon.org/forums/showthread.php?46250-Stars-Pokemon-colosseum-and--hacking-tutorial-part-1-File-decompression-recompression** images: There are still a lot of things I haven't been able to figure out on my own so far. It is to be hoped, that with my knowledge of pokemon colosseum and hacking now available to more people we will see some progress. Some things on the list are things I've started to piece together but got stuck. Some things I just couldn't find at all. I. physical/special split Done In Pokemon the shadow moves actually have a gen iv style physical/special split. Each of them has a flag determining whether it is physical or special. However, setting this value on a regular move has no effect. With some research I believe it will be possible to figure out a very simple way to implement the physical/special split in . May require editing the battle routine to check for this flag on every move rather than just shadow moves. This is probably in the start.dol but I really don't know. The super smash bros. melee hacking community have done a lot of .dol editing so I think there is enough knowledge on the .dol format in order to figure out the way to do this. II. Editing map scripts Done The files containing map data are .fsys files. Their file names start with a letter and a number (S1,M3,D2,T1, etc.) which identifies which area it is in the game. For example S1 is outskirt stand and D1 is the mystery lab. The file name is usually then followed by a word describing what is in that particular .fsys. Each area will have multiple files since each individual room gets an individual file. So D1_garage_1F is the first floor of the garage next to the main building of the mystery lab while D1_labo_B1 is 1 level underground in the main part of the lab. When you unarchive the .fsys, I have previously mentioned that the third file (named something like D1_garage_1F0000002 by quickBMS since they all have the same file name) contains the string table for that map. This file contains every text string in that map with a reference id number. This is all explained in the section on text editing. The second file in this archive seems to be the one containing scripts. If you search for the string ids from the corresponding string table, you will see that they all appear in this data which shows where they are being used. In colosseum this file is a bit hard to piece together but in it actually includes the names of the functions and pointers to each of these functions so you can actually very easily figure out which code corresponds to which in-game function. They have names like "talk_104_research1_m" which references the script activated when you talk to that NPC who is a male researcher, "lugia_relive" which is the script for purifying shadow lugia and "changebgm" which changes the background music. With enough people researching it should soon be possible to figure out how to write scripts like is already being done on the gba games with tools like XSE and PokeScript. I will include annotated pictures of the patterns I've noticed so far. The file headers in are very useful, telling us how many scripts there are and how many instructions each one contains as well as giving the name of each script. The command 0x80000000 appears to end the script. The 5th file (something like M5_apart_1F000004 from quickBMS) ends with the Magic bytes "scene_data". Like I explain in the part about editing models, files which end with "scene_data" as the very last bytes are what I believe to be 3d models. So this probably contains the actually model for that room. The archive also comes with a copy of the overworld models for each of the NPCs that appears in that map from trainers to pokemon. These are usually named by their japanese names like "usohachi" being bonsly's japanese name and "snach_zako" being a team snagem grunt. III. Editing textures Done I believe the textures are in big endian but by swapping them to little endian we could open them on a computer and edit them. I don't know which file format they're in either. The dolphin emulator has the ability to replace textures automatically by loading the textures you specify whenever it would have loaded the corresponding texture from the game. I've had fun editing the textures to recolour the main character's outfit and making primal groudon and kyogre textures but I haven't found a way to put them into the ISO itself so for example, when I play my hack on my wii u I can't have my edited textures. A lot of the textures are really bad; apparently some came from pokemon stadium on the N64! With today's higher standards and the ability to play the game in HD now it would be great to make a complete retexture of the game. IV. Editing models I believe all the models (like the pkx_yyy files) are the files which end with the bytes "scene_data". Just by looking at them you can see a pattern but I don't have the expertise to figure out what it all means. The models have the same format except some of the bytes at the very end of the colo models are moved to the very beginning in the models. However if you look at the data for where the main model data starts you will see that not only is the same format used, a lot of the models in , like deoxys normal) are exact copies from colosseum. Apparently some of the models are even as old as pokemon stadium. I've looked at some of the pokemon battle revolution files which also use the .fsys file format. I'm not interested in hacking battle revolution at all but it would be amazing to steal some of the models for gen IV pokemon and maybe some trainer models and have them in . Battle revolution seems to use a different file format but parts of the two formats look fundamentally the same. I don't know how the models from xy/oras are but maybe they could be converted into format too. Alternatively, if the model format is understood well enough then it may be possible for modellers to create their own custom models. There are pkx_yyy files for every pokemon and every human npc type in the game. There is also another model for each of the overworld pokemon and the overworld humans which differ from their in-battle models for those that have in-battle models. These are always packaged in the fsys of the map they appear in. I've looked at the data and their different. I think the overworld ones are less detailed as you will notice the humans have mitten-like hands in the overworld but all five fingers are visible in battle. - Things I haven't been able to figure out at all - I. Where is the weakness/resistance table ?! Done It's been in the same format in all the other games but I can't seem to figure it out for colosseum or . II. I know where the sound files are but I don't know how to edit them. Their file names and magic bytes might give the formats away though. I just don't know much about music formats and its a low priority for me. III. ASM hacking Done The majority of it will be in start.dol. The gamecube runs on the powerPC architecture which is very well documented and in fact I have a hex editor on my mac that was able to disassemble the code for me without me needing to specify any details. My assemly programming isn't great though as I kind of missed those lectures in uni ... (damn!) Understanding the game's programming could allow all sorts of hacks like making new move effects (e.g. trick room or quiver dance), make new abilities (e.g. adaptability or mega launcher) increasing the walking speed or adding new battle mechanics from later generations like drizzle expiring or not switching in your next pokemon when one dies until the end of the turn (For those who don't know, back in gen III, in double battles if one pokemon fainted you had to replace it straight away meaning if you doubled up on a slot then you could knock out that pokemon and then hit the next pokemon switched in on the same turn). We could also change things like the chances of finding shiny pokemon (which is set to 0 in ) or the critical hit chances and damage multiplier like in gen VI. Research images 1.zip Research images 2.zip Edited June 12, 2016 by StarsMmd 1
StarsMmd Posted May 18, 2015 Author Posted May 18, 2015 (edited) Just an update for anyone who's interested. I've found the weakness and resistance table and I've also managed to successfully implement the physical special split. I expected it to be pretty straight forward but I was actually surprised at how simple it was. I'll post some more tutorials soon. I'm still no closer to figuring out how the scripts work in the maps. I have however identified key data in them which can at least allow basic editing. For example in the agate village map the script for the man who gives you berries clearly has the item ids of each of the potential berries in a clear pattern. you could probably change this to any berry (maybe even any item) very easily. [EDIT:] I've found the actual pokespot data in common_rel. I've also successfully edited textures. This is all documented here: -Info-dump'>http://projectpokemon.org/forums/showthread.php?46590-Pokemon--Info-dumpEDIT: wow it's been a long time since these days but pretty much everything here has been reverse engineered. We've come a long way. Edited September 10, 2020 by StarsMmd
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now