[SCR] NICE Interface Enhancement (v2.70, 20.09.08)

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

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

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

[SCR] NICE Interface Enhancement (v2.70, 20.09.08)

Post by Gazz » Thu, 26. Jun 08, 19:35

(Das entsprechende deutsche Topic ist hier.)

Navigation, Interface, and Cockpit Enhancement
(Advanced Single-key System)

Overview
  • This script installs 11 hotkeys.
    On 10 of them you can save an object each.
    1 is for the message system, through which you can control multiple ships as well.
  • Once locked in, they are accessible from the whole universe, not just in sector.
  • Each object can be commanded using shortcuts or the regular command menu (!) and can serve as a target for other functions at the same time.
  • Pressing a hotkey multiple times activates different functions.
    If the script misunderstands you because you are clicking too slow, increase the keypress delay on the AL Plugin page.
  • Completely new "Notify when orders completed" - with eye tracking!
  • Attack queue
    You can queue an attack order for a ship.
    That means that it will immediately attack the target you want with extreme prejudice.
    Even if attacked, it will never switch targets to anything else until this primary target is destroyed.

    When the target is destroyed, the ship will continue with whatever it was doing before.

    You can leave your wingmen on Protect, only ordering them to attack special targets as needed. That way they always switch back to protecting you... and never get lost!
    You never have to rebuild the chain of who protects who.

    You can queue at least 100 such attack orders for every single ship.
    The ship will work through the list in reverse order, always giving your last order the highest priority.
    So whatever your ships are currently doing - you can always send them after special targets without having to fix their orders afterwards!
    They automatically go back to their previous orders...
  • In (nearly?) all cases these hotkeys work equally well on the sector map.

Usage
  • Hotkey 1x : Target saved object + get command access
    • For four seconds, this object can be the target of the following hotkey shortcut.
      If you are in Paranid Prime and bring up Terracorp HQ, you can order a freighter to fly and dock there - never leaving the cockpit.
    • It does not matter where the ship is in the universe or if it's docked or not...
      Betty briefly displays the ship in your target window so you can see name, shield, hull, and current command.

      If the ship is not in your sector, she tells you where it is and always tells you the ship type (short), and if the ship is landed.

      "Argon Prime, Caiman, Landed"
      "Heretics End, Elephant"

      During that time you have full command access to the ship!

      You can give explicit commands to the fighters that are docked at the carrier you're flying.
      You can give direct commands to ships that are 5 sectors away...

      This is not limited to some hardcoded instructions I included. The full command menu is accessible!
    • This hotkey can even be useful on the sector map.
      It briefly puts the ship in the sector map's ship list so if you're quick you can catch it there and open the command menu.
      Order OOS ships from your sector map. =)
    • If you activate your ship's autopilot while such a target is displayed, your ship automatically jumps / flies there.
      A quite intuitive way to save / use navigation waypoints.
    • Note:
      While stations are displayed in the target window, you do not have command access for them.
      Please do not drop freight from the remote ships while they are displayed in the window. Wait a second or two and even that will work remotely.
      (You do know that you can't drop real freight OOS, only drones, satellites and such? =)
  • Hotkey 2x : Heel! / Stop
    Saved ship will jump/fly to your sector and move to your current position.
    Obviously this only works on your own ships.

    If that ship happens to be a wingleader in the carrier you fly, it will launch because of the move to order.
    X3:TC may have wings but you can have quick access and direct control for multiple wings right now.

    Issueing the same order again stops the ship... and aborts the jump sequence if you're fast enough.

    I mostly use this to call in my support ship(s) to refuel, pick up cargo or ships... or whatever chores I want done.
    No more searching for them in the property list!

    Once my support ships have jumped to my sector I can change their orders easily enough because I have quick target keys for them.
  • Hotkey 3x : Attack target
    • If you activated another saved target during the last 4 seconds, your
      ships will attack the saved target.
      Else the ship attacks your current cockpit target.
    • If you did not provide any target or had the ship itself targeted, it will Attack All Enemies.
    • If the ship had a homebase or had to launch in order to do this, it will return to base as soon as the order is completed and said base is in the sector.
      Until that happens, the ships continue to Attack All Enemies.
      If the carrier that launched them enters the sector later, they will return to it...

      A homebase is optional. The ships always return to where they launched from.
    • This uses my Attack All Enemies upgrade where ships actually find the enemy.
      If you see an enemy on the sector map, so will your ships. Always.
      Scouts and satellites can be quite useful for that.
    • If the target is not in the same sector as the ship it will Move/Jump there.
    • If the ship is in the same sector as the target when the order is given, it will not switch targets until it's primary target is destroyed.
      This is intended for small scale operations when you want your wingman to attack this target right now instead of playing with a few random M5.
    • If the ship is not docked and in the same sector, this command queues an attack order.
      This way you can force your wingmen to attack targets in a certain order, never doing anything else - until completed.
  • Hotkey 4x : Protect
    • The ship can protect objects that are not hostile in any way and that the ship is not hostile to.
    • If you activated another saved target during the last 4 seconds, your
      ships will protect the saved target.
      Else the ship protects your current cockpit target.
    • If you did not provide any target or had the ship itself targeted, it will protect you.
    • The hotkeyed ship will assist the leader when there is nothing to protect against.
    • If not, the hotkeyed ship will Protect you. (the Playership)
    • If the target is not in the same sector as the ship it will Move/Jump there.
  • Hotkey 5x : Jump / FlyTo / Dock
    This one is even more flexible than what you saw before. =)
    • If you activated another saved target during the last 4 seconds, this will be the destination.
      Else your current cockpit target is it.
    • If you did not choose a destination, your personal ship will engage the autopilot and head to the target.
    • If the ship (and all it's escorts!) can dock at the target it will do so.
    • If not, they switch to Protect/Follow, depending on how friendly the target is.
    • If the destination is not in the same sector as the ship it will Move / Jump there.
  • Hotkey 6x : Save current target to this hotkey.
    On each of them you can save an object, like one of your ships.
    Pretty much every targetable thing can be saved and recalled but since ships are the most useful items, I usually refer to those.

    You can also target things universe wide if you choose to.
    You may not be able to aim at OOS ships or station... but your autopilot can!
    Clear your cockpit target (t 2x) and give your ship an order to protect, attack, or dock at some OOS object.
    Now the autopilot target can be locked to a hotkey just like your cockpit target.
  • Hotkey 7x : Notify when orders completed : Activate / Deactivate
    This has nothing to do with the Egosoft "Notify when orders completed".

    Note: You need to manually restart this command on every ship if you had it running with a version < 2.60 before.
    From now on it will auto update.
    • There is a hotkey to display a list of ships without order and the same hotkey selects them from the list.
    • To activate/deactivate this feature you have to assign a ship to a target hotkey (1-10) - at least temporarily - and press it 7x to activate the message system for this ship.
      This feature stays enabled if the ship is no longer locked onto a Hotkey.
    • If a ship then finishes it's order it will send an audio message to you.
      Instead of a meager "Incoming message" you might hear
      "Kingdom End, Mercury, Successfully docked".
      It also sends a more detailed message to the NICE message log.

      This message log can be viewed with pressing the Message Hotkey once.
      [ external image ]
      Super freighter 4 has just bought EC. (I used "Best Buy").
      Hauler 6 just stopped in space 28 sec ago.
      With Hauler 3 I was manually trading at a weapons fab.
      Sold some EC and bought the weapons.

      All this data can be called up again - until you send the freighter on a new mission.
      Then it takes a snapshot of it's cargo bay before heading out and compares to that when the order is finished again.

      Remote trading is now... easier.
    • In the log, every entry is preceeded by something like _2x_.
      That means: Press the same hotkey 2x and the ship that sent the message will pop up.
      You can then open the command menu and give it a new task without having to find it on the property list.
      You can view / select the ship as often as you like.
    • If you use a target hotkey to pop up an object (like Terracorp HQ), this will be "the destination" for the next 4 seconds.

      Pressing the message key to pop up a freighter will directly send it to jump/fly/dock at this destination.

      This overrides Eye Tracking.
    • Eye Tracking
      When doing remote trading you will often want to call a trader to the sector map you are currently watching.
      (You just found a factory full of cheap AHEPT there...)

      If you are watching any sector map (including the sector your personal ship is in), pressing the message key will not pop up the freighter without orders.
      Instead it will jump/fly directly to the sector you are watching.

      So basically, you snap your fingers and a freighter goes to the sector where you want to buy those cheap AHEPT.

      This is also useful if you are done buying things with your trader.
      If you go back to the sector map and use the message hotkey for that ship, it will again... undock and fly to your sector.
      You don't have to issue lenghty undock orders if you have more plans with that ship...
    • This log is never spammed. Ships / Messages that have orders again are automatically removed.
      Instead of the "galactic stardate" (does anyone use this?) those messages directly tell you how old they are in Min/Sec.
    • If the ship that sends the message is the leader of a fighter wing that landed on your carrier then the message is delayed until all ships of the wing have landed.
      You can quickly check if all fighters are safely home before you jump the carrier out.

[ external image ] (ZIP + SPK)
Last edited by Gazz on Sat, 20. Sep 08, 15:34, edited 31 times in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Thu, 26. Jun 08, 22:29

If i might ask, how does one get a hotkey to do something when double clicked? Is it a wait and some type of variable that gets incremented when you click it, and if you press it twice fast enough the variable is incremented to the point where it triggers a different if/else thing? Or is it some magic hidden functionality I dont know about?

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Fri, 27. Jun 08, 07:32

Just take a look...
It's barely over 1 page of script if I remember right.

Then again, magic is my business. =P

It's getting hard to remember all those hotkeys and in many cases scripts could use half the number they do now.
Double and even triple clicks can make script controls a lot easier.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Fri, 27. Jun 08, 07:57

Just as I figured. Incomprehensible at best.

Oh well, Ill just trust that it works on principal...

Side note, does it have something to do with a task you are starting?

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Fri, 27. Jun 08, 12:43

Hahaha! Patience, young padawan!
It's a whopping 30 line script and that's counting the comments. =P

But, yes, it has to do with the task. I didn't do that just for fun.
For any script with a time component you can't just read it from start to finish and expect it to make any sense.
You have to keep in mind what it's other incarnations do on this and other objects... and most of all when each part of the script runs.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Fri, 27. Jun 08, 17:39

I have much to learn then still :|

I shall look over it again, see if it makes any sense after that...

now you add a THIRD keypress? What did I do to deserve this >.<

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Fri, 27. Jun 08, 18:28

Well, if you want to understand the principle, I'd recommend the old version...

The new one is completely restructured so that I only had to change 1 number in the hotkey script to add another hotkey while the mainscript with the working functions remains static.
Definitely a cleaner modular structure but not necessarily easier to read because that one plays some real task ping pong. =)

I'm thinking about adding a Get lost! function to the Heel!.
If the freighter is targeted and you give the order, it docks locally or jumps/docks to a safer sector.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Fri, 27. Jun 08, 18:48

wait now it has 6 hotkeys too? Mmmm fun.


I might actually use that for resupply purposes like you mentioned. After all, you can never have too many missiles on hand at once ^^

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Tue, 2. Sep 08, 20:28

There is still potential for improvement.

I could add more functions like
4x
- attack my target (if hostile), then protect homebase / playership
- protect (if not hostile)
- attack all enemies (no target)
5x protect homebase / playership
6x dock at homebase / playership

...or make them context/type sensitive.
3x jump/fly to me if a freighter, jump/launch/protect me if an M class ship.

Effectively this would be a variation of the Group Hotkeys, except without the need to manually assign and rename all the ships.
(I am the leader of this empire, not his accountant!)
Press one key for... You are now F5!

The clickeroo is probably no less than with group hotkeys but this here also lets me give every possible command through the auto target feature.
The number of available keys is pretty limited, too, so a total of one key per controlled ship/group is easier to manage. (and remember =)
Last edited by Gazz on Wed, 3. Sep 08, 17:34, edited 1 time in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Dom Devore
Posts: 138
Joined: Tue, 12. Feb 08, 06:59
x3tc

Post by Dom Devore » Tue, 2. Sep 08, 21:32

This will be handy for getting quick access to my personal transporters and TL's that I'm constantly using. I'm quickly running out of free keys to assign hotkeys to though. Tis a pity that X3 doesn't allow for alt + and ctrl +

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Wed, 3. Sep 08, 11:27

Out of all my scripts it's probably the one I use the most. I like simple. =)

Anyone see something I overlooked or has some great idea for how combine commands or make them context sensitive?
Doubt I'll do anything with the script before the weekend.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Fri, 5. Sep 08, 11:56

I am beginning to really like hotkeys..I wish someone would invent a keyboard that had about 100 F keys on it so I could really take advantage of these things more..I am running out of hotkey room and memory (mine) as to where my hotkeys are on my keyboard....Just a thought :idea:
X3..The most fun a man can have...With his clothes on.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Fri, 19. Sep 08, 20:26

Pogi wrote:I am running out of hotkey room and memory (mine) as to where my hotkeys are on my keyboard...
I already released the function library for multi-click hotkeys so a lot of scripts could use fewer hotkeys than they do now. Many functions are well suited for being logically grouped on one key instead of using 2 or 3...


Version 2.70 released

Completely new "Notify when orders completed" with useful trading reports.

Key repeat speed can be adjusted for slow clickers. =)

Better integration with previously implemented features and... now with eye tracking! =)


Edit:
Manually buying and selling still has to be done on the property list.
I always have trouble finding the right ship there quickly.
I could however... make all "no orders" ships (that are on the message list) blink for one minute when I press the message hotkey.

So like... click... highlight my trade ships.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

kiniki
Posts: 80
Joined: Mon, 23. Jun 08, 12:02

NICE Interface - Mod Noob needs assistance!

Post by kiniki » Mon, 10. Aug 09, 20:06

Hi guys...

Just installed my first mod... But have no idea what to do with it!

I'm using the NICE interface, this gives Hotkey commands for different things... I've installed with the Plugin Manager, checked it's enabled and started the game..

Now I can see the new commands in "Ship Commands" but how do I make them work on Hotkeys?

For example, you can have a ship 'jump into sector and follow player'. How do I assign that to a hotkey? In fact, how do I save the ship as the one I want to assign this to?

Eg, I always want the same ship to answer this command, do I need to target a ship everytime I want to do this? Or can I assign a ship to the hotkey once and then it will do it always?

I really need a step by step idiot proof guide if anyone has used this and wouldn't mind giving me a little of their time?

Thanks

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

Re: NICE Interface - Mod Noob needs assistance!

Post by jlehtone » Mon, 10. Aug 09, 22:04

kiniki wrote:I really need a step by step idiot proof guide if anyone has used this ...
This? It would be much easier, if we would know what this is. Sure, we could try to look it up ourselves, but wouldn't it be much nicer if you had asked in, say the thread where this is described? Perhaps even the author of the script might follow that thread more closely.

Wait! The Forum Posting Rules tell you to do exactly that. The threads will now merge. :)

kiniki
Posts: 80
Joined: Mon, 23. Jun 08, 12:02

Post by kiniki » Mon, 10. Aug 09, 22:41

Sorry, however as I have been reading through the threads, I have noticed a lot of people being chastised for replying to old threads and then them being closed.

I didn't want to ask a question in this one only for it to get closed so I thought I would make a new thread.

Sorry for misinterpreting the rules, but there seems to be an inconsistency in what should and shouldn't be done between forums.

kiniki
Posts: 80
Joined: Mon, 23. Jun 08, 12:02

Post by kiniki » Tue, 11. Aug 09, 01:05

Anyways, can anyone give me a hint?

I really have no idea how anything in this script works.... I cant work out how to save a ship for the commands to work on. And even with a ship targetted I can't use the hotkeys (ie shift +1).. i am assuming you have to assign the commands yourself... which I have no idea how to do.

So any help would be much appreciated :)

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

Post by jlehtone » Tue, 11. Aug 09, 10:12

kiniki wrote:Sorry for misinterpreting the rules, but there seems to be an inconsistency in what should and shouldn't be done between forums.
Different Forums have different purpose and therefore different rules too.


Ingame you have "Controls", and there are listed "Hotkeys", and which keys/buttons activate them. For example, the vanilla "Activate Docking Computer" hotkey is not bound to anything by default. Hotkeys added by this script are somewhere there.

Now, just looking at the "Usage", I guess that pressing a hotkey 6 times stores the current target for the hotkey. Then, pressing some other number of times sends a different command to that ship. I'm not sure, I've never used this script.


Overall, have some patience for it might take a bit longer before somebody knowledgeable checks this discussion. And there is always the "PM the author" button.

kiniki
Posts: 80
Joined: Mon, 23. Jun 08, 12:02

Post by kiniki » Tue, 11. Aug 09, 10:15

Thanks jlehtone, I just assumed that rules were global..

I'll wait a couple of days and if I hear nothing I'll PM the author..

Thanks

Loner87
Posts: 66
Joined: Thu, 15. Jan 09, 16:25
x3tc

Post by Loner87 » Fri, 8. Oct 10, 17:09

Oh man, it's exactly the kind of script I was needing. You are great. Thank you.

Post Reply

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