Coder Social home page Coder Social logo

tgm-docs's Introduction

Documentation

Documentation for the TGM (Team Game Manager) used to host multiple Minecraft gamemodes. You can view the docs located at https://docs.warz.one. Pages are hosted using Github Pages.

Note: TGM is no longer maintained or supported. Please consider an alternative solution such as PGM.

Contributing

  • We use docsify to generate the docs. For any assistance related to setting up or editing the docs, read their tutorials.
  • All pages are located in the 'docs' folder in the Github repo. When editing or adding information, make sure everything is accurate and is formatted using markdown.

tgm-docs's People

Contributors

bennydoesstuff avatar benrobson avatar chatasma avatar jorgeberrex avatar palmidence avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tgm-docs's Issues

Document Gamemodes

A page to document:

  • The different gamemodes TGM supports
  • The IDs of the different gamemodes (CTW = Capture the Wool, etc)
  • A brief explanation of the gameplay of these gamemodes
  • A link to a map/JSON that is using that gamemode

Document MC Specifics

We should have a page/a few pages to document the basics of Minecraft and Bukkit. This could include:

  • The different Hotbar/Inventory IDs
  • Names of potion effects
  • Names of enchantments
  • Any other info that might be helpful for creating the JSON

Document unused kit modules

https://github.com/WarzoneMC/Warzone/blob/27e9cc37b6ec143437aef26282a383dc50991363/TGM/src/main/java/network/warzone/tgm/util/Parser.java

Items Attributes

  • display_name - The name of the item
  • lore - The subtext/description (lore) of the item
  • flags under Item Attributes
    • hide_attributes - Hides attributes like damage
    • hide_destroys - Hides what an item stack can destroy
    • hide_enchants - Hides what enchantments an item has
    • hide_placed_on - Hides what an item can be placed against
    • hide_potion_effects - Hides the potion effects on an item stack
    • hide_unbreakable - Hides the unbreakable state

Potion Attributes

"potion": {"effects": ["<effect>:<time> [amplifier]"]}

  • potion - The parent containing effects attributes.
  • effects - The parent containing child attributes.
  • effect - The potion effect the player receives.
  • time - The amount of time a player recives an effect when consumed.
  • amplifier - The level (or strength) of the effect when consumed.

Book Attributes

  • title - Sets the title of the book.
  • author - Sets who wrote the book.
  • generation - Sets the serialization of the book.
  • pages - The parent containing page attributes.

Document crafting module

All ingredients can be defined either as a string (example: "bookshelf") or a JSON object for matching exact items (example: {"material": "bookshelf", "displayName": "Magical books"} )

Removing recipes

Recipe removal for a specific material

	"crafting": {
		"remove": [
			"crafting table"
		]
	},

NOTE: compass recipe is always removed

Remove all recipes

	"crafting": {
		"remove": "*"
	},

Adding custom recipes:

shapeless recipes

	"crafting": {
		"recipes": [
			{
				"type": "shapeless",
				"result": {
					"material": "iron sword",
					"displayName": "&6&lExodus"
				},
				"ingredients": [
					"dirt"
				]
			}
		]
	},

shaped recipes

	"crafting": {
		"recipes": [
			{
				"type": "shaped",
				"result": {
					"material": "diamond",
					"enchantments": ["power:1"]
				},
				"ingredients": {
					"X": "dirt",
					"Y": "stone"
				},
				"shape": [
					"XY",
					"YX"
				]
			}
		]
	},

Cooking recipes (furnace, smoking, blasting, campfire)

	"crafting": {
		"recipes": [
			{
				"type": "campfire",
				"result": {
					"material": "diamond",
					"lore": [
						"Yes this is how diamonds are made"
					]
				},
				"ingredient": "coal",
				"experience": 0,
				"cookingTime": 600
			}
		]
	},

NOTE: experience and cookingTime are optional.

Stonecutting recipes

	"crafting": {
		"recipes": [
			{
				"type": "stonecutting",
				"result": {
					"material": "smooth stone slab"
				},
				"ingredient": "stone"
			}
		]
	},

Document custom countdowns

Example

	"countdowns": [
		{
			"id": "test",
			"title": "Countdown 1: %countdownTimeLeft%",
			"time": 5,
			"color": "purple",
			"style": "solid",
			"visible": true,
			"invert": false,
			"teams": ["red", "blue"],
			"onFinish": [
				"say yeet",
				"countdown start test1"
			]
		},
		{
			"id": "test1",
			"title": "Countdown 2: %countdownTimeLeft%",
			"time": 5,
			"color": "green",
			"style": "segmented 12",
			"visible": true,
			"invert": true,
			"teams": ["red", "blue"],
			"onFinish": [
				"say yote",
				"countdown start test"
			]
		}
	],

Countdown Structure

Field Description Type Required Default
id ID of the countdown used to start, edit or cancel it. String Yes
time Duration of the countdown in seconds. Integer Yes
title Text displayed on the boss bar. String Yes
color Color for boss bar. (BLUE, GREEN, PINK, PURPLE, RED, WHITE, YELLOW) String No PURPLE
style Style for the boss bar. (SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20) String No SOLID
visible Make the boss bar visible. Boolean No true
invert Make the boss bar go in the opposite direction. Boolean No false
teams Teams that are able to see the boss bar. String array No All teams
onFinish Commands that will run when the countdown ends. String array No

Document objectives/gamemodes

The whole Objectives section which includes Infection, blitz, deathmatch, hills, monuments, etc still needs to be documented. Should include some info on what each one means and how to document it into the JSON.

We should also probably make another page(s) to document:

  • The different gamemodes TGM supports
  • The IDs of the different gamemodes (CTW = Capture the Wool, etc)
  • A brief explanation of the gameplay of these gamemodes
  • A link to a map/JSON that is using that gamemode
  • Any gamemode specifics that might be helpful

Document time module (time limit, default winner, match broadcasts)

Example:

  • Sets the time limit to 20 minutes (1200 seconds)
  • When the time limit is up, blue wins by default
  • Every 10 seconds, a "Test" will be broadcasted and the give @a arrow 1 command will be ran
	"time": {
		"limit": 1200,
		"defaultWinner": "blue",
		"broadcasts": [
			{
				"message": "Test",
				"interval": 10,
				"repeat": true,
				"commands": [
					"give @a arrow 1"
				]
			}
		]
	},

limit and interval is in seconds.

Reorganize sidebar

Trying to think of the best way to sort the categories - right now, it's a little bit of a tossup for certain sections. Damage Control doesn't quite fit into a "Gear" category, but some of these need to be split into actual sections instead of throwing each module into "Mechanics" (which, technically each module is)

Avicus splits it into "Core Modules" (things that every map needs to run), "Game Components" (modules that affect how a map plays), "Advanced Modules" (abstract modules with very specific uses), and "Miscellaneous Modules" (modules that don't fit into any other category).

Stratus splits it into "Gear", "Entities" (modules that affect entity behavior), and "Miscellaneous".

PGM splits it into "General", "Information" (things that are communicated to the player), "Environment" (modules that affect the world), "Format" (whether a map uses teams or individual players), "Objectives", "Mechanics" (general gameplay modules), "Gear" (inventory specific modules), and "Blocks" (modules that affect how block behavior works in the world.)"

As I see it, we should split it into "Core", "Objectives", "Inventory", "Mechanics", and "Abstract",

Add Example Maps

We need to add links to some maps from the Maps repo as examples for people to base their JSONs off of. Would make it easier as they can see the whole JSON compared to only sections of it.

Document Launch Pads

LaunchPadModule.java

Example JSON:

	"launchpads": [
		{
			"region": {"type": "cuboid", "min": "9, 29, -124", "max": "9, 29, -124"},
			"delay": 2,
			"motion": "-0.35, 2.25, 0.35",
			"directional": false,
			"teams": ["blue"]
		},
		{
			"region": "blue-launchpad",
			"delay": 2,
			"motion": "-0.35, 2.25, 0.35",
			"directional": false,
			"teams": ["blue"]
		}
	]
Field name Description Type Required
region Area where the player needs to stand to be launched. Region ID or Region Object Yes
delay How long in ticks the player needs to stand to be launched. Integer No (Default: 0)
directional Whether the launchpad should launch the player in the direction they are looking at. Boolean No (Default: true)
motion Direction in which the player will be launched. If the directional field is set to true, this will act as a multiplier for the player's direction. Vector (x, y ,z) No (Default: 1, 1, 1)
teams List of teams that can use the launch pad. List of teams No (Default: all teams)

Document gamerule module

List of all the gamerule IDs (Only Java Edition)

Example:

	"gamerules": {
		"keepInventory": true,
		"doDaylightCycle": true,
		"doWeatherCycle": false
	},

Defaults:

ID TGM Default value
keepInventory false
doMobSpawning false
doDaylightCycle false
commandBlockOutput false
logAdminCommands false
doWeatherCycle false
disableElytraMovementCheck true
announceAdvancements false

Page for extremely basic info

We need a page to include extremely basic information, we can't assume people already know some stuff. Some info I'm thinking of would be:

  • How to use Github to make a Pull Request.
  • Recommend text editors to use for your JSON.
  • How to make a map (void world, how to prune, etc).
  • Where to build your map (Use Minehut, recommend plugins like Multiverse, etc).
  • Explain what the yaw is, the different inventory slot numbers, etc.
  • The correct license needed, required files for the world, etc.

Document player's gamemode

Example:

{
  "teams": [
    {
      "id": "cyan",
      "name": "Cyan",
      "color": "dark aqua",
      "gamemode": "survival",
      "min": 1,
      "max": 40
    }
  ]
}

Type attributes:

Attribute Description Value
survival Players have full access when interacting with the environment String
adventure Players are unable to place and destroy blocks String

Note that survival mode is default.

We could include creative and spectator mode, but I don't think they would be used in any manner. If we decide not to include creative and spectator mode, we could convert to boolean.

Bug with button

The button used to close out of the sidebar does not work, meaning users on mobile are unable to switch between pages.

button

Document Commands & Permissions

I have been looking into using TGM for my own Server and I found it very difficult to get all the permission nodes to apply them to my user groups. I would've thought there was a resource for this but when I asked in the contributing channel, one hasn't been made.

Document Meta Regions

Meta regions are regions that can hold multiple regions and they will be all treated as a single region.

Examples:

	"regions": [
		{
			"id": "meta-test", 
			"type": "meta", 
			"regions": [
				{"min": "89, 9, -54", "max": "90, 9, -54"},
				{"min": "89, 9, -57", "max": "90, 9, -57"}
			]
		}
	]
	"regions": [
                {"id": "blue-spawn-protection", "type": "cuboid", "min": "224, 0, -43", "max": "240, oo, -65"},
                {"id": "red-spawn-protection", "type": "cuboid", "min": "-1, 0, -43", "max": "15, oo, -65"},
                {"id": "meta-test", "type": "meta", "regions": ["blue-spawn-protection", "red-spawn-protection"]}
	]

Add support for Gitalk

https://github.com/gitalk/gitalk - This would be useful to centralize questions on the docs (for clarifications, or other reason) and allow discussions on the modules themselves. This has many advantages over just leaving a message in #mapmaking, and hooks right in with GitHub. It is easily installable with the script and CSS import.

<link rel="stylesheet" href="//unpkg.com/gitalk/dist/gitalk.css">

<script src="//unpkg.com/docsify/lib/plugins/gitalk.min.js"></script>
<script src="//unpkg.com/gitalk/dist/gitalk.min.js"></script>
<script>
  const gitalk = new Gitalk({
    clientID: 'Github Application Client ID',
    clientSecret: 'Github Application Client Secret',
    repo: 'Github repo',
    owner: 'Github repo owner',
    admin: ['Github repo collaborators, only these guys can initialize github issues'],
    // facebook-like distraction free mode
    distractionFreeMode: false
  })
</script>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.