Jump to content

Script craziness somehow


Halstrom

Recommended Posts

I'm somehow getting something screwed up in this script the variable sModName seems to be inconsistent. There are other similar scripts running at the same time with the same issues.

 

[04/22/2018 - 12:48:59PM] CCL: tao_catsuit.esp: 1 Assets Added, Total Now: 1

Tells me the taocatsuits mod has loaded ok

 

But then the next mod tries to use its sModName

 

The line:

 If (Game.IsPluginInstalled(sModName))

Is reading the mod and activating the if bit but on the next mod it also activates but the reading part seems to think its still using the previous sModName even thoughit shouldn't activate its trying to read the forms from the previous mod.

 

I added waits to try give it time to update but its made no difference.

Those 4 armor error ArmorIDs are for the next Mods Lists and Assets, nothing to do with TaoCatsuit Mod


Error Log:

Quote

[04/22/2018 - 12:48:59PM] CCL: tao_catsuit.esp: 1 Assets Added, Total Now: 1
[04/22/2018 - 12:48:59PM] CCL: DavesMomJeans.esp: 1 Assets Added, Total Now: 2
[04/22/2018 - 12:48:59PM] CCL: rpampas.esp: 3 Assets Added, Total Now: 5
[04/22/2018 - 12:49:00PM] CCL: SuperGirl.esp: 3 Assets Added, Total Now: 8
[04/22/2018 - 12:49:01PM] Armor Error: Mod/Count/LList/Form/ArmorID/Armor: tao_catsuit.esp/1/[LeveledItem < (11000A55)>]/[FormList < (11000968)>]/2048/None
[04/22/2018 - 12:49:01PM] Armor Error: Mod/Count/LList/Form/ArmorID/Armor: tao_catsuit.esp/2/[LeveledItem < (11000A55)>]/[FormList < (11000968)>]/2062/None
[04/22/2018 - 12:49:01PM] Armor Error: Mod/Count/LList/Form/ArmorID/Armor: tao_catsuit.esp/3/[LeveledItem < (11000A55)>]/[FormList < (11000968)>]/2067/None
[04/22/2018 - 12:49:01PM] Armor Error: Mod/Count/LList/Form/ArmorID/Armor: tao_catsuit.esp/4/[LeveledItem < (11000A55)>]/[FormList < (11000968)>]/2071/None

 

Script:

 

Scriptname CCL:CCL_1Catsuits extends ReferenceAlias

Group Misc
	GlobalVariable Property gDebugSetting Auto
	GlobalVariable Property gCurrAssetTotal Auto
EndGroup

Group ModLists
	LeveledItem Property LL_TaoCatsuit1 Auto
	LeveledItem Property LL_LatexNurseSuit1 Auto
	LeveledItem Property LL_LatexNurseSuit2 Auto
	LeveledItem Property LL_LatexNurseSuit3 Auto
	LeveledItem Property LL_SuitDreams1 Auto
	LeveledItem Property LL_SuitDreams2 Auto
	LeveledItem Property LL_SuitDreams3 Auto
	LeveledItem Property LL_SuitDreams4 Auto
	LeveledItem Property LLI_TaoCatsuit1 Auto
	LeveledItem Property LLI_LatexNurseSuit1 Auto
	LeveledItem Property LLI_LatexNurseSuit2 Auto
	LeveledItem Property LLI_LatexNurseSuit3 Auto
	LeveledItem Property LLI_SuitDreams1  Auto
	LeveledItem Property LLI_SuitDreams2  Auto
	LeveledItem Property LLI_SuitDreams3  Auto
	LeveledItem Property LLI_SuitDreams4  Auto
EndGroup

Group FLTargets
	FormList Property FL_CatsuitsArmored Auto
	FormList Property FL_CatsuitsLatexPVC Auto
	FormList Property FL_VaultTech Auto
	FormList Property FL_Medical Auto
	FormList Property FL_PantsSexy Auto
	FormList Property FL_ShortsSexy Auto
	FormList Property FL_JumpsuitsNice Auto
	FormList Property FL_DressesLatexPVC Auto
	FormList Property FL_LeotardsThin Auto
	FormList Property FL_BodysuitsThin Auto
	FormList Property FL_BodysuitsLatexPVC Auto
	FormList Property FL_Underwear_Naked Auto
EndGroup

Group LLTargets
	LeveledItem Property LL_CatsuitsArmored Auto
	LeveledItem Property LL_CatsuitsLatexPVC Auto
	LeveledItem Property LL_VaultTech Auto
	LeveledItem Property LL_Medical Auto
	LeveledItem Property LL_PantsSexy Auto
	LeveledItem Property LL_ShortsSexy Auto
	LeveledItem Property LL_JumpsuitsNice Auto
	LeveledItem Property LL_DressesLatexPVC Auto
	LeveledItem Property LL_LeotardsThin Auto
	LeveledItem Property LL_BodysuitsThin Auto
	LeveledItem Property LL_BodysuitsLatexPVC Auto
	LeveledItem Property LL_Underwear_Naked Auto
EndGroup

;-----------------------------------------------------------------------------------------------------------------------------

Int iDebugSetting = 1
String sModName
Int iCount
Int iAddedModA
Int iAddedModB
Int iAddedModC
Int iAddedModD

;-----------------------------------------------------------------------------------------------------------------------------

Event OnInit()
	fnInit()
EndEvent

Event OnPlayerLoadGame()
	fnInit()
EndEvent

Function fnInit()
	Utility.Wait(3.0)
	iDebugSetting = (gDebugSetting.GetValue()) as Int

	sModName = "tao_catsuit.esp"
	Utility.Wait(1.0)
	If (Game.IsPluginInstalled(sModName))
		if (iAddedModA < 1)
			iCount = 0
			Int iLevel = 1
			iAddedModA += 1
			fnAddArmorToLists(sModName, 0x00000F9A, iLevel, 1, FL_CatsuitsLatexPVC, LL_TaoCatsuit1) ; Tao Catsuit
			fnAddModListToNextLists(SModName, iLevel, LLI_TaoCatsuit1, LL_TaoCatsuit1)
			fnAddModListToNextLists(SModName, iLevel, LL_CatsuitsLatexPVC, LLI_TaoCatsuit1)

			if (iCount > 0)
				Int iNewTotal = gCurrAssetTotal.GetValueInt() + iCount
				gCurrAssetTotal.SetValue(iNewTotal)
				fnMessage("CCL: " + sModName + ": " + iCount + " Assets Added, Total Now: " + iNewTotal)
			endif
		endif
	else
		iAddedModA = 0
	endif

	sModName = "LatexNurseSuit.esp"
	Utility.Wait(1.0)
	If (Game.IsPluginInstalled(sModName))
		if (iAddedModB < 1)
			iCount = 0
			Int iLevel = 1
			iAddedModB += 1

			fnAddArmorToLists(sModName, 0x00000800, iLevel, 1, FL_CatsuitsLatexPVC, LL_LatexNurseSuit1) ; Latex NurseSuit White
			fnAddArmorToLists(sModName, 0x0000080E, iLevel, 1, FL_CatsuitsLatexPVC, LL_LatexNurseSuit1) ; Latex NurseSuit Black
			fnAddArmorToLists(sModName, 0x00000813, iLevel, 1, FL_CatsuitsLatexPVC, LL_LatexNurseSuit1) ; Latex Suit Black
			fnAddArmorToLists(sModName, 0x00000817, iLevel, 1, FL_CatsuitsLatexPVC, LL_LatexNurseSuit1) ; Latex NurseSuit Red
			fnAddArmorToLists(sModName, 0x0000081C, iLevel, 1, FL_CatsuitsLatexPVC, LL_LatexNurseSuit1) ; Latex NurseSuit Light Blue
			fnAddArmorToLists(sModName, 0x00000800, iLevel, 1, FL_Medical, LL_LatexNurseSuit1) ; Latex NurseSuit White
			fnAddArmorToLists(sModName, 0x0000080E, iLevel, 1, FL_Medical, LL_LatexNurseSuit1) ; Latex NurseSuit Black
			fnAddArmorToLists(sModName, 0x00000813, iLevel, 1, FL_Medical, LL_LatexNurseSuit1) ; Latex Suit Black
			fnAddArmorToLists(sModName, 0x00000817, iLevel, 1, FL_Medical, LL_LatexNurseSuit1) ; Latex NurseSuit Red
			fnAddArmorToLists(sModName, 0x0000081C, iLevel, 1, FL_Medical, LL_LatexNurseSuit1) ; Latex NurseSuit Light Blue
			fnAddModListToNextLists(SModName, iLevel, LLI_LatexNurseSuit1, LL_LatexNurseSuit1)
			fnAddModListToNextLists(SModName, iLevel, LL_Medical, LLI_LatexNurseSuit1)

			fnAddArmorToLists(sModName, 0x00000832, iLevel, 1, FL_CatsuitsLatexPVC, LL_LatexNurseSuit2) ; Latex Suit Red
			fnAddArmorToLists(sModName, 0x00000836, iLevel, 1, FL_CatsuitsLatexPVC, LL_LatexNurseSuit2) ; Latex Suit White
			fnAddArmorToLists(sModName, 0x00000837, iLevel, 1, FL_CatsuitsLatexPVC, LL_LatexNurseSuit2) ; Latex Suit  Blue
			fnAddModListToNextLists(SModName, iLevel, LLI_LatexNurseSuit2, LL_LatexNurseSuit2)
			fnAddModListToNextLists(SModName, iLevel, LL_CatsuitsLatexPVC, LLI_LatexNurseSuit2)

			fnAddArmorToLists(sModName, 0x00000845, iLevel, 1, FL_DressesLatexPVC, LL_LatexNurseSuit3) ; Latex MiniDress Blue
			fnAddArmorToLists(sModName, 0x0000084A, iLevel, 1, FL_DressesLatexPVC, LL_LatexNurseSuit3) ; Latex MiniDress Black
			fnAddArmorToLists(sModName, 0x0000084B, iLevel, 1, FL_DressesLatexPVC, LL_LatexNurseSuit3) ; Latex MiniDress Purple
			fnAddArmorToLists(sModName, 0x0000084C, iLevel, 1, FL_DressesLatexPVC, LL_LatexNurseSuit3) ; Latex MiniDress Red
			fnAddModListToNextLists(SModName, iLevel, LLI_LatexNurseSuit3, LL_LatexNurseSuit3)
			fnAddModListToNextLists(SModName, iLevel, LL_DressesLatexPVC, LLI_LatexNurseSuit3)

			fnAddArmorToLists(sModName, 0x00000821, iLevel, 1, FL_PantsSexy, LL_PantsSexy) ; Latex Corset Suit
			fnAddArmorToLists(sModName, 0x00000826, iLevel, 1, FL_CatsuitsArmored, LL_CatsuitsArmored) ; Latex ZeroSuit
			fnAddArmorToLists(sModName, 0x00000855, iLevel, 1, FL_BodysuitsLatexPVC, LL_BodysuitsLatexPVC) ; Latex Bodysuit Black

			if (iCount > 0)
				Int iNewTotal = gCurrAssetTotal.GetValueInt() + iCount
				gCurrAssetTotal.SetValue(iNewTotal)
				fnMessage("CCL: " + sModName + ": " + iCount + " Assets Added, Total Now: " + iNewTotal)
			endif
		endif
	else
		iAddedModB = 0
	endif

	sModName = "SuitDreams(3.Average).esp"
	Utility.Wait(1.0)
	If (Game.IsPluginInstalled(sModName))
		if (iAddedModC < 1)
			iCount = 0
			Int iLevel = 1
			iAddedModC += 1

			fnAddArmorToLists(sModName, 0x00000854, iLevel, 1, FL_CatsuitsArmored, LL_SuitDreams1) ; Catsuit Leather closed
			fnAddArmorToLists(sModName, 0x00000856, iLevel, 1, FL_CatsuitsArmored, LL_SuitDreams1) ; Catsuit Leather open
			fnAddArmorToLists(sModName, 0x000008AD, iLevel, 1, FL_CatsuitsArmored, LL_SuitDreams1) ; Catsuit Leather open with bra
			fnAddModListToNextLists(SModName, iLevel, LLI_SuitDreams1, LL_SuitDreams1)
			fnAddModListToNextLists(SModName, iLevel, LL_CatsuitsArmored, LL_SuitDreams1)

			fnAddArmorToLists(sModName, 0x00000855, iLevel, 1, FL_CatsuitsLatexPVC, LL_SuitDreams2) ; Catsuit Vinyl closed
			fnAddArmorToLists(sModName, 0x00000857, iLevel, 1, FL_CatsuitsLatexPVC, LL_SuitDreams2) ; Catsuit Vinyl open
			fnAddArmorToLists(sModName, 0x000008AE, iLevel, 1, FL_CatsuitsLatexPVC, LL_SuitDreams2) ; Catsuit Vinyl open with bra
			fnAddModListToNextLists(SModName, iLevel, LLI_SuitDreams2, LL_SuitDreams2)
			fnAddModListToNextLists(SModName, iLevel, LL_CatsuitsLatexPVC, LL_SuitDreams2)

			fnAddArmorToLists(sModName, 0x00000851, iLevel, 1, FL_JumpsuitsNice, LL_SuitDreams3) ; Vaultsuit101 closed
			fnAddArmorToLists(sModName, 0x00000852, iLevel, 1, FL_JumpsuitsNice, LL_SuitDreams3) ; Vaultsuit101 open
			fnAddArmorToLists(sModName, 0x00000853, iLevel, 1, FL_JumpsuitsNice, LL_SuitDreams3) ; Vaultsuit114 closed
			fnAddArmorToLists(sModName, 0x00000871, iLevel, 1, FL_JumpsuitsNice, LL_SuitDreams3) ; Vaultsuit111 closed
			fnAddArmorToLists(sModName, 0x00000872, iLevel, 1, FL_JumpsuitsNice, LL_SuitDreams3) ; Vaultsuit111 open
			fnAddArmorToLists(sModName, 0x000008B1, iLevel, 1, FL_JumpsuitsNice, LL_SuitDreams3) ; Vaultsuit111 open with bra
			fnAddArmorToLists(sModName, 0x00000851, iLevel, 1, FL_VaultTech, LL_SuitDreams3) ; Vaultsuit101 closed
			fnAddArmorToLists(sModName, 0x00000852, iLevel, 1, FL_VaultTech, LL_SuitDreams3) ; Vaultsuit101 open
			fnAddArmorToLists(sModName, 0x00000853, iLevel, 1, FL_VaultTech, LL_SuitDreams3) ; Vaultsuit114 closed
			fnAddArmorToLists(sModName, 0x00000871, iLevel, 1, FL_VaultTech, LL_SuitDreams3) ; Vaultsuit111 closed
			fnAddArmorToLists(sModName, 0x00000872, iLevel, 1, FL_VaultTech, LL_SuitDreams3) ; Vaultsuit111 open
			fnAddArmorToLists(sModName, 0x000008B1, iLevel, 1, FL_VaultTech, LL_SuitDreams3) ; Vaultsuit111 open with bra
			fnAddModListToNextLists(SModName, iLevel, LLI_SuitDreams3, LL_SuitDreams3)
			fnAddModListToNextLists(SModName, iLevel, LL_VaultTech, LL_SuitDreams3)

			fnAddArmorToLists(sModName, 0x00000866, iLevel, 1, FL_BodysuitsThin, LL_SuitDreams4) ; Shortsuit closed
			fnAddArmorToLists(sModName, 0x000008AF, iLevel, 1, FL_BodysuitsThin, LL_SuitDreams4) ; Shortsuit open
			fnAddArmorToLists(sModName, 0x000008B0, iLevel, 1, FL_BodysuitsThin, LL_SuitDreams4) ; Shortsuit open with bra
			fnAddArmorToLists(sModName, 0x00000870, iLevel, 1, FL_BodysuitsThin, LL_SuitDreams4) ; Sportsuit closed
			fnAddModListToNextLists(SModName, iLevel, LLI_SuitDreams4, LL_SuitDreams4)
			fnAddModListToNextLists(SModName, iLevel, LL_BodysuitsThin, LL_SuitDreams4)

			fnAddArmorToLists(sModName, 0x00000858, iLevel, 1, FL_ShortsSexy, LL_ShortsSexy) ; Minishorts
			fnAddArmorToLists(sModName, 0x00000859, iLevel, 1, FL_ShortsSexy, LL_ShortsSexy) ; Minishorts Suspenders

			fnAddArmorToLists(sModName, 0x00000860, iLevel, 1, FL_LeotardsThin, LL_LeotardsThin) ; Morningstar
			fnAddArmorToLists(sModName, 0x00000861, iLevel, 1, FL_LeotardsThin, LL_LeotardsThin) ; Morningstar silk
			fnAddArmorToLists(sModName, 0x00000862, iLevel, 1, FL_LeotardsThin, LL_LeotardsThin) ; Morningstar vinyl

			fnAddArmorToLists(sModName, 0x00000874, iLevel, 1, FL_Underwear_Naked, LL_Underwear_Naked) ; Naked
			fnAddArmorToLists(sModName, 0x00000863, iLevel, 1, FL_LeotardsThin, LL_LeotardsThin) ; Ringstar
			fnAddArmorToLists(sModName, 0x00000864, iLevel, 1, FL_LeotardsThin, LL_LeotardsThin) ; Scorpio
			fnAddArmorToLists(sModName, 0x00000865, iLevel, 1, FL_LeotardsThin, LL_LeotardsThin) ; Scorpio Jewel

			fnAddArmorToLists(sModName, 0x00000867, iLevel, 1, FL_LeotardsThin, LL_LeotardsThin) ; Slavesuit
			fnAddArmorToLists(sModName, 0x00000868, iLevel, 1, FL_LeotardsThin, LL_LeotardsThin) ; Slavesuit Luxurious
			fnAddArmorToLists(sModName, 0x00000869, iLevel, 1, FL_LeotardsThin, LL_LeotardsThin) ; Slavesuit Warrior

			if (iCount > 0)
				Int iNewTotal = gCurrAssetTotal.GetValueInt() + iCount
				gCurrAssetTotal.SetValue(iNewTotal)
				fnMessage("CCL: " + sModName + ": " + iCount + " Assets Added, Total Now: " + iNewTotal)
			endif
		endif
	else
		iAddedModC = 0
	endif

EndFunction

;-----------------------------------------------------------------------------------------------------------------------------

Function fnAddArmorToLists(String sMod, Int iArmorID, Int iLevel, Int iNum, FormList FLTarget, LeveledItem LLTarget)
	Utility.Wait(0.1)
	iCount +=1
	Armor arArmor = Game.GetFormFromFile(iArmorID, sMod) as Armor
	if (arArmor) && (FLTarget)
		if (FLTarget)
			FLTarget.AddForm(arArmor)
		endif
		if  (LLTarget)
			LLTarget.AddForm(arArmor, iLevel, iNum)
		endif
	else
		fnMessage("Armor Error: Mod/Count/LList/Form/ArmorID/Armor: " + sMod + "/" + iCount + "/" + LLTarget + "/" + FLTarget + "/" + iArmorID + "/" + arArmor) 
	endif
EndFunction

Function fnAddModListToNextLists(String sMod, Int iLevel, LeveledItem LLTarget, LeveledItem LLIList)
	Utility.Wait(0.1)
	if (LLTarget) && (LLIList)
		LLTarget.AddForm(LLILIst, iLevel, 1)
	else
		fnMessage("Next List Error: Mod/Count/LLTarget/LLIList: " + sMod + "/" + iCount + "/" + LLTarget + "/" + LLIList) 
	endif
EndFunction

Function fnMessage(String sMessage)
	if (iDebugSetting > 0)
		Debug.Trace(sMessage)
	endif
	if (iDebugSetting > 1)
		Debug.Notification(sMessage)
	endif
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