Difference between revisions of "Modifying MegaGlest"

From MegaGlest
Jump to navigation Jump to search
 
(98 intermediate revisions by 15 users not shown)
Line 1: Line 1:
The Glest Game provides sample tech trees, tilesets, and maps that you can explore and experiment with to learn more.
+
[[MegaGlest]] is a highly moddable game, with nearly every aspect from the menus to the [[factions]], [[techtrees]], [[maps]], [[tilesets]], and [[scenarios]] being modifiable. This includes the creation of entirely new files or modifications of existing ones.
  
==Introduction==
+
{{Tocright}}
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 or Blender.
 
  
*[[3dsmaxmodelling|Modelling with 3DSMax]]
+
==General Structure==
*[[blendermodelling|Modelling with Blender]]
 
  
==Maps==
 
Maps are single files, that define bidimensional matrices of cells, each cell has the following attributes:
 
  
* Height. From 0 to 20
+
===Techtrees===
* 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.
+
{{Main|Modifying MegaGlest/Techtrees}}
* 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.
+
Techtrees are methods of storing factions. A techtree always contains at least one faction, but what separates them from factions is that they define the resources and damage multipliers as well, allowing more customizability, and factions in techtrees are isolated, you can only use factions that belong in the same techtree against eachother.
* Resource. A cell can have an resource or not. A cell can't have both and object and a resource. Resources dependof 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.
+
===Factions===
 +
{{Main|Factions}}
 +
A sub-unit of techtrees (but often made standalone to go in pre-existing techtrees), factions define the units, upgrades, and starting units of a faction.
  
==Tilesets==
+
===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.
+
{{Main|Tilesets}}
 +
Tilesets are a collection of surface images and object models, combined with an XML file controlling the settings of how each map should look. The object models, for example, can instruct MegaGlest what model to use for trees on maps, or how the surfaces of the map will look. They do not actually change the map itself, just how it looks.
  
==Tech trees==
+
===Maps===
[[Tech_Tree_Editor|Tech Tree Editor]] - GUI Editor for easily modifying tech trees (design only).
+
{{Main|Maps}}
 +
Maps are small binary files made with the [[Maps/Editing|map editor]]. They control the heights, placement of objects and resources, player positions, map size, etc. All those settings are defined in the map editor, rather than using any form of XML. They cannot change how the objects in the map, such as the trees, will look though (that can only be done by tilesets), but can change the positioning of them only.
  
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:
+
===Scenarios===
 +
{{Main|Scenarios}}
 +
Scenarios, which includes tutorials, are XML files which tell the game which predetermined settings (such as which map) to use. They are generally combined with [[Lua]] scripting to allow added depth and to allow them to do things not normally possible in the game, such as telling a story, having a campaign, enforcing the [[AI]], or otherwise creating novelty in the game.
  
* A xml file with the same name of the folder, in this file are defined the initial resources for the players.
+
==Additions==
* 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.
+
In addition to the regular types of mods, there are a few other things that can be changed or are useful to know for making a mod.
* 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:
 
<pre>
 
  - A xml file with the same name of the faction folder that defines the starting units for this faction.
 
  - 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.
 
  - 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.
 
</pre>
 
  
==Glest Modder Survival Kit==
 
A work in progress version of the glest modder survival kit is available at the [http://www.glest.org/files/misc/gmsk_WIP.zip Glest Website].
 
  
==easyExtension==
+
===Windows/Linux Case sensitivity===
EasyExtension is a format used to distribute extensions created for the free open source game Glest. It's easy to use, has no risk to overwrite other extensions, is well documented...
+
As there are always problems with windows users ignoring case sensitivity, here is a script to fix it:
 +
<tt>
 +
find -name "*[A-Z]*" -print0 | xargs -0 -L 1 bash -c 'mv "$0" "$(echo $0 | tr [:upper:] [:lower:])"'
 +
</tt>
  
For more information go to [http://glest.eurion.net/?docs&easyExtension Glest.Eurion.net]
+
==See Also==
 +
*[[MegaGlest Tools]]
 +
*[[XML Definitions]]
 +
*[[G3D]]
 +
*[[Blender]]
  
==File Structure==
+
==External Sites==
The star is for folders and the dash is for files.
+
*[https://forum.megaglest.org/ MegaGlest Official Forums]
<pre>
+
[[Category:MG]]
* magitech
+
[[Category:Mods]]
- magitech.xml
 
** factions
 
*** [faction name]
 
- [faction name].xml
 
**** music
 
- *.ogg
 
**** units
 
***** each unit has a folder
 
- unit.xml
 
- particle_proj.xml
 
- fire_splash.xml
 
- etc
 
****** images
 
- *.bmp
 
****** models
 
- *.g3d/tga
 
****** sounds
 
- *.wav
 
**** upgrades
 
***** [upgrade folder]
 
- [upgrade].xml
 
****** images
 
- *.bmp
 
** resources
 
*** [resource folder]
 
- [resource].xml
 
**** images
 
- *.bmp
 
</pre>
 
 
 
==Questions==
 
#How can I make a part of a model's texture to change color when I change faction (turn to red/blue/green/yellow)? <br> in 3dsmax: select your model-->left click-->properties-->user defined-->write "CustomColor=True", by this way the model use the alpha chanel for the faction color.
 
 
 
#I made a building that can heal units, but when add the command heal and write <move-skill value="false" /> (so itt won't move) it says unknow command. So how can I make the building not to move but heal the units surrounding it ?
 
 
 
#How can I make new commands/skills, like the marketplace exchanges rock and wood to gold or a unit to camouflage itself ?
 
#How can I export 3ds max particle systems into glest? <br> The export plugin can't export particle systems.
 
#How to make projectiles (like arrows) to go in an arc and pull a line after it (like airplanes do)?
 
#How to make a projectile to come out of the dragons mouth not from it's stomach (middle of model)?
 
#Would it be possible to change the construction model based on how many villagers are currently working on it?<br>Yes
 
#Can I limit the number of villagers possible to work on a certain building? <br> No
 
#Is it possible to change the rain spriteto snow? <br> The rain no, but you can change the snow sprite in glest_game\data\core\misc_textures
 

Latest revision as of 12:47, 8 October 2019

MegaGlest is a highly moddable game, with nearly every aspect from the menus to the factions, techtrees, maps, tilesets, and scenarios being modifiable. This includes the creation of entirely new files or modifications of existing ones.

Template:Tocright

General Structure[edit]

Techtrees[edit]

Techtrees are methods of storing factions. A techtree always contains at least one faction, but what separates them from factions is that they define the resources and damage multipliers as well, allowing more customizability, and factions in techtrees are isolated, you can only use factions that belong in the same techtree against eachother.

Factions[edit]

Main article: Factions

A sub-unit of techtrees (but often made standalone to go in pre-existing techtrees), factions define the units, upgrades, and starting units of a faction.

Tilesets[edit]

Main article: Tilesets

Tilesets are a collection of surface images and object models, combined with an XML file controlling the settings of how each map should look. The object models, for example, can instruct MegaGlest what model to use for trees on maps, or how the surfaces of the map will look. They do not actually change the map itself, just how it looks.

Maps[edit]

Main article: Maps

Maps are small binary files made with the map editor. They control the heights, placement of objects and resources, player positions, map size, etc. All those settings are defined in the map editor, rather than using any form of XML. They cannot change how the objects in the map, such as the trees, will look though (that can only be done by tilesets), but can change the positioning of them only.

Scenarios[edit]

Main article: Scenarios

Scenarios, which includes tutorials, are XML files which tell the game which predetermined settings (such as which map) to use. They are generally combined with Lua scripting to allow added depth and to allow them to do things not normally possible in the game, such as telling a story, having a campaign, enforcing the AI, or otherwise creating novelty in the game.

Additions[edit]

In addition to the regular types of mods, there are a few other things that can be changed or are useful to know for making a mod.


Windows/Linux Case sensitivity[edit]

As there are always problems with windows users ignoring case sensitivity, here is a script to fix it: find -name "*[A-Z]*" -print0 | xargs -0 -L 1 bash -c 'mv "$0" "$(echo $0 | tr [:upper:] [:lower:])"'

See Also[edit]

External Sites[edit]