[SM Plugin] Squad Control

Discussion in 'Coding' started by Mikleo, Apr 5, 2017.

  1. Mikleo

    Mikleo Member

    Messages:
    155
    Likes Received:
    98
    Trophy Points:
    0
    Squad Chat
    Type ';' before any message in team chat to send it just for your squad along with an alert sound.


    /assign [player] [squad]
    (commander only) sets the squad of any player.

    /squadinfo
    list all of the squads in your team, their points and players

    /squadskills
    list all the members of your squad and what skills they currently have equipped.

    /sl [player]
    Votes for a player to become squad lead. If they get more than 51% of players in their squad to vote for them they become lead. if you omit [player] you vote for yourself.

    /rsl
    Sends a private comm chat message to your commander asking for squad lead.

    /channel [squad]
    (Spectator & unassigned only) join a squad as spectator or unassigned, allows you to use text chat and voice chat with like-minded individuals. The next level for your specpires server.


    Private Comm Chat
    Type ',' before any message in team chat to send a message to the commander only along with an alert sound! When the commander himself uses it his message gets sent to anyone who has used comm chat in the last 30 seconds. Like a response line.

    Public Comm Chat
    Type '.' before any message in team chat to send a message to the commander that is shown to the whole team. Only the commander sees the bright green text and hears the alert sound though. When the commander himself uses it the entire team sees the bright green text and hears the alert sound.

    /commander [optional team argument for spectators only]
    Displays the last person in the cv

    Voice Binds
    Add the following to your empires/cfg/autoexec.cfg replacing the [key] placeholder. if your in a game type "exec autoexec.cfg" in console after adding it.

    Squad Voice
    Talk to your squad members only

    Comm Voice
    Talk to the commander only, or reply as commander.

    All Voice
    Talk to everyone on server, Only usable to non admins when sc_allvoice is set to 1.


    Depends on emputils

    Git repo: https://git.empiresmod.com/sourcemod/SquadControl
     
    Last edited: Dec 23, 2017
  2. Paradox

    Paradox I am a gigantic asshole who loses people's hard wo

    Messages:
    6,926
    Likes Received:
    148
    Trophy Points:
    0
    holy shit , what a fucking hero
     
    Xyaminou likes this.
  3. A-z-K

    A-z-K Member

    Messages:
    3,241
    Likes Received:
    215
    Trophy Points:
    0
    -- lolfort at C5!
     
  4. Sgt.Security

    Sgt.Security Member

    Messages:
    3,137
    Likes Received:
    140
    Trophy Points:
    0
    Listing squad points would be really awesome and useful, honestly it should be a game feature(maybe list the points in squad menu).

    But squad chat needs to have a really, really bright color, or I don't see a reason to use it at all.
     
  5. Paradox

    Paradox I am a gigantic asshole who loses people's hard wo

    Messages:
    6,926
    Likes Received:
    148
    Trophy Points:
    0
    If it was another color It'd be great and actually work

    edit: wow I replied to your unedited message


    this one:
     
  6. Mikleo

    Mikleo Member

    Messages:
    155
    Likes Received:
    98
    Trophy Points:
    0
    I mean squad chat does have uses just not really in day to day pub games. You have those PUG's where everyone is spamming over the mic etc and you just want to discuss what your doing with your squad. TBH i'll look into squad voice i've looked at some things that could make it possible, problem being that you wouldent be able to tell if someone was using squad voice or regular voice without like a message in chat.

    Two most important features are !assignsquad and !sl.

    !sl isn't working very consistently at the moment, its the main reason i created the plugin tbh.

    apart from that i have a goal to make == talk to individually to the commander.
    and when the commander uses == it sends the message to any player that has used == in the last minute (like a response). I could do the same with voice I think.

    what do people think about -- applying to normal chat as well?

    Yes I can change the color of squad chat.

    My main priority is trying to fix issues atm though.
     
    Neoony likes this.
  7. Mikleo

    Mikleo Member

    Messages:
    155
    Likes Received:
    98
    Trophy Points:
    0
    v0.2

    Fixed more bugs

    Added squad voice chat, can't really test it properly so we'll see how it goes.
    Yes the sounds are a little irritating i just chose something i could get my hands on easily.
    You should post sounds here you want me to use, you're probably much better than me.

    And you can join squads as spectator and unassigned and talk to your squad with text or voice chat. I wish April fools hadn't gone already.

    I have to go to work in like an hour, So I can't test it this evening or tomorrow evening. Please let me know what happens. Any errors in the server logs etc.

    And no, the squad chat color hasn't changed lol, because it is too much for me to add in a few characters to a line.
     
    Neoony likes this.
  8. Avatarix

    Avatarix Member

    Messages:
    422
    Likes Received:
    24
    Trophy Points:
    0
    @Mikleo maybe better names for commands?
    /sql instead of /sl
    /sqp for /squadpoints or /sqpoints
    just add /sq prefix, itll be easier to write and remember
    ur my hero btw <3
     
  9. Neoony

    Neoony Member

    Messages:
    1,366
    Likes Received:
    106
    Trophy Points:
    0
    Damn, you just stole my squad chat idea xD

    https://forums.empiresmod.com/index.php?threads/modify-voice-call-plugin-squad-voice.20767
    But just kidding. At least someone did it. xD

    But this was actually the idea where I started considering trying to script sm for empires :grinnf:

    I just wonder if you did it over "SetListenOverride" like I intended to?
    EDIT: After checking, I see you did.

    GJ :P

    EDIT: but thanks, now I got a reference on how to properly read entity data...which was one thing I was trying to figure out few days ago :P

    Shit, I gotta move on to surrender and comm lock, before you do it xD
     
    Last edited: Apr 6, 2017
  10. Xyaminou

    Xyaminou Member

    Messages:
    1,369
    Likes Received:
    156
    Trophy Points:
    0
    the race has begun!
     
    Neoony likes this.
  11. Mikleo

    Mikleo Member

    Messages:
    155
    Likes Received:
    98
    Trophy Points:
    0
    Good News Boys,
    I was wrong, there is an easier way than that config.

    !bindsquadvoice [key]
    or
    bind [key] "+voicerecord_squad".

    Thanks to Mr.X for my listening to my lengthy inner monologue on trying to solve this issue. It really helped
     
    Neoony and Xyaminou like this.
  12. complete_

    complete_ lamer

    Messages:
    6,437
    Likes Received:
    144
    Trophy Points:
    0
    really nice idea
     
  13. Mikleo

    Mikleo Member

    Messages:
    155
    Likes Received:
    98
    Trophy Points:
    0
    v0.25
    Added Commander chat and commander voice to communicate directly with the commander
    Added alert sounds to comm chat and squad chat. So that the commander can hear when i'm sending a message to him.
    /squadpoints has been replaced with /squadinfo
    bug fixes

    Also just an extra note. Squad voice and comm voice chat work fine even when alltalk is on.
     
    Last edited: Apr 7, 2017
    Neoony likes this.
  14. !@zy(!z@r!) = Lazylizard

    !@zy(!z@r!) = Lazylizard Member

    Messages:
    25
    Likes Received:
    5
    Trophy Points:
    0
    Good job thank for this awesome plugin maybe you should also post on the allied modders / source mod forums so other games could use ideas and/or plugins .
     
  15. Mikleo

    Mikleo Member

    Messages:
    155
    Likes Received:
    98
    Trophy Points:
    0
    I keep trying to find a way to make squad chat a one key thing. but i don't think its possible.

    I'm thinking of changing the keys to make it even easier.

    Squad Chat: " message". A space before the message. Why would you use this in regular chat?

    Comm Chat ".message" A full stop before the message. Never seen anyone use this in regular chat.

    If you know the commands i don't see anyone using these accidentally.

    The other idea is "#message". but someone might try to quote hashtags and i don't think its as good

    Please let me know what you think and if you have any suggestions.
     
    Last edited: Apr 8, 2017
  16. Thexa4

    Thexa4 Developer Staff Member Moderator

    Messages:
    304
    Likes Received:
    98
    Trophy Points:
    0
    Using space and # might not be such good modifiers:
    • A space is relatively easy to add in front of a chat message and very hard to detect.
    • Hashtags are used by the game to display translated strings. So if you intercept those and play them to squads you're going to get very weird behavior.
     
  17. Mikleo

    Mikleo Member

    Messages:
    155
    Likes Received:
    98
    Trophy Points:
    0
    I mean yea space is hard to detect. But are there really players accidentally pressing space at the start of their messages? so much so that they cant stop themselves? And yea I understand that # is a bad idea. ";message" or ",message" are much better alternatives.

    Ok the more i look at it the more ";message" is looking like a good idea for squad messages.

    ",message" for private comm chat

    ".message" for public comm chat

    Maybe i don't need to use space after all.
     
    Last edited: Apr 8, 2017
  18. Thexa4

    Thexa4 Developer Staff Member Moderator

    Messages:
    304
    Likes Received:
    98
    Trophy Points:
    0
    , might work. Not sure about ;, there is a builtin to execute a console command, ;" I think. I'm one of those people that always somehow finds spaces at the start of my chatboxes, not sure why :P
     
  19. Mikleo

    Mikleo Member

    Messages:
    155
    Likes Received:
    98
    Trophy Points:
    0
    I see some threads that say putting ; at start of chat executes a command. like putting ;exit should exit the game.
    but that doesn't seem to be working for empires, if it type ;command in all chat it doesn't execute it.
     
  20. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    uhm what exactly is bad about -- and ==?

    what bugs me more is that being voted as spectator squadleader has no effect :P
    nah jk.

    but seriously, -- and == are fine
     

Share This Page