Difference between revisions of "Modifying MegaGlest"

From MegaGlest
Jump to navigation Jump to search
Line 106: Line 106:
 
*How can I make a part of a model's texture to change color when I change faction (turn to red/blue/green/yellow)?
 
*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-->left click-->properties-->user defined-->write "CustomColor=True", by this way the model use the alpha chanel for the faction color.
 
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.
 +
in general: transparency ( alpha channel ) is shown as the teamcolor in the game
  
 
*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 ?
 
*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 ?

Revision as of 14:43, 30 May 2007

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 and folders for tileset, tech tree, resource, faction, upgrade and unit definitions, as well as parameters for the particle projector and particle splash engine. 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.

The textures for the 3d models are in seperate files. These must be uncompressed tga-files with origin in lower left-hand corner. The filenames of these .tga texture files should be lower case, otherwise you'll get unix/windows case sensitivity problems!!

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

Creating your own game

The glest Engine supports a wide array of unit types that surpass the medival theme if you have a will to model, and convert the files, you can make your own game This topic was created by Firedeathbot

faction editing

copy the magitech folder to a place where you wont lose it(in case you mess up the game) the 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

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.

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.

Real-Time Content Editor

MOGware (video demonstrations)
"I don't know if you are happy with the typical method for getting content such as textures and models into the game, but with MOG, we have made it so it is a one-click process to go from your source (content) editor to the game. This happens while the game is running, so you are able to adjust textures or models, hit a button, then click over to the running game and see the old swap out for the new in realtime. MOG is free for individuals or small teams."

Tech trees

Tech Tree Editor - GUI Editor for easily modifying tech trees (design 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:

  • 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:
  - 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.

Glest Modder Survival Kit

A work in progress version of the glest modder survival kit is available at the Glest Website.

easyExtension

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

For more information go to Glest.Eurion.net

File Structure

The star is for folders and the dash is for files.

* magitech
- 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

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

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. in general: transparency ( alpha channel ) is shown as the teamcolor in the game

  • 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?

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

This can be set in the in the units particle project! particle projector

  • How to make a projectile to come out of the dragons mouth not from it's stomach (middle of model)?

This can be set in the in the units particle project! here --> <offset x="-0.3" y="0.5" z="1"/> for more info see particle projector

  • Would it be possible to change the construction model based on how many villagers are currently working on it?

Yes

  • Can I limit the number of villagers possible to work on a certain building?

No

  • Is it possible to change the rain spriteto 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. You can also edit other tilesets in this manner. (Vixis)