Author Topic: Duplicate entries?  (Read 4772 times)

Gamer Dad

  • Guest
Duplicate entries?
« on: May 18, 2019, 02:27:23 PM »
I'm building a profile for flight simming and I keep getting an "invalid multipart command" error stating "multipart commands cannot contain duplicate entries".  Here is the entry itself:

Viper [1..5;] [1..4;] Rejoin

The idea here is that a flight can be Viper 1 to Viper 5 then each flight can have 4 elements, so Viper 1-4 is the 4th guy in flight 1, Viper 4-1 is the 1st guy in flight 4.  I've made the numbers optional so if there's just one flight, then I can just say "Viper Rejoin" and have it work.  However, VA doesn't like the [1..4;] line and gives me an error when I try to save the command.  Changing it to [1..4] will work, but then that means that number is now mandatory and I don't want it to be the case.

How can I fix this?

Gamer Dad

  • Guest
Re: Duplicate entries?
« Reply #1 on: May 18, 2019, 02:40:05 PM »
Had a few more tries:

Viper [1;2;3;4;5;] [1;2;3;4;] Rejoin - fail

Viper [1;2;3;4;5;] [1;2;3;4] Rejoin - ok
Viper [1;2;3;4;5] [1;2;3;4;] Rejoin - ok

So it does not like to have both numbers optional but if one number is optional but the other number is not, it will work..... but I want both numbers to be optional.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Duplicate entries?
« Reply #2 on: May 18, 2019, 02:46:55 PM »
Would [1..54;] work?

Wondering if removing the duplicate restriction within the same command would be ok.

Away from my pc for a bit.

Gamer Dad

  • Guest
Re: Duplicate entries?
« Reply #3 on: May 18, 2019, 02:56:23 PM »
Would [1..54;] work?
It's actually a way to identify who is talking or who is being addressed.
Viper 1 means talking to the entire flight with callsign Viper, so all 4 guys
Viper 1-4 means talking to the 4th guy in Viper 1 flight
Viper 5-4 means talking to the 4th guy in Viper 5 flight

For example Viper 1 flight is talking to Cobra 3 flight:
Cobra 3-1, Viper 1-1, cleared inbound means the 1st guy in a flight callsign Viper 1 is talking to the 1st guy in a flight callsign Cobra 3.
Cobra 3-4, Viper 1-3, cleared inbound means the 3rd guy in a flight callsign Viper 1 is talking to the 4th guy in a flight callsign Cobra 3.

The second example is unlikely to happen as flight leads (1st guy) usually do the talking but let's say the flight lead of Viper flight got taken out so element lead (3rd guy) is now doing the talking.  So Viper 1-3 will now talk to Cobra 3-1.  Now let's say the first 3 guys in Cobra flight got taken out so now Cobra 3-4 is all that's left of Cobra 3 flight and he's talking to Viper 1-3 and asking for help.

Quote
Wondering if removing the duplicate restriction within the same command would be ok.
How is this done?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Duplicate entries?
« Reply #4 on: May 18, 2019, 03:08:22 PM »
The ambiguity is the issue here.

If both segments are optional, you'll generate "Viper 1 Rejoin", where the 1 comes from segment 1 ([1..5]) and "Viper 1 Rejoin", where the 1 comes from segment 2 ([1..4]), and so on, causing multiple duplicates where "{CMDSEGMENT}" would not be able to tell which segment is actually being used (how could it know if you meant the "1" from "[1..5]" or that from "[1..4]"? It cannot).


You'll have to work around this logical impossibility by making certain assumptions.

E.G. the command phrase could be "Viper [1..5] [1..4;] Rejoin;Viper Rejoin", which can be disambiguated like this:
Code: [Select]
Begin Text Compare : [{CMDSEGMENT:2}] Equals ''
    Write [Blue] 'Referencing a single craft within the caller's flight, E.G. "Viper 4 Rejoin"' to log
Else If Text Compare : [{CMDSEGMENT:2}] Equals 'Not Set'
    Write [Blue] 'Referencing the caller's entire flight, E.G. "Viper Rejoin"' to log
Else
    Write [Blue] 'Assume a full designation, E.G. "Viper 1 1"' to log
End Condition



Would [1..54;] work?
What do you mean [1..54;]?
The speech recognition engine recognizes single digits as part of a number, E.G. if you say "Viper 1 1" with that command string, it'd be recognized as "Viper 11"
I.E. "one one" is interpreted as "eleven"

Quote
Wondering if removing the duplicate restriction within the same command would be ok.
How is this done?
It is not possible currently.

Gamer Dad

  • Guest
Re: Duplicate entries?
« Reply #5 on: May 18, 2019, 03:27:15 PM »
The ambiguity is the issue here.
Here's the catch --- none of that is important.  This is only "important" for immersion factor and not for commands per se.

For example, a flight with callsign Viper 1 wants to refuel and talk to the tanker with callsign Texaco 3.
Tanker request refuel
Tanker, Viper 1 request refuel
Tanker, Viper 1-1 request refuel
Texaco 3, Viper 1 request refuel
Texaco 3-1, Viper 1 request refuel
Texaco 3-1, Viper 1-1 request refuel
Good day Texaco 3-1, Viper 1-1 is joining you 10nm from the east, reqest refuel

 
All of those commands (and the last one for exaggeration) simply execute the "request refuel" command, the rest of the words are for immersion purposes only.

Here is a line that is being used:
[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [1 1; 2 1; 3 1; 4 1; 5 1; 6 1; 7 1; 8 1; 9 1;] [Falcon; Gamble; Hawkeye; Plasma; Warhawk; Cyborg; Mudhen; Weasel; Bulldog; Cajun; Beast; Satan; Mustang; Panther; Banshee; Spade; Viper; Jaguar; Mako; Jackal; Cobra; Hammer;] [1..5;] [1..4] [Request; Requesting] [Refuel; Fuel]

The first bracket is composed of the possible tanker callsigns, then their number assignments, third bracket is the possible player flight callsigns, next two brackets are the player-flight number assignments, then the last two brackets are possible variations on the "request refuel" phrase.  As you can see, only the first bracket (tanker) and the last two brackets (request refuel) are mandatory, but I cannot make the [1..4] bracket optional without coming across the error.

Is there a better way of making this phrase work?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Duplicate entries?
« Reply #6 on: May 18, 2019, 04:43:53 PM »
Is there a better way of making this phrase work?

I would recommend splitting it up so that variations you'll never use are not generated.

E.G.
Tanker 1 Request Refuel
Tanker 1 1 1 Request Refuel
Tanker 1 1 1 1 Request Refuel

would be generated if duplicates were allowed (and even without duplicates you're already generating over 125000 phrases).


If anything, having nested brackets would help with this, so you can more clearly define which parts are optional.

E.G.
[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [1 1; 2 1; 3 1; 4 1; 5 1; 6 1; 7 1; 8 1; 9 1;] [[Falcon; Gamble; Hawkeye; Plasma; Warhawk; Cyborg; Mudhen; Weasel; Bulldog; Cajun; Beast; Satan; Mustang; Panther; Banshee; Spade; Viper; Jaguar; Mako; Jackal; Cobra; Hammer] [1 1;1 2;1 3;1 5;2 1;2 2;2 3;2 4;3 1;3 2;3 3;3 4;4 1;4 2;4 3;4 4;5 1;5 2;5 3;5 4;1;2;3;4;];] [Request; Requesting] [Refuel; Fuel]



Without any modification to VoiceAttack, it'd have to be split like so (simplified for readability):
Code: [Select]
[Tanker] [1 1] [Request; Requesting] [Refuel; Fuel]
[Tanker] [Request; Requesting] [Refuel; Fuel]

[Tanker] [1 1] [Falcon] [1..4] [1..4;] [Request; Requesting] [Refuel; Fuel]
[Tanker] [Falcon] [1..4] [1..4;] [Request; Requesting] [Refuel; Fuel]

[Tanker] [1 1] [Falcon] [Request; Requesting] [Refuel; Fuel]
[Tanker] [Falcon] [Request; Requesting] [Refuel; Fuel]


Full phrases, split:
Code: [Select]
[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [1 1; 2 1; 3 1; 4 1; 5 1; 6 1; 7 1; 8 1; 9 1] [Request; Requesting] [Refuel; Fuel];

[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [Request; Requesting] [Refuel; Fuel];


[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [1 1; 2 1; 3 1; 4 1; 5 1; 6 1; 7 1; 8 1; 9 1] [Falcon; Gamble; Hawkeye; Plasma; Warhawk; Cyborg; Mudhen; Weasel; Bulldog; Cajun; Beast; Satan; Mustang; Panther; Banshee; Spade; Viper; Jaguar; Mako; Jackal; Cobra; Hammer] [1..4] [1..4;] [Request; Requesting] [Refuel; Fuel];

[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [Falcon; Gamble; Hawkeye; Plasma; Warhawk; Cyborg; Mudhen; Weasel; Bulldog; Cajun; Beast; Satan; Mustang; Panther; Banshee; Spade; Viper; Jaguar; Mako; Jackal; Cobra; Hammer] [1..4] [1..4;] [Request; Requesting] [Refuel; Fuel];


[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [1 1; 2 1; 3 1; 4 1; 5 1; 6 1; 7 1; 8 1; 9 1] [Falcon; Gamble; Hawkeye; Plasma; Warhawk; Cyborg; Mudhen; Weasel; Bulldog; Cajun; Beast; Satan; Mustang; Panther; Banshee; Spade; Viper; Jaguar; Mako; Jackal; Cobra; Hammer] [Request; Requesting] [Refuel; Fuel];

[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [Falcon; Gamble; Hawkeye; Plasma; Warhawk; Cyborg; Mudhen; Weasel; Bulldog; Cajun; Beast; Satan; Mustang; Panther; Banshee; Spade; Viper; Jaguar; Mako; Jackal; Cobra; Hammer] [Request; Requesting] [Refuel; Fuel]

Final command:
Code: [Select]
[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [1 1; 2 1; 3 1; 4 1; 5 1; 6 1; 7 1; 8 1; 9 1] [Request; Requesting] [Refuel; Fuel];[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [Request; Requesting] [Refuel; Fuel];[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [1 1; 2 1; 3 1; 4 1; 5 1; 6 1; 7 1; 8 1; 9 1] [Falcon; Gamble; Hawkeye; Plasma; Warhawk; Cyborg; Mudhen; Weasel; Bulldog; Cajun; Beast; Satan; Mustang; Panther; Banshee; Spade; Viper; Jaguar; Mako; Jackal; Cobra; Hammer] [1..4] [1..4;] [Request; Requesting] [Refuel; Fuel];[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [Falcon; Gamble; Hawkeye; Plasma; Warhawk; Cyborg; Mudhen; Weasel; Bulldog; Cajun; Beast; Satan; Mustang; Panther; Banshee; Spade; Viper; Jaguar; Mako; Jackal; Cobra; Hammer] [1..4] [1..4;] [Request; Requesting] [Refuel; Fuel];[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [1 1; 2 1; 3 1; 4 1; 5 1; 6 1; 7 1; 8 1; 9 1] [Falcon; Gamble; Hawkeye; Plasma; Warhawk; Cyborg; Mudhen; Weasel; Bulldog; Cajun; Beast; Satan; Mustang; Panther; Banshee; Spade; Viper; Jaguar; Mako; Jackal; Cobra; Hammer] [Request; Requesting] [Refuel; Fuel];[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [Falcon; Gamble; Hawkeye; Plasma; Warhawk; Cyborg; Mudhen; Weasel; Bulldog; Cajun; Beast; Satan; Mustang; Panther; Banshee; Spade; Viper; Jaguar; Mako; Jackal; Cobra; Hammer] [Request; Requesting] [Refuel; Fuel]
« Last Edit: May 18, 2019, 08:51:45 PM by Pfeil »

Gamer Dad

  • Guest
Re: Duplicate entries?
« Reply #7 on: May 18, 2019, 06:26:12 PM »
VA doesn't seem to like nested brackets either?

I would recommend splitting it up so that variations you'll never use are not generated.
That's the thing, it's designed to cater from the simple to the detailed, so that it can be used for casual flying or for those who prefer deeper immersion when using comms.

I noticed in your recommendation, I can basically sum it up as:
[tanker] [1 1; etc] [command]
[tanker] [command]
[tanker] [1 1; etc] [falcon] [flight number] [element number;] [command]
[tanker] [falcon] [flight number] [element number;] [command]
[tanker] [1 1; etc] [falcon] [command]
[tanker] [falcon] [command]
129640 dynamic commands!

I think I can identify some areas in the comm line where I can try to avoid duplicates but I wonder if VA has the ability to ignore certain words between keywords?  ie, ignore the parts in bold, and italics are optional
[tanker] [1 1; etc] [falcon] [flight number] [element number;] [command]

Or even ignore certain parts entirely (ignore parts in bold)
[tanker] [1 1; etc] [falcon] [flight number] [element number;] [command]

So basically, it will look like:
[Tanker;Camel;Diamond;Canteen;Texaco;Dumbo;Wagon] [***ignore!!***] [Request; Requesting] [Refuel; Fuel]

VA will just listen for the word tanker (or the various callsigns associated with tanker) and then ignore everything else but listen for the words request or requesting and then refuel or fuel.  So if the user says "tanker, good morning, how's the weather up here? I just left Edwards AFB and the colonel's been bidgeing about the budget again.  Can I request fuel?" it'll still work...





Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Duplicate entries?
« Reply #8 on: May 18, 2019, 07:21:20 PM »
No, that's not possible. You can use wildcards at the beginning and/or end of a phrase, but not in between (E.G. "Tanker*" or "*Request fuel", but not both).

Plus, using wildcards at all will impact recognition accuracy (because the speech recognition engine has to freely guess what you're saying).

Gamer Dad

  • Guest
Re: Duplicate entries?
« Reply #9 on: May 19, 2019, 04:56:17 AM »
It doesn't need to guess, it just needs to listen out for certain keywords and execute those.  If none of the keywords appear, then no need to execute any commands.  But if this is not possible, then that's fine.

How about throwing the numbers into variables or "containers" (sorry, don't know the correct term) so that the first [1..5;] can be called [flightnumber] and the next [1..4;] can be called [elementnumber] and so even if the numbers are the same, since they have different variable names, maybe they won't be in conflict?  Again, since this is just cosmetic, VA doesn't really have to do anything with those variables.