[SCRIPT] Group Combat Hotkeys

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

[SCRIPT] Group Combat Hotkeys

Post by moggy2 » Tue, 3. Oct 06, 19:20

[Readme] . [Download]

Script: Group Combat Hotkeys
Author: Xai Corporation
Download: http://www.xai-corp.net/project/XaiCorp-ghk
  • This is an add on for the Group Management System

    This script defines new hotkeys to give orders to groups as defined by the Group Management System from Xai Corporation. The new hotkeys allow you to give orders to group leaders without going through their command menus.

    The hotkeys are devided into 2 groups. The first group allow you to select which group you wish to give orders to. The second group of hotkeys are the orders. These are given to the group selected by the first group of hotkeys.

    As an example, to order a group of ships, defined as group 3 by the Group Management System, the order to attack my target. You first press the hotkey defined for ''Select Group 3'' then you press the hotkey defined for ''Group attack my Target''.


    The Hotkeys
    • GHK: Select Group 1
    • GHK: Select Group 2
    • GHK: Select Group 3
    • GHK: Select Group 4
    • GHK: Select Group 5
    • GHK: Select Group 6
    • GHK: Group: Attack All
    • GHK: Group: Attack My Target
    • GHK: Group: Protect Me
    • GHK: Group: Protect My Target
    • GHK: Group: Hold Position
    • GHK: Group: Return Home
    • GHK: Group: Dock At...
    • GHK: Group: Launch Missiles
    • GHK: Wingmen: Launch Missiles
Version 2
This describes the new version of Group Hotkeys. The Hotkeys have completely changed from version 1. When upgrading from version 1 your old keybindings will be lost.
Last edited by moggy2 on Tue, 30. Sep 08, 16:36, edited 3 times in total.

RogerL
Posts: 398
Joined: Wed, 6. Nov 02, 20:31
x4

Post by RogerL » Fri, 8. Dec 06, 11:09

How does command hold position work? I supposed it was going to make fleets standby, but really doesn't do anything for me.

Besides this problem I must say, wonderful collection of scripts all these group managment stuff :) Just wish they fixed my fleets mass suicide while trying to dock sometimes, but that's not scriptable I guess :)

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Fri, 8. Dec 06, 11:15

May I suggest addition pf "Attack Nearest" (of me or my target). More offensive than plain "Protect".

RogerL
Posts: 398
Joined: Wed, 6. Nov 02, 20:31
x4

Post by RogerL » Sat, 9. Dec 06, 09:36

Well, after poking around for a few hours in your script, I found out that the script works, it's just not possible to use shift+0 as hotkey. Silly me, but not really first thing that I would have thought about :)

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Sun, 17. Dec 06, 03:57

package updated with new selection of hotkeys.
  • now control upto 6 groups
  • more command posibilities, including return home, and ordering the entier group to fire a missile at the target.
note this is a complete update. Your previous keybindings will be lost

Draslin
Posts: 199
Joined: Sat, 11. Feb 06, 22:07
x4

Post by Draslin » Sun, 17. Dec 06, 14:53

Well that didn't take long. Hehe, awesome work!

I'm planning to make essentially the same kind of hot keys, of course now I don't have to. One thing I was going to address was the possibility of a group being destroyed. I'd planned on having more groups on a carrier than I'd have hot keys for. So when one group would end up destroyed or disabled, it would automatically cycle in the next group available.

Do your hotkey's work along similar lines or is the maximum number of groups pegged at six?
Its not a hug so much as "Help me I'm dieing!"

nemezir
Posts: 31
Joined: Sat, 9. Dec 06, 15:14
x3tc

Post by nemezir » Sun, 17. Dec 06, 17:59

Hi moggy,

i just installed GMS and the Hotkey-Addon.

I configured the hotkeys (F1-F6 as groupselection and F7-F12 as command selection), some Groups (Fleetname = TF1, Fleetnumber 1 and 3 Ships assigned) and then tried to place some commands.

But theres no reaction! I have no keyboard-configuration conflicts and i also tried some other keys with the same result.

I am using 2.0.02 with bonuspackage and DDRS-Mod, all in German.
I have also GMS, GHK and GCC installed.

What did I do wrong?

nemezir

nemezir
Posts: 31
Joined: Sat, 9. Dec 06, 15:14
x3tc

Post by nemezir » Mon, 18. Dec 06, 15:40

no hints?

i tested also with 1.4.03 without success.

gms_X3.1.1.spk
ghk_X3.2.0.spk

is it because i use german x3 ?

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Mon, 18. Dec 06, 15:45

at the moment I have no idea why you can't get it to work.

I did notice that since X3.2.0.x the keyboard hotkeys nolonger work in the property menu, which makes it rather difficult to check things are working.

While testing I had the leadship of a group mapped to the second monitor so I could see what command he was running that way


Edit:
I take that back, the SPK was missing a script.
run package update and it should download the new version

nemezir
Posts: 31
Joined: Sat, 9. Dec 06, 15:14
x3tc

Post by nemezir » Mon, 18. Dec 06, 16:34

Hi Moggy,

I am sorry for going on Your nerves, but GMS&GHK is exactly the feature I've waited for...
Its a really great concept and I need to use it.
I can't live without this anymore now that I know its existing ;-)


Heres my question:

I have no scripting skills so I'm not sure if this is ok or not.

While I was checking the scripts, I found that only the group commands have three questionmarks (???) infront of arguemts.

Its looking like this:

Code: Select all

Version 301
Command Group: protect me
Command Name: plugin.Xai.grp.ghk.prtctme.hk

006 @ = [THIS] = call script plugin.Xai.grp.setcommand.gp : ???=$group ???=COMMAND_PROTECT ???=[PLAYERSHIP] ???=null
is this normal or is there something missing?


UPDATE:

Sorry, didn't see Your EDIT in Your previos Post.
I'll try it now!!! ;-)

It works and its great. Thanks for scripting this one!!!

nemezir

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Mon, 18. Dec 06, 23:25

Code: Select all

006 @ = [THIS] = call script plugin.Xai.grp.setcommand.gp : ???=$group ???=COMMAND_PROTECT ???=[PLAYERSHIP] ???=null
yep, if you ever see something like that, it's a good indication that the script is missing.

Jase555
Posts: 145
Joined: Fri, 13. May 05, 17:17
x4

Post by Jase555 » Sun, 14. Jan 07, 13:45

Again Thank you. Truly useful

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Re: [SCRIPT] Group Combat Hotkeys

Post by jlehtone » Thu, 25. Jan 07, 10:45

moggy2 wrote:
  • GHK: Group: Launch Missiles
  • GHK: Wingmen: Launch Missiles
Missiles. Scary plural. "Fire one, each of you." or "Spam all you've got."? Am I right to assume that the ships need a target first (unless Tempesting)?

Edit: Two more Q's.
1. What is the scope of these commands? The scope of broadcast is dockbay, if broadcaster is docked, and sector, if broadcaster is in space. The scope of wingman hotkeys is the whole universe. Thus, universe for GHK?

2. Does GHK Dock at.. have destination filter? When a ship broadcasts regular builtin Dock at.., one can only choose destinations where the broadcaster can dock. Slightly inconvenient, since a Carrier cannot broadcast to fighters; one of the fighters has to do the broadcast.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Thu, 25. Jan 07, 15:29

missiles:
1 missile per ship in group, ship's choice,

The scope:
Hotkeys can only be used when you're in space. The Commands work on ships that are in the same sector as you.

If the command seems like it needs a target chances are they'll use your current target. In the case of launch missiles iirc it'll take the leader's target as the target for the missiles.

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Mon, 29. Jan 07, 08:40

moggy2 wrote:missiles:
1 missile per ship in group, ship's choice,
Yes, I noticed. Is there documentation for

Code: Select all

ship -> find best missile for $target
somewhere?

Since you skip only class TS, I can make a group of TP Manta missile boats? :o :roll: 8)


Damn, tried to bind to Shift+Fn and Right Ctrl+Fn. Former works, but latter does not. I could bind directly to joystick buttons, but chose to let them generate key events. Game uses Left Alt and Left Ctrl by default, and I use Left Win as well. That diminishes the number of modifier keys.

What keys people have used for GHK? What was that issue with Shift+0? The F1--F5 is needed for choosing camera views. All the "multimedia" keys? There are plenty of them on recent keyboards (and mine has 0).


Edit: It could be nice to have a separate command to enter an arbitrary group number. One could then select any group. But then again, that would need a slot, and six groups is already much more than all M5/M4/M3 in the sector.

User avatar
Klyith
Posts: 594
Joined: Fri, 6. Jan 06, 01:38
x3

Post by Klyith » Tue, 30. Jan 07, 05:27

jlehtone wrote:Damn, tried to bind to Shift+Fn and Right Ctrl+Fn. Former works, but latter does not. I could bind directly to joystick buttons, but chose to let them generate key events. Game uses Left Alt and Left Ctrl by default, and I use Left Win as well. That diminishes the number of modifier keys.
X3 can only use shift as a modifier for key bindings. Ctrl & alt can only be used as single keys. And I've not tried but I doubt it can use media keys either. It can use shift + joystick buttons though, so if you have a joystick with profuse buttons that may help.

"Too many hotkeys, not enough keyboard" is a big X3 problem, and one that is getting worse as more scripts use them.

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Tue, 30. Jan 07, 07:49

Klyith wrote:And I've not tried but I doubt it can use media keys either.
Sounds likely. However, it sure can use the 'LWin' key as single key. But maybe 'LWin', 'RWin', and 'Menu' are "more regular" than media keys, since they have been around a bit longer.

povljr
Posts: 7
Joined: Sun, 11. Mar 07, 23:57

Can't set the hotkeys

Post by povljr » Mon, 2. Apr 07, 12:31

Now that I have my groups squared away I'm trying to create a group of M3 "bombers" or thinking of Dragons with firestorm torpedos to attack capital ships. So far setting the groups fire missle probability is of very limmited effectiveness. They just seem gun-shy. So I saw under Group Hotkey Commands, a hotkey that would tell the whole group to fire a missle. What luck!

Problem is: I CAN'T SET/ASSIGN THE HOTKEYS.
Having done so with the afterburnner and release drone features I assumed it would be the same.

Hit "esc"
left arrow to "controls" menu
right arrow to "interface"
scroll down to "extensions" and set them.
But I see no "select group 1" or anything like that.

Instead I have 10 otions formatted like this:
"FCOM:group1:attack my target"

these are useable for groups 1&2 and for the (5) options
-protect me
-protect my target
-attack my target
-attack all
-hold position

The only mod I have installed is "emp".
The scripts I have are
-weapon changer
-bonus pack
-rock remover
-and all those found within "ultimate command pack"

I have tried uninstalling the standalone spk for group hotkey commands aswell. I made sure it was the latest version 3.2.3. I even tried a few other versions, all with the same result.

Any ideas? I'm fresh out, but really want to hammer that hotkey a few times and see 20 Firestorm torpedos sailing into a K!

thanks in advance

jake

User avatar
Cith
Posts: 534
Joined: Thu, 21. Sep 06, 19:47
x3tc

Post by Cith » Sat, 28. Jul 07, 18:16

The hotkeys dont work. I've assigned SHIFT + 1 to 5 with various commands like, protect me, attack my target, hold position. But when I press them in game, nothing happens.

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Sun, 29. Jul 07, 03:46

you need to select the group number of the group you want to control first.

Post Reply

Return to “X³: Reunion - Scripts and Modding”