So far we've modeled, textured, and animated a model, exported it to g3d format, made a basic icon, and written a rudimentary unit xml file. The only thing left to do is to actually put our unit into the game.
One of the things we need to learn in order to do this is the structure of Glest's folders and files. This depends on what operating system you're using and what engine you're modding for.
Glest Advanced EngineWe'll cover GAE first. All we need to do is find the addons folder, create a few folders, and zip up our files. If you're running Linux, it's located in ~/.glestadv/addons/. On Windows XP, it's in C:\Documents and Settings\USERNAME\glestae\addons, and on Windows 7 it's in C:\Users\USERNAME\glestae\addons. Once you've found it, make a new folder there called "techs". Inside techs, make one called "magitech", inside magitech make one called "factions", inside factions make one called "tech", inside tech make one called "units", inside units make one called "bard" (or whatever you named your unit), and finally inside bard make one called "models" and one called "images". Normally there is also a folder for sounds, but we'll cover that in an appendix because not everyone has access to a microphone. In the "bard" folder, put a copy of the bard.xml file. In images, put the bard.bmp icon. In models, put all the *.g3d files we've made for this unit, as well as the *.tga texture. It's best to keep copies of all these files in a safe place as a backup. If you use Ubuntu One or a similar file synchronization service, consider adding your addons folder to your sync list. We've got our unit put into a tech tree and ready to be used in Glest, but currently there is nothing telling him to actually exist in the game. So, in the "tech" folder (not techs, tech) we're going to make a copy of tech.xml from the magitech folder (/usr/share/glestae/techs/magitech/factions/tech/tech.xml on Linux or "Program Files\glestae\techs\magitech\factions\tech\tech.xml" on Windows). Open up the copy. You'll see several lines denoting starting units, so add a copy of one of those lines, and change the unit name to "bard" and the quantity to 1. Now, when we play as Tech using this addon, we'll start with a bard.
Go ahead and zip the folder structure we've just made (i.e. the entire "techs" folder) and call the resulting archive "bard.zip". At the time of this writing, *.zip is the only format supported in the addons folder. Since we specified that this was going in the Tech faction of the Magitech tree, GAE will automatically merge it when we play that faction, but will keep the file in the addons folder. Once you've zipped the folder structure, you're done, and you can delete the original if you've backed it up.
So, to recap, on Linux you should have ~/.glestadv/addons/bard.zip, which contains /techs/magitech/factions/tech/units/bard/. On Windows, you should have either C:\Documents and Settings\USERNAME\glestae\addons\bard.zip, or C:\Users\USERNAME\glestae\addons\bard.zip. Within bard.zip, you should have /techs/magitech/techs/factions/tech/units/bard. In bard, you should have bard.xml, a models folder containing all the relevant *.g3d files, and an images folder with our bard.bmp icon. In "tech", we have our modified tech.xml file.
MegaglestIn Megaglest, we can't just append a unit to a tech tree without actually altering the tech tree itself, and this causes problems with multiplayer, so we're going to make a copy and alter that. MG has a "user data" folder, which is similar in some ways to GAE's addons. What we need to do is go into our MG core data and make a copy of the megapack, which we will put in the user data folder and alter, thus keeping the original intact. On Linux, the core data is located in ~/megaglest/ and on Windows it is in "Program Files\Mega-Glest\". Once you've located it, go into the techs folder and make a copy of the megapack. By default, your user data file is ~/megaglest/mydata or Mega-Glest\mydata. Now, make a new techs folder in mydata and put the megapack copy into it. Rename this new megapack copy into something like megapack2. Then go into the megapack2 folder and rename megapack.xml to megapack2.xml. Now, in /mydata/techs/megapack2/factions/tech/units, make a folder called "bard". In bard, make a folder called models and a folder called images. Put bard.xml into bard, put the icon bard.bmp into images, and put all our *.g3d files into models. In /mydata/techs/megapack2/factions/tech, alter tech.xml according to the instructions above for GAE. Megaglest doesn't use zip files the same way as GAE, so we're leaving it uncompressed, and we're good to go.
Glest ClassicMake it easy on yourself and upgrade to GAE or Megaglest. Visit
http://sourceforge.net/projects/glestae/ and
http://sourceforge.net/projects/megaglest/, weigh your options, and download the one of your choice. Also, since I get the feeling you're new to Glest, drop by the forums at
http://glest.org/glest_board/index.php and take a look around.
So that's it. You've incorporated your unit into a tech tree in Glest. Play a game and see how it looks. Once you've made sure it works, then you're done with the basics.