Snitch: Difference between revisions

From CivWiki
Jump to navigation Jump to search
Content added Content deleted
(rewrite most of the page, move to separate page)
Tag: Removed redirect
(link civ)
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:JukeAlertCheatsheet.png|thumb|350px| JukeAlert single image summary]]
[[File:JukeAlertCheatsheet.png|thumb|350px| A summary of snitch mechanics on [[CivClassic]]. "JukeAlert" refers to the name of the snitch plugin.]]
{{Mechanics series}}
A '''snitch''' is a block commonly included in [[Civ]] servers which records nearby player movement or actions. Snitches provide different abilities based on their type. Some can send a message to a [[NameLayer|NameLayer group]] when it detects player movement, allowing for real-time tracking of players. Other snitches can log nearby actions and can be examined after the fact to determine a recounting of events, even if nobody was present at the time.


Snitches are frequently placed in high-traffic areas to provide real-time insight into player movement, and in high-value areas so that any attacks can be traced back to a particular player or group.
'''Snitches''' are blocks which record the actions of other players in a radius around them. They come in two varieties: noteblocks and jukeboxes. Noteblocks only record player movement, while jukeboxes record all player actions, including breaking blocks and opening chests. Noteblocks and jukeboxes must be [[reinforced]] to turn into snitches. Snitches are managed by the '''JukeAlert''' plugin ([https://github.com/CivMC/JukeAlert source]).


Civ servers generally use [[Citadel|reinforced]] noteblocks and jukeboxes as snitch blocks, with each providing different capabilities.
== Creation ==


First introduced by [[Civcraft]], snitches have been included in every [[mainline]] civ server since.
To create a snitch, place down a noteblock or jukebox and reinforce it. Snitches have a square area with an 11 block radius, so a total of a 23x23 block area centered on the snitch.


== Mechanics ==
Snitches can be given names with the <code>/janame <name></code> command. A good naming pattern could be <code>[group name]<location></code>


{{Table alignment}}
== Breaking Snitches ==
<tabber>
|-|CivMC=
{| class="wikitable defaultcenter sortable"
|+
!Type
!Radius
!Dormant after
!Culled after
![[Snitch#Movement|Detects movement]]
![[Snitch#Actions|Detects actions]]
![[Snitch#Logs|Preserves logs]]
![[Snitch#Redstone Interaction|Emits redstone]]
|-
|Noteblock
|11 blocks
|4 weeks
|8 weeks
|{{yes}}
|{{no}}
|{{no}}
|{{no}}
|-
|Jukebox
|11 blocks
|6 weeks
|12 weeks
|{{yes}}
|{{yes}}
|{{yes}}
|{{yes}}
|}
|-|CivCraft 1.0=
{| class="wikitable defaultcenter sortable"
|+
!Type
!Radius
!Dormant after
!Culled after
![[Snitch#Movement|Detects movement]]
![[Snitch#Actions|Detects actions]]
![[Snitch#Logs|Preserves logs]]
![[Snitch#Redstone Interaction|Emits redstone]]
|-
|Noteblock
|11 blocks (configurable)
|{{n/a}}
|3 weeks
|{{yes}}
|{{no}}
|{{no}}
|{{no}}
|-
|Jukebox
|11 blocks (configurable)
|{{n/a}}
|3 weeks
|{{yes}}
|{{yes}}
|{{yes}}
|{{yes}}
|}
</tabber>


=== Creation ===
Snitches have a unique interaction with [[NameLayer]] - once broken, they will print the name of the group they are reinforced to, along with the primary owner of the group. This is to allow players to determine who (perhaps with malintent) placed snitches on their land. This does not occur when culled snitches are broken.
To create a snitch, place a noteblock or jukebox and [[Citadel|reinforce]] it.


You can give use <code>/janame <name></code> to set the name of the nearest snitch, which will then use that name in its notifications. By default, a snitch's name is empty.
== Recording Movement ==


=== Movement ===
Whenever a player not on a snitch's namelayer group (or a player who is on the snitch's namelayer group, but does not have the SNITCH_IMMUNE permission) enters the snitch's area, a notification is sent to the snitch's namelayer group. Players on the namelayer group must have the SNITCH_NOTIFICATIONS permission to see this notification.
When a player enters the radius of a snitch with the ability to detect movement, the snitch will send a message to the [[NameLayer|group]] it is reinforced to. The format of this message varies by server, but is generally <code><player name> entered snitch at <snitch name> [world <x>,<y>,<z>]</code>.


Snitches that track movement will also track if a player logs in or logs out within their radius. This sends a message in the same way player movement does.
Note that throwing an ender pearl into a snitch field will not trigger the snitch, but moving inside afterwards will.


=== Actions ===
By default, the notification has the form <code><player> entered snitch at <snitch name> [world <x>,<y>,<z>]</code>.
When a player takes one of a predefined list of actions within the radius of a snitch that can detect actions, the snitch will record that action so it can be viewed later. Unlike movement, the snitch will not broadcast recorded actions in real time.


The following is an complete list of actions which snitches record in their logs.
== Recording Actions ==

{| class="wikitable"
|+
!Action
!Description
|-
|<code>BLOCK_BREAK</code>
|A player broke a block.
|-
|<code>BLOCK_PLACE</code>
|A player placed a block.
|-
|<code>DESTROY_VEHICLE</code>
|A player destroyed a vehicle (such as a minecart).
|-
|<code>DISMOUNT_ENTITY</code>
|A player dismounted an entity (such as a horse).
|-
|<code>EMPTY_BUCKET</code>
|A player emptied a bucket (such as placing water).
|-
|<code>ENTER_VEHICLE</code>
|A player entered a vehicle (such as a minecart).
|-
|<code>EXIT_VEHICLE</code>
|A player exited a vehicle (such as a minecart).
|-
|<code>FILL_BUCKET</code>
|A player filled a bucket (such as taking water).
|-
|<code>IGNITE_BLOCK</code>
|A player ignited a block (such as lighting a block with flint and steel).
|-
|<code>KILL_MOB</code>
|A player killed a mob.
|-
|<code>KILL_PLAYER</code>
|A player killed another player.
|-
|<code>MOUNT_ENTITY</code>
|A player mounted an entity (such as a horse).
|-
|<code>OPEN_CONTAINER</code>
|A player opened a container (such as a chest).
|}


=== Breaking ===
Both noteblocks and jukeboxes record movement, but only jukeboxes record other player actions. Whenever a player performs an action - such as breaking a block, opening a chest, killing a mob, mounting a horse, etc - in the radius of a jukebox, a log entry is added to the jukebox.
When a player breaks a snitch that is not theirs, it will print the name of the group they are reinforced to, along with the primary owner of the group. This provides players a clue as to who had placed the snitch, which might otherwise be very difficult to determine.


This mechanic was first introduced in [[CivClassic]] and is present in every proceeding [[mainline]] server.
=== Checking Logs ===


== Logs ==
To read the logs of a jukebox, stand in the radius of the jukebox and use the <code>/jainfo</code> command, which will output the logs to chat. You can also use the <code>/ja</code> command to open a GUI containing the logs. To perform either of these commands, the jukebox must be reinforced to a group you have the <code>READ_SNITCHLOG</code> permission on.
[[File:Jainfo example.png|thumb|<code>/ja</code> as seen in-game. Each block denotes a recorded action.]]
If a snitch preserves logs, you can run <code>/ja</code> to open an interface containing the logs of the nearest snitch. <code>/jainfo</code> can also be used to print the logs of the nearest snitch to the chat (only visible to you). You can run these commands only on snitches reinforced to a group you have permissions on.


<code>/jainfo</code> can take additional parameters in the syntax <code>/jainfo [<page number> or 'next'] [censor] [action=<action type>] [player=<username>]</code>. These parameters can be combined in any order.
<code>/jainfo</code> can take additional parameters in the syntax <code>/jainfo [<page number> or 'next'] [censor] [action=<action type>] [player=<username>]</code>. These parameters can be combined in any order.


{|class="wikitable"
{|class="wikitable"
|+
|+<code>/jainfo</code> parameters
!width="20%"| Parameter
!width="20%"| <code>/jainfo</code> Parameter
!width="30%"| Description
!width="30%"| Description
!width="50%"| Example
!width="50%"| Example
Line 56: Line 171:
== Dormancy and Culling ==
== Dormancy and Culling ==


Snitches need to be periodically refreshed by a player entering the snitch field who is on the snitch group with the namelayer <code>LIST_SNITCHES</code> permission. Snitches that are not refreshed will first become dormant and lose all functionality but once refreshed will become functional again, if a dormant snitch isn't refreshed however after more time it will become culled. A culled snitch has no functionality but also can't be refreshed, functionality can only be regained by breaking and replacing the snitch block. You can use /jalist to see if your snitches have become dormant or how long is left until a snitch becomes dormant or culled. When you refresh a snitch, the timer on /jalist won't be updated until the daily server restart.
Snitches need to be periodically refreshed by a player entering the snitch field who is on the snitch group with the namelayer <code>LIST_SNITCHES</code> permission. Snitches that are not refreshed will first become dormant and lose all functionality but once refreshed will become functional again, if a dormant snitch isn't refreshed however after more time it will become culled. A culled snitch has no functionality but also can't be refreshed, functionality can only be regained by breaking and replacing the snitch block. You can use /jalist to see if your snitches have become dormant or how long is left until a snitch becomes dormant or culled.


== Redstone Interaction ==
{|class="wikitable"
|+Cull times
!| Type
!Domancy time
!| Cull time
|-
| Noteblock
|4 Weeks
| 8 Weeks
|-
| Jukebox
|6 Weeks
| 12 Weeks
|}


Snitches with the ability to emit redstone can be be configured to emit a redstone pulse when it records a specific action. This behavior must first be enabled for a specific snitch with <code>/jatogglelevers</code> (<code>/jatogglelevers 1</code> to enable, and <code>/jatogglelevers 0</code> to disable). Then, place a lever on one of the four cardinal faces of the snitch block — i.e., anywhere but top or bottom.
== Redstone Interactions ==


The face the lever is placed on changes the action which will cause the snitch to emit a redstone pulse.
Jukebox snitches can be configured to cause levers on the blocks on or adjacent to the jukebox sides to output a redstone pulse. This behavior which is disabled by default can be enabled with <code>/jaToggleLevers 1</code> and disabled by <code>/jaToggleLevers 0</code> in radius of snitch.

The direction the lever is placed on changes the action type that causes it to trigger.


{|class="wikitable"
{|class="wikitable"
|+
|+Redstone signal
!| Direction
!| Snitch face
!| Trigger
!| Trigger
|-
|-
Line 96: Line 196:
| Block break
| Block break
|}
|}

Nearby levers will be turned on for a duration of approximately 750ms. This duration can vary due to server lag. Levers that have already been enabled by players will also be turned off after 750ms.


== Kira ==
== Kira ==


[[Kira]] relays can be set up to automatically send snitch notifications for a discord channel.
[[Kira]] can be set up so that movement notifications are automatically relayed to a discord channel, in addition to being sent to a NameLayer group.


== Mods ==
== Mods ==


The [https://github.com/Gjum/SnitchMod/ SnitchMod] mod can be useful for managing snitches (1.18+).
The [https://github.com/Gjum/SnitchMod/ SnitchMod] mod by [[Gjum|GJum]] can be used to manage snitches.


== Commands ==
== Command Reference ==


{|class="wikitable"
{|class="wikitable"
|+ class="nowrap" | Commands
|+ class="nowrap" |
!| Usage
!| Command
!| Function
!| Description
|-
|-
| <code>jahelp</code>
| <code>/jahelp</code>
| Display JukeAlert help
| Display the help menu.
|-
|-
| <code>ja</code>
| <code>/ja</code>
| Open snitch GUI
| Open the in-game snitch interface.
|-
|-
| <code>/jainfo [<page number> or 'next'] [censor] [action=<action type>] [player=<username>]</code>
| <code>/jainfo [<page number> or 'next'] [censor] [action=<action type>] [player=<username>]</code>
| Print snitch logs in chat.
| Print snitch logs in chat.
|-
|-
| <code>jalist [group]</code>
| <code>/jalist [group]</code>
| Open an interface containing a list of snitches. If <code>group</code> is given, shows only snitches reinforced to that group.
| Display snitches in a GUI
|-
|-
| <code>janame <name></code>
| <code>/janame <name></code>
| Name snitch
| Set the name of the closest snitch.
|-
|-
| <code>jalookup []</code>
| <code>/jalookup <x>, <y>, <z></code>
| Use coordinates to show the namelayer the snitch is reinforced to
| Look up a snitch by its coordinates. This will show what group the snitch is reinforced to. This command can only be run on snitches on groups you have permissions for.
|-
|-
| <code>jamute [group]</code>
| <code>/jamute [group]</code>
| Ignore/Stop ignoring a group. Leaving the 'group' parameter empty will list the ignored groups.
| Temporarily mute or unmute movement notifications for snitches reinforced to <code>group</code>. If <code>group</code> is not given, list all ignored groups.
|-
|-
| <code>jaclear</code>
| <code>/jaclear</code>
| Clear snitch logs from a nearby snitch
| Clears snitch logs from the closest snitch.
|-
|-
| <code>jatogglelevers <0,1></code>
| <code>/jatogglelevers <0,1></code>
| Enable/Disabled the lever output functionality
| Enable (<code>1</code>) or disable (<code>0</code>) the lever output functionality of the closest snitch.
|}
|}

{{Template:Mechanics}}

Latest revision as of 23:56, 13 December 2023

A summary of snitch mechanics on CivClassic. "JukeAlert" refers to the name of the snitch plugin.

A snitch is a block commonly included in Civ servers which records nearby player movement or actions. Snitches provide different abilities based on their type. Some can send a message to a NameLayer group when it detects player movement, allowing for real-time tracking of players. Other snitches can log nearby actions and can be examined after the fact to determine a recounting of events, even if nobody was present at the time.

Snitches are frequently placed in high-traffic areas to provide real-time insight into player movement, and in high-value areas so that any attacks can be traced back to a particular player or group.

Civ servers generally use reinforced noteblocks and jukeboxes as snitch blocks, with each providing different capabilities.

First introduced by Civcraft, snitches have been included in every mainline civ server since.

Mechanics

Creation

To create a snitch, place a noteblock or jukebox and reinforce it.

You can give use /janame <name> to set the name of the nearest snitch, which will then use that name in its notifications. By default, a snitch's name is empty.

Movement

When a player enters the radius of a snitch with the ability to detect movement, the snitch will send a message to the group it is reinforced to. The format of this message varies by server, but is generally <player name> entered snitch at <snitch name> [world <x>,<y>,<z>].

Snitches that track movement will also track if a player logs in or logs out within their radius. This sends a message in the same way player movement does.

Actions

When a player takes one of a predefined list of actions within the radius of a snitch that can detect actions, the snitch will record that action so it can be viewed later. Unlike movement, the snitch will not broadcast recorded actions in real time.

The following is an complete list of actions which snitches record in their logs.

Action Description
BLOCK_BREAK A player broke a block.
BLOCK_PLACE A player placed a block.
DESTROY_VEHICLE A player destroyed a vehicle (such as a minecart).
DISMOUNT_ENTITY A player dismounted an entity (such as a horse).
EMPTY_BUCKET A player emptied a bucket (such as placing water).
ENTER_VEHICLE A player entered a vehicle (such as a minecart).
EXIT_VEHICLE A player exited a vehicle (such as a minecart).
FILL_BUCKET A player filled a bucket (such as taking water).
IGNITE_BLOCK A player ignited a block (such as lighting a block with flint and steel).
KILL_MOB A player killed a mob.
KILL_PLAYER A player killed another player.
MOUNT_ENTITY A player mounted an entity (such as a horse).
OPEN_CONTAINER A player opened a container (such as a chest).

Breaking

When a player breaks a snitch that is not theirs, it will print the name of the group they are reinforced to, along with the primary owner of the group. This provides players a clue as to who had placed the snitch, which might otherwise be very difficult to determine.

This mechanic was first introduced in CivClassic and is present in every proceeding mainline server.

Logs

/ja as seen in-game. Each block denotes a recorded action.

If a snitch preserves logs, you can run /ja to open an interface containing the logs of the nearest snitch. /jainfo can also be used to print the logs of the nearest snitch to the chat (only visible to you). You can run these commands only on snitches reinforced to a group you have permissions on.

/jainfo can take additional parameters in the syntax /jainfo [<page number> or 'next'] [censor] [action=<action type>] [player=<username>]. These parameters can be combined in any order.

/jainfo Parameter Description Example
<page number> or next View older entries. It can either be a page number or the keyword next. next will print the next page. /jainfo 3 will print the 3rd page.
censor Censor coordinates from the logs. This is useful for posting snitch evidence publicly. /jainfo censor will print Falvyu Block Break 1 [*** *** ***] instead of Falvyu Block Break 1 [1562 13 178]
action=<action type> Filter by action type. /jainfo action="block break" will only print entries where a block has been broken. Note that double quotes are only mandatory if the action has a space in it.
player=<username> Filter by player name. /jainfo player=RaiderCC1 will only print entries for 'RaiderCC1'. Note that this is case insensitive and will also print partial matches. /jainfo player=raider will therefore print entries for 'RaiderCC1' and any other player who has the word 'raider' in their name.

Dormancy and Culling

Snitches need to be periodically refreshed by a player entering the snitch field who is on the snitch group with the namelayer LIST_SNITCHES permission. Snitches that are not refreshed will first become dormant and lose all functionality but once refreshed will become functional again, if a dormant snitch isn't refreshed however after more time it will become culled. A culled snitch has no functionality but also can't be refreshed, functionality can only be regained by breaking and replacing the snitch block. You can use /jalist to see if your snitches have become dormant or how long is left until a snitch becomes dormant or culled.

Redstone Interaction

Snitches with the ability to emit redstone can be be configured to emit a redstone pulse when it records a specific action. This behavior must first be enabled for a specific snitch with /jatogglelevers (/jatogglelevers 1 to enable, and /jatogglelevers 0 to disable). Then, place a lever on one of the four cardinal faces of the snitch block — i.e., anywhere but top or bottom.

The face the lever is placed on changes the action which will cause the snitch to emit a redstone pulse.

Snitch face Trigger
North Player entry or login/logout
East Block placement
South Chest opened
West Block break

Kira

Kira can be set up so that movement notifications are automatically relayed to a discord channel, in addition to being sent to a NameLayer group.

Mods

The SnitchMod mod by GJum can be used to manage snitches.

Command Reference

Command Description
/jahelp Display the help menu.
/ja Open the in-game snitch interface.
/jainfo [<page number> or 'next'] [censor] [action=<action type>] [player=<username>] Print snitch logs in chat.
/jalist [group] Open an interface containing a list of snitches. If group is given, shows only snitches reinforced to that group.
/janame <name> Set the name of the closest snitch.
/jalookup <x>, <y>, <z> Look up a snitch by its coordinates. This will show what group the snitch is reinforced to. This command can only be run on snitches on groups you have permissions for.
/jamute [group] Temporarily mute or unmute movement notifications for snitches reinforced to group. If group is not given, list all ignored groups.
/jaclear Clears snitch logs from the closest snitch.
/jatogglelevers <0,1> Enable (1) or disable (0) the lever output functionality of the closest snitch.