Advent of Ascension Wiki
Advertisement
Advent of Ascension Wiki

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 repositories section of your build.gradle 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 in the below lines into the repositories section:

    maven {
        url "https://dl.bintray.com/tslat/aoa3"
    }

Then, in the dependencies section, add in the following line:

    compile ("net.tslat.aoa3:aoa3:<version>") {transitive = false}

Replacing <version> with the version of AoA you're developing for - E.G. net.tslat.aoa3:aoa3:3.3

Once done, refresh your gradle project and you should have access to AoA's classes.

Key Classes

Below are some key classes that developers may be interested in while

  • 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.

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: mod_provides_guides

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 assets/<modid>/lang/aoa3/guides/ directory of your mod.

Handling Bestiary Entries

IMC Key: mod_handles_bestiaries

Message Type: Function

Usage:

Takes a Function<EntityLivingBase, Tuple<List<String>, String>> 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.

Adding Custom Advent Gui Themes

IMC Key: add_advent_gui_theme

Message Type: Function

Usage:

Takes a Function<String, String> 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: register_hunter_entity

Message Type: String

Usage:

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

The expected format of the string is: "<EntityID> lvl:<HunterLevel> xp:<XP>" - E.G. "aoa3:cyclops lvl:10 xp:50.5"

Block Heartstone Drops From Entity

IMC Key: blacklist_heartstone_entity

Message Type: String

Usage:

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

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

Block Bloodlust Spawns From Entity

IMC Key: blacklist_bloodlust_entity

Message Type: String

Usage:

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

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

Advertisement