Skip to content

Commit

Permalink
Document tracking compass modules & more
Browse files Browse the repository at this point in the history
Signed-off-by: Pear <20259871+TheRealPear@users.noreply.github.com>
  • Loading branch information
TheRealPear committed Jun 22, 2024
1 parent 23c40c6 commit 3f3d816
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 24 deletions.
1 change: 1 addition & 0 deletions docs/commands/community.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: community
title: Community Commands
hide_table_of_contents: true
---

This page describes a list of commands, aliases, and permissions for [Community](https://github.com/PGMDev/Community/), a standalone plugin for managing PGM servers.
Expand Down
1 change: 1 addition & 0 deletions docs/commands/events.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: events
title: Events Commands
hide_table_of_contents: true
---

This page describes a list of commands, aliases, and permissions for the [Events](https://github.com/PGMDev/Events) plugin.
Expand Down
14 changes: 9 additions & 5 deletions docs/commands/main.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: main
title: PGM Commands
hide_table_of_contents: true
---

This page describes a list of PGM commands, aliases, and permissions.
Expand All @@ -13,16 +14,19 @@ Permissions are prefixed with `Permissions` (i.e. `Permissions.ADMINCHAT`).
| `/action list` | actions list<br />actions page | Inspect variables for a player. | -q query<br />-a all | [page] | `GAMEPLAY` |
| `/action trigger` | actions trigger | Trigger a specific action. || [action] | `GAMEPLAY` |
| `/action untrigger` | actions untrigger | Untrigger a specific action. || [action] | `GAMEPLAY` |
| `/filter` || Match a filter against a player. || [filter] [target] | `DEBUG` |
| `/mode push` || Reschedule all unconditional objective modes. || [time] | `GAMEPLAY` |
| `/mode start` || Starts an objective mode. || [mode number] [time] | `GAMEPLAY` |
| `/team alias` || Rename a team. || [old team name] [new team name] | `GAMEPLAY` |
| `/timelimit` | tl | Start a time limit. | -r result (can be `default`, `objectives`, `tie`, or name of team) | [duration] [result] [overtime] [max-overtime] | `GAMEPLAY` |
| `/join` | play | Join the match. | -f force | [team] defaults to random | `JOIN` |
| `/join` | play | Join the match. | -f force | [team] - defaults to random | `JOIN` |
| `/team force` || Force a player onto a team. ||| `JOIN_FORCE` |
| `/team shuffle` || Shuffle players among the teams. || -a all -f force | `JOIN_FORCE` |
| `/team shuffle` || Shuffle players among the teams. | -a all<br />-f force || `JOIN_FORCE` |
| `/leave` | obs | Leave the match. ||| `LEAVE` |
| `/loadnewmaps` | findnewmaps<br />new<br />maps | Load new maps. | -f force || `RELOAD` |
| `/pgm` || Reload the configuration. ||| `RELOAD` |
| `/pgm reload` || Reload the configuration. ||| `RELOAD` |
| `/pgm help` || View available PGM commands. ||| `RELOAD` |
| `/pgm confirm` || Execute any pending commands. ||| `RELOAD` |
| `/ffa min` || Set the minimum players. || [reset &#124; min-players] | `RESIZE` |
| `/ffa size` || Set the maximum players. || [reset &#124; max-players] (max-overfill) | `RESIZE` |
| `/team min` || Set the minimum players on a team. || [team] (reset &#124; min-players) | `RESIZE` |
Expand All @@ -46,9 +50,9 @@ Permissions are prefixed with `Permissions` (i.e. `Permissions.ADMINCHAT`).
| `/class` | selectclass<br />c<br />cl | Selects your class. |
| `/classlist` | classes<br />listclasses<br />cls | List all available classes. |
| `/g` | all<br />! (*do not use forward slash*) | Send a message to everyone. || [message] |
| `/inventory` | inv<br />vi | View a players inventory. |
| `/inventory` | inv<br />vi | View a player's inventory. |
| `/list` | who<br />online<br />ls | View a list of online players. |
| `/map` | mapinfo | Show info about a map. || [map name] defaults to current map |
| `/map` | mapinfo<br />showxml | Show info about a map. || [map name] - defaults to current map |
| `/maps` | maplist<br />ml | List all loaded maps. | -a author<br />-t tag1,tag2<br />-n name |
| `/match` | matchinfo | Show the match info. |
| `/mode list` | page | List all objective modes. || [page] |
Expand Down
26 changes: 13 additions & 13 deletions docs/modules/general/main.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ The maps version should follow the versioning schema `major.minor.patch`.
| Element | Description | Value/Children | Default |
|---|---|---|---|
| `<name>` | <span className="badge badge--danger">Required</span>The name of the map. | <span className="badge badge--primary">String</span> |
| `<slug>` | The map's slug, usually auto generated from the map's name. This should only be used when a map is renamed to retain the map's ratings, etc.<br />*Valid slugs are lowercase and only contain the characters:* `a-z 0-9 _` | <span className="badge badge--primary">String</span> | <span className="badge badge--secondary">Auto Generated</span> |
| `<version>` | <span className="badge badge--danger">Required</span>The map's [semantic version](https://semver.org/) string. | `1.0.0` |
| `<slug>` | The map's internal identifier, usually auto generated from the map's name. This should only be used when a map is renamed to retain the map's ratings, etc.<br />*Valid slugs are lowercase and only contain the characters:* `a-z 0-9 _` | <span className="badge badge--primary">String</span> | <span className="badge badge--secondary">Auto Generated</span> |
| `<version>` | <span className="badge badge--danger">Required</span>The map's [semantic version](https://semver.org/). | `1.0.0` |
| `<objective>` | <span className="badge badge--danger">Required</span>The map's objective, shown at the start of the match. | <span className="badge badge--primary">String</span> |
| `<authors>` | <span className="badge badge--danger">Required</span>The authors of the map, at least one author is required. | `<author>` |
| `<authors>` | <span className="badge badge--danger">Required</span>The authors of the map. At least one author is required. | `<author>` |
| `<contributors>` | Contributors to the map. | `<contributor>` |
| `<created>` | The date on which this map was initially released. | `YYYY-MM-DD` |
| `<phase>` | The phase of this map.<br />**Note:** By default, it will not appear in the list when a user runs /maps. In legacy PGM, only maps with production and standard show up on a website configured with an API. | `development`<br />`production` | `production` |
| `<edition>` | The edition of this map, describing which servers it should run on. | `standard`<br />`ranked`<br />`tournament` | `standard` |
| `<game>` | A custom title for this match's gamemode. | <span className="badge badge--primary">String</span> |
| `<gamemode>` | The gamemode(s) of this map, if this is not specified the map will set the gamemode(s) to whatever modules are used. | <span className="badge badge--primary">Gamemode ID</span> |
| `<phase>` | The stage of development the map is in.<br />**Note:** By default, it will not appear in the list when a user runs `/maps`. In legacy PGM, only maps in production phase show up on a website configured with an API. | `development`<br />`staging`<br />`production` | `production` |
| `<edition>` | The type of gameplay environment this map is intended for.<br />**Note:** In legacy PGM, only standard edition maps show up on a website configured with an API. | `standard`<br />`ranked`<br />`tournament` | `standard` |
| `<game>` | A custom title for this match's gamemode.<br />**Note:** A map can have multiple gamemode titles. PGM will select the lowest as the map's primary title. | <span className="badge badge--primary">String</span> |
| `<gamemode>` | The gamemode(s) of this map. If this is not specified the map will set the gamemode(s) to whatever modules are used. | <span className="badge badge--primary">Gamemode ID</span> |
</div>

```xml
Expand All @@ -66,7 +66,7 @@ There can be multiple authors and contributors to a map.
The contribution attribute should be used to specify what their contribution to the map was.

A player's name should **not** be used to credit them, instead their UUID should be used.
A UUID is a unique user identifier that is used to keep track of players even if they change their name.
A UUID is a universally unique identifier that is used to keep track of players even if they change their name.
You can check player UUIDs at [mcuuid.net](https://mcuuid.net/).
If an author or contributor is defined without a UUID, that player will not get any mapmaker perks on the map.

Expand All @@ -85,7 +85,7 @@ If an author or contributor is defined without a UUID, that player will not get
| Attribute | Description | Value |
|---|---|---|
| `uuid` | The UUID used to identify a Minecraft player. | <span className="badge badge--primary">String</span> |
| `contribution` | The contribution this author or contributor made to the map. | <span className="badge badge--primary">String</span> |
| `contribution` | A description of the contribution this author or contributor made to the map. | <span className="badge badge--primary">String</span> |
</div>

```xml
Expand Down Expand Up @@ -148,13 +148,13 @@ Additionally, a variant can also contain constants, which allows you to define t
| `<variant> </variant>` | A map variant. | <span className="badge badge--primary">String</span> |
</div>

#### Variant Attributes
##### Variant Attributes

<div className="table-container">
| Attribute | Description | Value | Default |
|---|---|---|---|
| `id` | <span className="badge badge--danger">Required</span>Unique identifier used to reference this map variant from other places in the XML. | <span className="badge badge--primary">String</span> |
| `world` | Specify the world the variant should use during a match. | <span className="badge badge--primary">String</span> |
| `world` | The world the variant should use during a match. | <span className="badge badge--primary">String</span> |
| `override` | Toggle if the variant name should override the base map name. If set to false, PGM will append `: [variant]` to the base map name. | <span className="badge badge--primary">true/false</span> | false |
</div>

Expand All @@ -167,7 +167,7 @@ Additionally, a variant can also contain constants, which allows you to define t
| `<unless> </unless>` | Apply an XML section for all variants except for a specific variant when loaded. | <span className="badge badge--secondary">XML Modules</span> |
</div>

#### If/Unless Conditional Attributes
##### If/Unless Conditional Attributes

<div className="table-container">
| Attribute | Description | Value |
Expand All @@ -192,7 +192,7 @@ PGM will search and replace any corresponding placeholders (`${constant_id}`) wi
| `<constant> </constant>` | An individual constant. | <span className="badge badge--primary">String</span> |
</div>

#### Constant Attributes
##### Constant Attributes

<div className="table-container">
| Attribute | Description | Value | Default |
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/information/broadcasts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ It should not be used for generic server-related messages.
<div className="table-container">
| Element | Description | Value |
|---|---|---|
| `<filter>` | <span className="badge badge--secondary" title="Can be either this attribute or a sub-element.">Property</span>Duration to wait after the match starts to show the message. | [Filters](/docs/modules/mechanics/filters) |
| `<filter>` | <span className="badge badge--secondary" title="Can be either this attribute or a sub-element.">Property</span>Filter if the broadcast message should be sent after the duration has passed, or if it is skipped. | [Filters](/docs/modules/mechanics/filters) |
</div>

### Examples
Expand Down
20 changes: 17 additions & 3 deletions docs/modules/mechanics/actions-triggers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ In the future, some features that are currently used in Kits may be transferred
| `<kit/>` | Applies a [Kit](/docs/modules/gear/kits). |
| `<fill/>` | Places blocks in a block-bounded region. |
| `<replace-item> </replace-item>` | Finds and replaces certain items. |
| `<take-payment> </take-payment>` | Allow players to pay with items in their inventory to trigger an action. |
</div>

### Action Attributes
Expand Down Expand Up @@ -96,8 +97,8 @@ In the future, some features that are currently used in Kits may be transferred
|---|---|---|---|
| `region` | <span className="badge badge--secondary" title="Can be either this attribute or a sub-element.">Property</span><span className="badge badge--danger">Required</span>The region to fill in. Multiple regions will be treated as an union. | [Region](/docs/modules/mechanics/regions) |
| `material` | <span className="badge badge--danger">Required</span>The filling material. | [Single Material Pattern](/docs/reference/items/inventory#material-matchers) |
| `filter` | Filters which blocks get affected. *May impact preformace for large fills.* | [Filter](/docs/modules/mechanics/filters) |
| `events` | Calls events for block placements and removals, which will make it affected by other filters and PGM features. *May impact preformace for large fills.* | <span className="badge badge--primary">true/false</span> | false |
| `filter` | Filters which blocks get affected. *May impact performance for large fills.* | [Filter](/docs/modules/mechanics/filters) |
| `events` | Calls events for block placements and removals, which will make it affected by other filters and PGM features. *May impact performance for large fills.* | <span className="badge badge--primary">true/false</span> | false |
</div>

### Replace Item Attributes/Elements
Expand All @@ -113,6 +114,19 @@ In the future, some features that are currently used in Kits may be transferred
| `amount` | Match for item stacks that have a certain amount of items in a range. | <span className="badge badge--primary">Range</span> |
</div>

### Take-Payment Attributes/Elements

<div className="table-container">
| Attribute | Description | Value |
|---|---|---|
| `<payment />` | <span className="badge badge--secondary" title="Can be either this attribute or a sub-element.">Property</span><span className="badge badge--danger">Required</span>An individual payment. | [Item Attributes](/docs/modules/gear/items#item-attributes) |
| `<success-action />` | <span className="badge badge--secondary" title="Can be either this attribute or a sub-element.">Property</span>The action to trigger upon a successful payment. | <span className="badge badge--primary">Action</span> |
| `<fail-action />` | <span className="badge badge--secondary" title="Can be either this attribute or a sub-element.">Property</span>The action to trigger upon a failed payment. | <span className="badge badge--primary">Action</span> |
| `material` | <span className="badge badge--danger">Required</span>The item to display as an icon. | [Material Name](/docs/reference/items/inventory#material-matchers) |
| `price` | The amount of a currency needed to purchase. | <span className="badge badge--primary">Number</span> |
| `currency` | The currency needed to purchase. | [Filter](/docs/modules/mechanics/filters) |
</div>

## Trigger Element

The trigger element waits for a dynamic filter to activate it, and afterwards it will trigger an action.
Expand Down Expand Up @@ -168,7 +182,7 @@ This example uses the `expose` attribute in Action to allow moderators to enable
a "Blitz Mode" using the `/action` command. Moderators must have the `GAMEPLAY` permissions
in order to use `/action`. See [Commands](/docs/commands/main) for more details.

```
```xml
<actions>
<!-- Moderator uses "/action trigger start-blitz" to start this Action -->
<action id="start-blitz" expose="true" scope="match">
Expand Down
65 changes: 65 additions & 0 deletions docs/modules/mechanics/tracking-compass.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
id: tracking-compass
title: Tracking Compass
---

The Tracking Compass module allows you to override the vanilla compass behavior by pointing
it to a player of interest. In addition, you can control how the compass selects the target to track.

#### Compass Element

<div className="table-container">
| Element | Description |
|---|---|
| `<compass> </compass>` | Node containing all compass properties used in this map. |

| Sub-element ||
|---|---|
| `<player>` | An individual compass property. |
| `<flag>` | An individual compass property. |
</div>

##### Compass Attributes

<div className="table-container">
| Attribute | Description | Value | Default |
|---|---|---|---|
| `order` | When using `DEFINITION_ORDER`, the compass targets first matching target. When using `CLOSEST`, the compass goes through all matching targets and chooses the one closest to the player. | `DEFINITION_ORDER`<br />`CLOSEST` |
| `show-distance` | Show the distance between the compass holder and tracked player in meters. | <span className="badge badge--primary">true/false</span> | false |
</div>

##### Player/Flag Attribute

<div className="table-container">
| Attribute | Description | Value | Default |
|---|---|---|---|
| `filter` | Filters who should be tracked by the compass. | [Filter](/docs/modules/mechanics/filters) |
| `holder-filter` | Filters out what compass targets can be eligible for what players, e.g. a team targets a different flag than the other team. | [Filter](/docs/modules/mechanics/filters) |
| `name` | The title name that describes the tracked player's role, e.g. "Wool Carrier" or a tracked object. | <span className="badge badge--primary">Formatted Text</span> |
| `show-player` | Show the tracked player's username to the compass holder.<br />**Note:** This is only applicable to `<player>` sub-element. | <span className="badge badge--primary">true/false</span> | false |
</div>

## Examples

```xml
<compass show-distance="true">
<player filter="always" show-player="true"/>
</compass>

<compass>
<player filter="always" name="Wool Carrier"/>
</compass>

<compass order="DEFINITION_ORDER">
<player filter="wool-carrier" name="Wool Carrier"/>
<player filter="enemy" show-player="true" name="Nearest Enemy"/>
</compass>

<compass>
<player holder-filter="red-team" filter="blue-carrier" show-player="true"/>
<flag holder-filter="red-team">blue-flag</flag>

<player holder-filter="blue-team" filter="red-carrier" show-player="true"/>
<flag holder-filter="blue-team" name="Some other name">red-flag</flag>
</compass>
```
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const config = {
announcementBar: {
id: 'new_features',
content:
'New Features: <a href="/docs/modules/gear/consumables">Consumables</a>, <a href="/docs/modules/general/main#map-variants">Map Variants</a>, <a href="/docs/modules/general/main#constants">Constants</a>, and <a href="/docs/modules/blocks/structures">Structures</a>',
'New Features: <a href="/docs/modules/mechanics/tracking-compass">Tracking Compass</a>, <a href="/docs/modules/gear/consumables">Consumables</a>, <a href="/docs/modules/general/main#map-variants">Map Variants</a>, and <a href="/docs/modules/general/main#constants">Constants</a>',
backgroundColor: '#fafbfc',
textColor: '#091E42',
isCloseable: true,
Expand Down
3 changes: 2 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const sidebars = {
"modules/mechanics/lanes",
"modules/mechanics/damage",
"modules/mechanics/gamerules",
"modules/mechanics/spawners",],
"modules/mechanics/spawners",
"modules/mechanics/tracking-compass"],
},
{
type: 'category',
Expand Down

0 comments on commit 3f3d816

Please sign in to comment.