Editing Commshare

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 +
[[Category:Manual]]
 +
 
== Overview ==
 
== Overview ==
Commshare (or Command Share) allows players to share control of units. Players who engage in Commsharing are assigned to a squad, which functions as if all the members of the squad were one player. Each squad member contributes all income and [[units]] to the squad.
+
Commshare (or Command Share) is an alpha feature. Players who engage in Commsharing are assigned to a squad, which functions as if all the members of the squad were one player. Each member assigned to a squad adds their income and units to the squad.
 +
 
 +
= Overview of modes =
 +
Commshare has three modes of operation:
  
Enable Commshare by holding {{key press|Tab}} to open the player list, then pressing the <samp>[[File:Commshare.png|x16px|Commshare|link=]] Commshare</samp> icon to invite a player into your squad or to accept a player's invitation to a squad.
+
* All mode
 +
All players are merged at game start (specifically ~166ms into the game). Nobody may unmerge or kick anyone at any time.
  
== Modes ==
+
* Invite mode (Default)
Commshare has three modes of operation:
+
To merge with another player, you must first both agree to it. The player who invites the other first becomes the 'squad leader' who acts as the representative of the squad. Squad leaders can kick anyone for any reason at any time. They will receive their units back upon getting kicked, however. You may also leave a squad at any time as well. Issuing an invite is simple: Press H then click on the half teal/half green commander.
;All mode
+
 
:All players are merged at game start (specifically, ≈166ms into the game). Nobody may unmerge or kick anyone at any time.
+
* None  
;Invite mode (Default)
+
No commsharing is allowed. No commshare commands will be responded to.
:To merge with another player, you must first both agree to it. The player who invites the other first becomes the "squad leader," who acts as the representative of the squad. Squad leaders can kick anyone for any reason at any time. The players will receive their units back upon getting kicked. You may also leave a squad at any time as well. Issuing an invite is simple: Press {{key press|Tab}}, then click on the half teal/half green Commander.
 
;None  
 
:No commsharing is allowed. No commshare commands will be responded to.
 
  
== Privileges ==
+
= Privileges =
  
 
All members may accept, decline, or issue invites. Only the squad leader may kick anyone.
 
All members may accept, decline, or issue invites. Only the squad leader may kick anyone.
  
== Developing ==
+
= Developing =
  
Commands to commshare should be issued using <syntaxhighlight lang="lua" inline>SendLuaRulesMsg</syntaxhighlight> with the following string:
+
Commands to commshare should be issued using SendLuaRulesMsg with the following string:
<syntaxhighlight lang="lua">sharemode <command> <param></syntaxhighlight>
+
sharemode <command> <param>
 
This is not case sensitive. The following are valid commands:
 
This is not case sensitive. The following are valid commands:
{|class="wikitable sortable"
+
{|
!Command!!Param!!class="unsortable"|Purpose
+
!Command:!!Param:!!Purpose:
 
|-
 
|-
|Accept || <var>playerID</var> || Accepts an invite from <var>playerID</var>.
+
|Accept || playerID || Accepts an invite from playerID.
 
|-
 
|-
|Decline || <var>playerID</var> || Declines an invite from <var>playerID</var>.
+
|Decline || playerID || Declines an invite from playerID.
 
|-
 
|-
|Invite || <var>playerID</var> || Issues an invite to <var>playerID</var>.
+
|Invite || playerID || Issues an invite to playerID.
 
|-
 
|-
|Kick || <var>playerID</var> || Forces <var>playerID</var> to unmerge, requires teamleader.
+
|Kick || playerID || Forces playerID to unmerge, requires teamleader.
 
|-
 
|-
|Remerge || None || Causes you to remerge if you were disconnected or kicked from game.
+
|Remerge || None || Causes you to remerge, if you were disconnected/kick from game.
 
|-  
 
|-  
 
|Unmerge || None || Causes you to unmerge.
 
|Unmerge || None || Causes you to unmerge.
 
|}
 
|}
  
=== Getting invites ===
+
== TeamRulesParam: Getting invites ==
Invites are stored in <syntaxhighlight lang="lua" inline>TeamRulesParam</syntaxhighlight> as private data. It is stored as if it were an ordered table.
+
Invites are stored in TeamRulesParam as private data. It is stored as if it was an ordered table.
{|class="wikitable sortable"
+
{|
!Param!!class="unsortable"|Info!!class="unsortable"|Notes
+
!Param:!!Info:!!Notes:
 
|-
 
|-
|<syntaxhighlight lang="lua" inline>commshare_invitecount</syntaxhighlight> || # of invites || Get this first, then do a <syntaxhighlight lang="lua" inline>for i = 1, commshare_invitecount</syntaxhighlight> loop.
+
|commshare_invitecount || # of invites || Get this first, then do a for i=1,commshare_invitecount loop.
 
|-
 
|-
|<syntaxhighlight lang="lua" inline>"commshare_invite_" .. i .."_id"</syntaxhighlight> || ID of the player who sent the invite ||  
+
|"commshare_invite_" .. i .."_id" || ID of the player who sent the invite ||  
 
|-
 
|-
|<syntaxhighlight lang="lua" inline>"commshare_invite_" .. i .."_timeleft"</syntaxhighlight> || Time remaining on this invite || You must check if this is different than last second's count to see if it's dead.
+
|"commshare_invite_" .. i .."_timeleft" || Time remaining on this invite || You must check if this is different than last second's count to see if it's dead.
 
|}
 
|}
 
 
{{Navbox manual}}
 

Please note that all contributions to Zero-K are considered to be released under the Creative Commons Attribution-ShareAlike (see Zero-K:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)