Difference between revisions of "Modifying MegaGlest"

From MegaGlest
Jump to navigation Jump to search
 
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Cleanup}}
+
[[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.
  
Glest enthusiasts are encouraged to experiment with, and explore, new design concepts using the Glest game engine. Glest itself is a full game engine, and mods, including new [[mods|techtrees]], [[tilesets]], and [[maps]]. These new elements can then be used in game to play, and can create the feel of an entirely new game.
+
{{Tocright}}
  
==Introduction==
+
==General Structure==
Glest has three main components: [http://glest.wikia.com/wiki/Mod_Compilations/Techtrees/Factions_for_Glest techs], [[tilesets]] and [[maps]].
 
  
===XML files===
 
Glest uses [[XML_Definitions|XML files]] and [[folders]] for [[tileset_name.xml|tileset]], [http://glest.wikia.com/wiki/Mod_Compilations/Techtrees/Factions_for_Glest tech tree], resource, [[faction]], upgrade and [[Unit_XML|unit]] definitions, as well as parameters for [[projectile particles]] and [[splash particles]]. These files can be viewed with any internet browser/file manager and edited with  [[Glest_Tools|text editor]].
 
  
===Image files===
+
===Techtrees===
Glest uses graphic files for [[Surface_texture_pallette.jpg|textures]] and icons. Currently 24-bit BMP and 24 or 32 bit TGA files are supported. The tga files must be uncompressed. A free and powerful TGA image editor is [http://gimp-win.sourceforge.net/stable.html gimp]. Also, please note that RLE compression is not supported, and must be disabled when saving. [[MegaGlest]] and [[GAE]] support additional formats such as PNG.
+
{{Main|Modifying MegaGlest/Techtrees}}
 +
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.
  
===3D files===
+
===Factions===
Glest uses its own 3d format for 3d models, models can be exported from 3dsmax or Blender.
+
{{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.
  
*[[Blender_Modelling|Modeling with Blender]]
+
===Tilesets===
*[[3dsMax_Modelling|Modeling with 3DSMax]]
+
{{Main|Tilesets}}
*[[Other_Modelling_Tools|Modeling with Other Modelling Tools]]
+
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.
  
The textures for the 3d models are in separate files. These must be uncompressed tga-files with origin in lower left-hand corner.
+
===Maps===
'''The file names of these .tga texture files must be lower case'''. Upper case will cause unix/windows case sensitivity problems!!
+
{{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.
  
==Tilesets==
+
===Scenarios===
[[tileset_name.xml|Tilesets]] define the surface textures, object models and some other parameters. Every tileset is a subfolder within the tileset folder of the Glest game directory. 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|Scenarios}}
*Note: Tech trees can use objects as resources. The difference is that 3d models for objects are defined on the tileset while resource 3d models are defined on the tech tree.
+
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.
  
*[[Tileset Hints]]
+
==Additions==
 +
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.
  
==Tech Trees==
 
Tech trees define factions, resources, units, and upgrades for a game. Each tech tree is a subfolder within the tech folder of Glest game directory. 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.
+
===Windows/Linux Case sensitivity===
* 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.
+
As there are always problems with windows users ignoring case sensitivity, here is a script to fix it:
* 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:
+
<tt>
** A xml file with the same name of the faction folder that defines the starting units for this faction.
+
find -name "*[A-Z]*" -print0 | xargs -0 -L 1 bash -c 'mv "$0" "$(echo $0 | tr [:upper:] [:lower:])"'
** 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.
+
</tt>
** 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.
 
  
===File Structure===
+
==See Also==
 
+
*[[MegaGlest Tools]]
* techs
+
*[[XML Definitions]]
** tech_name
+
*[[G3D]]
** common - (optional: Common UI elements used by numerous units)
+
*[[Blender]]
** factions
 
*** faction_name
 
**** units
 
***** unit_name
 
****** images
 
****** models
 
****** sounds
 
***** [[unit_name.xml]]
 
**** upgrades
 
***** upgrade_name
 
****** images
 
***** [[upgrade_name.xml]]
 
**** [[faction_name.xml]]
 
** resources
 
*** resource_name
 
**** images
 
**** models
 
**** [[resource_name.xml]]
 
** [[tech_name.xml]]
 
 
 
'''Faction editing'''
 
*Copy the [[Magitech]] folder to a place where you wont lose it(in case you mess up the game) then modify the techs by picking the units that you want the models of, and the article, and splash file you want. then open the XML's you wanted at the g3d files rename it to the models path, at the Commands section modify it to the image path, and your unit is done to edit the tech tree( lets say we wanted to add guns we would open the magitech XML and add the line attack type gun and we could have a gun to attack,
 
  
'''Menu editing'''
+
==External Sites==
*The Glest engine allows the menu to be changed in your dat/core/menu folder there is a section for the models a textures folder and a XML the xml configures the menu rotation, and the particles. The models folder contains the models for the menu. Lets say we wanted a blank start screen we would rename a blank g3d(located in the tileset under the name none) and copy it to the menu models directory and rename it menu_main. to change the loading screen, logo, and button open the textures folder and modify them to the extent you want.
+
*[https://forum.megaglest.org/ MegaGlest Official Forums]
 
+
[[Category:MG]]
==Maps==
+
[[Category:Mods]]
Maps are single files, that define bi-dimensional matrices of cells, each cell has the following attributes:
 
 
 
* Height. From 0 to 20
 
* Surface type. There are 5 surface types, and the map editor numbering system indicates the [[Surface_texture_pallette.jpg|texture type]], the texture file itself depends on the [[Tilesets#Custom_Tilesets|tileset]].
 
* Object. A cell can have an object or not, there are 10 types of objects, object models depend of the tileset, but objects 1 and 2 are trees, 3 is stone, 4 and 5 are bushes, objects from 5 to 9 can be anything and 10 is an invisible blocking object.
 
* Resource. Resources can be placed on cells. objects and resources cannot share the same cell at the same time. Resources depend on the Tech Tree.
 
 
 
Maps also define some other things such as start locations for each player, map size, altitude factor, and water level. Maps cannot define the placement of units or buildings. Maps may be edited with the [[MapEditing|Glest Map Editor]]. To play maps created with the editor, just place the .gbm file into the Glest map folder.
 
 
 
==FAQ==
 
'''How can I make a part of a model's texture to change color when I change faction (turn to red/blue/green/yellow)?'''
 
In 3dsmax: select your model-->right click-->properties-->user defined-->write "CustomColor=True" (only what's in the parentheses). By doing this the model will use the alpha channel for the faction color. In general: transparency (alpha channel) is shown as the team color in the game.
 
*Create a texture, for the whole model or for a part of it.
 
*Make sure the background of the texture is black.
 
*On the texture where you want the team color to show, color it white.
 
*Using gimp: Select your texture -> Layer -> Transparency -> Color to Alpha... -> Color should be set to white, if not, click on it -> Click OK
 
*Fire up the G3D viewer, select the different "custom colors" from the pull-down.
 
 
 
'''How can I export 3ds max particle systems into glest?'''The export plug-in can't export particle systems.
 
 
 
'''Is it possible to change the rain sprite to snow?'''''The rain no, but you can change the snow sprite in glest_game\data\core\misc_textures''
 
 
 
'''How do I make the nights brighter?'''In the /glest/tilesets/forest directory, open forest.xml with text editor. Search for <moon-light and increase numbers for colors (greater number=brighter). Save. A;; tilesets can be edited in this manner.
 
 
 
'''Is it possible to make different units in a building simultaneously?'''No, they are on a work queue basis
 
 
 
==See Also==
 
[[Glest_Tools|Glest Tools]]
 

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]