List of Released Devourment Add-ons:
Spoiler: show
None yet!
Event Handlers:
Spoiler: show
Your custom event handler will need to extend the DevourmentEventHandler class and override its blank functions. You will also need to register it with the manager script (see below) before it will catch events.
Unfortunately, Papyrus doesn't do multithreading very well, so all events are handled in a single thread. The implications of this should be obvious - don't put computationally expensive code in your events, or you could clog up the entire registry.
You will be seeing an integer parameter "flags" fairly often. This number encapsulates the lethality of any given vore (negative numbers are nonlethal, positive lethal) as well as its route. Currently only oral vore (1 and -1) is implemented, but the system is already set up to accept additional routes once animations are created.
Currently implemented events are:
OnSwallow(Actor pred, Actor prey, int flags)
Called whenever an Actor (of any race) swallows another. Note that a nonlethal->lethal transition is also considered a swallow.
Function OnEscape(Actor pred, Actor prey, int flags, bool oral)
Called whenever an Actor escapes another alive. The boolean does nothing yet, but when "full tours" are implemented it will provide information about the escape route.
Function OnDigestionTick(Actor pred, Actor prey, int flags, float numRealTicks)
Called every tick (1/10 second) for live prey Actors. The digestion registry is set up to handle processor slowdowns, travel/sleep/rest, and other scenarios in which ticks might be skipped - it will process these all at once and pass the number of ticks handled in this manner as numRealTicks.
Function OnPreyDeath(Actor pred, Actor prey, int flags)
Called whenever a prey character is killed and queued for shrinking-stomach digestion.
Function OnDeadDigestionTick(Actor pred, Actor prey, int flags, float completion)
As OnDigestionTick, but for dead Actors. Completion measures how close the prey is to excretion and ranges from 0-1.
Function OnExcretion(Actor pred, Actor prey, int flags)
Called whenever a prey Actor is excreted (or absorbed).
Function OnDialog(Actor pred, Actor prey, int flags)
Called when the player initiates a pred-prey dialog.
Function OnNewCharacter(Actor pred, Actor prey, int flags)
Called when the player transfers to a new body after she digests your previous character.
Function OnCustomEvent(Actor pred, Actor prey, int flags, float ID)
This function is intended to be called from dialog scripts. Pred and Prey are always the predator and prey who are currently speaking, one of whom must be the player. Please choose a non-integer number for your ID to minimize overlaps with other add-ons. ID zero is currently called by certain dialog options marked as (Sex) - I intend add-on makers to be able to catch this event and (for example) make the predator play a masturbating animation.
Unfortunately, Papyrus doesn't do multithreading very well, so all events are handled in a single thread. The implications of this should be obvious - don't put computationally expensive code in your events, or you could clog up the entire registry.
You will be seeing an integer parameter "flags" fairly often. This number encapsulates the lethality of any given vore (negative numbers are nonlethal, positive lethal) as well as its route. Currently only oral vore (1 and -1) is implemented, but the system is already set up to accept additional routes once animations are created.
Currently implemented events are:
OnSwallow(Actor pred, Actor prey, int flags)
Called whenever an Actor (of any race) swallows another. Note that a nonlethal->lethal transition is also considered a swallow.
Function OnEscape(Actor pred, Actor prey, int flags, bool oral)
Called whenever an Actor escapes another alive. The boolean does nothing yet, but when "full tours" are implemented it will provide information about the escape route.
Function OnDigestionTick(Actor pred, Actor prey, int flags, float numRealTicks)
Called every tick (1/10 second) for live prey Actors. The digestion registry is set up to handle processor slowdowns, travel/sleep/rest, and other scenarios in which ticks might be skipped - it will process these all at once and pass the number of ticks handled in this manner as numRealTicks.
Function OnPreyDeath(Actor pred, Actor prey, int flags)
Called whenever a prey character is killed and queued for shrinking-stomach digestion.
Function OnDeadDigestionTick(Actor pred, Actor prey, int flags, float completion)
As OnDigestionTick, but for dead Actors. Completion measures how close the prey is to excretion and ranges from 0-1.
Function OnExcretion(Actor pred, Actor prey, int flags)
Called whenever a prey Actor is excreted (or absorbed).
Function OnDialog(Actor pred, Actor prey, int flags)
Called when the player initiates a pred-prey dialog.
Function OnNewCharacter(Actor pred, Actor prey, int flags)
Called when the player transfers to a new body after she digests your previous character.
Function OnCustomEvent(Actor pred, Actor prey, int flags, float ID)
This function is intended to be called from dialog scripts. Pred and Prey are always the predator and prey who are currently speaking, one of whom must be the player. Please choose a non-integer number for your ID to minimize overlaps with other add-ons. ID zero is currently called by certain dialog options marked as (Sex) - I intend add-on makers to be able to catch this event and (for example) make the predator play a masturbating animation.
Public Functions:
Spoiler: show
The following functions are exposed by a stub version of the DevourmentRegistryScript included in v0.65 (please don't compile this!).
Function RegisterEventHandler(DevourmentEventHandler yourMod)
You must register your handler before it can receive events. For best results, do this in your script's OnInit block after a ten-second wait
Bool Function IsHandlerRegistered(DevourmentEventHandler yourMod)
Returns true if a handler is registered successfully
Function ForceSwallow(Actor pred, Actor prey, int flags)
Forces an actor to swallow another IF they are both valid types, using the selected flags.
Function ForceEscape(Actor prey, bool oralEscape)
Allows the specified Actor to escape immediately. The boolean parameter does nothing... yet.
Function ForceRegurgitate(Actor pred, bool oralEscape)
See above, except this causes all prey eaten by the specified predator to escape.
Bool Function ForceDialog(Actor pred, Actor prey)
Forces dialog IF the Actors are valid (ie, pred has eaten prey) and returns whether the attempt was successful. Skyrim's engine isn't exactly set up to handle this, so I had to use an ugly kludge which doesn't work 100% of the time.
Function AccelerateDigestion(Actor pred, int ticks)
Simulate a certain number of ticks (tenths of a second) for all prey eaten by the specified Actor
Int Function getNumEaten(Actor pred, int flags)
Returns the number of Actors eaten by the specified Actor. The int parameter does nothing at the moment but is intended to allow flag filtering in the future.
Actor Function whoAte(Actor prey)
Returns the Actor who ate the specified Actor, or None if they weren't eaten
Actor[] Function whoSheAte(Actor pred, int flags)
Returns an array of all Actors eaten by the specified Actor
Bool Function hasLivePrey(Actor pred)
Returns true if the Actor has eaten anyone and not digested them yet
Actor[] Function getPredArray()
Returns the master registry of predators. This is *NOT* thread-safe. Use ForceSwallow, ForceEscape, etc. to add or remove.
Actor[] Function getPreyArray()
See above.
int[] Function getTypeFlagArray()
See above.
float[] Function getDigestionTimeArray()
See above.
Actor[] Function getDeadPredArray()
See above.
Actor[] Function getDeadPreyArray()
See above.
Function disableEscape(Actor prey)
Prevents the specified prey from escaping until they are digested or forced out by a spell or script command
float Function getDeadDigestionCompletion(Actor prey)
Returns a value from 0-1 representing how close the specified dead Actor is to being completely digested
int Function getDeadDigestionTicks(Actor prey)
Returns the number of ticks for which the specified dead Actor will be digested
Function setDeadDigestionTicks(Actor pred, int ticks)
Forces all dead prey currently being digested by the specified Actor to be digested for the given number of ticks rather than their current value.
Function addPredatorRace(Race predRace, Idle swallowAnim, Armor belly)
Adds the given race as a possible predator as long as it is not of ActorTypeNPC. It will use the specified Idle when swallowing and will equip the specified Armor as its "belly."
bool Function isModPredatorRace(Race predRace)
Checks if the given race has been registered as a possible predator
Idle Function getModPredatorIdle(Race predRace)
Returns the Idle registered for the given predator race
Armor Function getModPredatorBelly(Race predRace)
Returns the Armor registered for the given predator race's belly
bool Function switchLethal(Actor prey)
Switches the given Actor from lethal to nonlethal digestion, or vice-versa. Returns true if successful.
bool Function sendDialogEvent(float customID)
Sends a dialog event with the specified ID. This will be caught by all registered DevourmentEventHandlers. Choosing non-integer values for your event IDs is best, since it minimizes possible overlap with other mods.
Function RegisterEventHandler(DevourmentEventHandler yourMod)
You must register your handler before it can receive events. For best results, do this in your script's OnInit block after a ten-second wait
Bool Function IsHandlerRegistered(DevourmentEventHandler yourMod)
Returns true if a handler is registered successfully
Function ForceSwallow(Actor pred, Actor prey, int flags)
Forces an actor to swallow another IF they are both valid types, using the selected flags.
Function ForceEscape(Actor prey, bool oralEscape)
Allows the specified Actor to escape immediately. The boolean parameter does nothing... yet.
Function ForceRegurgitate(Actor pred, bool oralEscape)
See above, except this causes all prey eaten by the specified predator to escape.
Bool Function ForceDialog(Actor pred, Actor prey)
Forces dialog IF the Actors are valid (ie, pred has eaten prey) and returns whether the attempt was successful. Skyrim's engine isn't exactly set up to handle this, so I had to use an ugly kludge which doesn't work 100% of the time.
Function AccelerateDigestion(Actor pred, int ticks)
Simulate a certain number of ticks (tenths of a second) for all prey eaten by the specified Actor
Int Function getNumEaten(Actor pred, int flags)
Returns the number of Actors eaten by the specified Actor. The int parameter does nothing at the moment but is intended to allow flag filtering in the future.
Actor Function whoAte(Actor prey)
Returns the Actor who ate the specified Actor, or None if they weren't eaten
Actor[] Function whoSheAte(Actor pred, int flags)
Returns an array of all Actors eaten by the specified Actor
Bool Function hasLivePrey(Actor pred)
Returns true if the Actor has eaten anyone and not digested them yet
Actor[] Function getPredArray()
Returns the master registry of predators. This is *NOT* thread-safe. Use ForceSwallow, ForceEscape, etc. to add or remove.
Actor[] Function getPreyArray()
See above.
int[] Function getTypeFlagArray()
See above.
float[] Function getDigestionTimeArray()
See above.
Actor[] Function getDeadPredArray()
See above.
Actor[] Function getDeadPreyArray()
See above.
Function disableEscape(Actor prey)
Prevents the specified prey from escaping until they are digested or forced out by a spell or script command
float Function getDeadDigestionCompletion(Actor prey)
Returns a value from 0-1 representing how close the specified dead Actor is to being completely digested
int Function getDeadDigestionTicks(Actor prey)
Returns the number of ticks for which the specified dead Actor will be digested
Function setDeadDigestionTicks(Actor pred, int ticks)
Forces all dead prey currently being digested by the specified Actor to be digested for the given number of ticks rather than their current value.
Function addPredatorRace(Race predRace, Idle swallowAnim, Armor belly)
Adds the given race as a possible predator as long as it is not of ActorTypeNPC. It will use the specified Idle when swallowing and will equip the specified Armor as its "belly."
bool Function isModPredatorRace(Race predRace)
Checks if the given race has been registered as a possible predator
Idle Function getModPredatorIdle(Race predRace)
Returns the Idle registered for the given predator race
Armor Function getModPredatorBelly(Race predRace)
Returns the Armor registered for the given predator race's belly
bool Function switchLethal(Actor prey)
Switches the given Actor from lethal to nonlethal digestion, or vice-versa. Returns true if successful.
bool Function sendDialogEvent(float customID)
Sends a dialog event with the specified ID. This will be caught by all registered DevourmentEventHandlers. Choosing non-integer values for your event IDs is best, since it minimizes possible overlap with other mods.