Jump to content

[WIP] SexLab Flirt - Pre-Alpha Dev work


Guest

Recommended Posts

Posted

MAJOR TOPIC EDIT:

 

Copied from later post:

 

 

The concept here is to allow an immersive way to directly affect NPC arousal, and "entice" characters. Ideally meant to be used alongside mods like Further Lover's Comfort and Reward Your Followers, it allows for a more varied experience than simply "undress and run around your follower until they pop a stiffie" or "use spells". I've added and tweaked a variety of mods to have immersive control over player arousal state. I've been looking at SLEN, to see if I can fine-tune it to my needs. But, ultimately, I wanted a solution that would allow the player to be flirtatious, without breaking immersion too terribly much.

 

I realize that opinions on what is "immersion-breaking" vary, so I won't really speak too much on the subject. But, here are the four options that I had in mind:

 

Joke - Tell your follower/friend a funny joke to show them your witty side. 1/20 chance (1/10 if speech is above 50) to increase NPC exposure by 20, decrease by 10 if failed.

 

Boast - Talk about your previous exploits. 1/30 chance (1/15 modified) to increase NPC exposure by 30, decrease by 15 if failed

 

Compliment - Who doesn't like to be told they're beautiful? 1/6 chance (1/3 modified) to increase NPC exposure by 40.

 

Allure - If you've got it, flaunt it. 50/50 chance to work, guaranteed to work with speech >50. Increase exposure by 70. Ideally, this would trigger a flirty animation on the player character, dependent on gender. ("Cheaty", perhaps, but this gives a solution to players who just want to get busy.)

 

Current Progress:

 

Generic Dialogue Trees - 90% complete

Scripting to Handle Exposure changes - 80% complete

Functioning Proof-of Concept - 86.666% complete

 

 

Old Original Post:

 

 

I'm working on a mod that adds a new mechanism for influencing NPC arousal through Sexlab Aroused Redux.  The idea hinges on a set of dialogue topics, partially-inspired by Oblivion's persuasion mini-game. There are four topics that can be selected from, and each one is suppose to run a Papyrus fragment to determine success or failure, and apply the correct adjustment to the NPC's exposure, accordingly.

 

However, I can't get the fragment to compile to save my life. I've paste-binned my code and compiler output here, if anyone wants to look at it.

 

 

Posted

In your code you cannot put a property directly inside the fragment section.

 

You may add it at the bottom of the whole fragment script.

 

So:

NOT IN the right or left cell of the topic fragment.

CORRECT: select the script in the rightmost frame, edit it, go to the bottom, add the property.

 

Posted

In your code you cannot put a property directly inside the fragment section.

 

You may add it at the bottom of the whole fragment script.

 

So:

NOT IN the right or left cell of the topic fragment.

CORRECT: select the script in the rightmost frame, edit it, go to the bottom, add the property.

 

Ah, okay. Well, let me mess with it. I might just implement the whole shebang as a full script, instead of a fragment, with properties defined for each flirt type. I'll update with results.

 

EDIT: Okay, I must be half brain-dead. Someone look at this and tell me what I did wrong.

ScriptName SLFFlirtChance extends TopicInfo

;Define property to be checked by topic conditionals

int property FlirtSuccess auto Conditional
    
;Generate random number to determine flirt success; chances improved with Speech skill above 50

int intRand
int intPlayerSpeech = Game.GetPlayer().GetActorValue("Speechcraft")
if intPlayerSpeech >= 50
    intRand = Utility.RandomInt(1,15)
else
    intRand = Utility.RandomInt(1,30)
endif

;If successful attempt, modify NPC exposure and set property accordingly
    
if intRand == 1
    float aExposure = 25
    slaFrameworkScr.UpdateActorExposure(akSpeaker, aExposure, "Sexlab Flirt Attempt Succeed")
    FlirtSuccess.Set(1)
else
    FlirtSuccess.Set(0)
endif
Posted

"TopicInfo" can accept only fragments. Not full scripts.

 

Remove completely your script. Delete it from the file system.

 

Then add just a semicolon in the "begin" or "end" frame of the topic info.

Close the topic info and re-open it.

 

You will see that a script has been generated.

 

Now edit the script, the full one, you will see that inside there are the "fragment" section.

Scroll to the bottom and add your property. But be aware that conditional properties are NOT supported by fragments.

 

I think you should put this inside a quest script, and then define a function to execute what you are doing, and call the function from inside the topic fragment.


Another error:

 

FlirstSuccess.Set(1)

 

For an Int property you should do this:

 

FirstSuccess = 1

 

 

Posted

"TopicInfo" can accept only fragments. Not full scripts.

 

Remove completely your script. Delete it from the file system.

 

Then add just a semicolon in the "begin" or "end" frame of the topic info.

Close the topic info and re-open it.

 

You will see that a script has been generated.

 

Now edit the script, the full one, you will see that inside there are the "fragment" section.

Scroll to the bottom and add your property. But be aware that conditional properties are NOT supported by fragments.

 

I think you should put this inside a quest script, and then define a function to execute what you are doing, and call the function from inside the topic fragment.

Another error:

 

FlirstSuccess.Set(1)

 

For an Int property you should do this:

 

FirstSuccess = 1

 

 

Okay, I think I get it. Here's the "main" script that contains the function that will be called by dialogue script fragments:

ScriptName SLFFlirtChance extends Quest

slaInternalScr property slaUtil auto
int property FlirtSuccess auto Conditional

;Generate random number to determine flirt success; chances improved with Speech skill above 50

int Function calculateChance(int baseChance, actor actNPC)
	int intRand
	float intPlayerSpeech = Game.GetPlayer().GetActorValue("Speechcraft")
	if intPlayerSpeech >= 50
		intRand = Utility.RandomInt(1,baseChance/2)
	else
		intRand = Utility.RandomInt(1,baseChance)
	endif

;If successful attempt, modify NPC exposure and set property accordingly
	
	if intRand == 1
		int aExposure = 25
		slaUtil.UpdateActorExposure(actNPC, aExposure, "Sexlab Flirt Attempt Succeed")
		FlirtSuccess = 1
	else
		FlirtSuccess = 0
	endif

return FlirtSuccess
endFunction

This script, miraculously, compiles, and I can set the property for slaUtil from the Quest Scripts menu.

 

Now, I go into one of the dialogue infos that i have, and attempt to add the fragment that calls the function I want:

SLFFlirtChance Flirt

Flirt.calculateChance(30, akSpeaker)

Now... how do I take the result of that function (the returned value) and apply it to my dialogue conditionals?

 

 

 

Posted

First to correctly attach a script to another script you need a property.

 

Something like:

 

SLFFlirtChance Property flirt auto

 

Then you can call the function as:

 

flirt.calculateChance(30, akSpeaker)

 

 

Now, your "conditional" property will not work because you have to define the whole script as conditional:

 

ScriptName SLFFlirtChance extends Quest Conditional

 

Then, as soon as you set your conditional variable with a value, then pretty much immediately this value is ready for the conditions.

 

Just one warning point: conditions of a Dialogue are evaluated BEFORE the fragments inside are run.

So don't think you can "calculate" on the fly if the dialogue will appear by using some code inside the dialogue itself.

The "set up of the conditional variable" has to be done before.

 

 

 

 

Posted

First to correctly attach a script to another script you need a property.

 

Something like:

 

SLFFlirtChance Property flirt auto

 

Then you can call the function as:

 

flirt.calculateChance(30, akSpeaker)

 

 

Now, your "conditional" property will not work because you have to define the whole script as conditional:

 

ScriptName SLFFlirtChance extends Quest Conditional

 

Then, as soon as you set your conditional variable with a value, then pretty much immediately this value is ready for the conditions.

 

Just one warning point: conditions of a Dialogue are evaluated BEFORE the fragments inside are run.

So don't think you can "calculate" on the fly if the dialogue will appear by using some code inside the dialogue itself.

The "set up of the conditional variable" has to be done before.

 

Ah... Okay. Well... That make this trickier than expected.

 

EDIT: So, I'm going to explain my rational, and what I was hoping to achieve. Clearly, my knowledge of the CK and Papyrus isn't sufficient to make this work the way I would like.

 

The concept here is to allow an immersive way to directly affect NPC arousal, and "entice" characters. Ideally meant to be used alongside mods like Further Lover's Comfort and Reward Your Followers, it allows for a more varied experience than simply "undress and run around your follower until they pop a stiffie" or "use spells". I've added and tweaked a variety of mods to have immersive control over player arousal state. I've been looking at SLEN, to see if I can fine-tune it to my needs. But, ultimately, I wanted a solution that would allow the player to be flirtatious, without breaking immersion too terribly much.

 

I realize that opinions on what is "immersion-breaking" vary, so I won't really speak too much on the subject. But, here are the four options that I had in mind:

 

Joke - Tell your follower/friend a funny joke to show them your witty side. 1/20 chance (1/10 if speech is above 50) to increase NPC exposure by 20, decrease by 10 if failed.

 

Boast - Talk about your previous exploits. 1/30 chance (1/15 modified) to increase NPC exposure by 30, decrease by 15 if failed

 

Compliment - Who doesn't like to be told they're beautiful? 1/6 chance (1/3 modified) to increase NPC exposure by 40.

 

Allure - If you've got it, flaunt it. 50/50 chance to work, guaranteed to work with speech >50. Increase exposure by 70. Ideally, this would trigger a flirty animation on the player character, dependent on gender. ("Cheaty", perhaps, but this gives a solution to players who just want to get busy.)

 

 

Posted

One trick I used a couple f times is to have the dialogue in two steps:

 

One branch, first topic with the Player question, and the first part of the answer. Generic.

In the first Topic Fragment you calculate your conditional variable.

Then a second Topic with an Invisible continue and conditioned with your conditional variable.

But be sure to add also a second Topic, still with invisible continue and the negated condition, to provide some sort of "finish dialogue".

Posted

One trick I used a couple f times is to have the dialogue in two steps:

 

One branch, first topic with the Player question, and the first part of the answer. Generic.

In the first Topic Fragment you calculate your conditional variable.

Then a second Topic with an Invisible continue and conditioned with your conditional variable.

But be sure to add also a second Topic, still with invisible continue and the negated condition, to provide some sort of "finish dialogue".

 

That is an option, I suppose. I'll mess with it, and see what I can work out.

 

EDIT: Actually, I need a roadmap on this one. Can you screenshot a sample Dialogue View that would show the flow of these topics? Here's the current Dialogue View flow that I currently have.

 

 

njJz511.jpg

 

 

 

 

EDIT 2: Scratch that. I think I might have an idea on how I want this to work. I'll mess with it, and see what happens.

Posted

I suppose are the second topics that should be conditioned.

In this case just call your calculation function on the fragment of the very first topic.

And then condition the others on your vmQuestVariable.

 

Posted

I suppose are the second topics that should be conditioned.

In this case just call your calculation function on the fragment of the very first topic.

And then condition the others on your vmQuestVariable.

 

Okay, I think I've got it implemented. Now, I just need to track down a follower to test it on. It doesn't seem to be working with mod followers, even though the only conditional on the top-level topic is to check that they are in CurrentFollowerFaction.

 

EDIT: Okay, I think I might have this, but I'm not sure... The dialogue topics for the second part (which reads the conditional) should they be split for success and failure? Or, two responses under the same topic?

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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