Author Topic: A suffix chain  (Read 9285 times)

netkingcol

  • Newbie
  • *
  • Posts: 28
A suffix chain
« on: May 26, 2016, 10:10:38 AM »
I'm working on a Materials and Synthesis profile for Elite Dangerous. For the synthesis part, I want the user to be able to ask questions like:
  • What's needed for Basic SRV Refuel?
  • What's needed for Premium FSD Injection?
  • Do I have enough materials to synthesise Standard Plasma Munitions?
Commands like these consist of three parts:
  • The question (What's needed for/Do I have enough...) which can be implemented as a prefix.
  • The quality of the synthesis (Basic/Standard/Premium) which I would like to write as a suffix.
  • The type of synthesis to be performed (SRV Refuel etc.) which I would also choose to implement as a suffix.
It would be good to be able to chain suffixes to build up a more complex command:
  • (prefix)What's needed for (suffix)Basic (suffix)SRV Refuel
Sure, I could have three suffixes for each type of synthesis:
  • Basic SRV Refuel
  • Standard SRV Refuel
  • Premium SRV Refuel
and that's how I'll do it for now, but I feel the prefix/suffix facility could be much more powerful and flexible if suffixes could be chained.

Rhaedas

  • Jr. Member
  • **
  • Posts: 72
Re: A suffix chain
« Reply #1 on: May 26, 2016, 11:00:36 AM »
I like the suggestion, not sure how the grouping would work that that unless he added a third type between prefix and suffix, VA wouldn't know that the first suffix was complete, I think.

Not played with wildcards much, maybe a way to use them and pull the info between?

Another suggestion to think about. Have the prefix as your example with the question, the suffix be the type, like SRV refuel, and when triggered, have VA ask for more info (basic, standard, premium) in a separate prompt. I think you can capture all three in variables, and then process what is needed from the inputs.

netkingcol

  • Newbie
  • *
  • Posts: 28
Re: A suffix chain
« Reply #2 on: May 26, 2016, 11:11:44 AM »
Yes, VA wouldn't know which order of suffixes would create the intended command.

Limiting it one suffix, what you suggest about prompting for further information within the suffix would probably meet my requirements, so thanks for the suggestion.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4785
  • RTFM
Re: A suffix chain
« Reply #3 on: May 26, 2016, 02:01:34 PM »
Code: [Select]
[Basic;Standard;Premium] SRV Refuel
Code: [Select]
Begin Text Compare : [{SUFFIX}] Starts With 'Basic'
Else If Text Compare : [{SUFFIX}] Starts With 'Standard'
Else
End Condition

I like this better than 3 separate suffixes, from the perspective of maintenance(don't have to edit 3 commands).

You can do the materials the same way, though the command will become bloated to edit, as the action list will get long.
« Last Edit: May 26, 2016, 02:05:36 PM by Pfeil »

Rhaedas

  • Jr. Member
  • **
  • Posts: 72
Re: A suffix chain
« Reply #4 on: May 26, 2016, 03:46:18 PM »
Nice, I knew there might be a way to do that, but wasn't sure it would work with suffixes. And you should be able to use my suggestion along with that, so if they say those modifiers, it goes on to the right thing, if they don't specify, VA can prompt them for clarification.

netkingcol

  • Newbie
  • *
  • Posts: 28
Re: A suffix chain
« Reply #5 on: May 26, 2016, 10:41:32 PM »
Code: [Select]
[Basic;Standard;Premium] SRV Refuel
Code: [Select]
Begin Text Compare : [{SUFFIX}] Starts With 'Basic'
Else If Text Compare : [{SUFFIX}] Starts With 'Standard'
Else
End Condition

I like this better than 3 separate suffixes, from the perspective of maintenance(don't have to edit 3 commands).

You can do the materials the same way, though the command will become bloated to edit, as the action list will get long.
Thank you Pfeil, I'll use this - and it shows that this thread belongs more in 'How Do I?' than in 'Feature Requests'  :)

In my particular case the If...Else If...Else will not be unmanageably long.