Jump to content

Questions to help me make sex mods


Recommended Posts

Posted (edited)

We have proof of concept - I am triggering NAF scenes through dialogue in game. Pair scenes align ok. Got NAF export tools working with Blender 4.2. 

 

Current goals are making: (maybe 1-2 months)

a con sex mod with dialogue that triggers scenes (plan to make craftable pheromone that is conditional to enable sex dialogue).

a dubcon/noncon sex mod that triggers on player when health drops below a set level. 

These will be limited function because my script technique is weak, but they will work until something better comes out.

 

I have questions, to help make these most usable:

 

1. What naked bodies are users having? (I would like to get penis alignment good in first round of animations, use best current bodies for spacing)

 

2. What is best way to spawn furnitures and objects to go with animations? 

 

3. What is best way to make mod with quests/scenes/scripts not break with many user updates? Should it detect version and end/restart all quests? Is there something else it should do? (example mods that do this best are helpful - I can see how they do it)

 

4. What is most lightweight way to monitor for condition on player (like health goes below 20%)? Would like to minimize having high script load that makes papyrus slow. 

 

5. Companions are always standing in scene. For tests I am using 'tai' to keep them away. What is best way to script for companions to go away or stand some other place (or be knocked down) while sex is happening? 

 

(I know, I can spend time looking for all of these things, but that is time not spent making mod or animating. I hope other people know and will share.)

 

(Please if you would not post a lot of complicated feature requests. I will try for fast and works rather than all the features.)

 

Many thank yous. 

  

Edited by Gray User
Posted

I haven't played starfield in quite a long time so I can't help you, i'm just commenting to say thank you for stepping up to the plate. 

Posted (edited)
5 hours ago, Gray User said:

2. What is best way to spawn furnitures and objects to go with animations? 

 

This is maybe not helpful in the immediate term, but I'm looking into adding event tracks to GLB/GLTF animations via Blender's pose markers so that the game's AnimObject system can be used.

 

5 hours ago, Gray User said:

3. What is best way to make mod with quests/scenes/scripts not break with many user updates? Should it detect version and end/restart all quests? Is there something else it should do? (example mods that do this best are helpful - I can see how they do it)

 

I remember hearing a good system for this in one of KingGath's videos. You would attach a script like this to a quest (it's been a hot minute since I've written Papyrus, so all the syntax in this might not be 100% correct):

Scriptname ExampleScript extends Quest

; Properties are baked into the save file, so this'll remember which version of the mod was last installed.
Int Property CurrentVersion Auto = 0

Function CheckVersion()
    Int ModVersion = 1
    If CurrentVersion < ModVersion
        ; Put your update logic here.
        ; You can also check for specific version numbers.
    EndIf
    CurrentVersion = ModVersion
EndFunction

Event OnQuestInit()
    RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
    CheckVersion()
EndEvent

Event Actor.OnPlayerLoadGame(Actor akSender)
    CheckVersion()
EndEvent

 

5 hours ago, Gray User said:

4. What is most lightweight way to monitor for condition on player (like health goes below 20%)? Would like to minimize having high script load that makes papyrus slow. 

 

Starfield has introduced some useful new events for detecting this, namely the OnActorValueGreaterThan and OnActorValueLessThan events, which can be registered for via the RegisterForActorValueLessThanEvent and RegisterForActorValueGreaterThanEvent functions. Example:

Scriptname ExampleScript extends Quest

Function RegisterActorForHealthDetection(Actor akTarget)
    ; You may have to check the max health first to use a percentage value.
    RegisterForActorValueLessThanEvent(akTarget, Game.GetHealthAV(), 15.0)
EndFunction

Event OnActorValueLessThan(ObjectReference akObjRef, ActorValue akActorValue)
    ; Your logic here after an actor reaches less than 15 health.
EndEvent

 

5 hours ago, Gray User said:

5. Companions are always standing in scene. For tests I am using 'tai' to keep them away. What is best way to script for companions to go away or stand some other place (or be knocked down) while sex is happening? 

 

The SetRestrained function on Actor should prevent them from moving, but I'm not sure if there's any easy way to make them move to a certain spot without overriding their AI package somehow.

Edited by Snapdragon_
Posted
1 hour ago, Snapdragon_ said:

 

This is maybe not helpful in the immediate term, but I'm looking into adding event tracks to GLB/GLTF animations via Blender's pose markers so that the game's AnimObject system can be used.

 

 

I remember hearing a good system for this in one of KingGath's videos. You would attach a script like this to a quest (it's been a hot minute since I've written Papyrus, so all the syntax in this might not be 100% correct):

Scriptname ExampleScript extends Quest

; Properties are baked into the save file, so this'll remember which version of the mod was last installed.
Int Property CurrentVersion Auto = 0

Function CheckVersion()
    Int ModVersion = 1
    If CurrentVersion < ModVersion
        ; Put your update logic here.
        ; You can also check for specific version numbers.
    EndIf
    CurrentVersion = ModVersion
EndFunction

Event OnQuestInit()
    RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
    CheckVersion()
EndEvent

Event Actor.OnPlayerLoadGame(Actor akSender)
    CheckVersion()
EndEvent

 

 

Starfield has introduced some useful new events for detecting this, namely the OnActorValueGreaterThan and OnActorValueLessThan events, which can be registered for via the RegisterForActorValueLessThanEvent and RegisterForActorValueGreaterThanEvent functions. Example:

Scriptname ExampleScript extends Quest

Function RegisterActorForHealthDetection(Actor akTarget)
    ; You may have to check the max health first to use a percentage value.
    RegisterForActorValueLessThanEvent(akTarget, Game.GetHealthAV(), 15.0)
EndFunction

Event OnActorValueLessThan(ObjectReference akObjRef, ActorValue akActorValue)
    ; Your logic here after an actor reaches less than 15 health.
EndEvent

 

 

The SetRestrained function on Actor should prevent them from moving, but I'm not sure if there's any easy way to make them move to a certain spot without overriding their AI package somehow.

dam never knew about this

Posted
1 hour ago, Snapdragon_ said:

 

This is maybe not helpful in the immediate term, but I'm looking into adding event tracks to GLB/GLTF animations via Blender's pose markers so that the game's AnimObject system can be used.

 

 

I remember hearing a good system for this in one of KingGath's videos. You would attach a script like this to a quest (it's been a hot minute since I've written Papyrus, so all the syntax in this might not be 100% correct):

Scriptname ExampleScript extends Quest

; Properties are baked into the save file, so this'll remember which version of the mod was last installed.
Int Property CurrentVersion Auto = 0

Function CheckVersion()
    Int ModVersion = 1
    If CurrentVersion < ModVersion
        ; Put your update logic here.
        ; You can also check for specific version numbers.
    EndIf
    CurrentVersion = ModVersion
EndFunction

Event OnQuestInit()
    RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
    CheckVersion()
EndEvent

Event Actor.OnPlayerLoadGame(Actor akSender)
    CheckVersion()
EndEvent

 

 

Starfield has introduced some useful new events for detecting this, namely the OnActorValueGreaterThan and OnActorValueLessThan events, which can be registered for via the RegisterForActorValueLessThanEvent and RegisterForActorValueGreaterThanEvent functions. Example:

Scriptname ExampleScript extends Quest

Function RegisterActorForHealthDetection(Actor akTarget)
    ; You may have to check the max health first to use a percentage value.
    RegisterForActorValueLessThanEvent(akTarget, Game.GetHealthAV(), 15.0)
EndFunction

Event OnActorValueLessThan(ObjectReference akObjRef, ActorValue akActorValue)
    ; Your logic here after an actor reaches less than 15 health.
EndEvent

 

 

The SetRestrained function on Actor should prevent them from moving, but I'm not sure if there's any easy way to make them move to a certain spot without overriding their AI package somehow.

 

All of the thank yous. That is very helpful!

 

There were a couple of things I encountered with NAF that I thought you might want to know about - is PM the preferred report way, or posting on discord?

 

(Love the exporter tool!! I think it will make creatures much easier)

Posted
2 hours ago, Gray User said:

 

All of the thank yous. That is very helpful!

 

There were a couple of things I encountered with NAF that I thought you might want to know about - is PM the preferred report way, or posting on discord?

 

(Love the exporter tool!! I think it will make creatures much easier)

 

No problem. PM & Discord both work for me. (Can also post an issue on GitHub if you have a GitHub account.)

  • 2 weeks later...
Posted
On 9/26/2024 at 12:35 AM, Snapdragon_ said:

The SetRestrained function on Actor should prevent them from moving

No, does not - if the actor collides he will move.

The only way to really fix an actor at his position is an invisible mount - but this seems to be ignored by NAF.

Posted
20 hours ago, zaira said:

No, does not - if the actor collides he will move.

The only way to really fix an actor at his position is an invisible mount - but this seems to be ignored by NAF.

 

Ah yeah, collision is a difficult problem to get around with Papyrus.

 

NAF gets around it by forcing the actor's position using a function that ignores collision checks. Only downside is that it then won't let *anything* move the actor from that position, even Papyrus scripts. I should probably add an API function that lets Papyrus scripts change the position NAF is forcing an actor to.

Posted

so we're just gonna pull from NAF directly? what about timers and stuff? I feel like someone should make a centralized system that comes with a default animation pack And can control the settings for all scenes Also some non-con would be nice

Posted
13 hours ago, NotDiscoDragonInAWig said:

so we're just gonna pull from NAF directly? what about timers and stuff? I feel like someone should make a centralized system that comes with a default animation pack And can control the settings for all scenes Also some non-con would be nice

 

Plan is to have a mod to start sex from NAF using dialogue (con) or losing combat (noncon). If I can make timers show on a menu, I will. If I cannot make timers show on a menu, user will have to set durations in the script. 

 

Major thing I cannot do is make mod that registers new animations like Sexlab or AAF, so I will make some empty spots for adds but after that users or other modders will have to make new dialogues on their own. 

Posted (edited)

Update:

 

Close to done enough to release alpha version to see if core function works for users. Right now, stuck on I cannot make papyrus call a sound. Way of doing this in old BGS games is totally gone (cannot define a Sound property). 

 

Would very much like any help, or example of script from user made mod that triggers custom sound. 

 

This is detail: (sorry for language, long day and cannot understand and angry at compiler)

 

Spoiler

New way in Starfield scripts has: (this one example from BE_KT02_GravitySwitchScript to make sound originate at player)

 

Quote

(property part)

WwiseEvent Property PowerON Auto Const Mandatory

 

(script part)

 

ObjectReference PlayerRef = Game.GetPlayer()

PowerON.Play(PlayerRef)

 

Fine. Papyrus bitches when I adapt this and put in main script (which is Quest type), so I think maybe it has to be ObjectReference type script, make new script like:

 

Quote
Scriptname _SeductionLibs extends ObjectReference

 

WwiseEvent Property Moan Auto Const Mandatory

 

Function MoanEffectBottom()

 

ObjectReference PlayerRef = Game.GetPlayer()

 

Moan.Play(PlayerRef)

 

EndFunction

 

 

This compiles, but when I call it in main script using 

 

Quote

_SeductionLibs.MoanEffectBottom()

 

 
Main script compile error says 'cannot call the member function MoanEffectBottom alone or on a type, must call it on a variable'
 
Fine. I make MoanEffectBottom a global function so compiler stops bitching about missing variable. Game script do not do this and call without variable, so I do not understand problem. Fine. 
 
New version with global function
 
Quote
Scriptname _SeductionLibs extends ObjectReference
 
WwiseEvent Property Moan Auto Const Mandatory
 
Function MoanEffectBottom() Global
 
ObjectReference PlayerRef = Game.GetPlayer()
 
Moan.Play(PlayerRef)
 
EndFunction

 

 Compiler says 'variable Moan is undefined', but function body is same as what compiled before. But if I remove 'Moan.Play(PlayerRef)' it compiles and I can call it in main script using '_SeductionLibs.MoanEffectBottom()'. 
 
So I do not understand. Fuck Compiler. 
 
There are things I would add if it worked (make sound originate at bottom actor, not just player), but right now just want to understand what I am doing wrong and make Compiler to stop being asshole. 
 
Many thanks if anyone can help. 
 


 

 

 

 

Edited by Gray User
Posted
On 10/17/2024 at 9:21 AM, Gray User said:

Update:

 

Close to done enough to release alpha version to see if core function works for users. Right now, stuck on I cannot make papyrus call a sound. Way of doing this in old BGS games is totally gone (cannot define a Sound property). 

 

Would very much like any help, or example of script from user made mod that triggers custom sound. 

 

This is detail: (sorry for language, long day and cannot understand and angry at compiler)

 

  Reveal hidden contents

New way in Starfield scripts has: (this one example from BE_KT02_GravitySwitchScript to make sound originate at player)

 

 

Fine. Papyrus bitches when I adapt this and put in main script (which is Quest type), so I think maybe it has to be ObjectReference type script, make new script like:

 

 

 

This compiles, but when I call it in main script using 

 

 

 
Main script compile error says 'cannot call the member function MoanEffectBottom alone or on a type, must call it on a variable'
 
Fine. I make MoanEffectBottom a global function so compiler stops bitching about missing variable. Game script do not do this and call without variable, so I do not understand problem. Fine. 
 
New version with global function
 

 

 Compiler says 'variable Moan is undefined', but function body is same as what compiled before. But if I remove 'Moan.Play(PlayerRef)' it compiles and I can call it in main script using '_SeductionLibs.MoanEffectBottom()'. 
 
So I do not understand. Fuck Compiler. 
 
There are things I would add if it worked (make sound originate at bottom actor, not just player), but right now just want to understand what I am doing wrong and make Compiler to stop being asshole. 
 
Many thanks if anyone can help. 
 


 

 

 

 

 

Think this is the problem. 

 

Cannot call a local function inside a global function. Play() is a local function. So to use it, cannot use global function for anything because all functions called from start function then have to be global, and then cannot call Play(). 

 

Rewriting mod from scratch. Again. 

 

  • 2 weeks later...
Posted

I can't help much with coding - sorry.

But I can playtest and can make Blender animations.

I see potential - I see hope.

Let me know if I can assist. (I'm CET timezone)

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...