[Bonus Plugin] Group Hotkeys (GHK)

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

[Bonus Plugin] Group Hotkeys (GHK)

Post by moggy2 » Wed, 13. Jun 07, 16:13

Name: Group Hotkeys (GHK)
Version: 2.3
Date: 05.04.2007
Scripter: moggy2
  • Using Group Hotkeys:
    This script defines new hotkeys to give orders to groups as defined by the Group Management System. The new hotkeys allow you to give orders to group leaders without going through their command menus.

    The hotkeys are divided 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:

    Hotkeys Group1
    GHK: Select Group 1
    GHK: Select Group 2
    GHK: Select Group 3
    GHK: Select Group 4
    GHK: Select Group 5
    GHK: Select Group 6

    Hotkeys Group2
    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: Escorts: Launch Missiles

    Tips:
    You don't have to select the group number each time you give an order. The last selected group number is remembered until it is overriden by another select group command. If you're only controlling one group, once you've set the group number once, you don't need to be selecting that group number before giving the commands.

    GHK: Escorts: Launch Missiles commands ships following you rather than the last selected group, and can thus be used even without defining any groups.

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

Post by jlehtone » Fri, 15. Jun 07, 08:42

This script is IMO the most powerful weapon in the vanilla game. 8)
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

Kraz
Posts: 11
Joined: Sat, 9. Jun 07, 21:40

Post by Kraz » Fri, 15. Jun 07, 21:53

Agreed, the GMS package is very powerful. Although I do still have odd problems with the GHK plugin. In the game menu where you can define hotkeys, I don not have the group selection hotkeys. what I see basically amounts to variations of the group attack and protect commands, some listed twice. I haven't been able to find a place to define the select group keys.
(I used the spk from the Xai Corp site, the only other scripts I am running are Xai corp scripts.) Have you seen this before?

Kraz

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

Post by jlehtone » Fri, 15. Jun 07, 23:31

The first version of GHK had commands for Group 1 and Group 2. The second version (now signed) has set of commands and six Select keybinds (for groups 1--6). Could it be that the spk version, which probably retains something of both version keybindings somehow lingers around? I had tested the second version before and then removed it. Now, with installation of signed version, I already seem to have the correct keys bound, like I did set them during the test. I actually never saw the first version keybinds in Controls.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

Kraz
Posts: 11
Joined: Sat, 9. Jun 07, 21:40

Post by Kraz » Tue, 19. Jun 07, 19:43

Ahh. That explains much. I'll remove the spk version and install the bonus pack version.

Cheers :)

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

Post by jlehtone » Mon, 16. Jul 07, 16:55

The hotkeys do work while the sector map is open. 8)

One can for example launch missiles or assing new tasks to Groups without closing the map. :D

target, fire; target, fire; target, fire; ...
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

feserik
Posts: 5
Joined: Tue, 21. Feb 06, 04:06

Post by feserik » Sun, 2. Sep 07, 08:19

Say i just docked for repairs and I have a second group still in the battle, can i still give group 2 commands while i'm docked?

User avatar
moggy2
Posts: 4588
Joined: Wed, 6. Nov 02, 21:31

Post by moggy2 » Sun, 2. Sep 07, 08:45

I don't think any hotkeys work while you're docked. Try it and see.

Sinnerman49
Posts: 85
Joined: Thu, 20. Sep 07, 17:00

Post by Sinnerman49 » Fri, 21. Sep 07, 03:17

For some reason, the group hotkeys are not working for me.

I've set up a group (1 ship actually...) with the GMS Command, set it as "Trade Fleet", "1" for the group, "0" followers, etc.

When I press "r" to view my ships, the TS that I made the group shows up as "Trade Fleet(1) Essex"

Then I went to the options menu, and under the key assignments set F12 to select Group 1 and F11 to Command "Dock at..."

However, in game, when I press F12, then F11 nothing happens, no sounds or anything.

Am I doing something wrong?

User avatar
moggy2
Posts: 4588
Joined: Wed, 6. Nov 02, 21:31

Post by moggy2 » Fri, 21. Sep 07, 03:27

the dock at hotkey requires a target. You need to have the station or carrier that you want the ship to land at as your current target. It's actually dock at my target.

Most of the hotkeys like that. You can't have a hotkey ask for input. so it takes the player target as the input.

Sinnerman49
Posts: 85
Joined: Thu, 20. Sep 07, 17:00

Post by Sinnerman49 » Fri, 21. Sep 07, 03:52

I see....well even that doesn't work. I target a Teladi ED, press F12, then F11 - nothing....

No sounds or anything letting me know that I selected Group 1

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

Post by jlehtone » Fri, 21. Sep 07, 08:29

Sinnerman49 wrote:No sounds or anything letting me know that I selected Group 1
That part is normal. 'Select Group' gives no feedback.

IIRC, Group 1 is already selected from start. The script has a global variable for 'CurrentlySelectedGroup', and that variable is thus initialized to '1' on first installation. The hotkeys can change that, but there is no way to know the current value without the use of ScriptEditor.


So your ship and "Trade Fleet(1) Essex" are in the same sector?

User avatar
moggy2
Posts: 4588
Joined: Wed, 6. Nov 02, 21:31

Post by moggy2 » Fri, 21. Sep 07, 15:19

did you ever use the unsigned version of GMS?

Sinnerman49
Posts: 85
Joined: Thu, 20. Sep 07, 17:00

Post by Sinnerman49 » Fri, 21. Sep 07, 22:04

No, just the the Egosoft signed bonus package and XTM

xyzzy
Posts: 216
Joined: Fri, 15. Jun 07, 02:27

Post by xyzzy » Sun, 23. Sep 07, 09:23

Moggy2 - I just tried GMS for the first time tonight, and it's great! Immediately made my "can't live without it" list. (In fact, i'm using almost all of the Xai corp scripts!)

I ended up using Klyith's renaming system after GMS renamed my ships, because I set up the naming scheme I prefer in that, with colorization and such. This didn't appear to harm anything with GMS - the ships have kept their new names so far, and everything seems to be working. I wonder if eventually there could be an option to not have GMS rename the ships?

I remapped keys to the GMS hotkeys, and they work as advertised so far. One minor point of confusion: if I have several groups of M3's in my carrier, it seems like I can't give them GMS commands unless they are launched via some other means? Once they're launched, I can control them fine with GMS. But if they're docked, giving "protect me" when I'm flying the carrier doesn't launch them. It's a minor thing, and likely a misunderstanding on my part.

If I use "attack my target", after that target is destroyed, will the GMS controlled ships go after other nearby targets on their own? Or must I tell them to do so?

Overall, excellent work! It goes a long ways to addressing a big hole in the original game.

Post Reply

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