Jump to content

Modding help


Recommended Posts

Hello. I am trying to add more animations to the mod "a Sex Mod" https://www.nexusmods.com/fallout4/mods/29674, but I can't seem to get it to work. The mod uses Leito's legacy animations, I think, and I'm trying to add more animations from Leito's Animations 1.4c.

 

I've added in the animations in questions in the relevant area in the script, idle properties, and I made sure the ID matches the ones I used in the creation kit. I will post the main script below.

 

Do any of you know what I'm missing? I would really appreciate if someone could help. And it might be worth to note that you can't get the source scripts from the mod itself. I had to decompile it with Champollion, as you can see. Oh, and I really have very little knowledge when it comes to scripting. I'm probably way out of my league here. And my computer refuses to run F4SE for some reason, so AAF isn't an option for me.

The animations that came with the mod work fine though, by the way.

 

;/ Decompiled by Champollion V1.0.6
PEX format v3.9 GameID: 2
Source   : E:\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User\_FemaleDialogMain.psc
Modified : 2018-03-02 20:08:09
Compiled : 2018-03-02 20:30:04
User     : Andreas
Computer : ANNY-ACER
/;
ScriptName _FemaleDialogMain extends Quest

;-- Properties --------------------------------------
ReferenceAlias Property aSexyFollower1 Auto
ReferenceAlias Property RaiderDialog Auto
ReferenceAlias Property RaiderDialog1 Auto
ReferenceAlias Property Follower1 Auto
ReferenceAlias Property FemaleAlias Auto
ReferenceAlias Property SexAlias01 Auto
ReferenceAlias Property SexAlias02 Auto
ReferenceAlias Property FollowToAlias02 Auto
ReferenceAlias Property FollowToAlias01 Auto
Form Property aMainNodes Auto Const
Form Property aDummyNode Auto Const
Idle Property LeitoDoggyF Auto Const
Idle Property LeitoDoggyM Auto Const
Idle Property Leito_BJ_F Auto Const
Idle Property Leito_BJ_M Auto Const
Idle Property LeitoCarryF Auto Const
Idle Property LeitoCarryM Auto Const
Idle Property LeitoMissionaryF Auto Const
Idle Property LeitoMissionaryM Auto Const
Idle Property LeitoCarryA2S1 Auto Const
Idle Property LeitoCarryA1S1 Auto Const
Idle Property LeitoCarryA2S2 Auto Const
Idle Property LeitoCarryA1S2 Auto Const
Idle Property LeitoCarryA2S3 Auto Const
Idle Property LeitoCarryA1S3 Auto Const
Idle Property LeitoCarryA2S4 Auto Const
Idle Property LeitoCarryA1S4 Auto Const
Idle Property IdleStop_Loose Auto Const
Armor Property NudeArmorMale Auto Const
Armor Property NudeArmorFemaleClean Auto Const
Armor Property NudeArmorFemaleDirt Auto Const
Keyword Property AO_Type_WorkshopAlarm Auto Const
Faction Property WorkshopNPCFaction Auto Const
Faction Property Voices_CompanionsFaction Auto Const
Race Property HumanRace Auto Const
Quest Property aSexyRaiderControlQuest Auto Const
Race Property HumanRaceChild Auto Const
Scene Property aSexyFemaleDialogsex1 Auto Const
GlobalVariable Property aSexyDauer Auto
GlobalVariable Property NacktOption Auto
Scene Property aSexyFemaleDialogKommHerScene Auto Const

;-- Variables ---------------------------------------
Actor SexActor2
Weapon SA2Waffe
Armor Nackt2
Form[] SexActor2EquippedArmor
Actor SA1
Armor Nackt1
Form[] SexActor1EquippedArmor
Actor SA2
Actor SexActor1
Weapon SA1Waffe

;-- Functions ---------------------------------------

Function EquipNackt1()
	float aNacktOption = NacktOption.GetValue()
	If (SexActor1.GetLeveledActorBase().GetSex() == 0)
		Nackt1 = NudeArmorMale
	Else
		If (SexActor1.HasKeyword(AO_Type_WorkshopAlarm) || SexActor1.IsInFaction(WorkshopNPCFaction) || aNacktOption == 3 as float)
			Nackt1 = NudeArmorFemaleDirt
		EndIf
		If (SexActor1.IsInFaction(Voices_CompanionsFaction) || aNacktOption == 2 as float)
			Nackt1 = NudeArmorFemaleClean
		EndIf
	EndIf
	If (SexActor1.GetLeveledActorBase().GetRace() == HumanRace)
		SexActor1.EquipItem(Nackt1 as Form, True, True)
	EndIf
EndFunction

Event ObjectReference.OnUnload(ObjectReference akSender)
	If (akSender)
		FollowToAlias01.Clear()
		FollowToAlias02.Clear()
		Debug.EnableCollisions(True)
	EndIf
EndEvent

Function Anziehen()
	SexActor1.UnEquipItem(Nackt1 as Form, False, True)
	SexActor1.RemoveItem(Nackt1 as Form, 1, True, None)
	SexActor2.UnEquipItem(Nackt2 as Form, False, True)
	SexActor2.RemoveItem(Nackt2 as Form, 1, True, None)
	Utility.wait(0.8)
	int I = 0
	While (I < SexActor1EquippedArmor.length)
		SexActor1.EquipItem(SexActor1EquippedArmor[I], False, True)
		I += 1
	EndWhile
	I = 0
	While (I < SexActor2EquippedArmor.length)
		SexActor2.EquipItem(SexActor2EquippedArmor[I], False, True)
		I += 1
	EndWhile
	I = 0
	SexActor1.EquipItem(SA1Waffe as Form, False, True)
	SexActor2.EquipItem(SA2Waffe as Form, False, True)
	SexActor1.SetRestrained(False)
	SexActor2.SetRestrained(False)
	Utility.wait(0.2)
	SexActor1EquippedArmor = None
	SexActor2EquippedArmor = None
	Nackt1 = None
	Nackt2 = None
	SA1 = None
	SA2 = None
	SexActor1 = None
	SexActor2 = None
	SexAlias01.Clear()
	SexAlias02.Clear()
	FollowToAlias01.Clear()
	FollowToAlias02.Clear()
	Actor RaiDia = RaiderDialog.GetActorRef()
	Actor RaiDia1 = RaiderDialog1.GetActorRef()
	RaiDia.SetEssential(False)
	RaiDia1.SetEssential(False)
	aSexyRaiderControlQuest.Stop()
	aSexyRaiderControlQuest.Reset()
	aSexyRaiderControlQuest.Start()
	aSexyRaiderControlQuest.SetStage(0)
	RaiDia.SetEssential(False)
	RaiDia1.SetEssential(False)
	Utility.wait(0.2)
	Self.SetStage(10)
EndFunction

Event OnDistanceLessThan(ObjectReference akObj1, ObjectReference akObj2, float afDistance)
	SexActor1.SetRestrained(True)
	SexActor2.SetRestrained(True)
	Self.SetStage(77)
	SexActor1.EvaluatePackage(False)
	SexActor2.EvaluatePackage(False)
	Self.StartSex2()
	aSexyFemaleDialogKommHerScene.Stop()
EndEvent

Function StartSex()
	Actor Follower = Follower1.GetActorRef()
	Actor Spoken = SexAlias02.GetActorRef()
	Actor NonSpoken = SexAlias01.GetActorRef()
	If (Follower == None && Spoken != None)
		SA1 = Game.Getplayer()
		SA2 = SexAlias02.GetActorRef()
	ElseIf (Follower == Spoken)
		SA1 = Game.Getplayer()
		SA2 = Follower
	ElseIf (Follower != None && Spoken != None && Follower != Spoken)
		SA1 = Spoken
		SA2 = Follower
	EndIf
	Spoken = None
	NonSpoken = None
	int SA1Sex = SA1.GetLeveledActorBase().GetSex()
	int SA2Sex = SA2.GetLeveledActorBase().GetSex()
	If (SA1Sex == 1)
		SexActor1 = SA2
		SexActor2 = SA1
	Else
		SexActor1 = SA1
		SexActor2 = SA2
	EndIf
	If (SA1Sex == 1 && SexActor1 == Game.Getplayer() && SA2Sex == 1)
		SexActor1 = SA1
		SexActor2 = SA2
		Debug.MessageBox("P1W+W")
	ElseIf (SA1Sex == 1 && SexActor1 == Game.Getplayer() && SA2Sex == 0)
		Debug.MessageBox("P1W+M")
		SexActor1 = SA2
		SexActor2 = SA1
	EndIf
	Self.RegisterForDistanceLessThanEvent(SexActor1 as ScriptObject, SexActor2 as ScriptObject, 100 as float)
	FollowToAlias01.ForceRefTo(SexActor1 as ObjectReference)
	FollowToAlias02.ForceRefTo(SexActor2 as ObjectReference)
	SexActor1.EvaluatePackage(False)
	SexActor2.EvaluatePackage(False)
	aSexyFemaleDialogKommHerScene.Start()
EndFunction

Function Ausziehen()
	Self.RegisterForRemoteEvent(SexActor2 as ScriptObject, "OnItemUnequipped")
	Utility.wait(0.1)
	SexActor2EquippedArmor = new Form[0]
	SexActor2.UnequipItemSlot(0)
	SexActor2.UnequipItemSlot(3)
	SexActor2.UnequipItemSlot(4)
	SexActor2.UnequipItemSlot(5)
	SexActor2.UnequipItemSlot(6)
	SexActor2.UnequipItemSlot(7)
	SexActor2.UnequipItemSlot(8)
	SexActor2.UnequipItemSlot(9)
	SexActor2.UnequipItemSlot(10)
	SexActor2.UnequipItemSlot(11)
	SexActor2.UnequipItemSlot(12)
	SexActor2.UnequipItemSlot(13)
	SexActor2.UnequipItemSlot(14)
	SexActor2.UnequipItemSlot(15)
	SexActor2.UnequipItemSlot(16)
	Self.EquipNackt2()
	Utility.wait(0.5)
	Self.UnregisterForRemoteEvent(SexActor2 as ScriptObject, "OnItemUnequipped")
	Self.RegisterForRemoteEvent(SexActor1 as ScriptObject, "OnItemUnequipped")
	SexActor1EquippedArmor = new Form[0]
	SexActor1.UnequipItemSlot(0)
	SexActor1.UnequipItemSlot(3)
	SexActor1.UnequipItemSlot(4)
	SexActor1.UnequipItemSlot(5)
	SexActor1.UnequipItemSlot(6)
	SexActor1.UnequipItemSlot(7)
	SexActor1.UnequipItemSlot(8)
	SexActor1.UnequipItemSlot(9)
	SexActor1.UnequipItemSlot(10)
	SexActor1.UnequipItemSlot(11)
	SexActor1.UnequipItemSlot(12)
	SexActor1.UnequipItemSlot(13)
	SexActor1.UnequipItemSlot(14)
	SexActor1.UnequipItemSlot(15)
	SexActor1.UnequipItemSlot(16)
	Self.EquipNackt1()
	Utility.wait(0.5)
	Self.UnregisterForRemoteEvent(SexActor1 as ScriptObject, "OnItemUnequipped")
EndFunction

Function EquipNackt2()
	float aNacktOption = NacktOption.GetValue()
	If (SexActor2.GetLeveledActorBase().GetSex() == 0)
		Nackt2 = NudeArmorMale
	Else
		If (SexActor2.HasKeyword(AO_Type_WorkshopAlarm) || SexActor2.IsInFaction(WorkshopNPCFaction) || aNacktOption == 3 as float)
			Nackt2 = NudeArmorFemaleDirt
		EndIf
		If (SexActor2.IsInFaction(Voices_CompanionsFaction) || aNacktOption == 2 as float)
			Nackt2 = NudeArmorFemaleClean
		EndIf
	EndIf
	If (SexActor2.GetLeveledActorBase().GetRace() == HumanRace)
		SexActor2.EquipItem(Nackt2 as Form, True, True)
	EndIf
EndFunction

Event Actor.OnItemUnequipped(Actor akSender, Form akBaseObject, ObjectReference akReference)
	If (akSender == SexActor1)
		If (akBaseObject != Nackt1 as Form)
			If (akReference)
				SexActor1EquippedArmor.add(akReference as Form, 1)
			Else
				SexActor1EquippedArmor.add(akBaseObject, 1)
			EndIf
		EndIf
	ElseIf (akBaseObject != Nackt2 as Form)
		If (akReference)
			SexActor2EquippedArmor.add(akReference as Form, 1)
		Else
			SexActor2EquippedArmor.add(akBaseObject, 1)
		EndIf
	EndIf
EndEvent

Function StartSex2()
	Self.UnregisterForDistanceEvents(SexActor1 as ScriptObject, SexActor2 as ScriptObject)
	float SexDauer = aSexyDauer.GetValue()
	If (SexDauer < 10 as float)
		SexDauer = 10 as float
	EndIf
	SA1Waffe = SexActor1.GetEquippedWeapon(0)
	SA2Waffe = SexActor2.GetEquippedWeapon(0)
	SexActor1.UnEquipItem(SA1Waffe as Form, False, True)
	Utility.wait(0.2)
	SexActor2.UnEquipItem(SA2Waffe as Form, False, True)
	Utility.wait(0.2)
	inputenablelayer myLayer = inputenablelayer.Create()
	myLayer.DisablePlayerControls(True, True, True, False, True, False, True, False, True, True, True)
	If (SexActor1 != Game.Getplayer() && SexActor2 != Game.Getplayer())
		myLayer.EnablePlayerControls(True, True, True, True, True, True, True, True, True, True, True)
	ElseIf (SexActor1 == Game.Getplayer() || SexActor2 == Game.Getplayer())
		Game.ForceThirdPerson()
	EndIf
	Self.Ausziehen()
	SexActor2.SetAvoidPlayer(False)
	Utility.wait(0.2)
	SexActor1.SetAnimationVariableBool("bHumanoidFootIKDisable", True)
	SexActor2.SetAnimationVariableBool("bHumanoidFootIKDisable", True)
	ObjectReference MyMainNodes = SexActor1.PlaceAtMe(aMainNodes, 1, False, False, True)
	Utility.wait(0.7)
	ObjectReference MyDummyNode01 = MyMainNodes.PlaceAtNode("Front01", aDummyNode, 1, False, False, True, False)
	Utility.wait(0.7)
	SexActor2.MoveTo(MyDummyNode01, 0, 0, 0, True)
	MyMainNodes.Delete()
	MyDummyNode01.Delete()
	SexActor2.SetAvoidPlayer(True)
	Self.RegisterForRemoteEvent((Game.Getplayer() as ObjectReference) as ScriptObject, "OnUnload")
	Idle f0 = Leito_BJ_F
	Idle m0 = Leito_BJ_M
	Idle f1 = None
	Idle m1 = None
	Idle f2 = None
	Idle m2 = None
	Idle f3 = None
	Idle m3 = None
	int randomSex = Utility.RandomInt(0, 100)
	If (randomSex <= 1)
		f1 = LeitoMissionaryF
		m1 = LeitoMissionaryM
		f2 = LeitoDoggyF
		m2 = LeitoDoggyM
		f3 = LeitoCarryF
		m3 = LeitoCarryM
	ElseIf (randomSex > 1 && randomSex <= 2)
		f3 = LeitoMissionaryF
		m3 = LeitoMissionaryM
		f2 = LeitoDoggyF
		m2 = LeitoDoggyM
		f1 = LeitoCarryF
		m1 = LeitoCarryM
	ElseIf (randomSex > 2 && randomSex <= 4)
		f2 = LeitoMissionaryF
		m2 = LeitoMissionaryM
		f1 = LeitoDoggyF
		m1 = LeitoDoggyM
		f3 = LeitoCarryF
		m3 = LeitoCarryM
	ElseIf (randomSex > 4)
		f2 = LeitoCarryA2S1
		m2 = LeitoCarryA1S1
		f1 = LeitoCarryA2S2
		m1 = LeitoCarryA1S2
		f3 = LeitoCarryA2S3
		m3 = LeitoCarryA1S3
	EndIf
	If (SexActor1 != Game.Getplayer() && SexActor2 != Game.Getplayer())
		myLayer.EnablePlayerControls(True, True, True, True, True, True, True, True, True, True, True)
	EndIf
	If (SexActor1 == Game.Getplayer() || SexActor2 == Game.Getplayer())
		Game.Getplayer().SetRestrained(False)
	EndIf
	If (SexActor1.GetLeveledActorBase().GetRace() == HumanRaceChild || SexActor2.GetLeveledActorBase().GetRace() == HumanRaceChild)
		Debug.MessageBox(" Idiot ! a child ? Your Char was killed now !")
		Game.Getplayer().KillEssential(None)
		Utility.wait(3)
	Else
		If (SexActor1.GetLeveledActorBase().GetSex() == 0 || SexActor2.GetLeveledActorBase().GetSex() == 0)
			SexActor2.PlayIdle(f0)
			SexActor1.PlayIdle(m0)
			Utility.wait(SexDauer)
		EndIf
		SexActor2.PlayIdle(f1)
		SexActor1.PlayIdle(m1)
		Utility.wait(SexDauer)
		SexActor2.PlayIdle(f2)
		SexActor1.PlayIdle(m2)
		Utility.wait(SexDauer)
		SexActor2.PlayIdle(f3)
		SexActor1.PlayIdle(m3)
		Utility.wait(SexDauer)
	EndIf
	Self.UnregisterForRemoteEvent(Game.Getplayer() as ScriptObject, "OnUnload")
	myLayer.EnablePlayerControls(True, True, True, True, True, True, True, True, True, True, True)
	Debug.EnableCollisions(True)
	SexActor2.SetRestrained(False)
	SexActor1.SetRestrained(False)
	SexActor1.SetAnimationVariableBool("bHumanoidFootIKDisable", False)
	SexActor2.SetAnimationVariableBool("bHumanoidFootIKDisable", False)
	SexActor1.PlayIdle(IdleStop_Loose)
	SexActor2.PlayIdle(IdleStop_Loose)
	Utility.wait(2)
	Self.Anziehen()
EndFunction

 

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