Jump to content

Devious Followers Continued - Interfaces for Modders


Lupine00

3,280 views

The information here is for modders that want to interoperate with DFC. This information used to be on the main page of the mod, but space is at a premium there, and most users will never care about it, so I've moved it off.

 

Mod Event Generation and Handling

Spoiler

DF listens for the following custom mod events:

 

  • "DF-Pause" - Pauses or unpauses DFC.
  • "DFEnslave" - Enslaves the PC via DFC. Enslavement settings are respected.
  • "AnimationEnd" - SexLab animation end - used to update status due to sex.
  • "dhlp-Suspend" - Deviously Helpless event suspend - tells DF that it's unsafe to trigger scenes.
  • "dhlp-Resume" - Deviously Helpless event resume - tells DF it's safe to trigger scenes again.
  • "PlayerRefEnslaved" - tells DFC that another mod has enslaved the PC - it pauses itself.
  • "PlayerRefFreed" - tells DF that the PC is free again - it unpauses itself.
  • "SSLV Entry" - for telling DF that the PC is entering Simple Slavery  - it drops the devious follower and resets its state.
  • "DF-ResistanceLoss" - removes some of the PC's resistance (willpower damage).
  • "DF-ResistanceGain" - adds some resistance to the PC (willpower regain)
  • "DF-ResistanceLossWithSeverity" - removes some of the PC's resistance, with a severity value that may limit lesser events from being over impactful.
  • "DF-DebtAdjust" - adds debt to the PC.
  • "DF-MinimumContractChange" - changes the minimum contract configuration.
  • "DF-AddFollower" - adds a new DF - does nothing if PC is at their limit of followers - depends on follower framework being used (if any).
  • "DF-RemoveFollower" - removes a follower - the follower is dismissed.
  • "DF-Spank" - get spanked.

 

These are all registered in _Dtick.psc

 

e.g. 

 

The following are vanilla-style mod events:

 

SendModEvent("DF-ResistanceLoss", "", 3.0) ; take away three points of resistance.

SendModEvent("DF-ResistanceGain", "", 1.0) ; add a point of resistance.

SendModEvent("DF-ResistanceLossWithSeverity", "2", 10.0) ; a severity 2 event that removes 10 resistance.

SendModEvent("DF-DebtAdjust", "", 550.0) ; Adds 550 gold debt to the PC. Send negative values to remove debt (add credit).

SendModEvent("DF-MinimumContractChange", "", 14.0) ; set minimum contract to 14 days.

SendModEvent("DF-Spank", "123456789", 2.0) ; spank the PC

 

When spanking the PC, the string parameter is the integer FormID of the spanking NPC, converted to a string. 

The floating point parameter is the spanking severity. It should be an integer. Specify < 0 for willpower-determined, or 0, 1, or 2 for explicit severity. Higher is more extreme.

 

 

The following are custom mod events:

 

Int eventHandle = ModEvent.Create("DF-AddFollower")

If eventHandle

    ModEvent.PushForm(eventHandle, sender) ; The calling quest

    ModEvent.PushForm(eventHandle, followerActor) ; The new follower

    ModEvent.PushInt(eventHandle, 1000)  ; Additional debt

    ModEvent.PushBool(eventHandle, False) ; Do not force the PC into gold control mode

    ModEvent.PushFloat(eventHandle, 7.0) ; Set minimum contract days to 7 - use a -ve day count to leave the current contract setting unchanged.

    ModEvent.Send(eventHandle)

EndIf

 

 

Int eventHandle = ModEvent.Create("DF-RemoveFollower")

If eventHandle

    ModEvent.PushForm(eventHandle, followerActor) ; The follower to dismiss

    ModEvent.Send(eventHandle)

EndIf

 

Note that when you're calling DF-AddFollower, it works the same whether the follower is a hireling or not. You specify the debt explicitly, it doesn't automatically add an extra 500 debt for hirelings; you get exactly what you specify. Setting a high debt value may result in the follower immediately going into debt recovery mode on the PC.

 

Int eventHandle = ModEvent.Create("DF-Pause")

If eventHandle

    ModEvent.PushBool(eventHandle, pauseState) ; true if pausing, false if resuming.

    ModEvent.PushForm(eventHandle, sender) ; The form that is the event source - be consistent.

    ModEvent.Send(eventHandle)

EndIf

 

The form is added to a form list, and DFC will not resume until all pausing sources have unpaused, so consistent use of the form value is essential.

 

DF raises the following mod events:

 

  • DFEnslave - to enslave the player into DFC (from SS, for example).
  • PlayerRefEnslaved - when the player is enslaved into DFC enslavement.
  • PlayerRefFreed - when the player is released from DFC enslavement.
  • DF-RemoveFollower - fired on sending to Simple Slavery when Devious Follower is removed.
  • SSLV Entry - puts player into Simple Slavery - DFC listens so it can clean player, but also fires this event.
  • RapeTattoos_addTattoo - fired to add tattoos for punishment or on enslavement
  • DF-SceneStart - fired at the start of sex, and other scenes, BEFORE dhlp-Suspend
  • DF-SceneEnd - fired at the end of sex, and other scenes, BEFORE dhlp-Resume
  • dhlp-Suspend - fired at the start of sex, and other scenes
  • dhlp-Resume - fired at the end of sex, and other scenes
  • LDCAddExtraDevices - when LDC updates its device list

 

See the list of events DF listens to above.

DF-SceneStart and DF-SceneEnd or dhlp-Suspend and dhlp-Resume are events you should listen to so you can avoid running events on top of DF scenes and causing  chaos.

 

 

Some Interesting Globals that DFC Uses

Spoiler
  • _DFBoredom - current follower boredom
  • _DFDailyDealTimer - game time that daily deal timer will roll over
  • _DFFatigue - current resistance fatigue
  • _DFFollowerCount - current (devious) follower count
  • _DflowEDHalf - half enslavement debt
  • _DflowEnslaveDebt - enslavement debt
  • _DFlowSlaveDebt - debt given to slaves
  • _DFPunDebt - punishment debt amount
  • _DFResistanceBroken - resistance losses beyond will 0, resistance 0
  • _DFSexScanAllowFemale - can scanner find females?
  • _DFSexScanAllowMale - can scanner find males?
  • _DFStanding - is the PC standing when they should be crawling
  • _DResist - current resistance
  • _DWill - current willpower

 

 

Devious Follower Data via StorageUtil

Spoiler

The following values may be present on followers or potential followers, depending on what the player has done.

  • DF_FollowerNeverDevious - Int value >= 0 means DFC ignores this follower.
  • DF_FollowerMaster - Int value >= 0 means this is the current DFC master.
  • DF_FollowerMasterDays - Float value >= 0 is the completed days this follower was/has previously been a DFC master for. On current and dismissed followers. It doesn't include the current hire session; see below...
  • DF_LastHireTime - Float value >= 0 is the time in game days when the follower was last hired (if ever). Use this to find how long the current hire session has lasted.
  • DF_FollowerBoredom - Float value >= 0 is the boredom the follower was last set with. Remains on dismissed followers.

 

The following Int values may be present on followers or potential followers, depending on what the player has done.

  • DF_FollowerPersonality - 0 to 6 (see below)
  • DF_FollowerAggression - 1 to 100
  • DF_FollowerGreed - 1 to 100
  • DF_FollowerHonor - 1 to 100
  • DF_FollowerLust - 1 to 100
  • DF_FollowerControl - 1 to 100
  • DF_FollowerPlayful - 1 to 100

 

Personality values:

  • 0 - default - pure random behavior - the baseline - exactly how DFC was prior to adding this feature
  • 1 - slaver - goal number one: enslave PC
  • 2 - profiteer - make more money, avoid things that interfere with money making
  • 3 - sexy - likes sex and bondage and also more sex
  • 4 - sadist - likes to make misery for the PC
  • 5 - moral - has a strict code, may be prudish or judgmental but more likely to be honest
  • 6 - nightmare - all the worst things, sometimes randomly
     

 

 

Factions

Spoiler

The following factions are in the DFC ESP and are used as details:

  • _DFDisable          - 0xXX0B8A73 - add a follower to this faction to make them never be devious
  • _DFEnable           - 0xXX2D1109 - add a follower to this faction to cause them to be skipped by the bulk follower disable operation (will not make disabled followers devious though)
  • _DFJobPriestFaction - 0xXX234032 - add an NPC to this faction to make them accept temple donations that reduce willpower-resistance fatigue.
  • _DMaster            - 0xXX015712 - do not add anyone to this. Followers in this faction act as DFC masters, but in many cases a master also needs to be on the alias, so this is only useful in dialogs.
  • _DBuyer             - 0xXX058192 - NPCs in this faction are able to return the PC's stolen/hidden items.

 

 

Slavery Punishment Tracking via StorageUtil

Spoiler

Slave punishment counts are set on the Player object and the follower, as StorageUtil Int values.

 

The values on the follower are specific to that follower. Modders will probably never need to care about these; DFC uses them internally when followers are changed.

The values on the player are for the current follower, and the global totals.

 

They use the following keys:

 

  • DF_Enslaved_PunishCount - punishment value for this enslavement and this follower - if the player is not enslaved at this time, it will usually be zero.
  • DF_Enslaved_TotalPunishCount - total punishment value for all enslavements with this follower - can be non zero, even though not enslaved at this time.
  • DF_Enslaved_TotalPunishCount_AllFollowers - totalled punishment value for all enslavements and all followers - can be non zero, even though not enslaved at this time. This value is only on the player, it isn't stored on any followers as it would get stale.
  • DF_Enslaved_Extreme_Punishment_Limit - on the player, the value at which DFC itself will administer an extreme punishment. If not set by DFC, the bad end mod can set this to any value it likes (though 250 is the suggested default).
  • DF_Enslaved_Final_Punishment_Limit - on the player, the value at which the "bad end" mod kills the PC. If there is an extreme punishment limit, this value should be at least twice that, and never equal or less than it.
    i.e.  assert DF_Enslaved_Final_Punishment_Limit DF_Enslaved_Extreme_Punishment_Limit

 

DF may (one day) expose both these values in the MCM, but I have not done so yet, and will not do so until I implement something for an "extreme punishment" scenario.

 

An external "bad end" mod may expose them in its MCM, and as they are StorageUtil values, there is no problem both mods having them in their MCM, but it should be understood that they can change at any time due to an external modification.

 

The punishment value is not simply the count of punishments, but is more granular, so there's scope for light punishments and heavy ones.

I think this is better than using floats, as float comparison is full of traps.

 

By default, a punishment (add debt) adds 10 to the score.

By default, being gagged, silenced, and whored out adds 1 to the score.

 

Severe crimes, as judged by DFC will score 25 points, and are:

  • not wearing part of your slave uniform in the required location.
  • not having your arms bound when the follower has decided that's how you should be.
  • losing your gag if you have been force-gagged and silenced.

 

Also, being abandoned by the follower for being a useless slave adds an instant 200 points.

 

I'd suggest that the PC needs to accumulate around 500 points to get a game over, but if you like it hardcore, you could half that value. Seems reasonable the player should be able to set the threshold, but 500 might be a reasonable default.

 

I'm also planning to add a native DF feature, so that around 250 points the PC suffers some extreme punishment, with a warning that there will be no second chance...

 

I'm also thinking that the player should at least have an option for spanks that the PC begs for to reduce the value by 1, and whippings that the PC begs for might reduce it by 3 or so, but I'm not implementing that yet. There needs to be some way to offset the fact that sometimes you will get punished unfairly, and it would suck to die because of an accumulation of bad luck with that.

 

It makes sense for a bad-end/death punishment mod to not worry about that, and just deal with the "end of game, you're dead, start a new one" problem.

Just check for DF_Enslaved_PunishCount DF_Enslaved_Final_Punishment_Limit , and if it is true, maybe you can plead your way out of it, and maybe you can't?

 

0 Comments


Recommended Comments

There are no comments to display.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use