Advent of Ascension Wiki

This wiki is currently being updated to 1.18.2+ versions of the mod. If you are struggling to find information regarding 1.16.5 AoA, or are curious as to why 1.18.2+ versions are being released incomplete, please check out this page.

READ MORE

Advent of Ascension Wiki
(Created page with "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-sour...")
Tag: Visual edit: Switched
 
(Replaced content with "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 freel...")
Tag: Replaced
 
(12 intermediate revisions by the same user not shown)
Line 2: Line 2:
   
 
== Information ==
 
== 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.
+
While Advent of Ascension isn't freely 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.
 
This page will detail the requirements for either integrating with AoA, or making an add-on.
   
Line 8: Line 8:
 
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.
 
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 ==
+
== Versions ==
  +
=== 1.12.2 ===
To effectively create an add-on or integrate with AoA, you will need to add it to your development environment.
 
  +
[[Third-Party Mod Integration/Making an Addon/1.12.2]]
To do this, you will need to edit the <code>repositories</code> section of your <code>build.gradle</code> file to add AoA's repository.
 
   
  +
=== 1.16.5 ===
If you do not already have a repositories section of your build.gradle, you'll need to create one.
 
  +
[[Third-Party Mod Integration/Making an Addon/1.16.5]]
   
  +
[[Category:Third-Party Mod Integration]]
From there, add in the below lines into the repositories section:
 
 
<syntaxhighlight lang="gradle">
 
maven {
 
url "https://dl.bintray.com/tslat/aoa3"
 
}
 
</syntaxhighlight>
 
 
Then, in the <code>dependencies</code> section, add in the following line:
 
 
<syntaxhighlight lang="gradle">
 
compile ("net.tslat.aoa3:aoa3:<version>") {transitive = false}
 
</syntaxhighlight>
 
 
Replacing <code><version></code> with the version of AoA you're developing for - E.G. <code>net.tslat.aoa3:aoa3:3.3</code>
 
 
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: <code>mod_provides_guides</code>
 
 
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 <code>assets/<modid>/lang/aoa3/guides/</code> directory of your mod.
 
 
=== Handling Bestiary Entries ===
 
IMC Key: <code>mod_handles_bestiaries</code>
 
 
Message Type: Function
 
 
Usage:
 
 
Takes a <code>Function<EntityLivingBase, Tuple<List<String>, String>></code> 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: <code>add_advent_gui_theme</code>
 
 
Message Type: Function
 
 
Usage:
 
 
Takes a <code>Function<String, String></code> 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: <code>register_hunter_entity</code>
 
 
Message Type: String
 
 
Usage:
 
 
Takes a <code>String</code> 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: <code>blacklist_heartstone_entity</code>
 
 
Message Type: String
 
 
Usage:
 
 
Takes a <code>String</code> argument from the message and parses it to blacklist an entity ID from spawning [[Heartstone]]s.
 
 
The expected format of the string is "<EntityID>" - E.G. "aoa3:cyclops"
 
 
=== Block Bloodlust Spawns From Entity ===
 
IMC Key: <code>blacklist_bloodlust_entity</code>
 
 
Message Type: String
 
 
Usage:
 
 
Takes a <code>String</code> argument from the message and parses it to blacklist an entity ID from spawning [[Bloodlust]]s.
 
 
The expected format of the string is "<EntityID>" - E.G. "aoa3:cyclops"
 

Latest revision as of 13:01, 5 November 2021

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

Versions[ | ]

1.12.2[ | ]

Third-Party Mod Integration/Making an Addon/1.12.2

1.16.5[ | ]

Third-Party Mod Integration/Making an Addon/1.16.5