a guide to editing units for Total Annihilation Kingdoms
This tutorial will take you through the process of creating a new Kingdoms unit by modifying one of the units which came with the game. It does not describe how to make a unit from scratch, nor does it describe how to change a unit's graphical model. Don't bother asking me how to do those things. I don't know how. What little I do know about these topics is provided at the end of this document.
The unit we will create is the Aramon Big Bertha, a long-range cannon similar to the unit from TA. Instead of using the Aramon Stronghold model, we'll use the model for the Veruna Bastion. This will help make the Bertha easier to tell apart from the other Aramon towers. Ideally, we would create an entirely new graphical model, but, like I said, I don't know how to do that. :-)
Before we begin, you'll need to download and install HPIView and HPIPack, two wonderful tools created by Joe D. You can get them from his page. Also, you can download the finished Big Bertha if you need something to compare against.
Although we are not basing our unit on the Aramon Flying Builder, it is convenient to follow the directory structure provided by its ufo file. This should help us make sure we remember everything we need to do.
The fbi file is the main unit definition file. It contains most of the things that we are going to change as well as many other unit properties. Be sure to leave a semicolon (;) at the end of every line.
The buildpic is the picture which will appear in the build menu of any unit that can make a Big Bertha. You can edit it in any JPEG editor if you want, but we'll just use the Bastion's buildpic.
We will make both the Acolyte and the Flying Builder capable of building the Big Bertha.
If you want your unit to add new sounds to your unit, you can put them in the sounds directory and reference them in the soundclass file. The sounds for the built-in units are in english.hpi. Poking through them and data.hpi's soundclasses folder should be enough to figure out what to do.
Creating your own buildpic is fairly simple; you just need to make a 64x48 JPEG file. It is customary to give your buildpic a gold border if it is a builder unit or a grey border if it is a not a builder. You can copy these borders from existing buildpics in data.hpi.
In order to create or modify a unit script, you'll need a "cobbler". No Kingdoms cobbler currently exists.
Supposedly, you can edit the 3do files (change textures, reshape polygons, etc.) with 3dobuilder+, but it always crashes on my system. You ought to be able to build completely new models as well, but not until we have a working cobbler.
For more information on the tags in the fbi files, take a look at Hansolo's description. Some of it is guesswork, but his document is the most complete one that I've seen.
Last, but certainly not least, the unitnumber in the fbi file must be unique. In order to avoid conflicting with any of Cavedog's units, don't set it to any number under 1000. In order to avoid conflicting with other 3rd party units, you'll have to rely on one of the unit sites' id registrations. There is one at Lokken's Keep and another at Unit Universe. There even used to be a third at Annihilated, but they seem to have (sensibly) deferred to Lokken's registry, which appears to be the only one which is actively maintained.