Jump to content

Recommended Posts

Posted

 

 

ive never used this mod is there a better implementation on getting the collar placed on you? Also how do you get it off? Would be nice if there was a Death Alternative event for it maybe.

 

Deviously Enslaved Continued has an option for ingame event to add Pet Collar to character. See reply #1 for list of mods that connect with it.

 

https://www.loverslab.com/files/file/2414-deviously-enslaved-continued/

 

 

 

Am I missing something?

 

I can't find a reference to Pet Collar on the download page of Deviously Enslaved Continued.

 

In general, it would be very useful if Pet Collar supported a mod event to equip and to remove the collar.

I would definitely make use of it in SD+ if there was such a mod event.

 

 

It is indeed not mentioned in the download page. By reply #1 I meant the first reply in support discussion. Supported mods are located there.

 

Edit: Oh, LL considers OP as #1. In that case the post would be #2. Sorry. blush.gif

 

Posted

The script code Deviously enslaved uses to equip Pet collar:

zadLibs Property libs Auto ; DDi, dont forget to define in creation kit
; grabbing the objects from the esp, early in code (init?)
bool modLoadedPetCollar = Quest.GetQuest("PetCollarConfig") != None
if modLoadedPetCollar ; we can grab these from the esp without errors in log
  Armor petCollar         = Game.GetFormFromFile(0x00000D65 , "PetCollar.esp") as Armor
  Armor petCollar_script  = Game.GetFormFromFile(0x00000D64 , "PetCollar.esp") as Armor
endif

... 

; to equip to player
libs.EquipDevice(actorRef, petCollar, petCollar_script, libs.zad_DeviousCollar)

This was written by Chase Roxand, the original author of Deviously enslaved, I just haven't changed it in DEC.

 

It looks like the same system you use to equip any DD based item. You get the Armor (in this case from the esp) then you get the rendered object for the armor (since there can be more than one with DD) (again from the esp, although you can normally get them from DDLibs with libs.GetRenderedDevice(armorRef)) and then you pass both with the proper keyword to DDi, and the actor you want the item to be equipped to (sub player into this field to add to player)

 

A mod event would be much simpler and I wouldn't have an issue with it, except you'll need to include instructions for passing an Armor in the modevent parameters if you want to specify which pet collar to use, since most mods are used to calling mod events without specifying any extra parameters (naked) (IA. SendModEvent("dhlp-Suspend")).

 

As for removing, the basic collar can be opened with a DDi restraint key, right? It's been awhile, but DEC doesn't have any special code for the regular collar.

Posted

 

 

ive never used this mod is there a better implementation on getting the collar placed on you? Also how do you get it off? Would be nice if there was a Death Alternative event for it maybe.

 

Deviously Enslaved Continued has an option for ingame event to add Pet Collar to character. See reply #1 for list of mods that connect with it.

 

https://www.loverslab.com/files/file/2414-deviously-enslaved-continued/

 

 

 

Am I missing something?

 

I can't find a reference to Pet Collar on the download page of Deviously Enslaved Continued.

 

In general, it would be very useful if Pet Collar supported a mod event to equip and to remove the collar.

I would definitely make use of it in SD+ if there was such a mod event.

 

 

I'll look how I can add these events then! :) 

Is this it?

RegisterGenericDevice(petCollar, "collar,short,metal,PetCollar")
Posted

Use "RegisterForModEvent("mod_event_name", "my_equip_function")" to point a modevent you make to a function. Then everytime someone calls the modevent mod_event_name, your function my_equip_function gets called, where you can substitute any function you write and any name you want.

 

Quick looking at your code doesn't show a suitable function borrow, probably have to make your own new function for this specifically.

 

Edit: Forgot, the function you point the modevent is an event, not a regular function IE:

; in your mod, to handle the modevent
RegisterForModEvent("PetCollarEquip", "OnEquipCollar")

...

; to be honest, I don't know how many of these parameters you need, I'm a chronic copy paster
Event OnEquipCollar(string eventName, string strArg, float numArg, Form sender)
  ; equip the collar
endEvent

;Calling the event in another mod, or your own mod:
SendModEvent("PetCollarEquip")

I still need to find a good example of calling modevents with parameters though...

 

Edit: Found this in cursed loot:

; in cursed loot_s dcur_libs.psc:

    int ECTrap = ModEvent.Create("ECStartAnimation") ;Does not have to be "ECTrap" any int name is OK       
    if (ECTrap)
       ModEvent.PushForm(ECTrap, self)             ; SendModEvent "black magic" - required
       ModEvent.PushForm(ECTrap, game.getplayer()) ; Target as Form
       ModEvent.PushInt(ECTrap, i)                 ; Animation as Int  0 = Tentacles, 1 = Machine 2 = Slime 3 = Ooze
       ModEvent.PushBool(ECTrap, impregnate)       ; bool Apply ECeffect (Ovipostion/exhausted) 
       ModEvent.Pushint(ECTrap, crowdradius)       ; Int Alarm radius in units (0 to disable)
       ModEvent.PushBool(ECTrap, true)             ; bool Use (basic) crowd control on hostiles
       ModEvent.Send(ECtrap)
    else
      libs.notify("[DCUR] Fatal Error: Estrus mod event could not be created.")
    endIf

; in Estrus Chaurus_s zzestruschaurusevents.psc:

RegisterForModEvent("ECStartAnimation", "OnECStartAnimation")

...

bool function OnECStartAnimation(Form Sender, form akTarget, int intAnim, bool bUseFX, int intUseAlarm,  bool bUseCrowdControl)

  actor akActor  = akTarget as Actor
  Bool bGenderOk = mcm.zzEstrusChaurusGender.GetValueInt() == 2 || akActor.GetLeveledActorBase().GetSex() == mcm.zzEstrusChaurusGender.GetValueInt()
  Bool invalidateVictim = !bGenderOk || akActor.IsInFaction(zzEstrusChaurusExclusionFaction) || akActor.IsBleedingOut() || akActor.isDead()

  if !invalidateVictim
    int SexlabValidation = Sexlab.ValidateActor(akActor)
    if intAnim == -1 && SexlabValidation != -12 ; Exclude Child Races
      Oviposition(akActor, false)
    elseif SexlabValidation == 1
      DoECAnimation(akActor, intAnim, bUseFX, intUseAlarm, bUseCrowdControl)
    else
      return false
    endif

    return true
  else
    return false
  endIf
endfunction

Found similar in Serial strip, but its a touch harder to read there.

 

So... if I'm reading this right, you could probably make something like this:

; in your mod, to handle the modevent
RegisterForModEvent("PetCollarEquip", "OnEquipCollar")

...

; if we can specify the required parameters, you probably only need the armor specifically
; or you could event try "Armor collar = regular_collar", generic variable instead of Form collarRef
;  bypassing the need for the if check in the function
;  can't remember what case I had where that doesn't work, actors maybe?
Event OnEquipCollar(Form collarRef)
  Armor collar = regular_collar
  if collarRef != None
    collar == collarRef as Armor
  endif
  ; equip the collar code goes here
endEvent

;Calling the event in another mod without specifying the collar:
SendModEvent("PetCollarEquip")

;Calling the event in another mod with a specific collar in mind:
int PetCollarEvent = ModEvent.Create("PetCollarEquip") 
if (PetCollarEvent)
  ModEvent.PushForm(PetCollarEvent, specific_collar as Form) ; the one form we need
  ModEvent.Send(PetCollarEvent)
else
  ; error message saying the mod doesnt exist, if the modder wants to use for debug
endIf

I don't know, never made a parameter specific modevent, might be more nuanced than that.

Posted

Thanks! I have a feeling that I'll not going to sleep now until I release a v5 with this...

 

For the passing in parameters to the event, I'm now looking at these 2 pieces of code from the latest DDi:

SendModEvent("DeviceVibrateEffectStop", akActor.GetLeveledActorBase().GetName(), vibStrength * numVibratorsMult)
RegisterForModEvent("DeviceVibrateEffectStop", "OnVibrateStop")
......
Event OnVibrateStop(string eventName, string argString, float argNum, form sender)
	libs.Log("OnVibrateStop("+argString+", "+Target.GetLeveledActorBase().GetName()+")")
	if Target && argString == Target.GetLeveledActorBase().GetName()
		if Target == libs.playerRef
			libs.NotifyPlayer("A small jolt of electricity emenates from the ")
			libs.NotifyPlayer("plugs within you, causing you to cry out in pain.")
		Else
			libs.NotifyNPC(Target.GetName() + " squirms uncomfortably as the plugs within her let out a painful jolt!")
		EndIf
		libs.ShockEffect.RemoteCast(Target, Target, Target)
		libs.Aroused.UpdateActorExposure(Target, Utility.RandomInt(10,20) * -1)
	EndIf
EndEvent

Probably not the best example, since I don't see how the 'argNum' argument is used inside the event, even though it is kind-of passed as 3-d parameter in SendModEvent()

 

One more question before I start testing it. Should I, and how do I UnregisterTheModEvent? Will it cause issues in a case when user uninstalls the mod while it is still 'registered'?

Posted
One more question before I start testing it. Should I, and how do I UnregisterTheModEvent? Will it cause issues in a case when user uninstalls the mod while it is still 'registered'?

 

Don't know.

 

Considering there are users saying their game was better without DEC after uninstall, and DEC doesn't bother unregistering them, I would say it doesn't hurt anything, maybe a few errors in the papyrus log if the engine finds the function no longer reachable, but nobody has complained that uninstalled DEC has caused them any issues so far.

 

But should be easily doable with :

UnRegisterForModEvent("PetCollarEquip") 
Posted

Another thing to know about ModEvents is that they have to be registered at each game load.

 

For that, it is better to register them in a reference alias script attached to the player (the event OnPlayerLoadGame only works for the player alias).

 

Here is an example from SexLab Stories.

 

https://github.com/SkyrimLL/SkLLmods/blob/master/Stories/Data/scripts/source/SLS_PlayerAlias_Fetish.psc

 

I did that in multiple mods:

 

- create a 'maintenance' function that registers the events

- call that function from the OnInit and OnPlayerLoadGame events.

 

My examples only use the basic modevent syntax... not the advanced one with multiple parameters (most of my mod events only use one or two parameters at most).

Posted

Somehow my registration persisted through re-load (and re-launch). According to a comment here it may no longer be actual. Are you sure, skyrimll? :unsure:

I've added an 'advanced' event:

Event OnPetCollarManipulate(Form sender, Form akTarget, int aiAction)
	Actor actorRef = akTarget as Actor
	if actorRef
		if aiAction == 0
			libs.RemoveDevice(actorRef, petCollarInventory, petCollar_scriptInstance, libs.zad_DeviousCollar, true)
		elseif aiAction == 1
			libs.EquipDevice(actorRef, petCollarInventory, petCollar_scriptInstance, libs.zad_DeviousCollar)
		else
			libs.Notify("[PetCollar] Error: OnPetCollarManipulate received invalid action: " + aiAction)
		endif
	else
		libs.Notify("[PetCollar] Error: OnPetCollarManipulate received invalid actor")
	endif
EndEvent

Imho managing single event will be easier, especially if I will be expanding it with other actions later.

 

The usage is like this (actual code from the PetCollarConfigScript):

int handle = ModEvent.Create("PetCollarManipulate")       
if handle
    ModEvent.PushForm(handle, self)
    ModEvent.PushForm(handle, actorRef)
    ModEvent.PushInt(handle, 1)
    ModEvent.Send(handle)
else
    libs.notify("[PetCollar] Error: Failed to send PetCollarManipulate event for PetCollarEquip")
endif

But if you want I'll also be OK with something like this:

SendModEvent("PetCollarEquipOnPlayer")
SendModEvent("PetCollarRemoveFromPlayer")

The package above is totally functional (I even checked the Papyrus logs and there are no errors after first save), so you are welcome to test it if you wish.

Posted

Is there a reason NPCs leave pet status when they aren't in the same cell as the player?

 

Seems odd I can't leave my pet at home, and if my follower lags behind too far as a pet they might lose their status because you left them behind in a different cell for even a moment.

Posted

There is a bug/feature where scripts just fall off from actors when you change zones: http://www.loverslab.com/topic/30613-best-practice-for-scripts-attached-to-magic-effects-oneffectfinish-or-registerforsingleupdate/?p=764305

I have a workaround for this, but as @Fredfish said, you need to turn 'Maintain Pet Effect on NPCs' option ON.

It will add an ability with OnLocationChange event to the Player that will search for up to 4 NPCs with PetAbility and 'fix' them.

  • 4 weeks later...
Posted

Could you also add this registration as a generic device?

RegisterGenericDevice(petCollar, "collar,short,metal,PetCollar")

This would make pet collar available to other mods using generic devices through tags.

 

I am working on improvements to allow any collar to be used with SD+ and this one line would make it possible to use pet collar with a SD master :)

Posted

Could you also add this registration as a generic device?

RegisterGenericDevice(petCollar, "collar,short,metal,PetCollar")

This would make pet collar available to other mods using generic devices through tags.

 

I am working on improvements to allow any collar to be used with SD+ and this one line would make it possible to use pet collar with a SD master :)

 

SD+ doesn't recognise it as a slave collar? I don't use that mod but a couple of other mods I use recognise it, Further Lovers Comfort and Aroused Creatures both regard any npc  I've fitted the collar to as a slave, the collar used by PetCollar is basically just a zaz collar.

Posted

 

Could you also add this registration as a generic device?

RegisterGenericDevice(petCollar, "collar,short,metal,PetCollar")

This would make pet collar available to other mods using generic devices through tags.

 

I am working on improvements to allow any collar to be used with SD+ and this one line would make it possible to use pet collar with a SD master :)

 

SD+ doesn't recognise it as a slave collar? I don't use that mod but a couple of other mods I use recognise it, Further Lovers Comfort and Aroused Creatures both regard any npc  I've fitted the collar to as a slave, the collar used by PetCollar is basically just a zaz collar.

 

 

What I am assuming these mods are doing is fetch a hardcoded reference to the formID of the collar directly from the mod file.

 

In contrast, what I am requesting is to have the mod register the pet collar as a generic device, which would make it available to any mod using generic devices without having to know the exact formID of the collar.

 

I could do the same and register it myself inside SD+ but it would be better if that was done inside Pet collar.

Posted

Could you also add this registration as a generic device?

RegisterGenericDevice(petCollar, "collar,short,metal,PetCollar")

This would make pet collar available to other mods using generic devices through tags.

 

I am working on improvements to allow any collar to be used with SD+ and this one line would make it possible to use pet collar with a SD master :)

 

Done: PetCollar_v5.0.0.zip

  • added SendModEvent support (for equip / unequip)
  • added RegisterGenericDevice support

 

  • 3 weeks later...
Posted

Hey!

 

So, this mod is messing my savegames.

 

Whenever I save as an actor is a pet, like the PC or a companion, save, then exist, the game refuses to load that save.

 

Help.

  • 2 weeks later...
Posted

I'm using version 4.9.1 and all is working fine except for a couple of issues. I've given the pet status to 4 slaves in my house to service my followers. A few times (not all the time) I get the message that a follower, let's say Lydia, needs the service of Pet #1, and at the same time the service of Pet #2. She will then have sex with both of them, literally flying through the air back and forth to both pets. If I let it continue the scenes will play out and end eventually. If I interrupt and cancel one scene Lydia will go back to the other one and I can initiate dialogue with her while the scene is playing. This can happen with other followers as well, not just Lydia.

 

The other issue is that Pet Collar seems to favor npc's that I have started a conversation with, or about to have sex with, interrupting the scene and snatching them away for service by the pets.

Posted

Hey!

 

So, this mod is messing my savegames.

 

Whenever I save as an actor is a pet, like the PC or a companion, save, then exist, the game refuses to load that save.

 

Help.

I've saved and loaded ~300 times like this and did not experience your issue. After I moved to Mod Organizer and manually resolved every mods conflicts, my game is stable as a rock. I hope you'll find the cause.

 

I'm using version 4.9.1 and all is working fine except for a couple of issues. I've given the pet status to 4 slaves in my house to service my followers. A few times (not all the time) I get the message that a follower, let's say Lydia, needs the service of Pet #1, and at the same time the service of Pet #2. She will then have sex with both of them, literally flying through the air back and forth to both pets. If I let it continue the scenes will play out and end eventually. If I interrupt and cancel one scene Lydia will go back to the other one and I can initiate dialogue with her while the scene is playing. This can happen with other followers as well, not just Lydia.

 

The other issue is that Pet Collar seems to favor npc's that I have started a conversation with, or about to have sex with, interrupting the scene and snatching them away for service by the pets.

Thanks for the clear description, both issues are easy to fix. The new version will be coming soon.

 

Hello, I was wondering if you could add a dialoge option to simply use the pets, independent of the arousal threshold. 

 

Thanks for this mod!

Hi, I'm glad you are enjoying it!

Very unlikely as this mod was never intended to use any dialogs. But there should be other mods with this functionality on this site, for example Sex Slaves, Puppet Master, Eager NPCs, etc.

Posted

 

I'm using version 4.9.1 and all is working fine except for a couple of issues. I've given the pet status to 4 slaves in my house to service my followers. A few times (not all the time) I get the message that a follower, let's say Lydia, needs the service of Pet #1, and at the same time the service of Pet #2. She will then have sex with both of them, literally flying through the air back and forth to both pets. If I let it continue the scenes will play out and end eventually. If I interrupt and cancel one scene Lydia will go back to the other one and I can initiate dialogue with her while the scene is playing. This can happen with other followers as well, not just Lydia.

 

The other issue is that Pet Collar seems to favor npc's that I have started a conversation with, or about to have sex with, interrupting the scene and snatching them away for service by the pets.

Thanks for the clear description, both issues are easy to fix. The new version will be coming soon.

Thanks for the reply yurik. I might as well throw this one in as it's probably related. With several pets available I might get a prompt to 'fuck the pet'. I click ok, then I get another prompt to fuck a different pet. Click ok, then another prompt and so on. I've received up to four prompts in a row, eventually I end up with a pet I just don't know who it's going to be.

Posted

Ok so that issue was solved, thanks Yurik.

 

But the problem is, my game is still laggy as hell only when the PC or an NPC has the pet status.

 

I have over 105 activated plugins, nothing else causes me to lag. Ran LOOT to sort the order too.

 

Also, say somebody needs the pet's service.

 

Great. the pet services them.

 

But then, even after I change cells, nobody else needs their service even when the arousal requirement is set to something like 10 or 15.

 

tested with both the PC and an NPC.

 

What gives?

Posted

Raughtr, I'm glad it did so. For your other issue, just tick the 'Maintain Pet Effect on NPCs' option in the MCM menu, 'Maintenance' section.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...