Author Topic: Some questions about the value and use of plugins.  (Read 3955 times)

Fly-By-Voice

  • Newbie
  • *
  • Posts: 6
Some questions about the value and use of plugins.
« on: January 01, 2023, 08:10:10 AM »
Greetings and Happy New Year!

I am looking to gain a better understanding of Voice Attack ‘plugins’.  Been using VA for about 3 years and, while I am not a programmer by profession, have written several profiles for in game use.  VA is very powerful.  It takes computer interaction to a new level.

So, do I continue to work with the existing VA profiles or is a plugin the next step?

The example I would refer to is a voice command for changing the heading on an airplane NAV system.  [set heading] [1..360] [degrees;]

Depending on the current heading, the new heading will move the heading bug left or right the required number of degrees after determining which direction will be the fastest path to the new heading.

Here are some of the questions related to plugins:

1)   What value does a plugin offer?
a.   faster execution of programmed actions?
b.   access to Windows functionality that VA does not offer?
c.   protection for programmer’s Intellectual Property since it is a compiled program?
d.   something else?

2)   Are there certain conditions where a plugin is recommended and others where it is not?

3)   For the [set heading] command referenced above, is the original program left in VA or moved partially or completely to the plugin?

4)   If the original program is left in VA, then does the plugin execute the keyboard key press only?

Anything you could offer is much appreciated.  Thanks for your help.

There are not enough voting stars for Voice Attack.  Looks like a 10 on 5 to me.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4781
  • RTFM
Re: Some questions about the value and use of plugins.
« Reply #1 on: January 01, 2023, 09:25:25 AM »
1)   What value does a plugin offer?
a.   faster execution of programmed actions?
b.   access to Windows functionality that VA does not offer?
c.   protection for programmer’s Intellectual Property since it is a compiled program?
d.   something else?
Plugins are generally intended to extend the functionality of VoiceAttack itself, and to interface with specific application (E.G. games) through their proprietary APIs

They can be faster in theory, but in practice that'd only matter for quite complex operations (much beyond doing basic calculations like those for your heading example).

For those already familiar with either of the supported programming languages, plugins and inline functions can also make it simpler to structure logic, and to manage data in more advanced ways (E.G. using lists and/or dictionaries, foreach loops, etc...)

2)   Are there certain conditions where a plugin is recommended and others where it is not?
If you need functionality that isn't available natively, or need to put together something particularly complex that would be cumbersome with native actions, you could consider either a plugin, or an inline function.

Inline functions can do the vast majority of what plugins can, but are probably more suited to relatively simple operations, as you'd probably want both newer language features (inline functions support up to C# 5.0) and more advanced autocomplete and linting features, as can be offered by IDEs like Visual Studio.

If something can be efficiently expressed using native actions, there's probably little sense in using a plugin or inline function.

3)   For the [set heading] command referenced above, is the original program left in VA or moved partially or completely to the plugin?

4)   If the original program is left in VA, then does the plugin execute the keyboard key press only?
Plugins cannot directly execute VoiceAttack actions. You can have a plugin do the math, but it'd then need to execute a VoiceAttack command containing the keypress action(s).

Fly-By-Voice

  • Newbie
  • *
  • Posts: 6
Re: Some questions about the value and use of plugins.
« Reply #2 on: January 02, 2023, 06:59:34 AM »
Pfeil, thanks very much for answering all my questions (on New year's day!).

Some of the sims I play offer access to "game state' data such as what is the current heading as far as the game variables are concerned.  I track the current heading and future changes to that heading by using VA variables but, in reality, VA does not know anything about what my sim is really up to.

My goal is 100% fly-by-voice and being directly connected to the real-time game variables via a plugin 'looks like' it would assist/help/accelerate my goal significantly? I'll leave that as a question.

Thanks again for your comments.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4781
  • RTFM
Re: Some questions about the value and use of plugins.
« Reply #3 on: January 02, 2023, 07:04:17 AM »
I assumed you already had a plugin to retrieve data from flight simulation you were referring to.

That seems like it has little to do with the questions you were asking.

Fly-By-Voice

  • Newbie
  • *
  • Posts: 6
Re: Some questions about the value and use of plugins.
« Reply #4 on: January 03, 2023, 06:42:40 AM »
Hi again:

No, I don't have a plugin to retrieve game state variables and, for sure, I don't know how to create one.  Looks like that's the next adventure along with trying out the vJoy plugin.