Third-Party Mod Integration/Making an Addon

Advent of Ascension offers open accessibility for developers wanting to add integration to AoA, or create add-ons.

Information
While Advent of Ascension isn't open-source, it does support third-party add-ons and allows developers to browse most of the source code to assist with doing so. This page will detail the requirements for either integrating with AoA, or making an add-on.

DISCLAIMER
This page is not a tutorial on mod development, and it is expected you know how to set up your forge development environment to create mods prior to using the below information.

Maven Repository
To effectively create an add-on or integrate with AoA, you will need to add it to your development environment. To do this, you will need to edit the  section of your   file to add AoA's repository.

If you do not already have a repositories section of your build.gradle, you'll need to create one.

From there, add the below lines into the repositories section:

Once this is done, create a  folder in your project directory, and drop in the AoA jar file from Curseforge (the one you use to play AoA). Then, in the  section, add in the following line:

Replacing:
 * with the version of AoA you're developing for - E.G.
 * with the name of the jarfile in your libs folder - E.G.

Once the build.gradle has been edited, re-run the  task in gradle, then refresh your gradle project via the gradle panel.

Key Classes
Below are some key classes that developers may be interested in or find useful.


 * PlayerUtil - A utility class that contains various useful methods for interacting with AoA's player data, such as skills and resources.
 * EntityUtil - A utility class that contains various useful methods for interacting with AoA's entities. Contains helper methods for type-immunities, type-damage dealing, and more.
 * PlayerDataManager - The container that holds all the relevant information and methods for AoA's player data. You can get a player's container via PlayerUtil#getAdventPlayer. Containers only exist on the server, not the client.
 * ConfigurationUtil - Contains all of the configuration options for AoA.
 * AoAMeleeMob, AoARangedMob, AoAFlyingMeleeMob, AoAFlyingRangedMob, AoAAnimal - The base classes for nearly all of AoA's creatures.
 * AoAAmbientNPC, AoATrader - The base classes for AoA's NPC entities.
 * Enums - The holder class for almost all of AoA's enum types. These enums are used in various methods throughout the mod.
 * ArmourRegister - Contains references to all of AoA's armour items after item registration.
 * BlockRegister - Contains references to all of AoA's blocks after block registration.
 * ItemRegister - Contains references to all of AoA's items after item registration.
 * CreativeTabsRegister - Contains references to all of AoA's creative tabs, for placing items in the creative menu.
 * EnchantmentsRegister - Contains references to all of AoA's enchantments.
 * MaterialsRegister - Contains references to all of AoA's tool, sword, and armour materials after item registration.
 * SoundsRegister - Contains references to all of AoA's sounds after sound registration.
 * ToolRegister - Contains references to all of AoA's tools after item registration.
 * WeaponRegister - Contains references to all of AoA's weapons after item registration.
 * SpecialHarvestTool - An interface that passes HarvestDropsEvents to any class that implements it, for custom interactions.
 * BaseArchergun - The base class for all AoA Archerguns. Contains all of the reference methods used for item stats and effects.
 * BaseBlaster - The base class for all AoA Blasters. Contains all of the reference methods used for item stats and effects.
 * BaseBow - The base class for all AoA Bows. Contains all of the reference methods used for item stats and effects.
 * BaseCannon - The base class for all AoA Cannons. Contains all of the reference methods used for item stats and effects.
 * BaseGreatblade - The base class for all AoA Greatblades. Contains all of the reference methods used for item stats and effects.
 * BaseGun - The base class for all AoA Guns. Contains all of the reference methods used for item stats and effects.
 * BaseMaul - The base class for all AoA Mauls. Contains all of the reference methods used for item stats and effects.
 * BaseShotgun - The base class for all AoA Shotguns. Contains all of the reference methods used for item stats and effects.
 * BaseSniper - The base class for all AoA Snipers. Contains all of the reference methods used for item stats and effects.
 * BaseStaff - The base class for all AoA Staves. Contains all of the reference methods used for item stats and effects.
 * BaseSword - The base class for all AoA Swords. Contains all of the reference methods used for item stats and effects.
 * BaseThrownWeapon - The base class for all AoA Thrown Weapons. Contains all of the reference methods used for item stats and effects.
 * BaseVulcane - The base class for all AoA Vulcanes. Contains all of the reference methods used for item stats and effects.

Inter-Mod Comms (IMC)
Advent of Ascension offers several IMC functions for quick optional integration. See below for the available functions and their uses.

Adding Custom Guides
IMC Key:

Message Type: Any

Usage:

Takes the Mod ID of the sending mod and registers it as a guides provider. Guides txt files should be placed in the  directory of your mod.

Handling Bestiary Entries
IMC Key:

Message Type: Function

Usage:

Takes a  argument from the message and uses that when opening a bestiary entry for any entity from your Mod ID.

The expected format for the Tuple is that the first is a list of stat lines in String format, and the second is an optional bestiary lore/description entry.

Handling Bestiary Info
IMC Key:

Message Type: Any

Usage:

Takes the Mod ID of the sending mod and registers it as a bestiary info provider. Bestiary txt files should be placed in the  directory of your mod.

Adding Custom Advent Gui Themes
IMC Key:

Message Type: Function

Usage:

Takes a  argument from the message and grabs several optional data pieces from it to register a new Advent Gui theme.

Function arguments:
 * "name" - Return the formatted name of your theme, to be displayed on the button selector for themes.
 * "background" - (Optional) The filepath to your theme background texture. E.G. "textures/gui/maingui/themes/default/background.png"
 * "buttons" - (Optional) The filepath to your theme buttons texture. E.G. "textures/gui/maingui/themes/default/buttons.png"
 * "overlay" - (Optional) The filepath to your theme overlay texture. E.G. "textures/gui/maingui/themes/default/overlay.png"

Registering a Hunter Entity
IMC Key:

Message Type: String

Usage:

Takes a  argument from the message and parses it to register an entity as a hunter entity.

The expected format of the string is: " lvl: xp:" - E.G. "aoa3:cyclops lvl:10 xp:50.5"

Block Heartstone Drops From Entity
IMC Key:

Message Type: String

Usage:

Takes a  argument from the message and parses it to blacklist an entity ID from spawning Heartstones.

The expected format of the string is "" - E.G. "aoa3:cyclops"

Block Bloodlust Spawns From Entity
IMC Key:

Message Type: String

Usage:

Takes a  argument from the message and parses it to blacklist an entity ID from spawning Bloodlusts.

The expected format of the string is "" - E.G. "aoa3:cyclops"