Devourment API resource

Forum for the Vore games, and other downloads
Forum rules
Don't ask about updates. If there is an update, it will simply be posted. If someone is committing to a timeline, they will just tell you the timeline without needing anyone to ask.

Use Looking for master thread when you are not posting about an existing game.


You use this forum and website at your own risk for all links and uploads. There is no quality control or malware scanning or testing done here. Proceed with caution and use a virtual machine (VM) for any uploads strongly recommended. Virus/malware scanners alone are generally not good enough.

Devourment API resource

Postby Vegan » Sun Nov 09, 2014 12:18 am

With the release of the Devourment API, I figured that there should be a separate thread for technical discussion among add-on makers. Here's the documentation that exists so far - please let me know if something isn't clear or if you think the API needs a certain feature.

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.


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.
Devourment: A Skyrim vore mod (F/?)
DevouRIMent: A RimWorld vore mod (F/?)
Tyrant Totem: A Pathfinder: Kingmaker vore mod (F/?)
User avatar
Vegan
Somewhat familiar
 
Posts: 113
Joined: Sun Mar 03, 2013 7:39 pm

Re: Devourment API resource

Postby greyfeather » Sun Nov 09, 2014 10:18 pm

You're speakin' my language. : :lol:
Bleh!
-Greyfeather
User avatar
greyfeather
Been posting for a bit
 
Posts: 53
Joined: Mon Jan 20, 2014 11:16 pm
Location: Just Outside Equestria

Re: Devourment API resource

Postby Sheights » Mon Nov 10, 2014 12:57 am

Very nice, a lot of good will come from this. You did a fine job with this.
Sheights
Intermediate Vorarephile
 
Posts: 446
Joined: Thu Dec 25, 2008 12:00 am

Re: Devourment API resource

Postby darkevilme » Wed Nov 12, 2014 12:34 am

Okay. Tested to see if i could do anything with this. And I can't. script calls such as the one for mia's example script swallowing the player fail to compile with the error devourmentregistryscript.psc(75,30): unknown type devourmentnamescript

I assume seen as the script doesn't actually do anything when I reach that part of the dialogue that compiling, is actually important.

random questions:

Is it possible to set a character's devourment rank from inside the editor?

Is there a quick and easy way to override the default talk to predator/prey dialogue with an entirely unique set of dialogue dependent on the character?
darkevilme
---
 
Posts: 1492
Joined: Wed Feb 01, 2006 12:00 am
Location: london, UK

Re: Devourment API resource

Postby Sheights » Wed Nov 12, 2014 2:20 pm

I am having the same problem as Darkevilme with the API examples. It's probably not a bug and we are just not setting it up properly. So how do we add the script as a reference or whatever in the CK. I'm going to click buttons until I figure it out but help would be appreciated.

*Edit*

To get the script to compile, go find devourmentregistyscript.psc, go to line 75 and delete it save the file
Go back to the creation kit and compile your mod.
now go back to the registry script, re add the line and save.

The only time that line is used is in the declaration, which means the script is fine without it, it's never used. However the mod it's used for probably has need for it, but the mod doesn't use the source file, it uses the already compiled pex.
We are not compiling the registry script, (and we were told not to) so it should be ok. Should. probably.
Sheights
Intermediate Vorarephile
 
Posts: 446
Joined: Thu Dec 25, 2008 12:00 am

Re: Devourment API resource

Postby darkevilme » Wed Nov 12, 2014 3:27 pm

I give up. Here's what I tried to do. And it doesn't work.

http://www.mediafire.com/download/t8nge3jxdjtxn8l/devourment-testmod.esp
http://www.mediafire.com/download/wymzz7xvqugc5gi/testscript.pex
Note i'm not terribly experienced at modding the game, I'm generally relying on being a programmer and tech savvy to produce what little I did.

edit:
Anyway. Explain how to make this work and I promise to make dialogue mods for skyrim devourment. Till then i'm taking a break from skyrim.
darkevilme
---
 
Posts: 1492
Joined: Wed Feb 01, 2006 12:00 am
Location: london, UK

Re: Devourment API resource

Postby Kavvanshrike » Sun Nov 16, 2014 9:24 pm

Vegan can we please get an an API example of how to make activated dialogue?(or add it to the Mia Example) I'm trying to have a quest giver have a unique set of dialogue when I press G and can only seem to get the default dialogue or no dialogue at all.
User avatar
Kavvanshrike
Participator
 
Posts: 260
Joined: Fri Sep 30, 2011 1:34 pm

Re: Devourment API resource

Postby ian66613 » Mon Nov 17, 2014 9:15 am

For those who want to make a standalone follower but also require devourment, first use this resource:

http://www.nexusmods.com/skyrim/mods/25673/

then after, re-add the esp for your standalone follower as the active file, and then devourment as a checkbox / load.
Ideal Vore Games · Vore Preferences · My OC (4 inch (10cm) fairy boy.)
I am NOT into Furries/Bestial/Animals.
User avatar
ian66613
---
 
Posts: 1305
Joined: Mon May 16, 2011 9:12 pm
Location: Wisconsin

Re: Devourment API resource

Postby darkevilme » Tue Nov 18, 2014 12:12 am

Function disableEscape(Actor prey)
Prevents the specified prey from escaping until they are digested or forced out by a spell or script command


This doesn't work. Least it doesn't when the player is the actor in question. I have a test mod which lets the player offer themselves to be lethally devoured by someone. But it doesn't work because unless they're a remarkable individual they'll hork the player back up afore digesting them.

edit: NVM, apparently one has to call disable escape AFTER calling switch lethal, mod works now.
darkevilme
---
 
Posts: 1492
Joined: Wed Feb 01, 2006 12:00 am
Location: london, UK

Re: Devourment API resource

Postby ryanshowseason3 » Thu Nov 20, 2014 10:48 pm

Thank you lots for this. We can make some cool stuff now I reckon. Here's one I cooked up. Sorry I didn't change the name.... I just worked within what you provided.

It catches the prey death event for the player and transfers their stats over to the new dovakhin.

I didn't like starting all my stats over so I made this little guy to save my progress on each new iteration of myself!

Hopefully I'll be able to make more stuff in the future.
Attachments
mod.rar
(1.28 KiB) Downloaded 1001 times
User avatar
ryanshowseason3
???
 
Posts: 2483
Joined: Thu Jan 05, 2006 12:00 am

Re: Devourment API resource

Postby VoreSkeeter » Sun Nov 23, 2014 4:51 pm

Is there any chance Vegan or someone else could make a short video or picture tutorial on how to call and make changes to the DevourmentRestistyScript ?

I'm like 40% into making a plugin that add's a bunch of extra conversations from the npc's to the player.

Most of them involve the npc deciding to betray and digest the player. But for the life of me figure out how to call the DevourmentRegistryScritp and change the Lethal Bool From False to True.

Additionally i'd also ask if anyone knows if it's possible call the variables involved in the belly scaling node And change them manually.

The reason im asking for above is I'm wondering if i could make a vorish dark brotherhood quest where your being smuggled into a castle with a crazy amount of guards to kill someone and the Maid or whoever that you payed to smuggle you inside has to suck in her belly quite (Or digest you a little a bit) so the guards don't think there's anyone hiding inside her gut.

i'd like to be able to shrink the belly node significant without killing the player to represent that.

Any help Regarding these problems would be greatly appreciated.
''Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.''

Dylan Thomas
User avatar
VoreSkeeter
Intermediate Vorarephile
 
Posts: 359
Joined: Thu Mar 09, 2006 12:00 am
Location: florida

Re: Devourment API resource

Postby darkevilme » Sun Nov 23, 2014 5:18 pm

You've not looked too much at the later parts of the dialogue demo have you?

Code: Select all
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 2
Scriptname TIF__02000D79 Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_1
Function Fragment_1(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
Manager.SwitchLethal(Game.getPlayer()) ;Make Mia digest the player <--- this line ^_^
MiaQuest.MiaAteYou=0
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

DevourmentRegistryScript Property Manager Auto <---and this one!
MiaRingDemoEventHandler Property MiaQuest Auto


Me I can't properly overload dialogue for when you're eaten by particular people or under certain circumstances. But we all have our crosses to bear.

Note, player has a chance to escape unless you disable that AFTER you switch to lethal digestion.

also, as for the belly nodes...no clue at all.
darkevilme
---
 
Posts: 1492
Joined: Wed Feb 01, 2006 12:00 am
Location: london, UK

Re: Devourment API resource

Postby VoreSkeeter » Mon Nov 24, 2014 8:54 pm

darkevilme wrote:You've not looked too much at the later parts of the dialogue demo have you?

Code: Select all
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 2
Scriptname TIF__02000D79 Extends TopicInfo Hidden

;BEGIN FRAGMENT Fragment_1
Function Fragment_1(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
Manager.SwitchLethal(Game.getPlayer()) ;Make Mia digest the player <--- this line ^_^
MiaQuest.MiaAteYou=0
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

DevourmentRegistryScript Property Manager Auto <---and this one!
MiaRingDemoEventHandler Property MiaQuest Auto


Me I can't properly overload dialogue for when you're eaten by particular people or under certain circumstances. But we all have our crosses to bear.

Note, player has a chance to escape unless you disable that AFTER you switch to lethal digestion.

also, as for the belly nodes...no clue at all.


I tried copy pasting that code before. I just got tons of errors and it still didn't work in game.
''Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.''

Dylan Thomas
User avatar
VoreSkeeter
Intermediate Vorarephile
 
Posts: 359
Joined: Thu Mar 09, 2006 12:00 am
Location: florida

Re: Devourment API resource

Postby darkevilme » Tue Dec 02, 2014 3:23 am

So I tried making a mod with the API. And I run out of steam. So I'm going to leave a piece of it here.

http://www.mediafire.com/download/00d90484uhngt8b/WIP.zip

Behold Warped's first dungeon. It's called wolf peak refuge. It's not really done, and I need to figure out a way of making it so that the elves don't have such good hearing, cause enemies in distant rooms come running a bit too much.

edit: My idea for the dungeon was the followers of Sunesh. Sorta the vorish outgrowth of the Thalmor, predatory elven supremacists as opposed to just elven supremacists. Idea might be worth building upon. I have no idea whether anyone is planning a more story/quest/faction driven devourment mod and if they're not maybe people should work on planning one here.
darkevilme
---
 
Posts: 1492
Joined: Wed Feb 01, 2006 12:00 am
Location: london, UK

Re: Devourment API resource

Postby ryanshowseason3 » Tue Dec 02, 2014 8:34 pm

Figured out how to do script fragments for the dialog system and it is much fun now!

Looking to make a mod to add the ability to ask any and all women to swallow you or be swallowed by you. It kinda takes forever to make dialog prompts and script fragments.

I'm making it random whether the women will want no chance for escape lethal vore, non lethal vore or lethal with a chance to escape vore.
User avatar
ryanshowseason3
???
 
Posts: 2483
Joined: Thu Jan 05, 2006 12:00 am

Re: Devourment API resource

Postby ryanshowseason3 » Tue Dec 02, 2014 10:41 pm

Ran into a couple snags with the api...


The force swallow has some limitations.

When used with the player as pred for non lethal vore the player must have their weapons sheathed. Vegan if you are already using SKSE for this can you call the sheathe weapons command and force the player to sheathe when performing non lethal vore?

Also when using the api to use lethal vore with player as pred it initiates a crime. I'm trying to implement some willing lethal vore but it causes everyone around to freak out. I'm doing a roundabout method and switching to lethal vore after the fact but it'd be nice if we could initiate lethal vore from script without causing crime events.
User avatar
ryanshowseason3
???
 
Posts: 2483
Joined: Thu Jan 05, 2006 12:00 am

Re: Devourment API resource

Postby ryanshowseason3 » Wed Dec 03, 2014 7:01 am

Noticed something else.

I registered for updates every 3 seconds and in those updates I made the call to run digestion ticks, 30 of them. Sometimes it just seems to kill the player when acting on them. Not like through digestion, they just fall to the floor dead still invisible from the vore effects I suppose.
User avatar
ryanshowseason3
???
 
Posts: 2483
Joined: Thu Jan 05, 2006 12:00 am

Re: Devourment API resource

Postby ryanshowseason3 » Wed Dec 03, 2014 9:16 pm

darkevilme wrote:Me I can't properly overload dialogue for when you're eaten by particular people or under certain circumstances. But we all have our crosses to bear.

Note, player has a chance to escape unless you disable that AFTER you switch to lethal digestion.

also, as for the belly nodes...no clue at all.


Thank you for this post. I remembered it when the disable escape wasn't working for some reason, and yes it was because I was calling it before switching to lethal!

I may know something about that dialog trouble you're having. I've run into some difficulties as well. Sometimes the links I've added don't show up and I only get a few of the dialog options I added.

I'm not sure which part breaks it but when it happens. I close and reopen the CK, make sure all my script properties for each response are filled in and have a value. Remove spaces between assignment operators so

Code: Select all
MiaAteyou=1


Not

Code: Select all
MiaAteyou = 1


Dunno if that one has any effect, but hey I got desperate for things to work.

Finally I hit the compile button under the script fragment section to make sure the script is built.

It seems to me that if any dialog option has a problem loading everything subsequent to it in the links may not appear in the dialog options.

EDIT: Found another caveat to dialog options not showing up although its hard to pin what is the right way to do it...

The 80 character limit for player responses is a lie as far as I can tell. When My responses hit that limit some of them are lost, usually the last one. Dunno what causes it maybe it overflows into some other memory when its too long but that's whats been making my dialog options disappear. I don't know what the real maximum length you can use is and still safely have all your options show up.

EDIT AGAIN:
After 2 days of scouring forums. I have given up on this issue and resorted to creating prompts that simply loop around to more options and then back to the original options. The issue still shows up.

I do however recommend anyone anyone editing dialog get TESEdit. From what I gather using it to generate a SEQ file is basically mandatory for the quests the example uses to generate dialog options for NPCs
User avatar
ryanshowseason3
???
 
Posts: 2483
Joined: Thu Jan 05, 2006 12:00 am

Re: Devourment API resource

Postby ryanshowseason3 » Sun Dec 07, 2014 11:11 pm

Struggling with the devourment skill here.

I'm revisiting that mod I posted above that I now realize is non-functional since I didn't include the script files.

I made it restore the health values now and I'm trying to make it restore the players original devourment level since that seems to get reset as well when the player is digested.

WEIRD SHIT seems to happen to that value though.

First off it seems to be 15 lower than the posted value in the MCM.

Second off when digested and reinstated as the pred the pred seems to gain 4 base value in their variable05 that determines the devourment level...

Setting it during the process of getting digested or after the player is reinstated in the provided event seems to cause absolute chaos with the value...

I've resigned to waiting 2 seconds after the event and then setting it so I am clear of any ridiculousness effecting it. At that I'm using forcevalue which is really awkward.
User avatar
ryanshowseason3
???
 
Posts: 2483
Joined: Thu Jan 05, 2006 12:00 am

Re: Devourment API resource

Postby darkevilme » Mon Dec 08, 2014 1:06 am

In theory based on the way the devourment dialogue script mod works if you have a blocking dialogue branch with a priority over 100 for its topic (especially force greet) then the dialogue override should work as that's the method used for Mia. This is only a theory though I've not tested it due to burning out on devourment/skyrim modding for now. Could also I suppose make your own devourment registry handler and modify the original default devourment dialogue choices to refer to a new variable in the handler (called default dialogue maybe) and control the variable as you go to toggle off the defaults (dun forget to put a setting of default dialogue to true again in the regurgitation call of the handler, otherwise the default dialogue will ne'er come back).
darkevilme
---
 
Posts: 1492
Joined: Wed Feb 01, 2006 12:00 am
Location: london, UK

Next

Return to Vore game