Jump to content

Modder's Resources - SexLab Seduction&Rape


Recommended Posts

View File

Modder's Resources - SexLab Seduction&Rape

 

 

 

Description:

Contains the function "RemoveAggressiveTag(sslBaseAnimation[] anims, string hook)". It removes the tag "Aggressive" from all passed animations and then adds it when the animation ends.

This enables SexLab Consequences and possibly other mods to dynamically differ between consensual sex and seduction.

 

 

Do to:

Write a similar function for rape so it's possible to dynamically differ between consensual sex, seduction and rape.

 

 

Credits:

Ashal - For making SexLab and answering my questions.

 

 

 

Permission:

If anything from my mod would help you with your own mod by all means use it.

It would be nice if you credit me, tough.


 

Link to comment

The animation and player stats do absolutely nothing with the Aggressive tag. I still fail to see how this helps distinguish anything that couldn't be distinguished easier in less round about ways 

Link to comment

Another mod has started a SexLab animation, so all you can find out about this animation are the functions SexLab has.

event OnInit() 
	RegisterForModEvent("AnimationStart", "SexLabAnimStart")
endEvent

Event SexLabAnimStart(string eventName, string argString, float argNum, form sender)

	actor[] actorList = SexLab.HookActors(argString)
	actor victim = SexLab.HookVictim(argString)
	
	if actorList.Length == 1
		if victim == None
			_Masturbate(actorList)
		else
			_ForcedMasturbate(actorList, victim)
		endIf
	else 
		if victim == None
			_Consensual(actorList)
		elseIf SexLab.HookAnimation(string argString).HasTag("Aggressive")
			_Rape(actorList, victim)
		else 
			_Seduce(actorList, victim)
		endIf 
	endIf 

endEvent

If you can think of a better solution I'm all ears.

Link to comment

The main problem is that relying on the Aggressive tag at all in unreliable as a means to identify something in that manner. If people disable the "Restrict Aggressive" option in MCM, or if they toggled off aggressive for all animations in the MCM, then they could very well be playing an rape animation that doesn't have the tag and would get seen as seduce instead. And other mods that are going the seduction route, aren't very likely defining a victim.

 

Within the confines of SexLab as it is now, if you wanted to differentiate between rape and seduction like that for all mods, then the only 100% reliable way would be to code cases for each sexlab mod by checking what hook was used on the sex. For example if you get back SexLab Defeats hook with GetHook(), you know it was rape. Obviously however that would mean having to make use case scenarios for other mods. But as it is now your making other mods need to make themselves compatible. One you have control over, the other you don't.

 

Within your own mod the solution would be to just use different hooks in the StartSex() call for if it was a seduction or if it was rape.

 

Link to comment

I'm assuming .GetHook() would return the hook you've defined during .StartSex?!

 

Thinking about it a little I found a much more secure way.
 

Event SexLabAnimStart(string eventName, string argString, float argNum, form sender)

	actor[] actorList = SexLab.HookActors(argString)
	actor victim = SexLab.HookVictim(argString)
	
	if actorList.Length == 1
		if victim == None
			_Masturbate(actorList)
		else
			_ForcedMasturbate(actorList, victim)
		endIf
	else 
		if victim == None
			_Consensual(actorList)
		elseIf StringUtil.Find(SexLab.GetHook(), "Rape", startIndex = 1)
			_Rape(actorList, victim)
		elseIf StringUtil.Find(SexLab.GetHook(), "Seduce", startIndex = 1) 
			_Seduce(actorList, victim)
		endIf 
	endIf 

endEvent

The only problem is that StringUtil.Find might return a 0 which could break if. Still, a much more secure and for other modders easier way to implement this feature than my first attempt.

Link to comment

As a downloader rather than a content creator I'm wondering if these are really 'releases' as such? I mean, I get all excited every time I see a new mod in this forum but today you've added this one function, and an animation player (SexLab Z) that inexplicably requires this function, and they're in two separate threads...

 

Since you're developing this for Consequences, and the Z player for this, couldn't it all just be contained within the Consequences thread? Or are we going to get a new thread for each new function you start working on?

 

I'd like to think the Downloads forum would remain a place I can look through for working content (in full or WIP), not an archive of code snippits and passive resources.  :(

Link to comment

Those 2 mods are actually (meant to be) two different mods.
As far as i understood, this mod will become some sort of framework, while the other page hosts a mod, that uses it.
Like SexLab and it's mods.

 

You're not completly wrong, but let some time pass before you complain about things like this.

Link to comment

The main problem is that relying on the Aggressive tag at all in unreliable as a means to identify something in that manner. If people disable the "Restrict Aggressive" option in MCM, or if they toggled off aggressive for all animations in the MCM, then they could very well be playing an rape animation that doesn't have the tag and would get seen as seduce instead. And other mods that are going the seduction route, aren't very likely defining a victim.

 

Within the confines of SexLab as it is now, if you wanted to differentiate between rape and seduction like that for all mods, then the only 100% reliable way would be to code cases for each sexlab mod by checking what hook was used on the sex. For example if you get back SexLab Defeats hook with GetHook(), you know it was rape. Obviously however that would mean having to make use case scenarios for other mods. But as it is now your making other mods need to make themselves compatible. One you have control over, the other you don't.

 

Within your own mod the solution would be to just use different hooks in the StartSex() call for if it was a seduction or if it was rape.

 

Wouldn't the best solution for cross-mod data functionality be to add a function to SexLab itself? A simple function that allows mods to pass custom keywords which SexLab would just store for other mods to read and do their thing. The actual keywords and what they're used for would be completely in the modders hands, as they wouldn't have any influence on SexLab itself.

Link to comment

@TheCaptn: Putting SexLab ZZZ and SexLab in one thread/download would make as much sense as putting the SexLab Framework and SexLab Matchmaker in one.

This thread is clearly labeled "Modder's Resources", if you don't want to mod why did you even looked at it?

 

@Menesh: It exists since SexLab Framework version 1.14: .GetHook(). It's a function I orignially requested to be able to find out which mod started a sex animation. Only after the discussion with Ashal in this very thread I realised all the possibilities it had. You can simply add e.g. a "_Rape" or "_Seduce" to your animation's hook so other mods can easily distinguish between them; however it would require that there a convention between all modders.

 

On topic: Because of the .GetHook() that was added in 1.14 this mod is obsolent and should only be used for education purposes.

Link to comment

You can simply add e.g. a "_Rape" or "_Seduce" to your animation's hook so other mods can easily distinguish between them; however it would require that there a convention between all modders.

 

 

No mod should use the same hook, it runs the risk of triggering the other mods events if both were using the hook "seduce" for their own uses.

 

Wouldn't the best solution for cross-mod data functionality be to add a function to SexLab itself? A simple function that allows mods to pass custom keywords which SexLab would just store for other mods to read and do their thing. The actual keywords and what they're used for would be completely in the modders hands, as they wouldn't have any influence on SexLab itself.

 

That sounds like a decent, easy solution to me. Let sex scenes be tagged the same way animations and voices are tagged. It does however still have the problem that it relies on other mods using it, best I'd be able to do alleviate that is make it always pass at least 1 keyword, the name of the script that started the sex.

Link to comment

 

You can simply add e.g. a "_Rape" or "_Seduce" to your animation's hook so other mods can easily distinguish between them; however it would require that there a convention between all modders.

 

 

No mod should use the same hook, it runs the risk of triggering the other mods events if both were using the hook "seduce" for their own uses.

 

Wouldn't the best solution for cross-mod data functionality be to add a function to SexLab itself? A simple function that allows mods to pass custom keywords which SexLab would just store for other mods to read and do their thing. The actual keywords and what they're used for would be completely in the modders hands, as they wouldn't have any influence on SexLab itself.

 

That sounds like a decent, easy solution to me. Let sex scenes be tagged the same way animations and voices are tagged. It does however still have the problem that it relies on other mods using it, best I'd be able to do alleviate that is make it always pass at least 1 keyword, the name of the script that started the sex.

 

 

I don't think that's a problem that you should have to concern yourself with. If mod authors decide not to use a provided tool, then it's their decision. Besides, the community here isn't that big, so getting people to work out a set of shared keywords shouldn't be a problem. Even though, you could add a list of keyword proposals to your Modders Guide. I'm pretty sure most people would automatically use those instead of thinking up their own if they don't have to. ;)

Link to comment

No mod should use the same hook, it runs the risk of triggering the other mods events if both were using the hook "seduce" for their own uses.

I said add, not replace.

E.g. "_SexLabDefeat_Rape". With "if StringUtil.Find(SexLab.GetHook(), "Rape", startIndex = 1)" you would then be able to find out if it was intended to be a rape, while the Defeat mod could check with "if StringUtil.Find(SexLab.GetHook(), "SexLabDefeat_Rape", startIndex = 1)" if the anim was started by it.

Link to comment

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

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