Jump to content

How can I permanently forbid a race I created-


Some_Maj

Recommended Posts

From being allowed to do the SexLab animations and what's the best way to do so?

 

I've done a little research but it seems it would require the main developers flagging said race's in one of the compiled script files, correct?

Or perhaps I could recompile said file with its ID?

 

I'm having a couple issues with this placeholder race for a little story which shouldn't be getting callout hits from the framework.

Link to comment

Out of curiosity, why do you want to restrict your race? As it'll put people off using it.

 

For a number of reasons a mod author might do this.

 

- Race uses scripts which can break if used by SL.

- Looks child like even though it is a adult race.

- Testing Purposes

Link to comment

this is kinda deep

hes trying to destroy his own creation

 

Wanting to create a non adult mod is hardly "destroying" it, child replacer mods would be classed as  "destroyed" by your definition of a successful mod, we do have a Non Adult forum on the site in case you hadn't noticed. :P

 

Link to comment

Actually, it's a little test on how far can I go with a little custom story I've been writing about a Dwemer bastion. The 'Race' in question would be a construct inspired in dwemer creations which is asexual.

 

 

The fact is I have no idea how this 'permissions' systems works aside from that child flag thing I've seen people mentioning about, which will be probably the flag I'll use. For an example, about a year ago I had Skyrim with dozens of witcher 3 inspired mods and there was this dwarf race which just wouldn't work at all with the animations system, lol.

Link to comment

Oook, you win a better explanation:

 

SexLab will do a series of check to validate an actore BEFORE starting the animation.

That procedure is managed by the function Valdate Actor in the sslActorLibrary.psc

 

 

 

Line 362

int function ValidateActor(Actor ActorRef)
	if !ActorRef
		Log("ValidateActor(NONE) -- FALSE -- Because they don't exist.")
		return -1
	; Remove actors stuck in animating faction
	elseIf ActorRef.IsInFaction(AnimatingFaction) && Config.ThreadSlots.FindActorController(ActorRef) == -1
		ActorRef.RemoveFromFaction(AnimatingFaction)
		Log("ValidateActor("+ActorRef.GetLeveledActorBase().GetName()+") -- WARN -- Was in AnimatingFaction but not in a thread")
	endIf	
	ActorBase BaseRef = ActorRef.GetLeveledActorBase()
	; Primary checks
	if ActorRef.IsInFaction(AnimatingFaction)
		Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- They appear to already be animating")
		return -10
	elseIf !ActorRef.Is3DLoaded()
		Utility.WaitMenuMode(2.0)
		if ActorRef.Is3DLoaded()
			Log("ValidateActor("+BaseRef.GetName()+") -- RECHECK -- The actor wasn't loadded but was after a short wait...")
			return ValidateActor(ActorRef)
		endIf
		Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- They are not loaded")
		return -12
	elseIf ActorRef.IsDead() && ActorRef.GetActorValue("Health") < 1.0
		Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- He's dead Jim.")
		return -13
	elseIf ActorRef.IsDisabled()
		Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- They are disabled")
		return -14
	elseIf ActorRef.IsFlying()
		Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- They are flying.")
		return -15
	elseIf ActorRef.IsOnMount()
		Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- They are currently mounted.")
		return -16
	elseIf ActorRef.IsInFaction(ForbiddenFaction)
		Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- They are flagged as forbidden from animating.")
		return -11
	elseIf FormListFind(Config, "ValidActors", ActorRef) != -1
		Log("ValidateActor("+BaseRef.GetName()+") -- TRUE -- HIT")
		return 1
	elseIf !CanAnimate(ActorRef)
		ActorRef.AddToFaction(ForbiddenFaction)
		Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- They are not supported for animation.")
		return -11
	elseIf ActorRef != PlayerRef && !ActorRef.HasKeyword(ActorTypeNPC)
		if !Config.AllowCreatures
			Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- They are possibly a creature but creature animations are currently disabled")
			return -17
		elseIf !sslCreatureAnimationSlots.HasCreatureType(ActorRef)
			Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- They are a creature type that is currently not supported ("+MiscUtil.GetRaceEditorID(BaseRef.GetRace())+")")
			return -18
		elseIf !CreatureSlots.HasAnimation(BaseRef.GetRace(), GetGender(ActorRef))
			Log("ValidateActor("+BaseRef.GetName()+") -- FALSE -- They are valid creature type, but have no valid animations currently enabled or installed.")
			return -19
		endIf
	endIf
	Log("ValidateActor("+BaseRef.GetName()+") -- TRUE -- MISS")
	FormListAdd(Config, "ValidActors", ActorRef, false)
	return 1
endFunction

 

 

 

You could easily find various things that suits your need. The better should simply be adding the forbidden faction (soft/hard dependancy) to yours construct or be a creature not supported (0-dependancy).

 

Bye

Link to comment

Right, thanks for the help! I also found the variables in that file which specify which race tags and sizes make it an unsupported race for animations, that should be a good failsafe too. I need to start playing around with extension scripts. I'm really new to this so... Yeah. But everything looks pretty well coded for adding/modifying functions.

Link to comment

Right, thanks for the help! I also found the variables in that file which specify which race tags and sizes make it an unsupported race for animations, that should be a good failsafe too. I need to start playing around with extension scripts. I'm really new to this so... Yeah. But everything looks pretty well coded for adding/modifying functions.

Just DO NOT change any functions in the Sexlab Framework. You don't want your mod to be Sexlab Version dependent. Always best to use the existing API and functionality.

 

Note though, the "child" flag has additional functionality built into the Skyrim game engine. NPCs marked with the flag will be unkillable and always flee from combat so if your mod expects this custom race to be killable or to be combative the "child" flag will be a problem.

 

There is a better way to do this anyhow. In your mod add a Keyword with the text "SexlabForbid", add that keyword to any NPC you don't want to have sex and that is ALL you need to do.

 

You COULD make the Sexlab Framework a dependency and use it's SexlabForbid keyword but that would be ridiculous, just creating your own keyword with the right text will be honored by Sexlab and that way you avoid an unnecessary dependency.

Link to comment

 

Right, thanks for the help! I also found the variables in that file which specify which race tags and sizes make it an unsupported race for animations, that should be a good failsafe too. I need to start playing around with extension scripts. I'm really new to this so... Yeah. But everything looks pretty well coded for adding/modifying functions.

Just DO NOT change any functions in the Sexlab Framework. You don't want your mod to be Sexlab Version dependent. Always best to use the existing API and functionality.

 

Note though, the "child" flag has additional functionality built into the Skyrim game engine. NPCs marked with the flag will be unkillable and always flee from combat so if your mod expects this custom race to be killable or to be combative the "child" flag will be a problem.

 

There is a better way to do this anyhow. In your mod add a Keyword with the text "SexlabForbid", add that keyword to any NPC you don't want to have sex and that is ALL you need to do.

 

You COULD make the Sexlab Framework a dependency and use it's SexlabForbid keyword but that would be ridiculous, just creating your own keyword with the right text will be honored by Sexlab and that way you avoid an unnecessary dependency.

 

Well, that solves the unkillable problem I would probably have. Thanks! 

Link to comment

General tips:

Don't access/modify directly script from other mods, as said you'll make a mess :P

 

Most of mods have specific scripts that are used for compatibility purposes and external access.

For example in sexlab should be SexlabFrameworks

Link to comment

Archived

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

  • 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