Next: Understanding the Aurie ecosystem - AurieFramework/YYToolkit GitHub Wiki
The Aurie ecosystem, inside which YYToolkit lives, can oftentimes be confusing for newcomers.
To help newcomers understand what each component does, this page provides a short rundown of what Aurie, YYToolkit, and AurieSharp do for you, both as an end-user and as a developer.
Aurie, often referred to as AurieCore or AurieCore.dll, is the main module of the Aurie Framework.
It does not do anything in of itself but provide APIs and a way to write extensions (commonly referred to as modules or plugins) to developers while providing a common ground for each extension.
These APIs handle common operations requested by extensions, such as function hooking or module interoperability.
The framework itself is completely devoid of any game-specific code, and it can therefore be used in a variety of applications - be it games or other software.
Tip
Aurie acts as the foundation for more game-specific projects, such as YYToolkit or AurieSharp.
Both of these projects are built upon Aurie.
Interfaces are a common point of confusion when it comes to Aurie's API. They are part of the Object Manager, and are therefore prefixed with Ob. They provide a way for modules to talk to one another without the need for exported functions, allowing syntax sugar like function overloading natively.
For more information on how to create and use interfaces in your project, see Creating and using Aurie interfaces.
Note
The information below is only true for YYToolkit Next - starting from version 3.0.0.
YYToolkit is an Aurie module that targets the GameMaker engine, and allows runtime-only modifications of game objects, scripts, rooms, and other assets. It is mainly used in modding communities of YYC games (for more information, see About VM and YYC).
YYToolkit exposes an interface (via Aurie), that other modules can use to interact with the running game. This interface is documented on the YYToolkit wiki.
Through this interface, you can hook into or override existing GameMaker behaviors, query and manipulate resources such as objects and scripts, and generally extend the runtime without having to modify the original game binaries.
Because of Aurie's common ground, any module that integrates with YYToolkit can also work with other Aurie-based modules, meaning developers can build on each other's work without reinventing the wheel.
AurieSharp is an official language binding allowing Aurie to act as a .NET Runtime host. Hosting the .NET Runtime allows for managed code to run inside the game process, even if the game itself is written natively.
This distinction leads to a split in module types, as managed and unmanaged code lives in separate "worlds", preventing them from directly interacting with one another.
It is for this reason that AurieSharp is not one project, but is instead bundled as three separate modules. The functionality of each module is detailed below.
The core module is the smallest of the three, but simultaneously is the most important. It's a native module loaded directly by Aurie. It's main job is to host the .NET runtime, and load the very first managed assembly.
The assembly name is hardcoded to AurieSharpManaged.dll, which must be placed inside the mods/Managed folder. Any dependencies of the AurieSharpManaged.dll module are automatically resolved and loaded. Unlike other managed mods, the AurieSharpManaged assembly lacks the standard InitializeMod and UnloadMod routines.
If the AurieSharpManaged.dll file is missing or cannot be loaded, the module terminates the running process.
For more information on AurieSharpManaged, see the sections below.
This module is a special kind. While it technically is a native module, it contains managed code. This is due to it being made in C++/CLI, and not pure C++.
The AurieSharp Interop module acts as a bridge between managed and unmanaged code. As stated above, managed mods alone cannot call APIs exposed by native code, including Aurie and YYToolkit. The interop module provides a curated set of API functions (documented on the AurieSharp Wiki) as a way to communicate with the two.
The YYToolkit bindings (namespace YYTKInterop) also wrap a few select engine types, ensuring mods written in managed code can always access variables safely without the fear of corrupting engine state.
This module is written in pure C#, and requires the AurieSharp Interop module to function. It is responsible for loading, unloading, and hot-reloading of managed mods. It also calls their respective InitializeMod and UnloadMod routines.
The AurieSharp Managed module is also responsible for keeping track of any loaded mods, as well as verifying their integrity. It essentially acts as the AurieCore of managed mods (albeit without providing any APIs).