Author Topic: Numbers/landing pads command ED  (Read 5143 times)

Onslawt

  • Guest
Numbers/landing pads command ED
« on: May 17, 2017, 09:26:37 AM »
Hi Guys,

My first post, please be gentle when ripping me a new one lol.

So I have been mucking about with voice attack for about 2 months basically using other brilliantly made profiles and tweaking them to suit. I also have the HCS pack Orion which I love and I currently play all of my games in VR mode with my Oculus Rift.

So like many I have struggled to do searches for systems in Elite dangerous via peering through the nose gap in my VR and reaching over my warthog stick and fumbling for my keyboard.

I came across a profile that someone made which allowed me to announce the phonetic alphabet and 0-9 and it would input this. I also found another profile that had landing pad information which I found kind of useful.

My problem was that the commands were conflicting, So I attempted to isolate the two commands with numbers for one i.e. 1,2,3 and with the numbers words for the other command i.e. one, two, three unfortunately voice attack sometimes would hear [one as 1, two as 2 and so on]

So I set out to try and rectify this with success however I feel the command is very bloated and don't fully understand certain programming abilities of Voice attack yet to try and reduce it's size it took me numerous attempts over 3 days to get it to this lol (trial and error, stereotypical guy bad with instructions :P )

My question is, can the command linked be reduced or be made to work more efficiently? Maybe one of the brilliant heads here can shed some light?

I've attached the other commands also for perusal, I have modified some to work differently than the originals maybe they can be tweaked also......oh and the landing pads are a work in progress (been enjoying voice attack and learning it, no time to play the game to write them down.)


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Numbers/landing pads command ED
« Reply #1 on: May 17, 2017, 10:36:27 AM »
One big improvement you can make is to cut out unnecessary options using "Else", which will function as "None of the above":

[Alpha;Alfa;Bravo;Charlie;Delta;Echo;Foxtrot;Golf;Hotel;India;Juliett;Juliet;Kilo;Lima;Mike;November;Oscar;Papa;Quebec;Romeo;Sierra;Tango;Uniform;Victor;Whiskey;Xray;Yankee;Zulu;space;dash;plus]
Code: [Select]
Begin Boolean Compare : [SpellingActive] Equals True
    Begin Text Compare : [{CMD}] Ends With 'plus'
        Press =  key and hold for 0,06 seconds and release
    Else If Text Compare : [{CMD}] Ends With 'space'
        Press Space key and hold for 0,06 seconds and release
    Else If Text Compare : [{CMD}] Ends With 'dash'
        Press - _ key and hold for 0,06 seconds and release
    Else
        Set Text [key] to '{TXTSUBSTR:"{CMD}":0:1}'
        Press variable key(s) [key] and hold for 0,06 seconds and release
    End Condition
End Condition
As the NATO alphabet logically uses words that start with the letter you want, you can isolate that letter and use it directly. "plus", "space", and "dash" are exceptions, so they're placed above the "Else" action, making it "if not an exception to the rule, use the first character of the command phrase as a keypress".


[Landing Pad;][0..40;Zero;One;Two;Three;Four;Five;Six;Seven;Eight;Nine]
Code: [Select]
Pause 0,5 seconds
Begin Text Compare : [{CMD}] Starts With 'Landing Pad'
    Say, 'Landing Pad'
End Condition
Pause 0,5 seconds
Begin Text Compare : [{CMD}] Does Not Contain 'Landing Pad'
Else If Text Compare : [{CMD}] Equals 'One'
    Press 1 key and hold for 0,06 seconds and release
Else If Text Compare : [{CMD}] Equals 'Two'
    Press 2 key and hold for 0,06 seconds and release
Else If Text Compare : [{CMD}] Equals 'Three'
    Press 3 key and hold for 0,06 seconds and release
Else If Text Compare : [{CMD}] Equals 'Four'
    Press 4 key and hold for 0,06 seconds and release
Else If Text Compare : [{CMD}] Equals 'Five'
    Press 5 key and hold for 0,06 seconds and release
Else If Text Compare : [{CMD}] Equals 'Six'
    Press 6 key and hold for 0,06 seconds and release
Else If Text Compare : [{CMD}] Equals 'Seven'
    Press 7 key and hold for 0,06 seconds and release
Else If Text Compare : [{CMD}] Equals 'Eight'
    Press 8 key and hold for 0,06 seconds and release
Else If Text Compare : [{CMD}] Equals 'Nine'
    Press 9 key and hold for 0,06 seconds and release
Else If Text Compare : [{CMD}] Equals 'Zero'
    Press 0 key and hold for 0,06 seconds and release
End Condition
Begin Text Compare : [{CMD}] Ends With 'One'
    Say, '0 1, green left, approach with Caution,      Danger close.'
Else If Text Compare : [{CMD}] Ends With 'Two'
    Say, '0 2.  Green right, Warning, steep  approach'
Else If Text Compare : [{CMD}] Ends With 'Five'
    Say, '0 5, green left, approach with Caution, shallow right      Danger close.'
Else If Text Compare : [{CMD}] Ends With '7'
    Say, '0 7, green left, Middle right of Station'
Else If Text Compare : [{CMD}] Ends With 'Seven'
    Say, '0 7, green left, Middle right of Station'
Else If Text Compare : [{CMD}] Ends With 'Nine'
    Say, '0 9.  Green right, short approach'
Else If Text Compare : [{CMD}] Ends With '10'
    Say, '1 0.  Green right, long approach'
Else If Text Compare : [{CMD}] Ends With '15'
    Say, '1 5, green right, Back left of station'
Else If Text Compare : [{CMD}] Ends With '17'
    Say, '1 7.  Green left, short approach'
Else If Text Compare : [{CMD}] Ends With '24'
    Say, '2 4.  Green left, short approach'
Else If Text Compare : [{CMD}] Ends With '25'
    Say, '2 5.  Green left, long approach'
Else If Text Compare : [{CMD}] Ends With '32'
    Say, '3 2.  Green left, short approach'
Else If Text Compare : [{CMD}] Ends With '33'
    Say, '3 3, green right, Back right of Station'
Else If Text Compare : [{CMD}] Ends With '39'
    Say, '3 9.  Green right, short approach'
Else If Text Compare : [{CMD}] Ends With '40'
    Say, '4 0.  Green right, long approach'
Else
    Say, 'None.'
End Condition
Same applies here: If there is no landing pad by that number, there's no need to treat it differently from all the other numbers that don't link to a pad.

I've also removed the numeric representations for 0-9. The built-in speech engine will always return them as text(not sure about Speech Platform 11 though).
Even if you still want that in, you could use "Or" by utilizing the condition builder(VoiceAttack v1.6.4.1 or higher required), or use the "{TXTNUM:}" token to translate it to a variable keypress.

TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
Re: Numbers/landing pads command ED
« Reply #2 on: May 18, 2017, 06:56:09 AM »
landing pad positions isn't something you are able to do with the hcs voicepacks. Well you can, but not reliably. You can certainly do it for every station, regardless of the type but what you can't do is only report positions when it's the correct type of station. In other words you would get landing pad info for outposts and planetary stations as well if you wanted to implement it. The problem is that Elites journal does tell us the pad position when you request docking but it does not report the station type until you've docked.

If you do want to do it then I would suggest installing a program called EDDI which utilises access to eddb to get station information and also has the landing pad info already built in for you.
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.

Onslawt

  • Guest
Re: Numbers/landing pads command ED
« Reply #3 on: May 19, 2017, 11:12:14 PM »
Thanks Pfeil, Ill take a look at it soon hopefully, if anything you've given me a baseline to try and understand the variable tokens in my situation cheers.

Thethingis  I will have a look at EDDI  and check out it's ability.

Thank you both for your replies, very much appreciated.