Forums » Community Projects

Group Voice Command Interface

12»
Aug 23, 2009 DivisionByZero link
After hearing some complaints about the lack of group interface, I was reminded of another method of sending voice commands without having to worry about bandwidth issues if there are many people in a group.

Starsiege:Tribes had a set of pre-canned wav files that would get played according to a simple chat interface. It was a series of menus that you would enter into like this:

hit v (for voice command)
hit d (for defense related commands)
hit b (for "The enemy is attacking our base!")

so, by quickly hitting v-d-b the entire team would hear you say, "The enemy is attacking our base!". This was great for an era where most people on 32 player servers were dialing in with modems still and *still* able to play an FPS game.
(incidentally, you can still get Tribes and if you want to check out the voice command, you can get it here: http://www.tribesftw.net/ but be ready to get owned if you get on a server)

So, after chatting with a couple people in IRC, they thought this sounded like a great thing for a plugin in VO and maybe it can eventually get integrated into the main game.

In a VO context, the simplest commands are things like, "attack my target" for which, there is already another plugin. But, if someone was the wing leader, they could assign target priorities, possibly, by controlling target pinning and working that into TargetLess's interface maybe. Finally, if the voice commands could be assigned tags, "Wing 1" and "Wing 2" and within the group, group members set up themselves as members of either group, then having a battle field commander be able to quickly reassign separate wings would make a lot of sense.

The key benefit of pre-canned wav files getting played is that you no longer have to worry about bandwidth usage in the group. Send it via chat interface and everyone hears the same message. This might get the devs to lighten up on the 8 person limit to groups that currently exists, as well.

So... this plugin would be like a Frankenstein of Targetless, the target reassign plugin (sorry don't recall the name) with a snazzy interface and some wav files. What it still needs, as an idea, is a developed voice command tree that makes sense.

Anyone game for working on it?
Aug 23, 2009 drazed link
Neat idea, as I already have too many projects on the go I can't really help :( But if you need any targetless API functions (like get pinned targets/set pin/etc) I'd be happy to add those for use by other plugins. Also, I will be expanding on targetless pinning considerably in the near/far future, at which time may break things that rely on targetless, but if I provide API functions I will ensure they are backwards compatible with new versions :d
Aug 24, 2009 genka link
Everything you mention should be pretty straight forward and easy to set up. Really, the difficulty is going to be deciding on the soundbytes that need recording, how they're to be organized, and then actually recording the damn things.
Another thing to note is that VO's music playing skills are .ogg based, so that's the sound format you're going to want to use.
Aug 24, 2009 maq link
wavs work too.
Aug 24, 2009 genka link
Oh. Didn't know.
Guess I'm the newb now.
Aug 27, 2009 DivisionByZero link
Here's a first stab at a set of a VC tree. Comments or things the plugin should do are in (---) after the command

v = voice commands
1 - offense
2 - defense
3 - information
4 - other

Under offense
v-1 offense
1 - attack %target% (set primary target)
2 - open fire
3 - engage at will
4 - secondary target %target% (set a tertiary target)

Under defense
v-2 defense
1 - defend %target% (set a secondary target)
2 - perform defensive flying (i.e. survive as long as you can)
3 - break off and fall back
4 - retreat/bug out!

Under information
v-3 information
1 - I am engaging %target%
2 - I'm taking fire from multiple bogies
3 - I need a target
4 - I have contact with the enemy (useful in storms/fog)

Under other
v-4 other
1 - Go repair and reload
2 - Return to objective
3 - Begin bomb run
4 - What is your status?

Under each of the above commands, a 4th tier determines the scope of the command action, so taking v-2-3 as an example

v-2-3 = voice - defend - break off and fall back!
1 - Wing 1
2 - Wing 2
3 - Wing 3
4 - Entire group

So, hitting v-1-3-2 would get the players who set themselves as wing 2 to hear:
"Engage at will!"

The idea of setting targets would work like "pinning" does in Targetless, except it would retain a fixed ordering of targets. The idea being that everyone will have a primary target (kill this first) and secondary target to defend (your wingmate/heavy in your wing) and a tertiary target (kill this after you kill primary).

thoughts?
Aug 28, 2009 shlimazel link
This has to be the best plugin idea ever... Couldn't you just have it post to group chat? Seems to me it would work just as good and let you release it sooner.
Aug 28, 2009 m4c4br3 link
Great idea! I'd actually like to see this implemented into the main game ASAP!
Aug 29, 2009 DivisionByZero link
Shlim - I think the easiest way to have it work is send the message to group chat, but have the plugin parse it and look for control codes to determine what sound file to play.

The idea of using a voice command that plays a file is to avoid having to take your eyes off the target. It works the other way too, in terms of sending information out. If you memorize the codes, you can just key in the appropriate command with a minimum of distraction. I know when playing tribes, it was pretty easy to end up memorizing most of the chat codes.
Aug 29, 2009 diqrtvpe link
The easiest way to do that would be to write a plugin that would look for the SwitchTarget codes, interpret them based on your status (group leader, subgroup leader, follower, etc.), and play the appropriate sound. I'd be happy to help you through any syntax problems you have with SwitchTarget if you want (I wrote it), just look for Denji Royhu ingame. Unfortunately, I have little enough time for playing these days, let alone coding, but I'll give what help I can.
Aug 29, 2009 meridian link
I'll be out of town this weekend, but would be willing to work on it if no one else has taken it up by the time I get back.

Couple questions:
*Should you be able to send commands to any of the 7 members (8 send destinations total instead of the 4 you list)? Or are you envisioning multiple members assigned as Wing2?
*How would Wing1, 2, etc. assigned? By order joined the group? (This depends on the answer to the above)
*Would the group leader have any special privileges as far as overriding other group member commands?

-Choco
Aug 29, 2009 DivisionByZero link
meridian: The idea would be for people to join the group and then set their own wing membership so join order doesn't matter. I think that'd be the best way to implement incase people join and leave the group.

I would hope that if this was satisfactory, then Guild would open up the group size limit while keeping the limit on VC. This would enable some voice system to be in place for everyone while keeping the bandwidth down for the server.

command priveleges... I think that would require some additional overhead in terms of telling everyone's program who the leader was and had such priveleges. It might be good, but it might be very annoying in terms of overhead. I don't know - I think if people were intelligent about the group they were flying in and disciplined enough to know not to reset everyone's target lists, it'll work fine enough.

The system is meant to enhance what should already be an organized group to some extent. Not supply a rigid interface that enforces the group's organization. At least, that's how I imagine it.

diqrtvpe: I don't know much about your plugin, but if that's more efficient, then I'm all for it. I don't know lua, nor the interfacing system in VO, so I'm not competent to comment on it.
Aug 29, 2009 diqrtvpe link
SwitchTarget is the target reassign plugin you couldn't remember the name of. :)
Aug 30, 2009 DivisionByZero link
diqrtvpe: I gathered that from your previous post. What I meant was that I had not looked at the inner workings of your plugin.

Even so, anyone who has made plugins is the wind beneath my wings...
Aug 31, 2009 diqrtvpe link
Ah, gotcha. The subgroup mechanism for SwitchTarget would seem to be fairly well suited to this concept, without all that much extra code needing to be written. The main group leader could call out to everyone in the main group and the subgroup leaders, and the subgroup leaders could call out to their subgroup members. There are already modes in place to make it so only the leaders can switch everyone's target, so making them be the only ones able to call out would be trivial. Similarly, setting new leaders is in place.

In short, the plugin could be made to work as basically a plugin to SwitchTarget, or could cannibalize code from SwitchTarget to work by itself. Obviously the first would be easiest, as to stand alone it would need to change all the codes it sends so as not to mess up other people's possible SwitchTarget installations, but both are certainly possible, and not necessarily too difficult. Again, I'd be willing to help anyone who wanted to take this on, but at the current time I don't have the time. :/
Aug 31, 2009 DivisionByZero link
I think the ideal is to only change the pinning order when the group leader calls a new target as opposed to changing the current target. This would avoid unintended consequences if someone is currently engaged in a close fight. Less intrusive and problematic. Setting the new pin, on the other hand, enables a more graceful disengagement.
Sep 01, 2009 meridian link
Guess it's up to me to make this plug-in then. I'll try have a bare bones mock-up ready in the next few days or so.

My plan:
Phase 1 - basic interface that outputs commands to group chat
Phase 2 - Assigning wingman positions
Phase 3 - Utilizing SwitchTarget-esque codes
Phase 4 - Adding sounds
Phase 5 - Interaction with TargetLess

I have no interest in recording sounds for this, so if someone else would like to take care of them it would be appreciated.
Sep 06, 2009 meridian link
Ok, here is my first pass at Phase 1, just in time for labor day. The text spewed to group chat isn't the prettiest, but this is only intended as a proof of concept.

I basically started with the QuickHail plug-in, removed the parts I didn't need, then added a bit of custom code. Be warned that I don't have the crash protection features implemented that QH uses, so I recommend BACKING-UP your wgaf.cfg file before using this plug-in (worst case you'll have to rebind keys 0-5). There is also a potential for messing up your binds if you activate QH and this plug-in at the same time -- I'm not sure how to address this issue yet...

Here's my list of changes from what DBZ proposed:
*Allows 4 wing groups (or two people each in a full group)
*Likewise, each set of commands has 5 options instead of 4
*Renamed Information category to Personal -- these are all commands that give info about the individual issuing them, not their wing group
*Created a 5th category for recon and moved the "contact with enemy" command here. I figure recon commands will be useful with some of the "stealthy" features the devs are thinking about adding
*Added some commands of my own: "Out of ammo", "Sector clear" (for groups with members in multiple sectors), and a generic "help me"
*I added a countdown sequence that is initiated with the "begin bomb-run" command
*Changed "break off and fall back" to "break off and regroup" -- as it was it seemed too similar to the "retreat" command

There's still room for adding more commands. What changes/additions would people like to see? The commands will not be customizable for obvious reasons, so get your comments in now. The command list will have to be finalized before recording sounds can begin.

Forgot to mention the command to bind is "gc"

GroupCommand v0.1a --UPDATED: GroupCommand v0.2.0a

Known bugs:
*Hiding command list with bind does not reset command sequence (fixed)
Sep 07, 2009 shlimazel link
Very excellent. I'm going to give it a try later today and I'll give you a bug report afterwards. I can't think of any suggestions for features yet, maybe after I try it.

{edit} I forgot to bind it, so no report I'm afraid.
Sep 09, 2009 Toimu link
So if a group is made up of 3 wings, and the commander is in the first wing, will the commander hear messages s/he sends to second/third wing? If not, I see some fat fingering messing up attacks :D