Gafbuilder can be used for a multitude of things when creating goodies for TA. Its main purpose, of course, is to be able to edit and create GAF files. GAF files are used in many things in TA, from interface artwork to weapon explosions, to unit build pictures, to surface features.
Most of the gaffing programs that have been released tend to lean towards the Unit Making side of TA. Not bad at all...but what about us folks who want to do map and tileset work?? Making things like tall spires, trees, metal patches, steam vents, etc... was all made possible by the original Gafbuilder, written by Kinboat a while ago. I have written a few updates that make this nice program even simpler to use, and add a lot of features and usability.
Surface features are all those cool things that <to me> make TA visually appealing to play. Trees, rocks, spires, steam vents, metal patches, etc... What good would the greenworld maps be if you could not create forests ?? Below are the major types of Surface Features in TA
Metal Patches: Are just a single image with a setting telling TA its a metal patch and how much metal it provides .Although these could be animated <like liquid metal> , it doesn't normally look good and after 1 minute the repeating animation gets very old, so its best to stick with making non animated metal patches.... Simple stuff here...
Steam Vents: again, just a simple image with settings telling it that its a steam vent. The animation of the steam rising is done by the TA engine.
Spires: Gets a little more complicated here....you must create 2 images at the very least. A main image of the spire, and a separate image of the shadow that the spire casts on the ground. You can also make 'death' sequences so the spire crumbles into dust and other stuff, but normally these just are lurking around the map, blocking movement and fire, and generally looking cool. When a unit walks behind a 'spire; normally you can see it going 'behind' the spire...really adds to the 3d look of the game.
Trees: Again, a bit more complicated than making a simple metal patch or spire...a typical tree can do many types of things:
Be destroyed
Be burned/catch on fire
Cause damage when 'burning'
Be reclaimed
Now, as you can imagine, separate images are needed for the destroy, burn, and reclaim sequences. And if you are planning on making that cool fire you always wanted, then plan on making 30 or so frames of 'fire' animation, same for the reclame animation as well, if the feature is to be reclaimable.
Of course, you re not strictly prohibited from using those exact categories. For example, the exploding barrels and transparent laser bridges that Blackthorn and I did for my Oxigen tileset. If you use your mind creatively, you can come up with some pretty nifty things and ideas.
How a GAF works <the simple version>
A gaf does not a surface feature make...it also needs a "TDF" file...or a simple text file that contains a definition of the feature. So, these two files combined both make the feature work correctly in TA...the GAF<contains the actual graphic images>, and the TDF <defines what the graphic images are supposed to do>
Actually, the TDF file is what makes the feature actually become available, and the GAF file is what the TDF uses to reference. So , if you make a TDF file , but no gaf to go with it, all your features will show up as blank in TAE or Annihilator. If you make a GAF file, but no TDF, nothing will show up in the editor.
Perhaps one of the hardest things to grasp about making surface features is this thing called a 'Footprint'. When you make the TDF file, one of the things you define is the footprint. This tells the TA engine how 'wide' and how 'long' your feature is. Its like a shoe size ;) This was the most frustrating thing to figure out because one had no way of knowing where the footprint was or how big to make it <not without a lot of trial and error and frustration>. This is where I've made all the refinements to Gafbuilder...i'll explain as i go on...
The footprint is the area of the gaf that will be recognized by the TA engine as something special, either as a metal patch, a steam vent, or a blocking object (like a towering column of rock).
The footprint is measured in "units' of 16x16 pixels, and can be only square or rectangular in shape.
So, what does this mean, you ask?? The footprint area is the are that TA will treat according to how you define it. If you want to make it a steam vent, go ahead!! If you want to make it a metal patch, go for it!. If you want to treat it like a 'Spire' or a column of rock (like those cool Lava spires, or my Evergreen Easter Island monoliths.) you can do that too.....lots of possibilities.
Walkthrough: From start to finish -using gafbuilder to make a palm tree.
Ok, here is a brief walkthrough using the two test images included with this program...in a series of steps:
( look in the tutorial subfolder in the directory in which Gafbuilder Pro is installed)
Choose the World
This update to Gafbuilder includes support for TAK, however I am going to be walking you through creating a surface feature for TA.
When Gafbuilder Pro starts, it will ask you to chooose a world to work with. Please choose "TA". If you choose another world, the colors will be severely wrong when you import the graphics. The color palettes used for each world are quite different.
Creating a Project
Start Gafbuilder Pro and create a new project by selecting "options-->Configure-->Configure Project Folder'
The following window will come up.
Type in or browse for a folder to use as a project folder. This can be any folder you want it to be.
Next, you must specify a "World Name" . The world name is the name of the 'world' (ie, Lavaworld, Greenworld, Evergreen, Oxigen, Crystalworld, etc..) to which your feature belongs to. This is the world name that your feature will appear under in Annihilator or TAE.
Make sure you leave the box checked, so that when you save your work and are ready to pack it all up for use in the game, that everything is in the correct place.
That's all you have to do, the program automatically creates the right directory structure for you (for doing surface features, anyways) and will default to saving all your work to the configured project folder (this is only until you close Gafbuilder, then it will lose the project folder info, but simply type in the correct information again if you want to resume work on a project)
Ok, our project is created.......now its time to do something!
Importing Sequences
Right click in the left blank window ..choose "Import Sequence' from the list.
The import sequence dialog box will show up.
Browse to the directory where you have this program installed and import the file called 'tree1.bmp'
Once its imported, all you have to do is click and drag a 1x1 rectangle around the area you want to be defined as the footprint. Pay attention here: This step ONLY defines the size, not the exact position of the footprint ...so if you cannot get it to snap perfectly to where you want it, don't worry about it. Just make sure the size is correct, and in the next step you will align it.
If the "Auto" checkbox is checked <it should be left on>, then it automatically snaps the footprint rectangle into the proper position for you as soon as you release the mouse button. Uncheck this box, if you do not desire this. <leave checked for this tutorial>
**You can also use the spinner controls <up/down arrows> by the footprint sizes to increase and decrease the footprint size.
Now, all you have to do is adjust the image using the X and Y spinner controls so that the image lines up correctly with your footprint. For an example, take a look at the before and after pictures below......
Before Alignment |
After Alignment |
| The red square area represents the portion of the feature that will be 'untouchable' by units and other features. This is the area that units will not be able to travel on. Think of it as the base of your tree trunk. | |
The exact x and y values are:
x: 54
y: 93
Just be sure and use your own judgment when doing this, a difference of 1 or 2 is no big deal.
Doing Shadows
Now its time to import the shadow that goes along with the palm tree.
To do this, click on Images-->import sequence, browse to the tutorial folder and get the file called "tree1-shad.bmp'
Select tree1 from the list on the left. You should see the tree come into view again. Right click in the window where the tree is displayed and you will get a pop-up menu. If you choose Overlay Image you should see an option that says "copy tree1 as overlay" . Choose this option.
Now select tree1-shad from the list on the left. You should see the shadow displayed on the right window
Right click in the window where the shadow is displayed and choose Overlay Image-->Show Overlay Image
The tree is now displayed on top of the shadow.
Use the x and y buttons to line up the shadow until it looks good. Use the before and afterimages below as a guide.
The exact x and y vaues are:
X: -3
Y: 68
Before |
After |
| To remove the alignment image from the view, right click in the RIGHT window, and choose Overlay Image-->Remove Overlay Image | |
Save it
Now we need to save our work. Click on " File --Save Gaf ". It should automatically bring you into the "anims" folder of your project. Just type the name you wish to save it under (in this case, type "test feature 1").
Ok, now the easy part.....the TDF creating:
Using The New TDF Editor
Another new feature that I implemented into Gafbuilder is a simple to use TDF creation system. Normally this would have to be done in notepad or something, but this is a nice alternative to doing it the "old fashioned way" .
To get started on making our TDF for this feature, make sure you have tree1 selected.
Right click in the RIGHT window and choose Create TDF for tree1 from the menu.
The TDF editor will open up.
The first thing you want to do is give the feature a name. So click on the "Feature Name' field and type in "Test tree 1"
The next thing is specifying a world name. Its a good idea to stick with the name you typed in for your project world name. So type in whatever you did there.
Now you must give it a description if you want it to have one. Type in whatever you'd like. If you want it to be displayed when the mouse is over it in the game, then make sure you check on the 'Show Description' check box!
Ok, now type in the name of the category you wish this feature to appear under when you select it to place in the game (i.e. trees).
Check the following boxes:
Blocking
Indestructible
Shadow Transparency
The sequence name should already be filled in for you, but if it isn't, make sure it says "tree1" in the feild.
Make the footprint size 1x1
Set the height to be 125
Next fill in the sequence shadow field with the name of the sequence to be used as the shadow . Type in "tree1-shad"
Now just make sure that the name of the gaf file is correct (it should be because it knows what you saved your last gaf file as, and copies that name into this spot) .If for some reason, the name isn't there type in "test1" into the field.
Everything else you can leave blank, since its not needed for our test feature. After all this is done, press the button that says "Add to Destination TDF". Then press the button that says "Save TDF"
When prompted for the name of the TDF file, type "test1" into the field that says TDF Name and press Save TDF again.
you should get a message saying it was saved successfully (and in the correct folder too).
Ok, we're done defining our feature!
Pack it up
Now its time to pack up this puppy and place it on a map using either Annihilator or TAE.
If you've set up the project folders and stuff from the beginning, all the work you save has been defaulted to saving to the correct directory.
All you have to do is go to "File--Export Project HPI" If its not available, then you didn't choose to build a project in the beginning.
type in the path to your Totala folder and the name of the HPI file in the 'Destination' field of the Pack Project window. For example: C:\cavedog\totala\test1.hpi
Press the "Pack' button......
You are done!!
Now, fire up your favorite TA map editor and if you saved your HPI fileyou should see a tab labeled after your world (the name you typed in for your world folder in the Create Project form)
As always, if you need any help, feel free to give me a buzz on ICQ, UIN# :10909371
C_A_P