News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Some questions about Yu-Gi-Oh! World Championship 2008 hacking  (Read 267 times)


  • Newbie
  • *
  • Posts: 2
    • View Profile
Some questions about Yu-Gi-Oh! World Championship 2008 hacking
« on: November 11, 2019, 11:47:02 am »

I've been trying to figure out how to edit the opponents' data in YGO World Championship 2008 (for the DS), to make a ROM hack with different CPU opponents, mostly just because by now I'm bored of the default CPU Free Duel opponents.

I know where to find the deck data in the ROM, so I can edit that quite easily. However, what I can't find is the rest of their data, like the characters' names or their numerical rating or information about the little hexagon that shows up next to them (if you've played WC2008 you'll know what I'm talking about). Is anyone knowledgeable enough about hacking DS games to help me out here?

While I'm at it it could also be interesting to know how to edit the 'downloaded ghosts' within the save file itself, which could potentially be easier... I can actually find the data in the .sav file (it starts at offset 33000), and a lot of the data is right there. However, I've tried editing simple things like the name of the deck, and then when I save the file and import it to Desmume, the downloaded ghosts won't show up any more. I found that offsets 33004 to 33007 contain some hex data which changes when deleting different ghosts, so I think there might be some kind of verification check for the ghosts involved with that.

Anyway, if you can help me out it would be much appreciated! My knowledge of hacking stuff boils down to trawling through things with a hex editor, so a lot of the more complicated stuff is lost on me. If you can show me how, though, I'll be forever indebted to you.

I also hope that this thread doesn't sound like a bunch of crap, lol...



  • Hero Member
  • *****
  • Posts: 2626
    • View Profile
Re: Some questions about Yu-Gi-Oh! World Championship 2008 hacking
« Reply #1 on: November 11, 2019, 10:25:09 pm »
As a general rule card game AI is hideously complicated (makes Go look like candyland sort of thing). being my usual link in such scenarios.

However here it sounds like either a graphical hack/aesthetics hack or just operating within existing scenarios. I find the former somewhat odd (I usually get bored of AI patterns long before I care what the opponent looks like) but to each their own on that one, and the latter if the devs gated off fun stuff for the single player mode can be tedious.

Editing data in the save and then loading it to have it not show is fairly expected -- the vast majority of games going back... probably to the NES have some kind of hash check done on the save so as you surmise it is likely that. You need to either edit before the hash is done (if it lands in memory it likely exists within the ROM at some point so maybe edit that as a cheat to see if it saves back), fix the hash (going to have to figure out what hash and what data is included in it, both of which might well be quite custom*) or tweak the ROM such that it disregards the hash upon loading (possibly the hardest, but if memory cheats are not a thing then possibly the least involved overall).

*if there is an existing save editor for the game then you might be able to do your edit, make a change in the editor and have it correct any hash related issues, or indeed if there is any source code for it then maybe figure out without having to first reverse engineer the hash. While I have seen crypto grade stuff for the DS it is often more of a very basic CRC, bytesum, parity or similar.

Back to aesthetics. Two main choices for aesthetics.
1) You edit the existing data within the game and 2) you edit what the game loads. 1) is very old school and if the data is used elsewhere it will likely break/change that but should be easy enough to do. If you are doing for you then this is less of a concern than making a story mode appear odd.
2) In this case you get to play with load calls and whatever else.

For existing parameters.
The easiest way is use savestates on an emulator, or possibly your flash cart, to allow you to load from a bank of existing scenarios you cook up. This is less than ideal for a lot of people though so we will skip it beyond noting it here. Same for the slightly easier for some option of load up a custom save at a custom point.
Beyond that it gets more fun. Sometimes the enemy AI might just be a number somewhere in RAM just like inventory or something and thus can be edited/selected with a cheat, as might the data in general in the memory but I mentioned that above.
Other times you will possibly want to look at some kind of program flow edit a la some boss rush, forced minigame selection or forced game selection where you essentially jump directly to that point in a game from somewhere earlier in it.


  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Some questions about Yu-Gi-Oh! World Championship 2008 hacking
« Reply #2 on: November 12, 2019, 04:27:29 am »
Thank you for your post! It was very informative, I will see if I can find anything out about hash checks and the like...

Oh, I'm fully aware of the AI's shortcomings in this game. It has a lot of frustrating moments lol. It might well be strange but I think it would be fun for me personally to build some decks and play against them - you can technically just do this by saving the deck recipe and going to recipe duel mode, but that's not as exciting or technically complicated.... :P Always the hard way eh....

I'm thinking that the parameters for CPU opponents must be stored in a compressed file somewhere, so I'll see if I can find where it is and play around with it.

EDIT: I've found out how to change stuff in memory, regarding the save data stuff - I can edit the ghost duelists stuff through that, but I can't seem to make the changes stick after the duel ends...

EDIT2: I've also now found where in the ROM the characters' "stats" are as well as a file that defines which deck is assigned to which character. It seems what characters are available in Free Duel mode is hard coded somewhere but I can't find where right now.... If I find it you'll see an EDIT3 soon lol
« Last Edit: November 12, 2019, 08:14:32 pm by Weetepin »