MARS

From Multiverse

Jump to: navigation, search

Contents

What is MARS?

Multiverse Agnostic Rules System (MARS) is an open-source server API that provides basic gameplay features such as:

The following are the MARS server plug-ins:

Generally, a plug-in will be run only once in a server installation, except in the case of a production installation that might have multiple plug-ins running on a single machine to take advantage of multiple cores.

Note: The other Multiverse servers are Multiverse infrastructure server plug-ins. In most cases, you will not need to modify these servers, though you may need to script them and configure them to suit your world.

MARS library

The compiled MARS packages are provided in the mv-home/dist/lib/mars.jar Java Archive (JAR) file.

If you want to modify or extend the classes in the library (see below), you can rebuild this JAR file. For more information, see Building MARS With Ant and Setting Up a Development Environment. If you rebuild mars.jar, save a copy of the original version in case you need to quickly revert for testing.

MARS source code

The Java source code for MARS is provided in the mv-home/src directory. You are free to modify and extend this code as needed (but see below). The API is documented in the server API Javadoc.

How to use MARS

There are three basic ways to use MARS in your gameworld. You can do so through.

  • Scripting: Add or modify Python scripts used by the four MARS server plugins and the other Multiverse plug-in servers. In many cases, this is the quickest and easiest way to customize your gameworld.
  • Extending MARS Java classes to add features and capabilities your gameworld needs. Because of Java's object-oriented nature, it is easy to extend the MARS classes through inheritance. This is a good approach because you can easily port your changes when you upgrade to a new server release.
  • Customizing MARS by modifying MARS Java classes and recompiling MARS yourself. WARNING: In general, avoid this approach, because it makes it more difficult to upgrade to new server releases.

Of course, you can also combine these approaches.

The last two choices require Java programming, and require you to either replace the existing mars.jar file with your own version, or preferably, to create your own JAR file that contains your classes. Creating your own JAR file with classes derived from MARS base classes will make it much easier to upgrade your server with new releases.

Personal tools