In your image editor, save block_one.bmp as a 32-bit image.
Because it is a game block, it has to be 42 pixels wide by 42 pixels
tall.
Run the game using the new shortcut you created. In order to
fast forward the game and see your changes, bring down the console by
pressing the tilde key (~). Now, type nextlevel. Each time you
do this, the game will advance by one level. Hit up arrow and
enter to repeat the command.
In the above image, block_one.bmp
has been replaced by a yellow and red smiley block. Whether you
agree this is cool or not, you should now be ready to create your own
mods for Verticube.
Read on to understand the specifics!
Definition Files
Definition files are the centerpiece of Verticube modding. If
you understand how they work, you can create anything within the puzzle
game engine.
Definition files contain key/value pair combos. For example,
if you had a key called "cat", and its name was "Snowflake", you could
add that info to the definition file like this:
<key
name="cat">Snowflake</Key>
Astute readers will notice that these files are XML. You must
keep consistent formatting with what an XML reader expects, or the game
will not run.
Inheritance
When creating a definition file, sometimes you see "inherit":
<Inherit name="Base"/>
This tells Verticube to include all of
the definitions in "Base" in the current definition. If a key
exists multiple times, the last one is the actual key value.
Creating a Theme
Creating a new theme is done by creating a definition file, and
setting certain keys to certain values. The best way to get
started is to copy an existing file to a new one, and to change the
information in the file on an as-needed basis.
To start, copy "resources/cache/def/candy.def.xml"
to "spud/cache/def/candy.xml",
and open the new file in your text editor.
Types of Keys
There are a number of different key types in a theme
definition. Here is a description of the ones that may interest
you:
- Ones that end in ".Img".
These point to files on the disk. You don't specify your mod, but
instead the paths underneath. In addition, you use $img instead of .jpg or .bmp. So, spud/image.bmp becomes /image.$img. The image
section below explains why some images have the .xml extension.
- NextTheme.
This is the theme that comes after this one. If you create a new
theme, use this to chain it. This
is very important!
- Ones
that end in ".Snd".
These are wav files that are played at different intervals.
- Ones that end in ".X" or ".Y". These contain screen
coordinates for different images. You'll find a lot of these in base.def.xml, though they can
be overridden.
- Music. This
should be a path to an ogg vorbis file. You can download a free
wav to ogg encoder, and use any tune you want with your Verticube mod.
- TrailInterval and NumTrails. These are
graphical effects for the blocks. Each theme can specify how
much, if any at all, they want to use.
Creating Images
All images in Verticube are either jpeg or bmp. You can make
part of your image transparent by making pixels in the image cyan (red:
0 green:255 blue:255). In order to see this, open "/resources/cache/sludgefactor/block_one.bmp".
You will notice that some of the edge pixels are bright blue.
They show up as transparent in-game.
XML Shaders
There is basic support for "shaders" in Verticube. Shaders are
special rendering rules for images. If a definition file has an
image listed with a ".xml"
extension, that is a shader. Shaders make possible the following:
- Animation: The ability to have multiple frames that cycle through
- Transparency: Use OpenGL's blending capability for transparency
I will make the details of the shader language available if modding
becomes popular enough for me to document it. For now, you can
follow the available examples.
Distributing Your Mod
Although there are many ways to create installers, the best way to
do it is to create a batch file that runs your mod. Next to verticube.exe, create a file
called run-spud.bat.
Inside, add:
@ECHO
OFF
@verticube.exe +set fs_game spud
Zip up your spud directory, along with run-spud.bat. Now, a
user should be able to unzip your directory into their installed
Verticube directory and click on run-spud.bat.
What you can't do
Please do not make mods for the shareware version of
Verticube! I would appreciate it if all mod authors created their
mods in a way that made them only work with the full version.
In addition, you can't commercially exploit, sell your mod, or
describe its contents as being an official Frogtoss Games creation.
Thanks for doing it by the rules.
Finally
If you create something worthwhile, post it to
the forums! We'll all take a look at it.