EighthMaster
From YPPedia
EighthMaster is a third-party tool made by Teuts that provides a Java framework for developers to quickly and easily produce applications that run off chat and game logs of Puzzle Pirates.
Contents |
Introduction
EighthMaster provides a set of plugins that perform various tasks based on entries in the log files produced by Puzzle Pirates. EighthMaster is released under a BSD license (free use), and developers are encouraged to create their own plugins to operate through it. The name EighthMaster refers to the popular third party tool QuarterMaster Pirate Helper, with Teuts' aim being to make the tool "half as good as QuarterMaster".
Installing and Running
- EighthMaster currently requires Java 1.6. In the near future it should be retrofitted to Java 1.4.
- Download the EighthMaster zip file and unzip it into a directory of your choice
- Download the plugins you wish to use (see below). Unzip them in the same directory as EighthMaster.
- Turn on chat logging in your YPP! client. For more details on how to do this see the great documentation for QuarterMaster Pirate Helper
- Run EighthMaster using EighthMaster.bat (Windows) or EighthMaster.sh (Mac/Linux). The first time it runs it will ask you to select two files.
- The first file is the yohoho.log file that is in your Puzzle Pirates directory
- The second file is your pirate's chat log, which you will have set up in step 3.
- EighthMaster will then open a small window with a check box for each available plugin. Select those you wish to use and enjoy!
Plugins are stored in the "plugins" directory. To remove unwanted plugins simply delete them from this directory.
To add more plugins as they become available, simply download and unzip in the same directory as EighthMaster. Only add plugins you trust! If in doubt about the plugin's author then caution is advised.
Plugins
Plugins currently available (in alphabetic order):
- Drinking Notifier Plays a sound when a drinking game starts
- Poker Assistant Estimates probability of having best hand in poker round based on number of opponents and your hand
- Pursuit Warning Plays a sound when your ship is pursued
Developing New Plugins
Java programmers interested in writing plugins will most likely want access to the source for EighthMaster. A plugin requires three classes implementing the interfaces described below. The plugins above are provided with source code, so these could be a good place to start.
Your plugin classes must be in a package plugins.<pluginpackage> so that they can be found and loaded by EighthMaster.
LogLineParser
The interface com.thinkfu.eighthmaster.logreader.LogLineParser specifies a single method that takes a line from a log file and returns an instance of a LogEvent (see below). The abstract class TimedLogLineParser has been provided to deal with parsing the time information, and those plugins that work off the chat log will probably want to extend this.
LogEvent
The interface com.thinkfu.eighthmaster.logreader.LogEvent is used to describe the information extracted from a line in the log file. This information will then be used by your plugin to determine what actions to take. Those using TimedLogLineParser will want to extend the TimedLogEvent (which deals with time information) instead.
Plugin
The main part of your plugin will be a class that implements the com.thinkfu.eighthmaster.Plugin interface.
- Your Plugin class must provide a constructor that takes a single argument - an instance of the EighthMaster class.
- For playing sounds it is recommended that you use the SoundOutput class that loads and prepares sound files for playback. These can be passed to EighthMaster to play with the playSound(SoundOutput) method.
- For visual output, your Plugin will be provided with a JPanel by the providePanel(JPanel) method that you must implement. This will be displayed in a separate frame. If no visual output is required then your Plugin should return null in the preferredFrameDimensions() method.
- Up to two LogLineParsers can be provided by your Plugin. One is for the pirate chat log, given by getChatLogParser(), and the other for the game log given by getYohohoLogParser(). Again return null if your Plugin does not require one or the other of these parsers.
- The remaining methods are self-explanatory, providing a name, description and author details for your Plugin.









