This thread will be dedicated to patches developed for Glest In Space total conversion mod. The eventual goal for the GIS team is to get our changes applied to the mainline (so that we eventually won't have to maintain our own source besides the mod specific files).
Patch Screenshot GalleryUpdated 2011/01/31I combined both patches from 2011/01/30 into 1 patch.
Patch File:
Complete PatchUpdated 2011/01/30Multi Select TabsThis patch allows an arbitrary number of units to be selected removing the standard 16 max units. When more then 16 units are selected, tabs appear next to the unit icons. This allows the player to toggle through the tabs to see all the units' portraits that have been selected. The player can either click on the tab itself or use the TAB shortcut.
Programmers NotesThere were several files that needed to be modified for allowing multi-select. Right now, a GraphicalButton is being used for the tabs. But I think if this is something desired for the mainline, that the tab buttons be apart of the faction sets and can be skinnable.
Patch based on SVN Revision 1666
Patch file:
Complete PatchA patch for the above patch that fixes the Free Morph Command:
Patch for Free MorphUpdated 2011/01/19Free Morph CommandIn the mainline, the morph command requires a cost in resources in order to execute this command. For instance, if an initiate is to be morphed into a battlemage, then the morph command costs the value of the battlemage as set in the battlemage's xml (I think its 75 gold). If a modder wants to make the battlemage morph free, at this point he cannot. There is a means of refunding resources but the player requires whatever resources the unit costs at the start of the morph command, and only gets the funds back when the morph command finishes. This patch enables modders to make a free morph. Meaning, the morph is free and doesn't require any up-front resources.
In order to enable a free morph, add the following element to the command xml. If value is
true, then the morph is free, and
false is the default behavior. Also note, if the morph-free element doesn't exist in the xml, then the morph command also uses the default behavior (so this won't effect any existing tech trees).
<command>
<morph-free value="true"/>
</command>
Programmers notesThis was a fairly straight forward implementation. I added the necessary code to parse the xml. Then I added several if statements to check for free morphing.
Patch based on SVN Revision 1563
Patch file:
stand alone patchScreenshots of applied patchA test on the mage tech's initiate to battlemage morph
Updated 2011/01/12HUD Unit Placement PatchThe hud unit placement patch enables modders to move the unit's icon, information, stats, and commands via xml. The placement of these components are determined by keywords in the xml like: left, right, mid, top, and bottom. An example of the xml is listed below:
<hud value="true" >
<unitinfo x-axis="right" y-axis="top"/>
</hud>
Where
x-axis is the horizontal placement of the unit information and valid values are
left,
right, and
mid. y-axis is the vertical placement of the unit information and valid values are
top,
bottom, and
mid.
Programmers notesThe code isn't exactly straight forward to move the unit portraits and information around. The coordinates for the components were hard coded without any explanation of why the numbers were used. So I converted the coordinates to be relative to the size of the screen ... so the hud should look uniform regardless of resolution.
Patch based on SVN Revision 1518
Patch file:
Complete PatchPatch based on SVN Revision 1468:
Patch file:
Incremental PatchPatch file:
Complete PatchScreenshots of applied patchUpdated 2011/01/08Patch based on SVN Revision 1468:
Patch file (including minimap, resource position, & overlay patches):
Complete PatchUpdated 2011/01/06HUD Overlay PatchThe hud overlay patch enables modders to add an overlay to the hud specified in the xml. The overlay is one tga file and can be located anywhere; however, I suggest putting it in the faction home directory with a new directory called hud. Also, make sure the tga file (when saved/exported) has compression turned
off.
The new xml for adding the overaly is shown below.
<hud value="true" >
<overlay path="hud/hud.tga" value="false"/>
</hud>
Where
path is the local path to the overlay image.
value enables the overlay to be enables or disabled (false = disabled and true = enabled).
Patch based on SVN Revision: 1413
Patch file (including minimap & resource position patches):
Complete PatchPatch file (have to apply minimap patch, then resource position patch):
Incremental PatchScreenshots of applied patchUpdated 2011/01/05Resource Position PatchThe resource position patch allows modders to change the position of the resource indicators in 1 of 3 positions: Left, Mid (default), and Right.
The max resource quantity is also toggable: meaning, the maximum information is either displayed or not. There is one exception, consumables will always display their maximum regardless of this setting.
The resources can also be sorted by consumables in 1 of 3 sorts: unsorted (default), left, and right.
In order to use this feature, add the following to the faction xml file (its per faction specific like all HUD enhancements)
<hud value="true" >
<resources position="mid" consumables="unsorted" showmax="true"/>
</hud>
Where valid values for position are
left,
mid, and
right. Valid values for consumables are
unsorted,
left, and
right. Valid values for showmax are
true and
false.
Programing NotesIn order to allow for sorting of consumables, a vector of pointers was created in types/tech_tree.cpp which contains the sorted list of resource_types. When the renderer class draws the HUD with sorting turned on, it uses this vector instead of the default.
As always, please let me know if you have any suggestions, comments, or questions.
Patch based on SVN Revision: 1413
Patch file (including minimap patch):
Complete PatchPatch file (have to apply minimap patch first):
Incremental PatchScreenshots of applied patchResource Positions | GIS Usage |
| |
Updated 2011/01/03Minimap Position PatchThe minimap position patch allows modders to position the minimap in 1 of six positions: Top Left (default), Top Right, Bottom Left, Bottom Right, Mid Left, and Mid Right.
In order to use this feature, add the following to the faction xml file (its per faction specific)
<hud value="true" >
<minimap x-axis="left" y-axis="top"/>
</hud>
Where valid values for x-axis are
left and
right. Valid values for y-axis are
top,
bottom,
mid.
Programing NotesIn order to create a "dynamic" minimap location, the global/metrics class needed to be changed from a const singleton class to a dynamic singleton class (sorry if the terminology isn't correct). The reason for this is that data members cannot be changed in a const class after instantiation (from my limited understanding of const's in C++). If there is another way of modifying the data members of the const singleton, then I would be glad to fix it (if so desired). The result of this patch is that the updated Metrics class returns a pointer instead of a const reference and so I had to modify several files that were dependent on Metrics.
Please let me know if you have any suggestions, comments, or questions.
Patch based on SVN Revision: 1413
Patch file:
Patch Version 2Screenshots of applied patch