8 terrain textures instead of 6
by Mindwedge · 04/14/2005 (11:29 pm) · 46 comments
Hi all
---------------
TGE 1.3 files
---------------
Step 1: replace your common/editor/EditorGui.gui file with this
file.
Step 2: replace your common/editor/EditorGui.cs file with this
file.
--------------------
UPDATE FOR 1.4
--------------------
1.4 is using a changed directory structure. BEWARE! If you have been using 1.3 and you update to 1.4 some of your scripts may not work as they used to.
Here are the updated files for 1.4 (tested with the 1.4 demo for validity). Place them in your creator/editor folder:
EditorGui.cs
EditorGui.gui
If the server is down for these files try again later. The server is rarely down for more than an hour.
Have fun!
Note: You'll want to verify the bitmap paths for the default textures in EditorGui.gui to match your own development paths, else it will cause an error message in your console log.
---------------
TGE 1.3 files
---------------
Step 1: replace your common/editor/EditorGui.gui file with this
file.
Step 2: replace your common/editor/EditorGui.cs file with this
file.
--------------------
UPDATE FOR 1.4
--------------------
1.4 is using a changed directory structure. BEWARE! If you have been using 1.3 and you update to 1.4 some of your scripts may not work as they used to.
Here are the updated files for 1.4 (tested with the 1.4 demo for validity). Place them in your creator/editor folder:
EditorGui.cs
EditorGui.gui
If the server is down for these files try again later. The server is rarely down for more than an hour.
Have fun!
Note: You'll want to verify the bitmap paths for the default textures in EditorGui.gui to match your own development paths, else it will cause an error message in your console log.
#42
Here are the parts you have to change in common/editor/EditorGui.cs:
tork.beffy.de/uploads/EPainterScroll.txt
This could save you some hours positioning all the controls :P
06/16/2006 (12:46 am)
Phew, extending the texture editor to 16 textures was really annoying to do...
Here are the parts you have to change in common/editor/EditorGui.cs:function EPainterChangeMat(%file)
{
// make sure the material isn't already in the terrain.
%file = filePath(%file) @ "/" @ fileBase(%file);
// beffy: change number of textures here
for(%i = 0; %i < 16; %i++)
if(EPainter.mat[%i] $= %file)
return;
EPainter.mat[EPainter.matIndex] = %file;
%mats = "";
// beffy: change number of textures here
for(%i = 0; %i < 16; %i++)
%mats = %mats @ EPainter.mat[%i] @ "\n";
ETerrainEditor.setTerrainMaterials(%mats);
EPainter.setup();
("ETerrainMaterialPaint" @ EPainter.matIndex).performClick();
}
function EPainter::setup(%this)
{
EditorMenuBar.onActionMenuItemSelect(0, "Paint Material");
%mats = ETerrainEditor.getTerrainMaterials();
%valid = true;
// beffy: change number of textures here
for(%i = 0; %i < 16; %i++)
{
%mat = getRecord(%mats, %i);
...If somebody needs the code for that scrollable control I've used, replace your "EPainter" gui control in common/editor/EditorGui.gui with the contents of this file (MAKE A BACKUP BEFORE DOING SO!) - you'll have to change the texture paths in there, though!tork.beffy.de/uploads/EPainterScroll.txt
This could save you some hours positioning all the controls :P
#43
06/30/2006 (3:28 pm)
I get the same crash as above, i extend the editor to 16 textures, change the mask to 0x31 but still get a crash in the level loader, looks like it is expecting the level save file to have 16 materials when it doesn't, could this be a TGE 1.3 problem?
#44
12/12/2006 (7:06 pm)
Anybody get this (get the terrain texture painter to display 8 terains) to work in 1.5? I added the 4 guictrls each for the 7th and 8th terrains, and upped the iteration from 6 to 8 in relevant functions. The editor still works , but only displays 6 terrains. help?...
#45
I also had to change the positions in the cs file with the following.
new GuiBitmapCtrl(ETerrainMaterialBitmap6) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "9 453";
Extent = "96 96";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
wrap = "1";
};
new GuiTextCtrl(ETerrainMaterialText6) {
canSaveDynamicFields = "0";
Profile = "GuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "10 380";
Extent = "8 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "255";
};
new GuiButtonCtrl(ETerrainMaterialChange6) {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "9 554";
Extent = "96 22";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.changeMaterial(6);";
hovertime = "1000";
text = "Add...";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiBorderButtonCtrl(ETerrainMaterialPaint6) {
canSaveDynamicFields = "0";
Profile = "GuiBorderButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "4 434";
Extent = "106 118";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.setPaintMaterial(6);";
hovertime = "1000";
text = "Button";
groupNum = "-1";
buttonType = "RadioButton";
};
new GuiBitmapCtrl(ETerrainMaterialBitmap7) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "122 452";
Extent = "96 96";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
wrap = "1";
};
new GuiTextCtrl(ETerrainMaterialText7) {
canSaveDynamicFields = "0";
Profile = "GuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "123 433";
Extent = "8 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "255";
};
new GuiButtonCtrl(ETerrainMaterialChange7) {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "122 553";
Extent = "96 22";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.changeMaterial(7);";
hovertime = "1000";
text = "Add...";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiBorderButtonCtrl(ETerrainMaterialPaint7) {
canSaveDynamicFields = "0";
Profile = "GuiBorderButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "117 434";
Extent = "106 118";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.setPaintMaterial(7);";
hovertime = "1000";
text = "Button";
groupNum = "-1";
buttonType = "RadioButton";
};
new GuiBitmapCtrl(ETerrainMaterialBitmap8) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "9 594";
Extent = "96 96";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
wrap = "1";
};
new GuiTextCtrl(ETerrainMaterialText8) {
canSaveDynamicFields = "0";
Profile = "GuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "10 521";
Extent = "8 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "255";
};
new GuiButtonCtrl(ETerrainMaterialChange8) {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "9 695";
Extent = "96 22";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.changeMaterial(8);";
hovertime = "1000";
text = "Add...";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiBorderButtonCtrl(ETerrainMaterialPaint8) {
canSaveDynamicFields = "0";
Profile = "GuiBorderButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "4 575";
Extent = "106 118";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.setPaintMaterial(8);";
hovertime = "1000";
text = "Button";
groupNum = "-1";
buttonType = "RadioButton";
};
new GuiBitmapCtrl(ETerrainMaterialBitmap9) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "122 593";
Extent = "96 96";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
wrap = "1";
};
new GuiTextCtrl(ETerrainMaterialText9) {
canSaveDynamicFields = "0";
Profile = "GuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "123 574";
Extent = "8 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "255";
};
new GuiButtonCtrl(ETerrainMaterialChange9) {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "122 695";
Extent = "96 22";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.changeMaterial(9);";
hovertime = "1000";
text = "Add...";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiBorderButtonCtrl(ETerrainMaterialPaint9) {
canSaveDynamicFields = "0";
Profile = "GuiBorderButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "117 575";
Extent = "106 118";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.setPaintMaterial(9);";
hovertime = "1000";
text = "Button";
groupNum = "-1";
buttonType = "RadioButton";
};
Sorry if this dont make sense, i'm a newbie.
If you need me to explain in more detail let me know.
01/26/2007 (1:25 pm)
I have managed to get 10 in 1.5 by changing the iterations. I also had to resize the holder in F10 mode.I also had to change the positions in the cs file with the following.
new GuiBitmapCtrl(ETerrainMaterialBitmap6) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "9 453";
Extent = "96 96";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
wrap = "1";
};
new GuiTextCtrl(ETerrainMaterialText6) {
canSaveDynamicFields = "0";
Profile = "GuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "10 380";
Extent = "8 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "255";
};
new GuiButtonCtrl(ETerrainMaterialChange6) {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "9 554";
Extent = "96 22";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.changeMaterial(6);";
hovertime = "1000";
text = "Add...";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiBorderButtonCtrl(ETerrainMaterialPaint6) {
canSaveDynamicFields = "0";
Profile = "GuiBorderButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "4 434";
Extent = "106 118";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.setPaintMaterial(6);";
hovertime = "1000";
text = "Button";
groupNum = "-1";
buttonType = "RadioButton";
};
new GuiBitmapCtrl(ETerrainMaterialBitmap7) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "122 452";
Extent = "96 96";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
wrap = "1";
};
new GuiTextCtrl(ETerrainMaterialText7) {
canSaveDynamicFields = "0";
Profile = "GuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "123 433";
Extent = "8 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "255";
};
new GuiButtonCtrl(ETerrainMaterialChange7) {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "122 553";
Extent = "96 22";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.changeMaterial(7);";
hovertime = "1000";
text = "Add...";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiBorderButtonCtrl(ETerrainMaterialPaint7) {
canSaveDynamicFields = "0";
Profile = "GuiBorderButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "117 434";
Extent = "106 118";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.setPaintMaterial(7);";
hovertime = "1000";
text = "Button";
groupNum = "-1";
buttonType = "RadioButton";
};
new GuiBitmapCtrl(ETerrainMaterialBitmap8) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "9 594";
Extent = "96 96";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
wrap = "1";
};
new GuiTextCtrl(ETerrainMaterialText8) {
canSaveDynamicFields = "0";
Profile = "GuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "10 521";
Extent = "8 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "255";
};
new GuiButtonCtrl(ETerrainMaterialChange8) {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "9 695";
Extent = "96 22";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.changeMaterial(8);";
hovertime = "1000";
text = "Add...";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiBorderButtonCtrl(ETerrainMaterialPaint8) {
canSaveDynamicFields = "0";
Profile = "GuiBorderButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "4 575";
Extent = "106 118";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.setPaintMaterial(8);";
hovertime = "1000";
text = "Button";
groupNum = "-1";
buttonType = "RadioButton";
};
new GuiBitmapCtrl(ETerrainMaterialBitmap9) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "122 593";
Extent = "96 96";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
wrap = "1";
};
new GuiTextCtrl(ETerrainMaterialText9) {
canSaveDynamicFields = "0";
Profile = "GuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "123 574";
Extent = "8 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "255";
};
new GuiButtonCtrl(ETerrainMaterialChange9) {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "122 695";
Extent = "96 22";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.changeMaterial(9);";
hovertime = "1000";
text = "Add...";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiBorderButtonCtrl(ETerrainMaterialPaint9) {
canSaveDynamicFields = "0";
Profile = "GuiBorderButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
//changed posision
position = "117 575";
Extent = "106 118";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ETerrainEditor.setPaintMaterial(9);";
hovertime = "1000";
text = "Button";
groupNum = "-1";
buttonType = "RadioButton";
};
Sorry if this dont make sense, i'm a newbie.
If you need me to explain in more detail let me know.
#46
Good resource.
However, there is a problem for mine. When I add this, and change directories, etc etc., it doesn't let me hold down the right mouse button to pan the camera.
06/24/2007 (5:42 pm)
Nice, I definitely like being able to use more textures. Allows for more ground cover. Like when you do beach maps or something, many times you have sand, dirt, grass, concrete(if a city is on the coast), rock, etc.Good resource.
However, there is a problem for mine. When I add this, and change directories, etc etc., it doesn't let me hold down the right mouse button to pan the camera.

Associate Stefan Beffy Moises
thanks a lot man, that did the trick! Seems to work now, just gotta re-texture the terrains! :)