Atavism Online

Prerequisites:

  1. Access and familiarity with the AGIS code for Atavism.
  2. The AGIS project set up in an Integrated Development Environment (IDE) like Eclipse.
  3. Familiarity with Java programming.
  4. Setting up AGIS in Eclipse
  5. Building and Testing Your AGIS

Step 1: Crafting the Plugin.java File

Begin by creating a Plugin.java file within the AGIS project. This file manages client communications for guild activities (e.g., guild creation or chat messaging).

Key Components:

  • GuildPlugin Constructor: Initializes the plugin type for server recognition.
    public GuildPlugin() {
    super(GUILD_PLUGIN_NAME);
    setPluginType("Guild");
    }
  • Logger: Useful for debugging.
    protected static final Logger log = new Logger("Guild");
  • onActivate Function: Activates the plugin, setting up message filters and hooks.
    public void onActivate() {
    Log.debug("GUILD PLUGIN: activated");
    registerHooks();
    }
  • registerHooks Function: Placeholder for future message hooks.
    protected void registerHooks() {
    }

Step 2: Establishing the Client.java File

The Client.java file inside the atavism.agis.plugins package serves as an intermediary for server messaging, defining plugin interactions.

Initial Setup:

package atavism.agis.plugins;

public class GuildClient {
protected GuildClient() {
}
}

Step 3: Implementing the Python Script

This script registers the plugin and can adjust settings without recompiling the AGIS code.

Python Script:

from atavism.server.engine import Engine

Engine.registerPlugin(“atavism.agis.plugins.GuildPlugin”)

Step 4: Integrating the Plugin with the Server Start-Up Script

  1. Modify world.sh: Add -p Guild,1 to the PLUGIN_TYPES list.
  2. Include the Python Script: Insert the line "${AO_WORLD_CONFIG}"/guildplugin.py \ in the objmgr process code block.

Step 5: Verifying the Plugin Activation

Upon server start-up, check the objmgr.out log for the “GUILD PLUGIN: activated” message, indicating successful integration.

Advanced Steps for Version 10.8.0+

  1. Update ServerStarter.java: Add startGuild() method in src/atavism/agis/server/ServerStarter.java.
  2. Modify AllInOneServer.java: Incorporate the startGuild() call in the postScript function.

By following these steps, you’ll have a functional Guild System plugin for Atavism, integrated seamlessly with LearnPress for an effective learning experience. Remember, this guide focuses on the initial setup and integration, with more detailed functionalities to be added as per your project requirements.