Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: Red Spot on April 30, 2009, 02:52:43 PM

Title: F11 and F12 keys
Post by: Red Spot on April 30, 2009, 02:52:43 PM
Is it at all possible to use these? I was under the impression you could set them up but eventhough I have it doesnt seem to work.
This is in 1.3ta5.

What I'm using:
bzgame_keys.cfg:
// Group toggle
Bind("-shift -ctrl F1", "control.group.toggle1");
Bind("-shift -ctrl F2", "control.group.toggle2");
Bind("-shift -ctrl F3", "control.group.toggle3");
Bind("-shift -ctrl F4", "control.group.toggle4");
Bind("-shift -ctrl F5", "control.group.toggle5");
Bind("-shift -ctrl F6", "control.group.toggle6");
Bind("-shift -ctrl F7", "control.group.toggle7");
Bind("-shift -ctrl F8", "control.group.toggle8");
Bind("-shift -ctrl F9", "control.group.toggle9");
Bind("-shift -ctrl F10", "control.group.toggle10");
// RS-V: Added use of the F11 and F12 keys
Bind("-shift -ctrl F11", "control.group.toggle11");
Bind("-shift -ctrl F12", "control.group.toggle12");

// Group move
Bind("-shift +ctrl F1", "control.group.move1");
Bind("-shift +ctrl F2", "control.group.move2");
Bind("-shift +ctrl F3", "control.group.move3");
Bind("-shift +ctrl F4", "control.group.move4");
Bind("-shift +ctrl F5", "control.group.move5");
Bind("-shift +ctrl F6", "control.group.move6");
Bind("-shift +ctrl F7", "control.group.move7");
Bind("-shift +ctrl F8", "control.group.move8");
Bind("-shift +ctrl F9", "control.group.move9");
Bind("-shift +ctrl F10", "control.group.move10");
// RS-V: added use of the F11 and K12 keys
Bind("-shift +ctrl F11", "control.group.move11");
Bind("-shift +ctrl F12", "control.group.move12");



bzgame_group.cfg:
// ======================
// BATTLEZONE GROUP PANEL
// ======================

// DEFINE CONTROLS
ConfigureInterface()
{
// group panel button
DefineControlType("GroupPanelButton", "BUTTON")
{
Size(38, 54);
Style("TRANSPARENT", "ROLLOVER", "TOGGLE");
}

// group panel button label
DefineControlType("GroupPanelButtonLabel", "BUTTON")
{
Pos(0, 0);
Size(38, 13);
Image("colorize.tga", 89, 17);
Font("MEDIUM");
Style("INERT", "ROLLOVER", "TOGGLE");
}

// group panel button health/build light
DefineControlType("GroupPanelButtonLight", "STATIC")
{
ColorGroup("WHITE");
Size(2, 5);
}

// group panel button back
DefineControlType("GroupPanelButtonBack", "BUTTON")
{
ColorGroup("GROUPBACK");
Pos(0, 13);
Size(38, 41);
Image("colorize.tga", 89, 30);
Style("INERT", "ROLLOVER", "TOGGLE");

CreateControl("Icon", "STATIC")
{
ColorGroup("GROUPICON");
Pos(3, 0);
Size(32, 32);
}

CreateControl("Light1", "GroupPanelButtonLight")
{
Geom("HINTERNAL", "BOTTOM");
Align("<Icon");
Pos(1, 1);
}

CreateControl("Light2", "GroupPanelButtonLight")
{
Geom("RIGHT", "VINTERNAL");
Align("<Light1");
Pos(1, 0);
}

CreateControl("Light3", "GroupPanelButtonLight")
{
Geom("RIGHT", "VINTERNAL");
Align("<Light2");
Pos(1, 0);
}

CreateControl("Light4", "GroupPanelButtonLight")
{
Geom("RIGHT", "VINTERNAL");
Align("<Light3");
Pos(1, 0);
}

CreateControl("Light5", "GroupPanelButtonLight")
{
Geom("RIGHT", "VINTERNAL");
Align("<Light4");
Pos(1, 0);
}

CreateControl("Light6", "GroupPanelButtonLight")
{
Geom("RIGHT", "VINTERNAL");
Align("<Light5");
Pos(1, 0);
}

CreateControl("Light7", "GroupPanelButtonLight")
{
Geom("RIGHT", "VINTERNAL");
Align("<Light6");
Pos(1, 0);
}

CreateControl("Light8", "GroupPanelButtonLight")
{
Geom("RIGHT", "VINTERNAL");
Align("<Light7");
Pos(1, 0);
}

CreateControl("Light9", "GroupPanelButtonLight")
{
Geom("RIGHT", "VINTERNAL");
Align("<Light8");
Pos(1, 0);
}

CreateControl("Light10", "GroupPanelButtonLight")
{
Geom("RIGHT", "VINTERNAL");
Align("<Light9");
Pos(1, 0);
}
}

// group panel button fill gauge
DefineControlType("GroupPanelButtonFill", "SQUAREGAUGE")
{
ColorGroup("DEFAULT");
Pos(3, 0);
Size(32, 32);
}
}


//
// CREATE GROUP PANEL
//
CreateControl("GroupPanel", "WINDOW")
{
Geom("RIGHT", "VINTERNAL");
Align("<BasePanel");
Pos(5, 0);
Size(478, 54); // 398, 54
Style("TRANSPARENT", "INERT");

CreateControl("Group1", "GroupPanelButton")
{
Pos(0, 0);
UseVar("control.group.select1");

NotifyParent("Button::Select", "Toggle1");
NotifyParent("Button::Deselect", "Toggle1");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F1");
UseVar("control.group.select1");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select1");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build1");
}
}
}

OnEvent("Toggle1")
{
Cmd("control.group.toggle1");
}

CreateControl("Group2", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group1");
Pos(2, 0);
UseVar("control.group.select2");

NotifyParent("Button::Select", "Toggle2");
NotifyParent("Button::Deselect", "Toggle2");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F2");
UseVar("control.group.select2");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select2");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build2");
}
}
}

OnEvent("Toggle2")
{
Cmd("control.group.toggle2");
}

CreateControl("Group3", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group2");
Pos(2, 0);
UseVar("control.group.select3");

NotifyParent("Button::Select", "Toggle3");
NotifyParent("Button::Deselect", "Toggle3");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F3");
UseVar("control.group.select3");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select3");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build3");
}
}
}

OnEvent("Toggle3")
{
Cmd("control.group.toggle3");
}

CreateControl("Group4", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group3");
Pos(2, 0);
UseVar("control.group.select4");

NotifyParent("Button::Select", "Toggle4");
NotifyParent("Button::Deselect", "Toggle4");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F4");
UseVar("control.group.select4");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select4");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build4");
}
}
}

OnEvent("Toggle4")
{
Cmd("control.group.toggle4");
}

CreateControl("Group5", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group4");
Pos(2, 0);
UseVar("control.group.select5");

NotifyParent("Button::Select", "Toggle5");
NotifyParent("Button::Deselect", "Toggle5");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F5");
UseVar("control.group.select5");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select5");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build5");
}
}
}

OnEvent("Toggle5")
{
Cmd("control.group.toggle5");
}

CreateControl("Group6", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group5");
Pos(2, 0);
UseVar("control.group.select6");

NotifyParent("Button::Select", "Toggle6");
NotifyParent("Button::Deselect", "Toggle6");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F6");
UseVar("control.group.select6");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select6");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build6");
}
}
}

OnEvent("Toggle6")
{
Cmd("control.group.toggle6");
}

CreateControl("Group7", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group6");
Pos(2, 0);
UseVar("control.group.select7");

NotifyParent("Button::Select", "Toggle7");
NotifyParent("Button::Deselect", "Toggle7");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F7");
UseVar("control.group.select7");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select7");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build7");
}
}
}

OnEvent("Toggle7")
{
Cmd("control.group.toggle7");
}

CreateControl("Group8", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group7");
Pos(2, 0);
UseVar("control.group.select8");

NotifyParent("Button::Select", "Toggle8");
NotifyParent("Button::Deselect", "Toggle8");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F8");
UseVar("control.group.select8");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select8");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build8");
}
}
}

OnEvent("Toggle8")
{
Cmd("control.group.toggle8");
}

CreateControl("Group9", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group8");
Pos(2, 0);
UseVar("control.group.select9");

NotifyParent("Button::Select", "Toggle9");
NotifyParent("Button::Deselect", "Toggle9");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F9");
UseVar("control.group.select9");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select9");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build9");
}
}
}

OnEvent("Toggle9")
{
Cmd("control.group.toggle9");
}

CreateControl("Group10", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group9");
Pos(2, 0);
UseVar("control.group.select10");

NotifyParent("Button::Select", "Toggle10");
NotifyParent("Button::Deselect", "Toggle10");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F10");
UseVar("control.group.select10");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select10");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build10");
}
}
}

OnEvent("Toggle10")
{
Cmd("control.group.toggle10");
}

CreateControl("Group11", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group10");
Pos(2, 0);
UseVar("control.group.select11");

NotifyParent("Button::Select", "Toggle11");
NotifyParent("Button::Deselect", "Toggle11");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F11");
UseVar("control.group.select11");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select11");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build11");
}
}
}

OnEvent("Toggle11")
{
Cmd("control.group.toggle11");
}

CreateControl("Group12", "GroupPanelButton")
{
Geom("RIGHT", "VINTERNAL");
Align("<Group11");
Pos(2, 0);
UseVar("control.group.select12");

NotifyParent("Button::Select", "Toggle12");
NotifyParent("Button::Deselect", "Toggle12");

CreateControl("Label", "GroupPanelButtonLabel")
{
Text("F12");
UseVar("control.group.select12");
}

CreateControl("Back", "GroupPanelButtonBack")
{
UseVar("control.group.select12");

CreateControl("Fill", "GroupPanelButtonFill")
{
UseVar("control.group.build12");
}
}
}

OnEvent("Toggle12")
{
Cmd("control.group.toggle12");
}
}
Title: Re: F11 and F12 keys
Post by: General BlackDragon on April 30, 2009, 02:53:12 PM
short answer: no.

The game isn't hardcoded to recognize groups past 10.

also the base panel only has 9 slots.

While the game could use the KEYS, there is no such thing as "control.group.toggle11" or "control.group.toggle12"

You could assign F12 to something like iface.screenshot, or something like that, but it has to be an existing command.

To view all commands, both ingame and in shell, go to console and type "ls" and explore the various paths it shows. *note, ingame i recommend using a shell resolution of 1024 or greater to see the entire list.
Title: Re: F11 and F12 keys
Post by: Red Spot on April 30, 2009, 02:56:35 PM
Thanks, I assumed as I could extend the basepanel I would be able to do the same for the groups. Somewhere I remember I did once for 1.2 (or perhaps already failed before ....)
Title: Re: F11 and F12 keys
Post by: General BlackDragon on April 30, 2009, 03:02:26 PM
If you read the 1.3 changelogs there is some mention of enabling the base panels to go up to 9.

Everything is in the changelog, :)
Title: Re: F11 and F12 keys
Post by: Nielk1 on April 30, 2009, 03:15:22 PM
// Full team toggle - TV mod

Bind("-shift -ctrl F12", "control.team.toggle1");
Bind("-shift -ctrl F12", "control.team.toggle2");
Bind("-shift -ctrl F12", "control.team.toggle3");


Bind("-shift -ctrl F11", "control.team.toggle2");
Bind("-shift -ctrl F11", "control.team.toggle3");
Title: Re: F11 and F12 keys
Post by: Red Spot on April 30, 2009, 03:15:42 PM
Quote from: General BlackDragon on April 30, 2009, 03:02:26 PM
If you read the 1.3 changelogs there is some mention of enabling the base panels to go up to 9.

Everything is in the changelog, :)

lol, I can tell you exactly where it is in the changelogs as I needed it to check wich teamslot I needed to override for the 2nd servicebay, just search for "CategoryTypeOverride" :)
(I have a folder with all changelogs in there and just use the windows search function to search through all files at once, its my first source of information :))

I meant it more as in if I add the F11 and F12 keys to bzgame_keys.cfg file than the only tweak should be the same as I need to do to get the extra base icons to show up .. or thats what I assumed ..
Title: Re: F11 and F12 keys
Post by: Red Spot on April 30, 2009, 03:16:54 PM
Quote from: Nielk1 on April 30, 2009, 03:15:22 PM
// Full team toggle - TV mod

Bind("-shift -ctrl F12", "control.team.toggle1");
Bind("-shift -ctrl F12", "control.team.toggle2");
Bind("-shift -ctrl F12", "control.team.toggle3");


Bind("-shift -ctrl F11", "control.team.toggle2");
Bind("-shift -ctrl F11", "control.team.toggle3");


I have put that under the "0" and "9" keys, as TV I also have Dutchboys Newkeys :D

edit: my controls use the numbered keys a bit more:
Bind("-shift -ctrl 7", "network.chateditline '/chatteam';network.chatline.entered");
Bind("-shift -ctrl 8", "network.chateditline '/chatall';network.chatline.entered");
Title: Re: F11 and F12 keys
Post by: Nielk1 on April 30, 2009, 03:21:03 PM
?!?!
U NEED numbers 1,2,3,4,5,6,7,8,9,0 all clear for menu use?
Title: Re: F11 and F12 keys
Post by: Red Spot on April 30, 2009, 03:22:15 PM
Why so? Only if you have some building under it, afaik.


edit: do note this hasnt been fully tested yet, I was just in the process of doing that ... perhaps you are still correct :)
Title: Re: F11 and F12 keys
Post by: Red Spot on April 30, 2009, 05:43:40 PM
Quote from: Nielk1 on April 30, 2009, 03:21:03 PM
?!?!
U NEED numbers 1,2,3,4,5,6,7,8,9,0 all clear for menu use?

Seems you need :)
The keys do work, but they dont stop working when you want to select 1 unit from a group, so with the keys I added if you select unit #7 from a group it also switches to teamchat ... so it seems I have to come up with something else thats easy to reach (or just accept that the keys have 2 functions in one ... :D)
Title: Re: F11 and F12 keys
Post by: Power Board on May 01, 2009, 10:58:06 AM
Just a short question,
I have a keyboard with G1, G2, G3, G4, G5, etc. Am i able to configure BZ2 to use those keys as well as the function keys?
Title: Re: F11 and F12 keys
Post by: AHadley on May 01, 2009, 04:05:03 PM
I would imagine so, but you can't configure them to work in the same way and you'll have to bind them to different functions.
Title: Re: F11 and F12 keys
Post by: Red Spot on May 01, 2009, 08:39:17 PM
Quote from: Power Board on May 01, 2009, 10:58:06 AM
Just a short question,
I have a keyboard with G1, G2, G3, G4, G5, etc. Am i able to configure BZ2 to use those keys as well as the function keys?

Have you actually tried?

The first post shows exactly where and what you can edit to get the G-keys to work as F-keys, and yes you can assign 2 keys to same function.
If you cant do it from the menu than you can edit the "bzinput_*" files, like the one for the mouse:
// BATTLEZONE 2 INPUT MAP
// (MOUSE-SPECIFIC CONTROLS)

// read the common controls
Exec("bzinput_common.cfg");

// bind mouse-specific controls
BindAnalog("steer", "MouseX");
BindAnalog("pitch", "MouseY");
BindDiscrete("weapon_fire", "Mouse1");
BindDiscrete("weapon_special", "Mouse3");
BindDiscrete("weapon_next", "WheelDown");
BindDiscrete("weapon_toggle", "Mouse1"); // (only used during weapon_link)


Changed the weapon_next button to the scollbutton on the mouse and in the "bzinput_commen" file made the mouse2 button for targetting, makes it a bit easier to configure things if you have a few installs running. :) (though you could also just copy over the userprefs file)