Theme Guide, FAQ, & Index

Graphics and Themes you created go here.
Please read the Image Theme Guide, FAQ, & Index before posting in this forum.
Jeck
Posts: 71
Joined: Mon Aug 17, 2009 11:53 pm
Location: Snow-covered forest

Theme Guide, FAQ, & Index

Post by Jeck »

What is a theme?
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?

"MyTheme/"
  • 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!
"MyTheme/sound"
  • This folder contains music files. Currently, that means "Track1.mp3" (for in the deck editor) and "Track0.mp3" (for everywhere else).
"MyTheme/sound/sfx"
  • This contains the sound effects played while dueling. Just look at the readme in "Res/sound/sfx" for details.
"MyTheme/sets/"
  • 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:

<activebg>
  • 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
<case>
  • 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.
<style>
  • 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.

FAQ
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.
Okay, but why not have the backdrop.jpg fill the whole screen?
  • 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.
I don't want to use some particular textures (the gold and goldglow) but they keeps showing up. How do I get rid of them?
  • 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.
So I can change a card image... can I change what it does, to?
  • 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.
Can I change the particle effects used by the main menu and the mana symbols? Alright, but what about the fonts?
  • 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.
I've got an ugly gray line on my theme! What do I do?
  • 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.
I put an avatar.jpg into my theme, but I still see the old player avatar. What's going on?
  • 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.
Why did you put an avatar image there, if it makes them harder to theme?
  • 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 :P
How do I make a shop_alias.png?
  • 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.
I've taken a bunch of images from different themes and remixed them! Isn't this awesome?
  • 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 :).
What the heck is going on with Taskboard.png?
  • 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 :)

Theme Index
In alphabetical order by creator:

Star Wars Mod Themes
Last edited by Jeck on Tue Feb 09, 2010 12:04 am, edited 24 times in total.
jobr
Posts: 12
Joined: Wed Oct 07, 2009 5:27 pm

Re: Theme Guide & FAQ

Post by jobr »

Great!
Now I know how to replace the not-so-pleasant-to-look-at "Simon" font.
I got a few questions though, which texture size should I use, which backround should I use, and finally, which format should I save it to? Since PNG doesn't exist as an option.
Jeck
Posts: 71
Joined: Mon Aug 17, 2009 11:53 pm
Location: Snow-covered forest

Re: Theme Guide & FAQ

Post by Jeck »

FAQ updated with the answer to your question :) See the "Alright, but what about the fonts?" section. :)
jobr
Posts: 12
Joined: Wed Oct 07, 2009 5:27 pm

Re: Theme Guide & FAQ

Post by jobr »

great, thanks ;)
Finally I can look at something else than the simon font :D

Edit,
This was MUCH harder than I thought, everytime I get the exact same height and widht as the simon font, the characters aren't on the same spot as the simon font. Could you gie me the the setting you're using? Like the character set, the texture size, well everything. I just can't get it to work... :oops:
wololo
Site Admin
Posts: 3728
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Theme Guide & FAQ

Post by wololo »

Hey, I'm sad to say I don't remember the settings we used for the Simon font :(
But there's not that many choices... it has a 11px height, and think that's pretty much it...
AzureKnight
Posts: 37
Joined: Fri Aug 28, 2009 5:49 am

Re: Theme Guide & FAQ

Post by AzureKnight »

Thanks for the tutorial! Just posted my Magic Theme! :D
Image 3rd Place Winner: SilverBlade by AzureKnight Image TOP 25: Skies of Emeria by AzureKnight
Raziel017
Posts: 132
Joined: Sat Aug 29, 2009 7:05 am

Re: Theme Guide & FAQ

Post by Raziel017 »

is there a way that i can create my own theme?maybe a software that can make it easier for me to create themes for my wagic?im an anime fan also a magic the gathering fan.im thinking of creating my own original theme.is there a way i can do it? :D
wololo
Site Admin
Posts: 3728
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Theme Guide & FAQ

Post by wololo »

Did you actually read this FAQ? It explains what you have to change and how you can do it, as well as a list of programs that can help you to do it :o
Look at abrasax's themes to get inspiration.
Free software you can use:
Paint dot net
audacity
hge particle editor
bitmapfontbuilder

google for those, read the faq again, try by yourself, and come back with more precise questions.
bugabinga
Posts: 5
Joined: Mon Nov 09, 2009 1:04 pm
Location: Germany

Re: Theme Guide & FAQ

Post by bugabinga »

Great FAQ ! ( Wish I had read it before I started playing around with Themes, but hey ... :lol: )

I noticed the default Theme renders a background.png onto screen, whereas when I copy and rename the Res/graphics folder and set this Theme with no further modifications, the background.png/ is (presumably) ignored!
Can anybody confirm this?

And what's the reason?
--------------------
Oli
wololo
Site Admin
Posts: 3728
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Theme Guide & FAQ

Post by wololo »

I think this file is now called "backdrop.jpg", I don't think there is an image "background.png", it is probably an old file in your graphics folder
Locked