Skip to content

Mapping Basics

redwall_hp edited this page Apr 20, 2016 · 3 revisions

In AthenaGM, a map consists of a regular Minecraft world that has been cleaned up a little and given a YAML configuration file that defines metadata and functionality. This guide will walk you through the process of preparing a map.

image

  1. Preparing the World

Out of the box, AthenaGM uses a void-world generator when it loads a map world, meaning chunks will never be generated, no matter where the player goes. All that will exist is what you, the map creator, chooses to put there.

When making the world, you have two primary methods available:

  1. Build your map and paste it into an empty void world on a regular Bukkit server, using WorldEdit. This is the cleanest option, and preferable for "sky island" style maps.
  2. Build your map and use MCEdit to prune unneeded chunks, leaving only the ones you need. This is accomplished by selecting the chunks and using the Chunk Control tool's Prune button to throw out all of the chunks in the world, except for the ones selected. Save the world and you're done.

However you achieve it, you should end up with a standard Minecraft world directory.

image

  1. Clean Up the World Files

With that out of the way, let's clean things up and remove unnecessary files. Be sure to make a copy of the world folder before proceeding, so you can revert if you mess anything up.

A clean world folder should have the following files:

  • level.dat — Stores general world metadata and settings
  • region/ — This folder contains the region files, which describe the physical blocks and chunks.
  • data/ — Stores other world information. You can remove data/villages.dat though.

Everything else can probably go. Directories like playerdata/ are completely unnecessary, as they store things like players' inventories...and AthenaGM doesn't need that.

You should end up with something that looks like this:

image

What's this agm.yml file? That's something we'll be adding next. It's the secret recipe that tells AthenaGM everything it needs to know about the map, from its name and other metadata to kits, teams and regions.

  1. Create agm.yml

Go ahead and create an agm.yml file in your world folder, as pictured above. The specifics will be covered more thoroughly in another document, but for now, let's go through the basics of setting up agm.yml.

agm.yml is the backbone of an AthenaGM map, serving as a central location for everything Athena needs to know about the map. Its name and author go there, the game mode it's designed for goes there, teams and kits are defined there, protected regions are defined there, etc.

Let's start with the basic metadata:

name: Spongeland
author: redwall_hp
version: 1.0.0
objective: Become the King of the Hill in this epic castle made entirely of sponge!
gamemode: koth

A block of parameters like this will usually be the topmost part of the file, defining simple metadata that the plugin will use internally and display to the user. name and author are self-explanatory, and the version field is used to help identify variations of the map, if you make updates later and need a way to help tell them apart.

The objective field is a brief description of the map that will be displayed to the user when they join the game. This could be a little description of the map itself, or a tip pointing the player in the right direction of the map objective.

The most important of these fields is probably gamemode, which is how AthenaGM knows what game mode this map is designed for. Athena will broadcast this identifier to installed gamemode plugins, which listen for the one belonging to them, so they can spring into action and orchestrate gameplay when a map requests it. Check with the gamemode plugin in question for the value to use here. (The gamemode plugin may also have additional configuration that a map can invoke.) If a gamemode plugin doesn't respond, Athena will default to a free-for-all until the match timer ends and the map changes.

You'll want to at least set up teams, spawn points and kits next, but that's beyond the scope of this guide. Further information on defining map behavior can be found in the next guide: Defining Map Behavior and Settings.

  1. Deploying the Map

When your map is done, it needs to be installed on the server and added to an arena's map rotation. Your finished world folder should be dropped into the server's maps/ folder, which should look like this:

maps
├── koth_jungle
│   ├── agm.yml
│   ├── data
│   ├── level.dat
│   └── region
│       ├── r.-1.-1.mca
│       ├── r.-1.0.mca
│       ├── r.0.-1.mca
│       └── r.0.0.mca
└── koth_spongeland
    ├── agm.yml
    ├── data
    ├── level.dat
    └── region
        ├── r.-1.-1.mca
        ├── r.-1.0.mca
        ├── r.0.-1.mca
        └── r.0.0.mca

In this example, the world directories are named with a gamemode prefix, which is useful for clarity if you're running a server with multiple minigames. It's completely optional, and players won't see it either way (AthenaGM only displays the contents of the name YAML field). It makes it easier to keep organized, though.

Now you need to open plugins/AthenaGM/config.yml and add the map to a rotation, so Athena will put it into the cycle.

arenas:
  koth:
    name: "King of the Hill"
    gamemode: koth
    time_limit: 600
    maps:
    - koth_jungle
    - koth_spongeland

You will have to restart the server for rotation changes to be loaded.

Clone this wiki locally