Themes are folders placed in your "Res/Themes/" directory, that change the way the game looks (and sounds). The folder name itself defines the name of the theme, so keep that in mind when building or using one. They can basically contain customized copies of almost any resource loaded by the game (though not decks or ai, just graphics, sounds, card images, and music). For a graphics only example, check out the "Res/Themes/Jade/" folder.
So, what exactly can a theme change?
- Basically, if it's an image file, but it's not a specific card, it goes here. For most themes, this is all you'll need to edit. Just copy a graphics file, edit it, and save it. The game should load the file when you switch to "MyTheme" in the options menu. You can even place AI avatar images, card backs, or modified versions of the "no image version" of cards in this directory!
- This folder contains music files. Currently, that means "Track1.mp3" (for in the deck editor) and "Track0.mp3" (for everywhere else).
- This contains the sound effects played while dueling. Just look at the readme in "Res/sound/sfx" for details.
- This folder is used to hold themed versions of specific cards. This requires that you mirror the structure of the normal sets folder, so to create a themed version of "Firebreathing", from 10E, you'd have to create a "MyTheme/sets/10E/129548.jpg" and a ""MyTheme/sets/10E/thumbnails/129548.jpg". Important note: You can also use zip files for this, just like in the regular sets directory.
What else does a theme need?
There are two other, very important files used by themes. These are "preview.png" and "themeinfo.txt".
- Preview.png is a 227*128 pixel image showing a preview of your new theme; without this, the theme will not be recognized by the game.
Themeinfo.txt is used as a way to show theme artist names from inside Wagic. The first line of this file should contain your name, and is shown above the preview image, just like the default themes display "Artist: Wagic Team". Unfortunately, this first line is limited to sixteen characters (we wanted it to fit on the screen), so if you've got a really long name Wagic will just ignore the rest of it. While that first line is really all you need, we've also been using these files as a basic readme. Check out "graphics/themeinfo.txt", for example, to find out who contributed the different pieces of art we use.
Special graphics files
There are also files that can be themed which are not present in the default graphics directory. These files are specifically to give additional options to theme designers, and are not necessary for a working theme.
- trophy_unlocked_SETID.png, where SETID is replaced with a setname like "10E". This image is used to display an award's "unlocked trophy" (by default, a booster pack) in the trophy room. The game first looks for files with this name before using trophy_set.png as a default. Feel free to experiment with sizes for this file, as it should support anything you throw at it. The same trick can be done for any other unlockable item, just look in your options.txt for the appropriate names.
style.txt, which is a special theme styling file. This file allows you to bundle numerous substyles into a single theme, and even have the theme dynamically select a style based on the contents of the player or opponent's deck.
Writing a style.txt file
The best way to learn how to write a style.txt file is to check out the one inside the Gemstones theme, now bundled with Wagic. Please keep in mind that, although the file is named ".txt", it follows the standard conventions of an XML file. Here are a few things to note about style.txt:
- The <activebg> block is what tells a theme how to dynamically pick a substyle depending on the composition of the decks in play. It's only necessary if you want to support dynamic styles- without it, the player can still select styles in the options menu.
It works by applying a filter for each style its looking at, and then picking whichever style has the most cards after its filter has been applied. <activebg> has an attribute named source,which can be:
- -1 (meaning it looks at both players combined)
1 (meaning it only looks at player 1's cards)
2 (meaning it only looks at player 2's cards
- Inside the <activebg> block are a number of <case> blocks. They're written like this:
<case rule="FILTER">STYLE NAME</case>
FILTER is a special string of text that checks cards to see if they match a certain condition. It shows up in a couple of places, including inside booster pack files. There's a tutorial on writing filters here.
- The style block is the most important block, used to define a particular style. It has a single attribute, name, whose purpose should be obvious.
Inside the style block, you define files which you want to override the default version of a themed file. For example, to override the standard backdrop.jpg file,
you would write <backdrop.jpg>NEWFILE.jpg</backdrop.jpg>
That's about it for style.txt. If you've got any other questions, please post them at the end of this thread.
What's with the gold.png, wood.png, and goldglow.png?
- We wanted the default theme to have a "sparkly" gold border. We achieved this effect by a little bit of graphic trickery. The gold.png is rendered twice on top of the wood.png, at different offsets, and the goldglow goes on top of all that. These files move at different rates, and with a little fancy blending, give a computationally cheap "sparkle" effect.
- Internally, our current engine only supports textures with dimensions that are powers of 2. The PSP's screen is (usually) 480x272. With a 480x255 texture, we internally use 512x256 pixels worth of memory. If we went up to 480x272, we'd actually be using twice the memory! More memory used by the backdrop means less memory available for card textures, which means slower and more battery-intensive Wagic. Trust us, this way is better. It won't be this way forever, though—We know about a technique that should help things, but it didn't make it into this release.
- If a theme is missing a file, it instead looks in the "Res/graphics" directory. The safest way to "remove" an image is to just use a transparent image of the same size. This might leave gray lines somewhere, but it'll always work. The best way to remove an image is to save a 1x1 transparent image with that name, instead of using the old file's size... but I haven't checked every file to make certain doing this is bug-free. If you get strange graphical glitches (or a new crash), you should use the "safer" solution listed above.
- Nope, sorry. Themes don't even look at _cards.dat, or anything like that. That's something themes aren't designed to do: You'll never, ever be able to change what a card actually does using a theme. However, we just might have plans for other exciting features that would allow this kind of thing... not yet, though. Just use the standard "Res/sets" directory and _cards.dat for now.
- Yes, absolutely! Check out the "Inverted" theme for an example of doing just that. To do this, you'll need the particle editor from the tools at
http://hge.relishgames.com/downloads.html. Check here for the documentation
- Yep, absolutely! Any bitmap font editor can probably be made to work, but the one at http://www.lmnopc.com/bitmapfontbuilder/ is what we use. This is where, unfortunately, you'll need to do a little graphics editing. Font textures should be PNG format with transparent background. Then, the image is divided into 256 cells... 16 rows and 16 columns; each cell represents a single character. For simon, these cells should be 11 pixels high, meaning your texture should be 176 pixels high. The other two fonts want characters 16 pixels high, meaning your texture should be 256 pixels high. Just look at the original font textures as reference.
- The most likely reason is that you've got a file that isn't the right size. Check the original images in "Res/graphics" to be certain everything is the correct width and height. If you've still got a gray line, this is probably (unfortunately) an issue with the engine... we've done our best to minimize it in this release, but it's still possible. There is a solution planned, however, so in future versions this won't be an issue.
- The profile you're using probably already has an avatar.jpg in its directory. For the "Default" profile (which comes with an avatar), that means the avatar in the "Res/player" directory. Other profiles don't have one by default, but you'll want to check the proper directory just in case.
- Well, the basic reasoning was this: a lot of people who play Wagic will never visit the forums, or read the manual, or any of that... but they might still want to have different avatars for their profiles. By leaving an image there, we're giving a subtle clue on how to do that
- Jhotun provided us with a double resolution copy of the shop background, from which we simply cut the cards out by hand (thanks, Photoshop!) and then shrunk it to the right size; for some reason, cutting things out by hand actually seemed to work out better than using a rendered mask for the cards. Generally speaking, it's best to work at double or higher resolution. There's a lot of leeway in working this way, because the tiny errors tend to even themselves out once the file is shrunk.
- Yes, actually, it is awesome.
We love that you're using Wagic's new theme feature to make your game look great... but please don't post "remixed" themes on the forum.
A lot of different people worked hard on those themes, so posting their work again as yours is just... not a good idea. If you really think you've got an awesome "remix", present it to the original artists. If you're only remixing one theme, then you've only got one artist to worry about it-- if they like your remix, you can ask them if they'd post a link to it in their theme's main thread. If they say no, then drop it. It's up to the original artist what happens with their work.
If you've borrowed images from many different themes, it gets even more complicated. You'll have to ask for permission from every single one of theme, and prove that you've got that permission. This means, basically, that they have to post a note at the bottom of their theme's topic saying "Permission to use these images is granted to X, maker of the remix Y". If an artist says no, you'll have to remove their art from your theme and find something else. Sorry, but that's just the way it works.
The best thing to do, of course, is just to make your own theme from scratch. Then we can all be impressed, and you won't have to ask for anyone's permission .
- To save internal memory, taskboard.png is actually sliced up into 9 different tiles once loaded. There are four corner tiles of 64x64 pixels, four edge tiles of 128x64 or 64x128 (depending on which edge), and one center tile of 128x128. While the way these are tiled tends to be pretty forgiving, keep in mind that the four edge-tiles and the center-tile all need to seamlessly match eachother. For example, the top edge's left and right borders have to match itself, and its bottom border has to match the top border of the center tile.
Thanks for reading! I'm really excited to see what you all come up with, so please post your themes! For now, just start a new topic... once we have enough themes I'll set up an index here.
And if you have any other theme related questions, please ask below. We'll answer them as quickly as we can
In alphabetical order by creator:
- Abrasax's Fullmetal Alchemist theme
- Abrasax's Guild Wars theme, based on the game of the same name.
- Abrasax's Ice Age theme.
- Abrasax's MTGO theme.
- Abrasax's Star Wars theme.
- Azure Knight's Magic the Gathering theme.
- Jeck's Gemstone series, currently including Lapis, Jade, Jasper, Jet, and Moonstone.
- Ilya B's Fina Saga theme.
- Lakeesha's Christmas Theme
- RedHate's Magic the Gathering theme
- Saulsimeon's X-Men Theme theme.
- Saulsimeon's Final Fantasy Theme theme.
Star Wars Mod Themes
- DarthGadar's Dejarik Table theme.