[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: 4588
Joined: Wed, 6. Nov 02, 21: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: 396
Joined: Wed, 6. Nov 02, 21:31
x4

Post by RogerL » Fri, 8. Dec 06, 12: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: 17238
Joined: Sat, 23. Apr 05, 21:42
x4

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

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

RogerL
Posts: 396
Joined: Wed, 6. Nov 02, 21:31
x4

Post by RogerL » Sat, 9. Dec 06, 10: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: 4588
Joined: Wed, 6. Nov 02, 21:31
x3ap

Post by moggy2 » Sun, 17. Dec 06, 04: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: 193
Joined: Sat, 11. Feb 06, 23:07
x3

Post by Draslin » Sun, 17. Dec 06, 15: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, 16:14
x3tc

Post by nemezir » Sun, 17. Dec 06, 18: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, 16:14
x3tc

Post by nemezir » Mon, 18. Dec 06, 16: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: 4588
Joined: Wed, 6. Nov 02, 21:31
x3ap

Post by moggy2 » Mon, 18. Dec 06, 16: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, 16:14
x3tc

Post by nemezir » Mon, 18. Dec 06, 17: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: 4588
Joined: Wed, 6. Nov 02, 21:31
x3ap

Post by moggy2 » Tue, 19. Dec 06, 00: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: 114
Joined: Fri, 13. May 05, 17:17
x3tc

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

Again Thank you. Truly useful

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

Re: [SCRIPT] Group Combat Hotkeys

Post by jlehtone » Thu, 25. Jan 07, 11: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: 4588
Joined: Wed, 6. Nov 02, 21:31
x3ap

Post by moggy2 » Thu, 25. Jan 07, 16: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: 17238
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Mon, 29. Jan 07, 09: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.

Post Reply

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