Modifying MegaGlest

From MegaGlest
Revision as of 13:28, 24 November 2006 by Hailstone3 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Glest Game provides sample tech trees, tilesets, and maps that you can explore and experiment with to learn more.

Introduction

Glest has three main components: maps, tilesets, and tech trees. To play a game the user can select any combination of map+tileset+tech tree.

XML files

Glest uses XML files for tileset, tech tree, resource, faction, upgrade and unit definitions. These files can be viewed with any internet browser and edited with any text editor.

Image files

Glest uses graphic files for textures and icons. Currently 24-bit BMP and 24 or 32 bit TGA files are supported.

3D files

Glest uses its own 3d format for 3d models, models can be exported from 3dsmax using the g3d export plugin.

Maps

Maps are single files, that define bidimensional matrices of cells, each cell has the following attributes:

   * Height. From 0 to 20
   * Surface type. There are 5 surface types, in the map file there is only a number indicating the type of texture, the texture file itself depends of the tileset.
   * Object. A cell can have an object or not, there are 10 types of objets, object models depend of the tileset, but objects 1, 2 and 3 are trees and objects 4 and 5 are stones, objects from 5 to 10 can be anything, depending on the tileset.
   * Resource. A cell can have an resource or not. A cell can't have both and object and a resource. Resources depend of the Tech Tree.

Maps also define some other things such as start locations for each player, size of the map, altitude factor, and water level. Maps can't define the placement of any unit or building. Maps can be edited with the map editor. To play maps created with it just place them into the map folder of the game. Map files must have gmp extension. There is a manual for the map editor.

Tilesets

Tilesets define the surface textures, object models and some other parameters, (resource 3d models are defined at the tech tree). Every tileset is a subfolder of the tileset folder of the game. In this subfolder there must be a xml file with the same name of the folder, this file defines the location of every texture and model and some other parameters.

Tech trees

Tech trees define factions, resources, units, and upgrades for a game. Every tech tree is a subfolder of the tech folder of the game. In this subfolder are located:

   * A xml file with the same name of the folder, in this file are defined the initial resources for the players.
   * A resources folder, in this folder are placed all the resources of the tech tree, as well as its 3d models. Each resource is in a separate subfolder with an xml file defining its parameters.
   * A factions folder, in this folder are placed the factions for the game, every faction has its own folder, inside this folder there must be:
         o A xml file with the same name of the faction folder that defines the starting units for this faction.
         o An units folder, in this folder are placed all the units for this faction. Each unit is in a separate subfolder with an xml file defining its parameters.
         o An upgrades folder, in this folder are placed all the upgrades for this faction. Each upgrade is in a separate subfolder with an xml file defining its parameters.