FANDOM


Making an addon

An example of optimal settings for a Glest addon. The non-solid trait is the only one that cannot be changed.

The addons format is a method of formatting the folders in a distributed mod to ensure it is easiest to install (GAE users can simply copy the archive to their addons folder, while Glest and MegaGlest users need to only extract the archive into the installation directory and their personal MegaGlest folder, respectively). It is done by having all folders relative to the share/glestae folder (in GAE) or the installation directory (in Glest/MegaGlest). The name of the archive can be any unique name (preferably including version numbers and the name of the mod) while the folder structure must always be constant. Think of it as having the archive merged with the installation directory (or share/glestae directory in GAE).

ExamplesEdit

Packaging a techtree named "my_techtree" would have the folder structure:

archive_name.7z/techs/my_techtree/[..]

Or if you had a mod pack that was distributing various maps, a techtree, and a tileset:

archive_name.7z/techs/my_techtree/[..]
               /tilesets/my_tileset/[..]
               /maps/[..]

In short, you can pretend the archive was the installation directory or share/glestae directory.

ScenariosEdit

GAE and Glest/MegaGlest store scenarios in different folders. This is great for preventing engine specific code from getting mixed up, but if your mod uses scenarios that are compatible with both engines, then you will have to have two instances of the scenario. In GAE, scenarios are stored in gae/scenarios whereas in MegaGlest, they are stored in scenarios and tutorials. As well, GAE has a further folder after scenarios which is the category to place the scenario in (default categories are "glest_classic" and "glest_tutorials"). Because the non-supporting engines will ignore the extra folder, you can use both locations. For example:

Having "my_scenario" work in all engines:

archive_name.7z/gae/scenarios/[category]/my_scenario/[..]
               /scenarios/my_scenario/[..]

Having it work in just GAE:

archive_name.7z/gae/scenarios/[category]/my_scenario/[..]

Or in just Glest/MegaGlest:

archive_name.7z/scenarios/my_scenario/[..]

Archive FormatsEdit

To ensure support with the intended GAE target, all addons must be compressed as either zip or 7z. 7z is strongly recommended due to its advantages over zip in size and performance. Both can be compressed and decompressed by the 7zip program. Note that it must be a non-solid 7z archive (by default, it is solid, which is not compatible). This can be changed from the add to archive screen in 7-zip.

On Linux, 7z archives can be created as non-solid by appending -ms=off to the end of the command. For example: 7z a elves.7z ./techs -ms=off. You may need to install the p7zip-full package to get this functionality.

InstallingEdit

One of the biggest features of the addons format, in addition to being a single folder convention between all the engines, is the ease of installation. This varies slightly with the engine used.

GAEEdit

In GAE, the archive (as a 7z or zip file) needs to merely be copied to the addons folder.

Operating system Location of the addons folder
Windows 2000/XP C:\Documents and Settings\[User name]\glestadv\addons
Windows Vista/7 C:\Users\[User name]\glestadv\addons
Linux ~/.glestadv/addons

MegaGlestEdit

In MegaGlest, the archive should be directly extracted (uncompressed) to their personal MegaGlest folder.

Operating system Location of the MegaGlest folder
Windows 2000/XP C:\Documents and Settings\[User name]\Application Data\megaglest
Windows Vista/7 C:\Users\[User name]\AppData\Roaming\megaglest
Linux ~/.megaglest

GlestEdit

In Glest, there is no user specific installation, so installing a mod installs it for all users. The archive should be directly extracted to the installation folder.

Operating system Default installation folder
Windows 2000/XP/Vista/7 C:\Program Files\Glest_*
Linux

* denotes the version number, so Glest 3.2.2 would have the folder name Glest_3.2.2.

GAE FeaturesEdit

GAE can play compressed addons without having to uncompress them, allowing for a smaller filesize, as well as eliminating the need to extract the file. Archives are merely placed in the addons folder located in %personal_folder%/glestadv. This is the same folder where the INI and log files are stored. In GAE, it is also possible to use a non-compressed folder to contain addons.

On Linux, this location is ~/.glestadv.

See AlsoEdit

External LinksEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.