Romhacking.net

Romhacking => Newcomer's Board => Topic started by: FaulkFan on June 13, 2014, 01:54:27 pm

Title: Pokemon TCG ROM hacking tools?
Post by: FaulkFan on June 13, 2014, 01:54:27 pm
Hello everyone, I am new to the forum. I was wondering if anyone knew if there are any ROM hacking tools for the Pokemon TCG gba game? Or if there are any tools that would work. A text editor, map editor, and a deck editor would be amazing!
Title: Re: Pokemon TCG ROM hacking tools?
Post by: danke on June 13, 2014, 05:36:32 pm
Tools like that don't currently exist. However, the text in the game is easily edited, as is the text in the cards. I still have my stuff from when I translated the second game, but that won't be of use to you. I believe a table file for the first game is up on the Wiki.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FAST6191 on June 14, 2014, 07:53:04 pm
The only problem with deck editors is it tends to break the AI, which most will tell me is already weak (this is to be expected as card games are nightmarishly hard to code AI for but hey). If you only want it to play against another player then that is a different matter.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FaulkFan on June 24, 2014, 11:32:49 pm
I wouldn't be changing the decks too much so I don't think the AI would break. Just rounding off playsets of cards already in use.

How hard would it be to create tools?
Title: Re: Pokemon TCG ROM hacking tools?
Post by: KaioShin on June 25, 2014, 03:26:05 am
How hard would it be to create tools?

This is one of things where, if you have to ask, the answer is very hard  :-\
Title: Re: Pokemon TCG ROM hacking tools?
Post by: danke on June 25, 2014, 03:41:21 am
It would be very easy to create tools... But the problem with the tools was already pointed out. Changing cards in decks would mess up the AI.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FaulkFan on June 25, 2014, 04:52:37 pm
It would be very easy to create tools... But the problem with the tools was already pointed out. Changing cards in decks would mess up the AI.

I am not talking about building all new decks or anything. Just completing playsets. If you changed the count of a card the deck already uses from 3 to 4 the AI should be able to handle that right?

@KaioShin: I know very little/nothing about creating programs. I was simply asking how hard it would be for someone who knew what they are doing before I go asking people.

I just think it's a great game in the Pokemon series and I would love to be able to easily edit it!
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FAST6191 on June 25, 2014, 05:41:43 pm
Collectible card game AI for a game to make it just like real life is horrific to try to program things for on a supercomputer, doing anything in real (ish) time on the GBA's 16.78MHz ARM7 with just under 300KB of memory and all of 32 megabytes of storage space is just not possible. The reasons why would involve me going into some depth on how games work, consider it this way though there are 32 pieces on a chess board, each can maybe make an average of 6 possible moves and thus trying to predict any number of moves ahead like a human might then means you are very quickly dealing with exponential numbers and having to crunch the lot or at least something close to it. I had the dubious pleasure of reading up on the rules to the game earlier today and it seems the pokemon TCG has however many possible cards, various win/loss states, effects that do all sorts of things, weaknesses, probabilities changing damage*, trainer cards, retreats -- at any given point there are a serious potential amount of moves available (easily in the thousands per turn) and all way way way beyond any supercomputer today.

*to be fair most of those seem to be "flip a coin, heads you win, tails I lose" so 20 plus 20 if coin in your favour can probably be safely approximated to 30.

To help with this the developers sharply limit the options, cards available to them and their opponent and maybe add the results of a few player matches and strategies that work against and with a given deck, depending upon the game they may even have a limited version of xray glasses. If you want to go a bit more in depth then the Magic the gathering people have a good article from when they made their XBLA game (and the 360 is order of magnitude more powerful than the GBA), http://archive.wizards.com/Magic/magazine/article.aspx?x=mtg/daily/feature/44

Now it may be that the devs just use a basic heuristic or 5 to try to make an AI that kind of works, pokemon TCG and similar games like yugioh are often quite broken to the point where this is possible (it is the collectible/rare part of the cart game thing and why you end up with a long list of tournament rules against certain combos), but I would be shocked if it was solely that. You alter just a couple of cards and you alter all kinds of probabilities, counter strategies and more that the devs would be counting on for the deck and then things start breaking down very quickly.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FaulkFan on June 25, 2014, 06:18:39 pm
Yea but just increasing the number of one card in the deck shouldn't cause any problems. The AI knows what to do with that card originally. I could see the AI having issues playing completely new decks. I would only be streamlining the decks already there. At any rate if I had an editor then I could obviously test each change.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FAST6191 on June 25, 2014, 07:29:53 pm
Given you are mandated 60 cards it means you are losing out on something else to gain it, also that you have differing probabilities of being able to play a given type of card. Alas the only terms I can really discuss this in would be for Magic the Gathering (and an extremely old rule set at that) or general AI development/game theory and I am not sure how well I can convey it if you do not know either. Maybe if you are losing a few trainer cards for some more energy it could work but you start changing pokemon to something slightly different and that goes.

It may still work but realistically it is there for a reason -- the original devs did not disallow card changes because they were opposed to fun but typically because it does not work if you do change it (and do not run the decks against each other and code accordingly).
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FaulkFan on June 25, 2014, 10:38:49 pm
I think the AI would do okay for the most part. You can create any deck you want with the in game editor and the AI is perfectly fine dealing with any card combination you can create. There are cards that manipulate the opponents deck/hand and pokemon powers that alter the way they have to play and what cards they can play. I think the AI could handle a few minor changes as long as you aren't expecting them to pick up a certain combo that the AI doesn't already use. At any rate nobody will really know what the AI can handle until someone creates a deck editor. :)

EDIT: After reading your post I feel you're under the assumption that all the decks are preset in the game. You can create any deck you want for your deck. I was referring to a program to edit the enemies deck.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FAST6191 on June 26, 2014, 12:33:27 pm
I was under that impression, however it matters little and may actually be worse.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FaulkFan on June 26, 2014, 03:54:40 pm
How does that make it worse? I am not questioning you, you seem very knowledgeable. I am just trying to understand.

How about a simple Text editor, or sprite editor?
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FAST6191 on June 26, 2014, 06:37:00 pm
From before it is mathematically impossible to simulate in real time on a supercomputer -- the amount of options at any given play raise to the relevant power makes that so. To this end you take shortcuts, hopefully the game has dead ends in strategies and some basic strategies that you can try to program into your AI to have it work. One of the better ways is to do this is to limit the options that might be encountered, like limiting the player deck, maybe at best giving them a small sideboard composed of similar cards. However here you say the human player has free reign over a deck, this then means you basically have to build a generalist deck or have some potentially useless counters built in and it will be built to play against most decks. Change the probabilities of given cards, or remove strategies from a deck, and things start deteriorating fast -- card games are somewhat larger than their animations and whatever else would appear to allow them any right to be, it is good odds that such a size increase is a database of sorts.

Sprites and text should be no harder than sprites and text ever are.

Title: Re: Pokemon TCG ROM hacking tools?
Post by: tc on June 26, 2014, 06:51:19 pm
Not GBA, the game is compatible with original GB. I have no clue what its AI would do if given the kinds of desk humans are allowed.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: danke on June 26, 2014, 08:04:55 pm
It's a Gameboy game, FAST. (The sequel is GBC-exclusive).

As for graphics, none of them are compressed and can be viewed in any graphics editor. I'd suggest YY-CHR. The text is easily edited via any text editor. I'd suggest WindHex, and the table file for this game is available over on the RHDN wiki.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FaulkFan on June 26, 2014, 10:27:35 pm
What about Maps and sprite placement?
Title: Re: Pokemon TCG ROM hacking tools?
Post by: kuja killer on June 26, 2014, 10:41:04 pm
Collectible card game AI for a game to make it just like real life is horrific to try to program things for on a supercomputer, doing anything in real (ish) time on the GBA's 16.78MHz ARM7 with just under 300KB of memory and all of 32 megabytes of storage space is just not possible.

-- at any given point there are a serious potential amount of moves available (easily in the thousands per turn) and all way way way beyond any supercomputer today.


question about that. I once tried a one of the yugioh games for the first time in my life a year or two ago for the DS. I think it was "yugioh 5ds ...something"

And whenever the CPU/opponet would go (not me the player) this little textbox appears with dots (elipseys) ..and it usually lasts for about 10 to 15 seconds seriously....just for the opponet to make a move.

Is that related to what you said ?? How it needs to spend a super long time figuring out what to do ??
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FAST6191 on June 27, 2014, 05:35:45 am
A lot of games have an odd relationship with UI design but usually not that bad, to that end yes I would place money on that being the case here. What might be interesting is if you take ages on your turn and then basically do nothing, it might still take its time but I have to wonder if they don't also use all the time available (yugioh games had some nice animations as well if memory serves).

As for maps, sprite placement and the like consider it a normal game as far as most hacking is concerned. It is just that customising decks in any real way when using AI is extremely hard to do if you want the AI to still work well, bordering on "why not just make your own homebrew game*?".

*though I would probably fork http://code.google.com/p/wagic/ instead.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: FaulkFan on June 27, 2014, 05:24:19 pm
The extent of "ROM hacking" I've done is using programs specifically designed to alter certain games. I was hoping I could find someone who could create me some decent hacking tools for Pokemon TCG. I have no interest in creating an entirely homebrew game, I just want me and my friends to be able to easily edit that nifty little game. :)

June 30, 2014, 10:24:22 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Sorry for the double post but my question never got answered. How hard would it be to create a few basic editors for the Pokemon TCG game? Like a simple text, sprite, and map editor? I know there are other programs that will work with some doing but no one can debate the fact that a custom editor would be easier for the common person to use. I just think think it was such an awesome game I don't see why there isn't a entire ROM hacking community dedicated to hacking the Pokemon TCG.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: Seihen on July 01, 2014, 03:53:53 am
Why isn't there an editor? 'Cause you haven't made it yet, buddy!  :thumbsup:
Let us know when it's ready, so the common person can use it and edit things a little easier.
Title: Re: Pokemon TCG ROM hacking tools?
Post by: mantidactyle on July 01, 2014, 11:24:02 am
You can easily edit the CPU decks.
The main issue is the AI is really bad. I made a little change in the AI so it doesn't do some obvious mistakes anymore (like attaching a basic energy instead of a Double Colorless on Pokémon that need 2 colorless energies to attack). It took me a lot of time, mainly because I'm a beginner I guess.

The CPU tends to put Big Basics that won't attack in front to prepare their Bench.
The CPU can deck out itself with Kangaskhan using Fetch 25 turns in a row while you do nothing.
Some opponents have a Special AI (allowing them to use Pokémon Breeder for example).
Others won't start the duel unless they got 2 basics in hand, some Energy cards, or some specific Pokémon.

I'll document it on Data Crystal once I finish some other projects (Yu-Gi-Oh Dark Duel Stories hack and a Pokémon Stadium 1 / 2 editor)

For the CPU Decks, the format is [Amount] [Card]. For example :
===============================================
0x30848-0x3086F : Grandmaster Ronald
===============================================
14 02 04 07 01 3D 02 40 01 5A 01 5F 01 72 01 76
02 B9 04 BC 04 BF 03 C0 02 C1 01 C3 03 C5 01 C9
02 CA 03 D0 03 D5 01 E3


0x14 = 20
0x02 : Fire Energy
=> 20× Fire Energy