How to make custom theme

A simple, addictive strategy game where the object is to avoid hazards without knowing exactly where they are, but instead by deducing where they must be.
Post Reply
User avatar
Tranceopotamus
Posts: 1
Joined: Sat Sep 19, 2009 9:08 am

How to make custom theme

Post by Tranceopotamus » Sat Sep 19, 2009 9:32 am

When I "control-click HexAddict and select Show Package Contents, then go inside to Contents/Resources/Themes/" I see the folders for the different themes, but I don't see how to make a new theme. It also says that I should come here for help making a theme but I couldnt find anything about it.
User avatar
beastie
Posts: 443
Joined: Sun Apr 25, 2004 6:51 am
Contact:

HexAddict custom Theme How-To Guide

Post by beastie » Sun Sep 20, 2009 10:31 am

Find the Themes folder. As the manual says, control-click HexAddict and select Show Package Contents, then go inside to Contents/Resources/Themes. In there, make a new folder named what you want your Theme to be called. That's the only required step. HexAddict will use generic graphics, sounds, and text for your Theme. Now launch HexAddict and try it out!


Graphics. Naturally, you'll want at least some of your own graphics. See the "Pure" theme for an extremely simple example of a Theme that just consists of a few images and nothing else. Look in the Minesweeper theme folder to see all of the particular image names that you can have in your theme to provide a background, hazards, safe spots, etc. All images are optional. All images you put in your Theme folder should be in PNG format except the background, which should be a JPG. Transparency is important for all of your PNGs. Size is not important, but look at the Minesweeper images to get an idea of their ideal sizes. What software you use to create them, how to use it to create PNGs, etc. is beyond the scope of this post.

Have a look into the Archaeologist theme to see how you can provide multiple images for a particular graphic in order to let HexAddict pick from them randomly. Just add a "-2", "-3" etc. to their filenames (in front of the ".png", naturally).
  • Image file names: background.jpg, hex-hit-hazard.png, hex-marked-hazard.png, hex-unmarked-hazard.png, hex-mistake-hazard.png, hex-path-end.png, hex-safe-1.png, hex-safe-2.png, hex-safe-3.png, hex-safe-4.png, hex-safe-5.png
Sounds. Just like images, generic sounds are used if you don't include them. All included sounds must be .aiff files.
  • Sound file names: move.aiff, mark-safe.aiff, mark-hazard.aiff, hit-hazard.aiff, win.aiff
Text. Make an "info-XX.xml" file inside to contain all of the text unique to your theme, with the "XX" replaced by the abbreviation for your language. All of the included themes have at least one for English, info-en.xml.

Copy this file from another theme such as Minesweeper and then start editing in a text editor. Seeing the existing strings from the other theme should make it clear what the keys are and how they are used. As you can see in Minesweeper's info-en.xml file, you can use an <array> of <string>s instead of just one <string> if you want HexAddict to pick randomly.

All of the below keys are optional, and generic text is used for anything you've not bothered to include. If the folder name of your theme is for a particular language, remember to include a "title" key in the info-XX.xml files for any other languages that will provide an appropriate Theme title.
  • Text keys: title, clearGameDesc, hazardPlural, loseClear, losePath, winClear, winPath, winScoreDescription
That's it!
Post Reply