The Glest Wiki
(Formatting with tt)
Line 29: Line 29:
 
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 [http://www.7-zip.org/ 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.
 
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 [http://www.7-zip.org/ 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: <tt>7z a elves.7z ./techs -ms=off</tt>. You may need to install the p7zip-full package to get this functionality.
+
On Linux, 7z archives can be created as non-solid by appending <tt>-ms=off</tt> to the end of the command. For example: <tt>7z a elves.7z ./techs -ms=off</tt>. You may need to install the p7zip-full package to get this functionality.
   
 
==GAE Features==
 
==GAE Features==

Revision as of 03:23, 18 August 2011

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). 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).

Examples

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.

Scenarios

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 Formats

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.

GAE Features

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 Also

External Links