[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: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

[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: 21801
Joined: Sat, 23. Apr 05, 21:42
x4

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
x3

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: 21801
Joined: Sat, 23. Apr 05, 21:42
x4

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
x3

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: 21801
Joined: Sat, 23. Apr 05, 21:42
x4

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, 03:06
x3

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: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

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: 108
Joined: Thu, 20. Sep 07, 17:00
x3

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: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

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: 108
Joined: Thu, 20. Sep 07, 17:00
x3

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: 21801
Joined: Sat, 23. Apr 05, 21:42
x4

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: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

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

did you ever use the unsigned version of GMS?

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

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

No, just the the Egosoft signed bonus package and XTM

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

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.

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

Post by jlehtone » Sun, 23. Sep 07, 12:02

The hotkeys do affect ships in the same environment. Player can never be in the "Docking bay of carrier" environment. There are couple other unsigned GMS add-ons, which add commands to yell at docked fighters.

I usually broadcast "Fly to sector". Everybody launches and then that command completes. Groups regroup automatically. 8)


"Attack my target" is an infinite command. If a ship running this command does not have a target, it will attack the current target of that ship, where "me" was while the command was issued. If that ship has no target, it is escorted and check for target is repeated (forever). Thus, "Attack my target" will continue attacks as long as you have target.

However, if you tell groups to "Attack ..", you give a one shot command. It does complete. And when it does, the group leaders have no command. At that point GMS kicks in and starts another infinite command on those leaders: "Attack all enemies". :D
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

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

Post by xyzzy » Sun, 23. Sep 07, 17:11

Thanks jlehtone, that is exactly what I was wondering about.

*EDIT* I also just found Xai "Group Carrier Operations", which looks handy to address one of the issues I mentioned of how to launch the groups. I will try that next.

boulistar
Posts: 37
Joined: Sun, 2. Jul 06, 18:25
x3tc

Post by boulistar » Wed, 17. Oct 07, 17:26

Great work moggy2, thanks for those good scripts you made.

There are so many hotkeys to configure, I wonder what keys do you guys use.

Thanks again.

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

Post by jlehtone » Wed, 17. Oct 07, 17:32

Removed the 'screenshot' from 'F9', as 'PrtScn' has it too. That did leave F6--F12 (with and without Shift), ie 14 keys. But I have programmable stick, so I don't reach for keyboard for these.

boulistar
Posts: 37
Joined: Sun, 2. Jul 06, 18:25
x3tc

Post by boulistar » Wed, 17. Oct 07, 17:44

Thank you very much for the suggestion, my fellow Pilot :)

Post Reply

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