Zero editor scripts

Started by RepComm, February 23, 2014, 09:43:45 PM

Previous topic - Next topic
February 23, 2014, 09:43:45 PM Last Edit: February 23, 2014, 10:10:35 PM by -RepublicCommando-
I was goofing off in the ZE scripts to change up the interface a bit, and soon found myself side tracked and finding some old commented out lines in the main gzeditor script. Evidently there is one for decals.. And it works just by uncommenting the lines!

edit: [spoiler]
I fixed the position and size of this button, so here it is. Just replace the commented out ones in gzeditor script
CreateControl("Decals", "BUTTON")
      {
          ColorGroup("DEFAULT");
          Pos(458, 32);
          Size(72, 18);
          Font("SMALL");
          Text("Decals");
          Style("ROLLOVER", "RADIO");
          Value(10);
          UseVar("editor.mode");
      }

[/spoiler]
I have no idea what it will do ingame, or if it even works, but I just wanted to share this as the first piece of neato stuff that I expect to be posted here.

I hereby dedicate this topic to manipulating/modding (which I unfortunately found out wasn't a word..) the zero editor scripts for the better or for the fun.

Post your finds, there's all kinds of candy in the scripts..

edit-
More fun! It appears that ZE scripts (maybe even the whole editor..?) were definitely carried over from battlezone game editor. [spoiler=Source]// =================================
// BATTLEZONE EDITOR CAMERA CONTROLS
// =================================

//
// CREATE THE CAMERA CONTROL
//
CreateControl("EditCamera", "STATIC")
{..
Neato, right?[/spoiler]

Edit- What, still not interesting enough for you? How about this:

Holy nads thats cool, can you change up the scripts to make ZE a bit more user friendly?
"I would explain it to you but your head might explode."


Define "User Friendly."

It seems pretty gosh darn simple to me :P

Essentially, you could make it do whatever you want with the right scripting..

Decal node... :blink: Is it have any effect in game?
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:


I've done more examination and it appears the for the most part, the editor scripts are just basically GUI controllers (They just set up the GUI and get the real source from the EXE itself (dejavu), so you cannot really change too much about how the functions actually work (so I couldn't just make an edit mode that lets me save in a different format, even if I could program it to read it, it just doesn't have that door open for me to do so).

The brush size seems to have that particular limit, which is a tad unfortunate, but who needs a decal that big, right? :P

I cannot munge right now (I'll have to set up some things.. my Zero builder project deals with munge process and is incomplete, so I'll have to set up a separate playground for now..), but I'll try to get it up and tested later.

edit- Here is the script that sets up the scale for the decal [spoiler] CreateControl("X", "EDIT")
{
Pos(0, 12);
Size(28, 15);
Font("TINY");
Style("ROLLOVER");
Cursor("Highlight");
UseVar("editor.decal.scale.x");
}

//CreateControl("Y", "EDIT")
//{
// Pos(33, 12);
// Size(28, 15);
// Font("TINY");
// Style("ROLLOVER");
// Cursor("Highlight");
// UseVar("editor.decal.scale.y");
//}

CreateControl("Z", "EDIT")
{
Pos(33, 12);
Size(28, 15);
Font("TINY");
Style("ROLLOVER");
Cursor("Highlight");
UseVar("editor.decal.scale.z");
}
[/spoiler]
Looks like they got confused between Z and Y axis like I always do.. They added a function to scale the Y (gravity up and down in virtual world), which they commented out. Though I imagine it does not do much since decal is just a flat plain..

Just curious: what files, may content such scripts? Where do you find them? Are you use some special software or tools for editing them?
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

February 25, 2014, 12:59:32 PM #7 Last Edit: February 25, 2014, 01:07:03 PM by -RepublicCommando-
The scripts are in *.cfg format (not sure exactly what it is.. it's a really simple language)

They are found here: ..\BFBuilder\DataTEMPLATE\Editor\Data\Config\editor\ and in any project you've ever made with BFBuilder.

You can open a CFG with notepad or anything that edits text files.
--
I wish I could find some sort of CFG editor with syntax so I could see if I make mistakes or something when making my own..
--

gzeditor.CFG is the one I've modded the most, and it sort of loads up all the other scripts..

Heres mine if you want to take a look at what I've changed (this enables decals edit mode) [spoiler=gzeditor.cfg]//
// CREATE EDITOR MENU BAR
//

ConfigureVarSys()
{
    CreateInteger("editor.sky.range", 0);
    SetIntegerRange("editor.sky.range", 0, 10);
}

//Exec("swbf_license.cfg");

// Start File Control
CreateControl("EditLoadSave", "STATIC")
{
    Pos(0, 0);
    Size(88, 42);
    ColorGroup("INPUTBOX");
    CreateControl("FileTitle", "STATIC")
    {
        ColorGroup("INPUTBOX");
        Pos(4, 0);
        Size(90, 12);
        Font("SMALL");
        JustifyText("LEFT");
        Text("FILE:");
        Style("Transparent");
    }
    CreateControl("Load", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(4, 12);
        Size(38, 24);
        Font("SMALL");
        Text("Load");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "Load");
    }
    CreateControl("Save", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(46, 12);
        Size(38, 24);
        Font("SMALL");
        Text("Save");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "Save");
    }
    OnEvent("Load")
    {
        Cmd("editor.load");
    }
    OnEvent("Save")
    {
        Cmd("editor.save");
    }
}
// End File Control

// Start Global Show Filters
CreateControl("EditGlobalView", "STATIC")
{
    Pos(90, 0);
    Size(378, 42);
    ColorGroup("INPUTBOX");
    CreateControl("ShowMenuLabel", "STATIC")
    {
        ColorGroup("INPUTBOX");
        Pos(4, 0);
        Size(245, 12);
        Font("SMALL");
        Text("SHOW:");
        JustifyText("LEFT");
        Cursor("Highlight");
        Style("Transparent");
    }
    CreateControl("ShowObjects", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(5, 12);
        Size(64, 12);
        Font("SMALL");
        Text("Objects");
        Cursor("Highlight");
        Style("RADIO", "TOGGLE", "ROLLOVER");
        UseVar("game.render.geometry");
        Value(1);
    }
    CreateControl("ShowRegions", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(5, 26);
        Size(64, 12);
        Font("SMALL");
        Text("Regions");
        Cursor("Highlight");
        Style("RADIO", "TOGGLE", "ROLLOVER");
        UseVar("editor.showregions.value");
        Value(1);
    }
    CreateControl("ShowFoliage", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(71, 12);
        Size(70, 12);
        Font("SMALL");
        Text("Foliage");
        Cursor("Highlight");
        Style("RADIO", "TOGGLE", "ROLLOVER");
        UseVar("editor.showfoliage.value");
        Value(1);
    }
    CreateControl("ShowBarriers", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(71, 26);
        Size(70, 12);
        Font("SMALL");
        Text("Barriers");
        Cursor("Highlight");
        Style("RADIO", "TOGGLE", "ROLLOVER");
        UseVar("editor.showbarriers.value");
        Value(1);
    }
    CreateControl("ShowPaths", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(143, 12);
        Size(50, 12);
        Font("SMALL");
        Text("Paths");
        Cursor("Highlight");
        Style("RADIO", "TOGGLE", "ROLLOVER");
        UseVar("editor.showpaths.value");
        Value(1);
    }
    CreateControl("ShowPathPlan", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(143, 26);
        Size(50, 12);
        Font("SMALL");
        Text("Plans");
        Cursor("Highlight");
        Style("RADIO", "TOGGLE", "ROLLOVER");
        UseVar("editor.showpathplan.value");
        Value(1);
    }
    CreateControl("ShowHintNodes", "BUTTON")
    {
        Pos(195, 12);
        Size(78, 12);
        Font("SMALL");
        Text("HintNodes");
        Cursor("Highlight");
        Style("RADIO", "TOGGLE", "ROLLOVER");
        UseVar("editor.showhintnodes.value");
        Value(1);
    }
    CreateControl("ShowBoundaries", "BUTTON")
    {
        Pos(195, 26);
        Size(78, 12);
        Font("SMALL");
        Text("Boundary");
        Cursor("Highlight");
        Style("RADIO", "TOGGLE", "ROLLOVER");
        UseVar("editor.showboundaries.value");
        Value(1);
    }
    CreateControl("GroupSolidWire", "STATIC")
        {
            ColorGroup("BACKGROUND");
            Pos(274, 0);
            Size(80, 12);
            Font("SMALL");
            Style("Transparent");
            Cursor("Highlight");
            Text("TERRAIN VIEW:");
            JustifyText("LEFT");
            UseVar("editor.currentLayerName");
        }
        CreateControl("Solid", "BUTTON")
        {
            ColorGroup("DEFAULT");
            Pos(280, 12);
            Size(40, 12);
            Font("SMALL");
            Text("Solid");
            Cursor("Highlight");
            Style("ROLLOVER", "TOGGLE");
            UseVar("editor.showsolidterrain");
        }
        CreateControl("Wire", "BUTTON")
        {
            ColorGroup("DEFAULT");
            Pos(280, 26);
            Size(40, 12);
            Font("SMALL");
            Text("Wire");
            Cursor("Highlight");
            Style("ROLLOVER", "TOGGLE");
            UseVar("editor.showwireterrain");
            Value(1);
        }
        CreateControl("Height", "BUTTON")
        {
            ColorGroup("DEFAULT");
            Pos(325, 12);
            Size(49, 12);
            Font("SMALL");
            Text("Height");
            Cursor("Highlight");
            Style("ROLLOVER", "RADIO");
            UseVar("editor.wireframe");
            Value(2);
        }
        CreateControl("Color", "BUTTON")
        {
            ColorGroup("DEFAULT");
            Pos(325, 26);
            Size(49, 12);
            Font("SMALL");
            Text("Color");
            Cursor("Highlight");
            Style("ROLLOVER", "RADIO");
            UseVar("editor.wireframe");
            Value(3);
    }
}
// End Global Show Filters

// Start Change Layer
CreateControl("GlobalChangeLayer", "STATIC")
{
    Pos(470, 0);
    Size(368, 42);
    ColorGroup("INPUTBOX");
    CreateControl("CurrentLayerTitle", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(4, 0);
        Size(60, 12);
        Font("SMALL");
        JustifyText("LEFT");
        Text("Active Layer:");
        Style("Transparent");
    }
    CreateControl("CurrentLayerName", "STATIC")
    {
        ColorGroup("LISTBOX");
        Pos(75, 14);
        Size(285, 22);
        Font("SMALL");
        Style("Solid");
        Cursor("Highlight");
        JustifyText("LEFT");
        UseVar("editor.currentLayerName");
    }
    CreateControl("ShowLayers", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(4, 12);
        Size(67, 24);
        Font("SMALL");
        Text("CHANGE:");
        Cursor("Highlight");
        Style("RADIO", "TOGGLE", "ROLLOVER","OUTLINE");
        UseVar("editor.showlayers.value");
        Value(1);
    }
}
// End Change Layer

    //CreateControl("EditShowModes", "STATIC")
    //{
    //    Pos(140, 85);
    //    Size(225, 125);
    //    Image("zeroeditor-cursor.tga");
    //    ColorGroup("INPUTBOX");
    // Only in Solid mode, not very useful.
    //CreateControl("ShowTerrain", "BUTTON")
    //{
    //  Pos(5, 110);
    //  Size(75, 15);
    //  Font("SMALL");
    //  Text("Show Terrain");
    //  Cursor("Highlight");
    //  Style("RADIO", "TOGGLE", "ROLLOVER");
    //  UseVar("editor.showterrain.value");
    //  Value(1);
    //}
    //}

// Start Global Edit Undo Redo Control
CreateControl("EditCamera", "STATIC")
{
    Pos(0, 43);
    Size(88, 34);
    ColorGroup("INPUTBOX");
    CreateControl("GlobalEditTitle", "STATIC")
    {
        ColorGroup("INPUTBOX");
        Pos(4, 0);
        Size(84, 12);
        Font("SMALL");
        JustifyText("LEFT");
        Text("EDIT:");
        Style("Transparent");
    }
    CreateControl("Undo", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(4, 12);
        Size(38, 18);
        Font("SMALL");
        Text("Undo");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "Undo");
    }
    CreateControl("Redo", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(46, 12);
        Size(38, 18);
        Font("SMALL");
        Text("Redo");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "Redo");
    }
    OnEvent("Undo")
    {
        Cmd("editor.undo");
    }
    OnEvent("Redo")
    {
        Cmd("editor.redo");
    }
}
// End Global Edit Undo Redo Controls

// Start Edit Mode Bar Control
CreateControl("EditMenu", "STATIC")
{
    Pos(90, 43);
    Size(748, 34);
    ColorGroup("INPUTBOX");
    CreateControl("ModeMenuTitle", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(4, 0);
        Size(85, 12);
        Font("SMALL");
        Text("EDIT MODE:");
        Cursor("Highlight");
        Style("Transparent");
    }
    CreateControl("Height", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(5, 12);
        Size(53, 18);
        Font("SMALL");
        Text("Height");
        Style("ROLLOVER", "RADIO");
        Value(0);
        UseVar("editor.mode");
    }
    CreateControl("Color", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(61, 12);
        Size(49, 18);
        Font("SMALL");
        Text("Color");
        Style("ROLLOVER", "RADIO");
        Value(1);
        UseVar("editor.mode");
    }
    CreateControl("Texture", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(113, 12);
        Size(60, 18);
        Font("SMALL");
        Text("Texture");
        Style("ROLLOVER", "RADIO");
        Value(2);
        UseVar("editor.mode");
    }
    CreateControl("Water", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(176, 12);
        Size(48, 18);
        Font("SMALL");
        Text("Water");
        Style("ROLLOVER", "RADIO");
        Value(3);
        UseVar("editor.mode");
    }
    CreateControl("Foliage", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(227, 12);
        Size(57, 18);
        Font("SMALL");
        Text("Foliage");
        Style("ROLLOVER", "RADIO");
        Value(4);
        UseVar("editor.mode");
    }
    CreateControl("Object", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(287, 12);
        Size(56, 18);
        Font("SMALL");
        Text("Object");
        Style("ROLLOVER", "RADIO");
        Value(5);
        UseVar("editor.mode");
    }
    CreateControl("Path", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(346, 12);
        Size(42, 18);
        Font("SMALL");
        Text("Path");
        Style("ROLLOVER", "RADIO");
        Value(6);
        UseVar("editor.mode");
    }
    CreateControl("Regions", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(391, 12);
        Size(64, 18);
        Font("SMALL");
        Text("Regions");
        Style("ROLLOVER", "RADIO");
        Value(9);
        UseVar("editor.mode");
    }
    //
    // create the 'decals' editor button
    //
      CreateControl("Decals", "BUTTON")
      {
          ColorGroup("DEFAULT");
          Pos(458, 32);
          Size(72, 18);
          Font("SMALL");
          Text("Decals");
          Style("ROLLOVER", "RADIO");
         Value(10);
          UseVar("editor.mode");
      }
    CreateControl("HintNode", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(458, 12);
        Size(72, 18);
        Font("SMALL");
        Text("HintNode");
        Style("ROLLOVER", "RADIO");
        Value(11);
        UseVar("editor.mode");
    }
    CreateControl("Barrier", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(533, 12);
        Size(65, 18);
        Font("SMALL");
        Text("Barrier");
        Style("ROLLOVER", "RADIO");
        Value(12);
        UseVar("editor.mode");
    }
    CreateControl("PathPlanning", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(601, 12);
        Size(68, 18);
        Font("SMALL");
        Text("Planning");
        Style("ROLLOVER", "RADIO");
        Value(13);
        UseVar("editor.mode");
    }
    CreateControl("Boundary", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(672, 12);
        Size(72, 18);
        Font("SMALL");
        Text("Boundary");
        Style("ROLLOVER", "RADIO");
        Value(14);
        UseVar("editor.mode");
        //NotifyParent("Button::Press", "EditBoundary");
    }
    OnEvent("Control::Activate")
    {
        Cmd("editor.mode 0");
        Activate("|EditLoadSave");
        Activate("|EditGlobalView");
        Activate("|EditShowModes");
        Activate("|GlobalChangeLayer");
        Activate("|EditHeight");
        Activate("|EditCamera");
        Activate("|AdvancedControls");
        Activate("|EditVisRange");
    }
    OnEvent("Control::Deactivate")
    {
        Deactivate("|EditLoadSave");
        Deactivate("|EditShowModes");
        Deactivate("|EditCamera");
        Deactivate("|EditHeight");
        Deactivate("|EditColor");
        Deactivate("|EditTexture");
        Deactivate("|EditWater");
        Deactivate("|EditFoliage");
        Deactivate("|EditObject");
        Deactivate("|EditPath");
        Deactivate("|EditRegions");
        Deactivate("|EditGlobalView");
        Deactivate("|AdvancedCreateTerrain");
    }
}
// End Edit Mode Bar Controls
CreateControl("AdvancedControls", "STATIC")
{
    Pos(840, 0);
    Size(180, 42);
    ColorGroup("INPUTBOX");
    CreateControl("AdvancedTitle", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(4, 0);
        Size(60, 12);
        Font("SMALL");
        JustifyText("LEFT");
        Text("Advanced");
        Style("Transparent");
    }
    CreateControl("NewTerrain", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(4, 12);
        Size(55, 24);
        Font("SMALL");
        Text("Terrain");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "AdvTerrain");
    }
        OnEvent("AdvTerrain")
        {
           Cmd("iface.activate AdvancedCreateTerrain");
           Cmd("editor.getterrainsize");
        }
        OnEvent("Control::Deactivate")
        {

        }
    CreateControl("AdvCamera", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(65, 12);
        Size(55, 24);
        Font("SMALL");
        Text("Camera");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "AdvCamera");
    }
        OnEvent("AdvCamera")
        {
            Cmd("iface.activate AdvancedCamera");
        }

    CreateControl("AdvImage", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(126, 12);
        Size(50, 24);
        Font("SMALL");
        Text("Image");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "AdvImage");
    }
        OnEvent("AdvImage")
        {
            Cmd("iface.activate AdvancedImage");
        }

}
CreateControl("AdvancedCreateTerrain", "STATIC")
{
    Pos(0, 0);
    Size(300, 200);
    ColorGroup("INPUTBOX");
    Geom("HCENTRE", "VCENTRE");
    STYLE("MODAL");
    CreateControl("NewTerrainPropsTitle", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(4, 2);
        Size(298, 12);
        Font("SMALL");
        JustifyText("VCENTRE");
        Text("TERRAIN PROPERTIES");
        Style("Transparent");
    }
    CreateControl("CurrentWidthTitle", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(155, 24);
        Size(55, 12);
        Font("SMALL");
        JustifyText("VCENTRE");
        Text("Width:");
        Style("Transparent");
    }
    CreateControl("CurrentDepthTitle", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(215, 24);
        Size(55, 12);
        Font("SMALL");
        JustifyText("VCENTRE");
        Text("Depth:");
        Style("Transparent");
    }
    CreateControl("CurrentTerrainSize", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(4, 38);
        Size(60, 12);
        Font("SMALL");
        JustifyText("LEFT");
        Text("Current Terrain Size:");
        Style("Transparent");
    }
    CreateControl("CurrentTerrainSizeValues", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(155, 38);
        Size(55, 12);
        Font("SMALL");
        JustifyText("VCENTRE");
        Style("Transparent");
        UseVar("editor.current_height");
    }
    CreateControl("CurrentTerrainSizeValues2", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(215, 38);
        Size(60, 12);
        Font("SMALL");
        JustifyText("VCENTRE");
        Style("Transparent");
        UseVar("editor.current_width");
    }
   CreateControl("CreateTerrainSize", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(32, 54);
        Size(60, 12);
        Font("SMALL");
        JustifyText("LEFT");
        Text("New Terrain Size:");
        Style("Transparent");
    }
    CreateControl("TerrainSizex", "EDIT")
    {
        ColorGroup("INPUTBOX2");
        Pos(155, 54);
        Size(55, 14);
        Font("SMALL");
        JustifyText("VCENTRE");
        Style("ROLLOVER");
        Cursor("Highlight");
        UseVar("editor.new_height");
    }
    CreateControl("TerrainSizey", "EDIT")
    {
        ColorGroup("INPUTBOX2");
        Pos(215, 54);
        Size(55, 14);
        Font("SMALL");
        JustifyText("VCENTRE");
        Style("ROLLOVER");
        Cursor("Highlight");
        UseVar("editor.new_width");
    }
    CreateControl("Warning", "STATIC")
    {
        ColorGroup("WARNING");
        Pos(4, 74);
        Size(300, 12);
        Font("LARGE");
        JustifyText("VCENTER");
        Text("W A R N I N G !");
        Style("Transparent");
    }
    CreateControl("Warning2", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(4, 86);
        Size(300, 12);
        Font("MEDIUM");
        JustifyText("VCENTER");
        Text("CREATING A NEW TERRAIN WILL");
        Style("Transparent");
    }
    CreateControl("Warning3", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(4, 100);
        Size(300, 12);
        Font("MEDIUM");
        JustifyText("VCENTER");
        Text("ERASE THE CURRENT TERRAIN AND");
        Style("Transparent");
    }
    CreateControl("Warning4", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(4, 114);
        Size(300, 12);
        Font("MEDIUM");
        JustifyText("VCENTER");
        Text("MAY MOVE EXISTING OBJECTS");
        Style("Transparent");
    }
    CreateControl("CreateTerrain", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(80, 144);
        Size(140, 20);
        Font("SMALL");
        Text("Create New Terrain");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "CreateTerrain");
    }
    CreateControl("CancelTerrain", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(80, 175);
        Size(140, 20);
        Font("SMALL");
        Text("Cancel");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "CancelTerrain");
    }
    OnEvent("CreateTerrain")
    {
        Cmd("iface.activate");
        Cmd("editor.new_width.value");
        Cmd("editor.new_height.value");
        Cmd("editor.new");
        Cmd("editor.showgrid");
       // Cmd("editor.mode 2");
        Cmd("editor.wireframe 1");
        Cmd("camera.setposition 0 6 0");
        Cmd("sky.visibilityRange 2700");
        Cmd("sky.FogRange 2699 2800");
        Cmd("editor.texture.texture wipe_black.tga");
        Deactivate("|AdvancedCreateTerrain");
    }
    OnEvent("CancelTerrain")
    {
        Deactivate("|AdvancedCreateTerrain");
    }
    OnEvent("Control::Activate")
    {
        //Deactivate("|AdvancedControls");
        Deactivate("|CancelTerrain");
    }
    OnEvent("Control::Deactivate")
    {
        Activate("|AdvancedControls");
    }
}

CreateControl("AdvancedCamera", "STATIC")
{
    Pos(0, 0);
    Size(300, 120);
    ColorGroup("INPUTBOX");
    Geom("HCENTRE", "VCENTRE");
    STYLE("MODAL");
    CreateControl("AdvCameraTitle", "STATIC")
    {
        ColorGroup("INPUTBOX");
        Pos(2, 0);
        Size(290, 12);
        Font("SMALL");
        Text("Advanced Camera Controls:");
        Style("TRANSPARENT");
    }
    CreateControl("RangeTitle", "STATIC")
    {
        ColorGroup("INPUTBOX");
        Pos(2, 18);
        Size(90, 12);
        Font("SMALL");
        JustifyText("LEFT");
        Text("Visibility Range:");
        Style("TRANSPARENT");
    }
    CreateControl("vrange", "EDIT")
    {
        ColorGroup("INPUTBOX2");
        Pos(120, 16);
        Size(55, 15);
        Font("SMALL");
        JustifyText("LEFT");
        Style("ROLLOVER");
        Cursor("Highlight");
        UseVar("sky.visibilityRange");
    }
    CreateControl("FogRangeTitle", "STATIC")
    {
        ColorGroup("INPUTBOX");
        Pos(39, 50);
        Size(70, 12);
        Font("SMALL");
        JustifyText("LEFT");
        Text("Fog Range:");
        Style("TRANSPARENT");
    }
    CreateControl("FogRangeTitle", "STATIC")
    {
        ColorGroup("INPUTBOX");
        Pos(125, 36);
        Size(35, 12);
        Font("SMALL");
        JustifyText("LEFT");
        Text("Min");
        Style("TRANSPARENT");
    }
    CreateControl("FogRangeTitle", "STATIC")
    {
        ColorGroup("INPUTBOX");
        Pos(185, 36);
        Size(35, 12);
        Font("SMALL");
        JustifyText("LEFT");
        Text("Max");
        Style("TRANSPARENT");
    }
    CreateControl("fograngeMin", "EDIT")
    {
        ColorGroup("INPUTBOX2");
        Pos(120, 48);
        Size(55, 15);
        Font("SMALL");
        JustifyText("LEFT");
        Style("ROLLOVER");
        Cursor("Highlight");
        UseVar("sky.FogStart");
    }
    CreateControl("fograngeMax", "EDIT")
    {
        ColorGroup("INPUTBOX2");
        Pos(180, 48);
        Size(55, 15);
        Font("SMALL");
        JustifyText("LEFT");
        Style("ROLLOVER");
        Cursor("Highlight");
        UseVar("sky.FogEnd");
    }
     CreateControl("TopDown", "BUTTON")
        {
            ColorGroup("DEFAULT");
            Pos(75, 70);
            Size(150, 20);
            Font("SMALL");
            Text("Set Top Down View");
            Style("ROLLOVER");
            NotifyParent("Button::Press", "TopDownView");
        }
        OnEvent("TopDownView")
        {
            Cmd("camera.settopview");
    }
    CreateControl("CancelTerrain", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(120, 94);
        Size(50, 20);
        Font("SMALL");
        Text("Close");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "CancelCamera");
    }
    OnEvent("CancelCamera")
    {
            Deactivate("|AdvancedCamera");
    }
}

CreateControl("AdvancedImage", "STATIC")
{
    Pos(0, 0);
    Size(200, 110);
    ColorGroup("INPUTBOX");
    Geom("HCENTRE", "VCENTRE");
    STYLE("MODAL");
    CreateControl("AdvImageTitle", "STATIC")
    {
        ColorGroup("INPUTBOX");
        Pos(2, 0);
        Size(198, 12);
        Font("SMALL");
        Text("Advanced Image Controls:");
        Style("TRANSPARENT");
    }
    CreateControl("BurnTerrain", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(40, 18);
        Size(120, 16);
        Font("SMALL");
        Text("Burn Terrain");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "BurnTerrain");
    }
    OnEvent("BurnTerrain")
    {
        Cmd("editor.light.terrain.fullblur");
    }

    CreateControl("SaveHiresmap", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(40, 38);
        Size(120, 16);
        Font("SMALL");
        Text("Save HiRes Map");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "SaveHires");
    }
    OnEvent("SaveHires")
    {
        Cmd("editor.savehiresmap 4096 4096");
    }
    CreateControl("SaveHeightmap", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(40, 58);
        Size(120, 16);
        Font("SMALL");
        Text("Save HeightMap");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "SaveHeightMap");
    }
    OnEvent("SaveHeightMap")
    {
            Cmd("editor.saveheightmap 4096 4096");
    }
    CreateControl("CancelImage", "BUTTON")
    {
        ColorGroup("DEFAULT");
        Pos(75, 78);
        Size(50, 20);
        Font("SMALL");
        Text("Close");
        Style("ROLLOVER");
        NotifyParent("Button::Press", "CancelImage");
    }
    OnEvent("CancelImage")
    {
            Deactivate("|AdvancedImage");
    }

}


CreateControl("EditVisRange", "STATIC")
{
    Pos(840, 43);
    Size(180, 34);
    ColorGroup("INPUTBOX");
    CreateControl("VisRangeTitle", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(0, 3);
        Size(75, 10);
        Font("SMALL");
        Text("Visibility:");
        Style("TRANSPARENT");
    }
    CreateControl("VisRangeMinus", "STATIC")
    {
        ColorGroup("BACKGROUND");
        Pos(3, 18);
        Size(20, 10);
        Font("LARGE");
        Text("-");
        Style("TRANSPARENT");
    }
    CreateControl("Range1", "BUTTON")
    {
        Pos(22, 18);
        Size(10, 12);
        Font("SMALL");
        Text("128");
        Style("ROLLOVER", "RADIO");
        Value(1);
        UseVar("editor.sky.range");
        NotifyParent("Button::Select", "Range1");
        }
    OnEvent("Range1")
        {
        Cmd("sky.visibilityrange 500");
        Cmd("sky.fogrange 499 502");
        }

    CreateControl("Range2", "BUTTON")
        {

        Pos(36, 18);
        Size(10, 12);
        Font("SMALL");
        Text("256");
        Style("ROLLOVER", "RADIO");
        Value(2);
        UseVar("editor.sky.range");
        NotifyParent("Button::Select", "Range2");
        }
    OnEvent("Range2")
        {
        Cmd("sky.visibilityrange 1000");
        Cmd("sky.fogrange 999 1002");
        }

    CreateControl("Range3", "BUTTON")
        {

        Pos(50, 18);
        Size(10, 12);
        Font("SMALL");
        Text("512");
        Style("ROLLOVER", "RADIO");
        Value(3);
        UseVar("editor.sky.range");
        NotifyParent("Button::Select", "Range3");
        }
    OnEvent("Range3")
        {
        Cmd("sky.visibilityrange 1500");
        Cmd("sky.fogrange 1499 1502");
        }

    CreateControl("Range4", "BUTTON")
        {

        Pos(64, 18);
        Size(10, 12);
        Font("SMALL");
        Text("768");
        Style("ROLLOVER", "RADIO");
        Value(4);
        UseVar("editor.sky.range");
        NotifyParent("Button::Select", "Range4");
        }
    OnEvent("Range4")
        {
        Cmd("sky.visibilityRange 2000");
        Cmd("sky.fogrange 1999 2002");
        }

    CreateControl("Range5", "BUTTON")
        {

        Pos(78, 18);
        Size(10, 12);
        Font("SMALL");
        Text("1024");
        Style("ROLLOVER", "RADIO");
        Value(5);
        UseVar("editor.sky.range");
        NotifyParent("Button::Select", "Range5");
        }
    OnEvent("Range5")
        {
        Cmd("sky.visibilityrange 2500");
        Cmd("sky.fogrange 2499 2502");
        }
CreateControl("Range6", "BUTTON")
        {

        Pos(92, 18);
        Size(10, 12);
        Font("SMALL");
        Text("1024");
        Style("ROLLOVER", "RADIO");
        Value(6);
        UseVar("editor.sky.range");
        NotifyParent("Button::Select", "Range6");
        }
    OnEvent("Range6")
        {
        Cmd("sky.visibilityrange 3000");
        Cmd("sky.fogrange 2999 3002");
        }
         CreateControl("Range7", "BUTTON")
                {

                Pos(106, 18);
                Size(10, 12);
                Font("SMALL");
                Text("1024");
                Style("ROLLOVER", "RADIO");
                Value(7);
                UseVar("editor.sky.range");
                NotifyParent("Button::Select", "Range7");
                }
            OnEvent("Range7")
                {
                Cmd("sky.visibilityrange 3500");
                Cmd("sky.fogrange 3499 3502");
        }
         CreateControl("Range8", "BUTTON")
                {

                Pos(120, 18);
                Size(10, 12);
                Font("SMALL");
                Text("1024");
                Style("ROLLOVER", "RADIO");
                Value(8);
                UseVar("editor.sky.range");
                NotifyParent("Button::Select", "Range8");
                }
            OnEvent("Range8")
                {
                Cmd("sky.visibilityrange 4000");
                Cmd("sky.fogrange 3999 4002");
        }
         CreateControl("Range9", "BUTTON")
                {

                Pos(134, 18);
                Size(10, 12);
                Font("SMALL");
                Text("1024");
                Style("ROLLOVER", "RADIO");
                Value(9);
                UseVar("editor.sky.range");
                NotifyParent("Button::Select", "Range9");
                }
            OnEvent("Range9")
                {
                Cmd("sky.visibilityrange 4500");
                Cmd("sky.fogrange 4499 4502");
        }
         CreateControl("Range10", "BUTTON")
                {

                Pos(148, 18);
                Size(10, 12);
                Font("SMALL");
                Text("");
                Style("ROLLOVER", "RADIO");
                Value(10);
                UseVar("editor.sky.range");
                NotifyParent("Button::Select", "Range10");
                }
            OnEvent("Range10")
                {
                Cmd("sky.visibilityrange 5000");
                Cmd("sky.fogrange 4999 5002");
        }
        CreateControl("VisRangePlus", "STATIC")
            {
                ColorGroup("BACKGROUND");
                Pos(160, 18);
                Size(20, 10);
                Font("SMALL");
                Text("+");
                Style("TRANSPARENT");
    }
}
[/spoiler]

February 25, 2014, 01:11:45 PM #8 Last Edit: February 25, 2014, 01:21:14 PM by tirpider
cfg is just a customary file extension that's been used for years.
Typically it would just be a text config file, with settings and such.
In this case, it looks like they are just definitions for setting up the GUI in ZeroEdit.

As for what language..
I'm going to guess it's a variant of whatever scripting language was part of Zero when they started making it into a level editor.

You could look for other games that used Zero and see if or how they were scripted, but I am going to bet that most everything in our version was built exclusively for it.
The cfg files were probably made by the person in charge of setting up the editor and he probably didn't make a handbook.

You're probably on your own as far as figuring out what everything does or what their extents are.

-edit
Perhaps it's more than just the GUI.
input/input_common_alt.cfg is pretty interesting.

Quote from: tirpider on February 25, 2014, 01:11:45 PM
Perhaps it's more than just the GUI.
input/input_common_alt.cfg is pretty interesting.
Mmm, nice find..
I wonder if it actually gets used in the munges, it would be sweet to see what you could accomplish with it (maybe even see if shift + W throttles even faster.. Maybe see if BF2 Mod tools have that command line(s) and just stick it in and see what happens :P Totally dreaming)

February 25, 2014, 02:23:52 PM #10 Last Edit: February 25, 2014, 03:00:24 PM by MileHighGuy
Thanks RC. Is there a way I can change the blend tool brush size? That is what is interesting me the most.

EDIT: height blend, just to clarify

I think all those cfg's are for ZeroEdit only.
Affecting ZeroEdit's behavior, not the edited level.

February 25, 2014, 02:42:00 PM #12 Last Edit: February 25, 2014, 02:48:54 PM by -RepublicCommando-
Quote from: tirpider on February 25, 2014, 02:40:15 PM
I think all those cfg's are for ZeroEdit only.
Affecting ZeroEdit's behavior, not the edited level.
Ah well.. Swing at every ball I guess -_-
--
Not sure about the blend (I didn't know it had one.. actually), Ima play with it a bit and see what I can do.

Im also going to take a stab and say that *.DCL is the file zero edit stores decals in..

Idea Burst: could you code ZE to be on Mac?
"I would explain it to you but your head might explode."


You could create an application that functions just like ZE on a scripting language that can export to Mac (and or windows), sure (Infact I am hoping to accomplish this after I finish my Zero Builder project that replaces BFBuilder).

But as far as just "converting" it over, I am highly skeptical.. And if you could, I'd deem you a genius.. Or just a guy with too much time on his hands.

edit- On the other hand, you might be able to run zero edit executable in an Windows emulator for a mac OS.. Depends on how flexible zero editor really is.