Author Topic: Hardpoint commands  (Read 4990 times)

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
Hardpoint commands
« on: January 20, 2017, 11:41:10 AM »
Is there a way to have a command, after deploying the hardpoints, keep track of which hardpoint your using and know what has been assigned to that hardpoint.
I have tried to mod the comms commands and the side panel command to get this to work by no luck, maybe because I don't know what I doing.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Hardpoint commands
« Reply #1 on: January 21, 2017, 03:45:40 AM »
Which game, Which profile?

If you're looking to modify a HCS Voice Packs profile, you can also have a look at their forum.

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
Re: Elite Dangerous Hardpoint commands
« Reply #2 on: January 21, 2017, 10:21:23 AM »
Ha Ha
Yea I guess that would have been better to include that info.
Elite Dangerous 2.2.03, My own Voice Attack profile, with a Logitech x-55 and 3d flight stick pro

I am trying to understand how to compile these commands. I have read tutorials, but am to easily confused.
Some of the thing I have read don't use the same terminology, that is used in the current voice attack beta

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Hardpoint commands
« Reply #3 on: January 21, 2017, 11:08:32 AM »
If you haven't already, look into EDDI, it can provide live data to VoiceAttack from the game.

However, to keep track of hardpoints manually, you'll have to set variables for any information you need.

E.G. when deploying a hardpoint:
Code: [Select]
Set Boolean [Hardpoint1Deployed] to True

And when you need to check whether it's deployed:
Code: [Select]
Begin Boolean Compare : [Hardpoint1Deployed] Equals True
    Write '[Blue] Hardpoint 1 is deployed' to log
Else
    Write '[Blue] Hardpoint 1 is not deployed' to log
End Condition

Tkael

  • Newbie
  • *
  • Posts: 49
Re: Hardpoint commands
« Reply #4 on: January 21, 2017, 02:45:26 PM »
EDDI is wonderful, but it cannot provide data on the status of hardpoints (deployed or no) as that info is not published to the player journals. I still track that with VA variables, basically like Pfeil showed.

Command: "[Deploy; engage; retract; disengage;] [the;] [hardpoints; hard points; weapons; armaments; guns]"
Code: [Select]
Execute command, '((Hardpoints))' (by name) (and wait until it completes)
Set small int (condition) [temp] value to 0
Begin Text Compare : [{LASTSPOKENCMD}] Starts With 'deploy'
    Set small int (condition) [temp] value to 1
End Condition
Begin Text Compare : [{LASTSPOKENCMD}] Starts With 'engage'
    Set small int (condition) [temp] value to 1
End Condition
Begin Text Compare : [{LASTSPOKENCMD}] Starts With 'retract'
    Set small int (condition) [temp] value to 2
End Condition
Begin Text Compare : [{LASTSPOKENCMD}] Starts With 'disengage'
    Set small int (condition) [temp] value to 2
End Condition
Begin Small Integer Compare : [temp] Equals 1
    Set Boolean [hardpoints] to True (save value to profile)
    Execute command, '((RS - Hardpoints Deploy))' (and wait until it completes)
Else If Small Integer Compare : [temp] Equals 2
    Set Boolean [hardpoints] to False (save value to profile)
    Execute command, '((RS - Hardpoints Retract))' (and wait until it completes)
Else
    Execute command, '((RS - Hardpoints))' (and wait until it completes)
End Condition - Exit when condition met


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Hardpoint commands
« Reply #5 on: January 21, 2017, 03:06:44 PM »
EDDI is wonderful, but it cannot provide data on the status of hardpoints (deployed or no) as that info is not published to the player journals.
The documentation implied this, but I don't own the game, so I wasn't sure how hardpoints work.


If I may provide a few thoughts on your command, if I understand it correctly, you could compress it to the following:
[Deploy; engage; retract; disengage;] [the;] [hardpoints; hard points; weapons; armaments; guns]
Code: [Select]
Execute command, '((Hardpoints))' (by name) (and wait until it completes)
Begin Text Compare : [{EXP: '{LASTSPOKENCMD}' LIKE 'deploy*' Or '{LASTSPOKENCMD}' LIKE 'engage*'}] Equals '1'
    Set Boolean [hardpoints] to True (save value to profile)
    Execute command, '((RS - Hardpoints Deploy))'
Else If Text Compare : [{EXP: '{LASTSPOKENCMD}' LIKE 'retract*' Or '{LASTSPOKENCMD}' LIKE 'disengage*'}] Equals '1'
    Set Boolean [hardpoints] to False (save value to profile)
    Execute command, '((RS - Hardpoints Retract))'
Else
    Execute command, '((RS - Hardpoints))'
End Condition - Exit when condition met
I'm using the "{EXP:}" token to provide "Or" functionality, and the wildcard at the end of the word to match will function as "Starts with".

Whether you use "{EXP:}" or not, there is no need for individual checks, as all statements are mutually exclusive:
Code: [Select]
Begin Text Compare : [{LASTSPOKENCMD}] Starts With 'deploy'
    Set small int (condition) [temp] value to 1
Else If Text Compare : [{LASTSPOKENCMD}] Starts With 'engage'
    Set small int (condition) [temp] value to 1
Else If  Text Compare : [{LASTSPOKENCMD}] Starts With 'retract'
    Set small int (condition) [temp] value to 2
Else If  Text Compare : [{LASTSPOKENCMD}] Starts With 'disengage'
    Set small int (condition) [temp] value to 2
End Condition
Using this structure, when "{LASTSPOKENCMD}" starts with, for example, "deploy", that is the only check that needs to be processed, because the other three cannot be true.


Also, it's not necessary to use the "Wait until this command completes before continuing" option for the "Execute Another Command" action in the final section of the command, because no processing occurs after that. Execution of the other command cannot "step on"(create a race condition) your original command.

Incurable-Rash

  • Full Member
  • ***
  • Posts: 181
Re: Hardpoint commands
« Reply #6 on: January 24, 2017, 06:41:26 PM »
Thank you

Because I really don't understand the programing I'll have to study these and see if I can understand what you did.