-
Notifications
You must be signed in to change notification settings - Fork 59
Project Releases, DLLs, and public interfaces
ravahn edited this page Dec 18, 2021
·
3 revisions
Every plugin release includes two different .zip files:
- FFXIV_ACT_Plugin_N.N.N.N.zip - this is a zip file containing just the FFXIV_ACT_Plugin.dll. All dependent libraries are embedded inside this DLL using an MIT licensed version of Costura/Fody
- FFXIV_ACT_Plugin_SDK_N.N.N.N.zip - this is a zip file containing both the FFXIV_ACT_Plugin.dll as well a the following additional DLLs:
- FFXIV_ACT_Plugin.Common.dll - This library exposes publicly-accessible types that are intended for reuse by other developers
- FFXIV_ACT_Plugin.Config.dll - Internal library for decoupling config from the main assembly
- FFXIV_ACT_Plugin.Logfile.dll - Internal library for decoupling log writing from memory / network assemblies
- FFXIV_ACT_Plugin.Memory.dll - Internal library for detecting game process, retrieving memory-based data, and sending it to the logfile assembly
- FFXIV_ACT_Plugin.Network.dll - Internal library for calling Machina to retrieve network packet data, decoding the packets, and sending to the logfile assembly
- FFXIV_ACT_Plugin.Parse.dll - Internal library for accepting log lines from ACT and parsing the data as combat actions. Includes DoT/HoT/Damage Shield simulation logic.
- FFXIV_ACT_Plugin.Resource.dll - Internal library used by Network, Memory, and Parse assemblies to represent game data, including custom definitions for action & status effects.
The intent behind the SDK zip is to allow other developers to more easily disassemble the code to review for safety purpose. Only public interfaces defined in FFXIV_ACT_plugin.Common.dll should be accessed by other plugins, and only the following public properties on FFXIV_ACT_Plugin class should be called from other plugins:
- IDataSubscription DataSubscription
- IDataRepository DataRepository
- bool PluginStarted All other fields, properties and methods are considered internal and subject to change.
As of version 2.6.2.9, the public interfaces are defined as follows:
public interface IDataSubscription
{
event NetworkReceivedDelegate NetworkReceived;
event NetworkSentDelegate NetworkSent;
event CombatantAddedDelegate CombatantAdded;
event CombatantRemovedDelegate CombatantRemoved;
event PrimaryPlayerDelegate PrimaryPlayerChanged;
event ZoneChangedDelegate ZoneChanged;
event PlayerStatsChangedDelegate PlayerStatsChanged;
event PartyListChangedDelegate PartyListChanged;
event LogLineDelegate LogLine;
event ParsedLogLineDelegate ParsedLogLine;
event ProcessChangedDelegate ProcessChanged;
}
public interface IDataRepository
{
/// <summary>
/// Returns the currently-selected plugin language. Note that in the future this may change to automatically detect the language from game memory.
/// </summary>
/// <returns>1=EN, 2=FR, 3=DE, 4=JP</returns>
Language GetSelectedLanguageID();
/// <summary>
/// Returns a reference to the .Net process for the currently selected FFXIV game instance
/// </summary>
/// <returns>System.Diagnostics.Process reference</returns>
Process GetCurrentFFXIVProcess();
/// <summary>
/// Loads and returns an unsorted dictionary for the specified resource type
/// </summary>
/// <param name="resourceType">The type of resource to load</param>
/// <returns>unsorted dictionary containing all resource id's and strings of the specified type</returns>
IDictionary<uint, string> GetResourceDictionary(ResourceType resourceType);
/// <summary>
/// Returns the current territory identifier from game memory
/// </summary>
/// <returns>a uint specifying the current territory id</returns>
uint GetCurrentTerritoryID();
/// <summary>
/// Returns the unique identifier for the current active player, which can be used to locate their Combatant record.
/// </summary>
/// <returns>the player's identifier</returns>
uint GetCurrentPlayerID();
/// <summary>
/// Retrieves a list containing all active combatants, including players and mobs. Note that this method will only refresh the data every 100ms, and
/// shares a single instance of the list object with all callers
/// </summary>
/// <returns>a read-only collection containing all currently loaded combatants</returns>
ReadOnlyCollection<Combatant> GetCombatantList();
/// <summary>
/// Returns a class containing information about the logged-in player
/// </summary>
/// <returns>Player stats class</returns>
Player GetPlayer();
/// <summary>
/// Returns the current Date/Time last reported to the game client by the server
/// </summary>
/// <returns>a date/time with the server's last communicated time</returns>
DateTime GetServerTimestamp();
/// <summary>
/// Returns the game version, parsed from ffxivgame.ver file
/// </summary>
/// <returns>a string containing the contents of ffxivgame.ver</returns>
string GetGameVersion();
/// <summary>
/// Returns a boolean indicating whether in-game chatlog text is being logged or hidden.
/// </summary>
bool IsChatLogAvailable();
}
The following models are defined in FFXIV_ACT_Plugin.Common:
public class Combatant
{
public Combatant()
{
NetworkBuffs = new NetworkBuff[30];
}
public uint ID { get; set; }
public uint OwnerID { get; set; }
public byte type { get; set; }
public int Job { get; set; }
public int Level { get; set; }
public string Name { get; set; }
public uint CurrentHP { get; set; }
public uint MaxHP { get; set; }
public uint CurrentMP { get; set; }
public uint MaxMP { get; set; }
public uint CurrentCP { get; set; }
public uint MaxCP { get; set; }
public uint CurrentGP { get; set; }
public uint MaxGP { get; set; }
public Boolean IsCasting { get; set; }
public uint CastBuffID { get; set; }
public uint CastTargetID { get; set; }
public Single CastDurationCurrent { get; set; }
public Single CastDurationMax { get; set; }
public Single PosX { get; set; }
public Single PosY { get; set; }
public Single PosZ { get; set; }
public Single Heading { get; set; }
public uint CurrentWorldID { get; set; }
public uint WorldID { get; set; }
public string WorldName { get; set; }
public uint BNpcNameID { get; set; }
public uint BNpcID { get; set; }
public uint TargetID { get; set; }
public byte EffectiveDistance { get; set; }
public PartyType PartyType { get; set; }
public IntPtr Address { get; set; }
public int Order { get; set; }
public NetworkBuff[] NetworkBuffs;
}
public enum PartyType
{
None = 0,
Party = 1,
Alliance = 2
}
public class NetworkBuff
{
public UInt16 BuffID { get; set; }
public UInt16 BuffExtra { get; set; }
public DateTime Timestamp { get; set; }
public float Duration { get; set; }
public uint ActorID { get; set; }
public string ActorName { get; set; }
public uint TargetID { get; set; }
public string TargetName { get; set; }
}
public class Player
{
public uint JobID { get; set; }
public uint Str { get; set; }
public uint Dex { get; set; }
public uint Vit { get; set; }
public uint Intel { get; set; }
public uint Mnd { get; set; }
public uint Pie { get; set; }
public uint Attack { get; set; }
public uint DirectHit { get; set; }
public uint Crit { get; set; }
public uint AttackMagicPotency { get; set; }
public uint HealMagicPotency { get; set; }
public uint Det { get; set; }
public uint SkillSpeed { get; set; }
public uint SpellSpeed { get; set; }
public uint Tenacity { get; set; }
public UInt64 LocalContentId { get; set; }
}