ModdingAPI
The following modules provides a comprehensive set of tools and functionalities for modders to interact with the Horse mod.
AttachmentsAPI
The following module provides functionalities related to attachments in the Horse mod.
Require: require("HorseMod/api/AttachmentsAPI")
-
HorseMod.api.AttachmentsAPI.addNewAttachments(
itemDefinitions:table<string,HorseMod.ItemDefinition>
):nil Used to define new attachments.
-
HorseMod.api.AttachmentsAPI.addNewAttachment(
fullType:string,
slot:HorseMod.AttachmentSlot,
attachmentDef:HorseMod.AttachmentDefinition
):nil Add a singular attachment definition for a given item full type and slot.
-
HorseMod.api.AttachmentsAPI.addNewSlot(
slot:HorseMod.AttachmentSlot,
slotDefinition:HorseMod.SlotDefinition
):nil Used to define a new attachment slot.
-
HorseMod.api.AttachmentsAPI.addNewModelAttachment(
modelAttachment:string,
attachmentData: {bone:string, offset:HorseMod.XYZ, rotate:HorseMod.XYZ}
):nil Used to add a new model attachment point to the horse model script via Lua. This attachment point can then be used in
HorseMod.attachments.AttachmentData.slotsDefinitionsto define new attachment slots on a custom position on the horse.- Parameters:
modelAttachment (
string) – Attachment point name.
RidingAPI
The following module provides functionalities related to riding mechanics in the Horse mod.
Require: require("HorseMod/api/RidingAPI")
-
HorseMod.api.RidingAPI.addBodyLocationRestriction(bodyLocation:
string, canEquip:boolean):nil Add a body location restriction while mounting a horse. By default, body locations are restricted from being equipped/unequipped while mounted unless explicitly allowed in the
HorseMod.patches.ClothingEquip.allowedLocationstable.- Parameters:
bodyLocation (
string) – The body location to restrict. This is the body location registries entry, e.g.,base:hat.canEquip (
boolean) – Whether the body location can be equipped while mounted on a horse.
-
HorseMod.api.RidingAPI.addValidTimedAction(actionName:
string):nil Add a valid timed action while mounting a horse. By default, only a few timed actions are allowed while mounted.
- Parameters:
actionName (
string) – The name of the timed action to allow.