Jump to content

Obscure patches (January 2022)


Recommended Posts

Posted

 

I updated the file for Skooma Whore as loose files.

Please use this version if you downloaded my patch.

New game required or just script changes?

 

(No worries, had to start a new for other reasons)

Probably just overwrite.

That said I have no idea how the changes overlap :)

Posted

I found a bug in my patch to Wolfclub.

If you are using Simple Slavery or Deviously Enslaved and you downloaded the patch, you do update it with today's file.

Posted

do you make any changes to corpselight farm in falkreath? cause I have a town replacer mod(ETAC) and that building sticks to the vanilla look with a floating door,  I opened my console and clicked on it and it said the last reference change was in skooma whore for some reason, but i dunno anyone else having that issue?

  • 2 weeks later...
  • 3 weeks later...
Posted

@skyrimll, is the skooma whore patch still right? As of 1.0?

Like you don't mention for which versions it's made with most patches which means that if the mod gets updated , the patch doesnt work/counterproductive the mod.

 

Sorry, my english.exe has stopped responding in this message.

Posted

@skyrimll, is the skooma whore patch still right? As of 1.0?

Like you don't mention for which versions it's made with most patches which means that if the mod gets updated , the patch doesnt work/counterproductive the mod.

 

Sorry, my english.exe has stopped responding in this message.

 

Yes... it covers version 1.0 and includes some patches shared on the discussion thread.

  • 3 weeks later...
Posted

I updated the Dangerous Night patch to version 2.2 and added missing updates to the Skooma Whore patch.

 

Would you also be able to fix the issues with "Scan Only"?

 

I use "Scan Only" and "Morality = High" and often come across two problems: (1) a dead NPC is selected or (2) an NPC above the morality threshold is incorrectly selected.

 

 

 

I looked at some of the key parts of the code (sldn2_upkeep.psc, State scan) and the logic looks fine, so I'm not sure why NPCs of Morality=3 are getting selected.

 

As for why dead NPCs are getting selected, I don't know if SexLab.FindAvailableActor() filters out dead NPCs or not.

Posted

 

I updated the Dangerous Night patch to version 2.2 and added missing updates to the Skooma Whore patch.

 

Would you also be able to fix the issues with "Scan Only"?

 

I use "Scan Only" and "Morality = High" and often come across two problems: (1) a dead NPC is selected or (2) an NPC above the morality threshold is incorrectly selected.

 

 

 

I looked at some of the key parts of the code (sldn2_upkeep.psc, State scan) and the logic looks fine, so I'm not sure why NPCs of Morality=3 are getting selected.

 

As for why dead NPCs are getting selected, I don't know if SexLab.FindAvailableActor() filters out dead NPCs or not.

 

 

To save some time, can you point me to the right direction in DN2's code? where should I be looking?

Posted

 

 

Would you also be able to fix the issues with "Scan Only"?

 

I use "Scan Only" and "Morality = High" and often come across two problems: (1) a dead NPC is selected or (2) an NPC above the morality threshold is incorrectly selected.

 

 

 

I looked at some of the key parts of the code (sldn2_upkeep.psc, State scan) and the logic looks fine, so I'm not sure why NPCs of Morality=3 are getting selected.

 

As for why dead NPCs are getting selected, I don't know if SexLab.FindAvailableActor() filters out dead NPCs or not.

 

 

To save some time, can you point me to the right direction in DN2's code? where should I be looking?

 

 

I think the file controlling it would be sldn2_upkeep.psc. The State scan section starts on line 274 in the original version and 279 in your patched version.

 

The first portion of code is filling an NPC array using Sexlab's FindAvailableActor() function, from SexLabFramework.psc. I'm not sure whether that filters out dead NPCs since the function just calls another object instead.

 

The section afterward loops through the array and does the morality comparison. After that while loop, I assume the next portion of code (If Dummy == None) is meant to handle cases where no valid NPCs were found. However, the issue may be that during the While loop's check for morality conditions, when invalid actors are found, it never touches the Dummy variable so it never gets set to none. Instead, it sets NPC[X] to none. I'm not sure what the purpose of that is, but I'm also not very familiar with papyrus code (I assume None is the same as Null, but not sure if there's any other special behavior).

 

 

 

State scan
	Function ADangerousNight()
	If FollowerCount.GetValue() > 0
		(Alias_Follower1.GetRef() as Actor).AddToFaction(SexLabForbiddenActor)
		(Alias_Follower2.GetRef() as Actor).AddToFaction(SexLabForbiddenActor)
		(Alias_Follower3.GetRef() as Actor).AddToFaction(SexLabForbiddenActor)
		(Alias_Follower4.GetRef() as Actor).AddToFaction(SexLabForbiddenActor)
	EndIf
	Actor[] NPC = new actor[4]
	If MCM.gender == "Both"
		NPC[0] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, -1, Game.GetPlayer())
		NPC[1] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, -1, Game.GetPlayer(), NPC[0])
		NPC[2] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, -1, Game.GetPlayer(), NPC[0], NPC[1])
		NPC[3] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, -1, Game.GetPlayer(), NPC[0], NPC[1], NPC[2])
	elseif MCM.gender == "Females Only"
		NPC[0] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, 1, Game.GetPlayer())
		NPC[1] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, 1, Game.GetPlayer(), NPC[0])
		NPC[2] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, 1, Game.GetPlayer(), NPC[0], NPC[1])
		NPC[3] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, 1, Game.GetPlayer(), NPC[0], NPC[1], NPC[2])
	elseif  MCM.gender == "Males Only"
		NPC[0] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, 0, Game.GetPlayer())
		NPC[1] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, 0, Game.GetPlayer(), NPC[0])
		NPC[2] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, 0, Game.GetPlayer(), NPC[0], NPC[1])
		NPC[3] = SexLab.FindAvailableActor(Game.GetPlayer(), 4096.0, 0, Game.GetPlayer(), NPC[0], NPC[1], NPC[2])
	endif
	If FollowerCount.GetValue() > 0
		(Alias_Follower1.GetRef() as Actor).RemoveFromFaction(SexLabForbiddenActor)
		(Alias_Follower2.GetRef() as Actor).RemoveFromFaction(SexLabForbiddenActor)
		(Alias_Follower3.GetRef() as Actor).RemoveFromFaction(SexLabForbiddenActor)
		(Alias_Follower4.GetRef() as Actor).RemoveFromFaction(SexLabForbiddenActor)
	EndIf
	Int iRef = 0
	Int X = 1
	Actor Dummy = NPC[0]
	While iRef == 0
		If NPC[X] != none
			if mcm.moral == "Low" || (NPC[X].GetActorValue("Morality") <= 2 && mcm.moral == "Medium") || (NPC[X].GetActorValue("Morality") <= 1 && mcm.moral == "High") || (NPC[X].GetActorValue("Morality") == 0 && mcm.moral == "Very High")
				If NPC[X].GetFactionRank(sla_Arousal) > Dummy.GetFactionRank(sla_Arousal)
					Dummy = NPC[X]
					X += 1
				else
					X += 1
				EndIf
			else
				NPC[X] = none
				X += 1
			endif
		Else
			X += 1
		EndIf
		If X == 4
			iRef = 1
		endif
	EndWhile
	If Dummy == None
		If mcm.scan == "scan first"
			SuccssesfulScan = 0
			GoToState("spawn")
		ElseIf mcm.scan == "scan only"
			Debug.Notification("You wake up from a sudden noise, but there's nothing to see.")
			GoToState("CleanUp")
		endif
	Else
		Alias_Aggressor1.ForceRefTo(Dummy)
		SuccssesfulScan = 1
		GoToState("Place")
	endif
	RegisterForSingleUpdate(UpdateInterval)
	EndFunction
EndState

 

 

 

TL;DR

 

For the issue of dead NPCs being selected, don't know the cause since it traces back to an SL Framework function. Don't know whether the function filters dead NPCs out or not.

 

For the issue of moral NPCs being incorrectly selected, I think the cause of the error is between lines 307 to 328 (original source code) and related to how the Dummy variable is never touched when an NPC fails the morality conditions. A fix may require a a new variable or re-thinking how the NPC[] and Dummy variables are used/modified.

    Actor Dummy = NPC[0]
    While iRef == 0
        If NPC[X] != none
            if mcm.moral == "Low" || (NPC[X].GetActorValue("Morality") <= 2 && mcm.moral == "Medium") || (NPC[X].GetActorValue("Morality") <= 1 && mcm.moral == "High") || (NPC[X].GetActorValue("Morality") == 0 && mcm.moral == "Very High")
                If NPC[X].GetFactionRank(sla_Arousal) > Dummy.GetFactionRank(sla_Arousal)
                    Dummy = NPC[X]
                    X += 1
                else
                    X += 1
                EndIf
            else
                NPC[X] = none
                X += 1
            endif
        Else
            X += 1
        EndIf
        If X == 4
            iRef = 1
        endif
    EndWhile
    If Dummy == None
        ...etc
  • 2 weeks later...
Posted

skyrimll, does that look like a flaw in the logic of the code to you?

 

As for why it triggers on dead NPCs, haven't figured that one out. It's damn annoying though. Happens even on decapitated NPCs.

 

post-204633-0-71851400-1463531520_thumb.jpg

Posted

I haven't had time to look into this yet... RL work has been demanding this week and it will be again next week.

June seems more open so far.. I should have more time to progress on bug fixes and new content.

Posted

skyrimll, does that look like a flaw in the logic of the code to you?

 

As for why it triggers on dead NPCs, haven't figured that one out. It's damn annoying though. Happens even on decapitated NPCs.

 

Try this script and let me know if it works.

 

I added a check for 'IsDead()' on the actor and fixed the loop to make sure morality conditions are evaluated for NPC[X] when X = 0 (which it was not).

sldn2_upkeep.pex

Posted

 

skyrimll, does that look like a flaw in the logic of the code to you?

 

As for why it triggers on dead NPCs, haven't figured that one out. It's damn annoying though. Happens even on decapitated NPCs.

 

Try this script and let me know if it works.

 

I added a check for 'IsDead()' on the actor and fixed the loop to make sure morality conditions are evaluated for NPC[X] when X = 0 (which it was not).

 

 

Didn't fix the dead NPC issue. I left a save in the area where it was happening consistently and used that to test. Same issue occurred with a decapitated NPC being selected.

 

Update: Did a quick test for morality. Issue still came up. Triggered on an NPC with morality = 3 despite the morality setting being set to high.

Posted

 

 

skyrimll, does that look like a flaw in the logic of the code to you?

 

As for why it triggers on dead NPCs, haven't figured that one out. It's damn annoying though. Happens even on decapitated NPCs.

Try this script and let me know if it works.

 

I added a check for 'IsDead()' on the actor and fixed the loop to make sure morality conditions are evaluated for NPC[X] when X = 0 (which it was not).

Didn't fix the dead NPC issue. I left a save in the area where it was happening consistently and used that to test. Same issue occurred with a decapitated NPC being selected.

 

Update: Did a quick test for morality. Issue still came up. Triggered on an NPC with morality = 3 despite the morality setting being set to high.

Where was that in the game?

 

I will need a sure way to test it.

Posted

 

 

 

skyrimll, does that look like a flaw in the logic of the code to you?

 

As for why it triggers on dead NPCs, haven't figured that one out. It's damn annoying though. Happens even on decapitated NPCs.

Try this script and let me know if it works.

 

I added a check for 'IsDead()' on the actor and fixed the loop to make sure morality conditions are evaluated for NPC[X] when X = 0 (which it was not).

Didn't fix the dead NPC issue. I left a save in the area where it was happening consistently and used that to test. Same issue occurred with a decapitated NPC being selected.

 

Update: Did a quick test for morality. Issue still came up. Triggered on an NPC with morality = 3 despite the morality setting being set to high.

Where was that in the game?

 

I will need a sure way to test it.

 

 

For the dead NPC test, the location was Fort Snowhawk. Could probably do a "kill all" command once entering then run to the bed area. Probably good to set the MCM settings to 100% as well, but I didn't (think default setting for that type of cell is 80%?).

 

For morality, I don't have a established test location for good testing. I just did a quick test by going to a random inn. Set "civilization" setting to 100%. I checked to make sure all NPCs in the cell were morality = 3 and then used simple actions to sleep nearby an NPC of a valid gender (vicinity probably doesn't matter though since the cells are small). In that quick test, there were less than 4 NPCs in the cell.

 

And of course I set MCM settings as "Scan Only" and Morality = High.

 

 

Can you also attach the updated psc file for me to look through?

Posted

skyrimll, does that look like a flaw in the logic of the code to you?

 

As for why it triggers on dead NPCs, haven't figured that one out. It's damn annoying though. Happens even on decapitated NPCs.

rofl what the problem? everything looks awesome XD

Posted

 

 

 

 

skyrimll, does that look like a flaw in the logic of the code to you?

 

As for why it triggers on dead NPCs, haven't figured that one out. It's damn annoying though. Happens even on decapitated NPCs.

Try this script and let me know if it works.

 

I added a check for 'IsDead()' on the actor and fixed the loop to make sure morality conditions are evaluated for NPC[X] when X = 0 (which it was not).

Didn't fix the dead NPC issue. I left a save in the area where it was happening consistently and used that to test. Same issue occurred with a decapitated NPC being selected.

 

Update: Did a quick test for morality. Issue still came up. Triggered on an NPC with morality = 3 despite the morality setting being set to high.

Where was that in the game?

 

I will need a sure way to test it.

 

 

For the dead NPC test, the location was Fort Snowhawk. Could probably do a "kill all" command once entering then run to the bed area. Probably good to set the MCM settings to 100% as well, but I didn't (think default setting for that type of cell is 80%?).

 

For morality, I don't have a established test location for good testing. I just did a quick test by going to a random inn. Set "civilization" setting to 100%. I checked to make sure all NPCs in the cell were morality = 3 and then used simple actions to sleep nearby an NPC of a valid gender (vicinity probably doesn't matter though since the cells are small). In that quick test, there were less than 4 NPCs in the cell.

 

And of course I set MCM settings as "Scan Only" and Morality = High.

 

 

Can you also attach the updated psc file for me to look through?

 

 

Here is the source file.

 

I won't be able to test anything for a while because of RL issues.

 

My guess so far is that something is flagging the dead NPCs as 'not dead'.

 

Are these headless corpses coming from another mod?

sldn2_upkeep.psc

Posted

 

 

 

 

 

 

 

 

skyrimll, does that look like a flaw in the logic of the code to you?

 

As for why it triggers on dead NPCs, haven't figured that one out. It's damn annoying though. Happens even on decapitated NPCs.

Try this script and let me know if it works.

 

I added a check for 'IsDead()' on the actor and fixed the loop to make sure morality conditions are evaluated for NPC[X] when X = 0 (which it was not).

Didn't fix the dead NPC issue. I left a save in the area where it was happening consistently and used that to test. Same issue occurred with a decapitated NPC being selected.

 

Update: Did a quick test for morality. Issue still came up. Triggered on an NPC with morality = 3 despite the morality setting being set to high.

Where was that in the game?

 

I will need a sure way to test it.

 

 

For the dead NPC test, the location was Fort Snowhawk. Could probably do a "kill all" command once entering then run to the bed area. Probably good to set the MCM settings to 100% as well, but I didn't (think default setting for that type of cell is 80%?).

 

For morality, I don't have a established test location for good testing. I just did a quick test by going to a random inn. Set "civilization" setting to 100%. I checked to make sure all NPCs in the cell were morality = 3 and then used simple actions to sleep nearby an NPC of a valid gender (vicinity probably doesn't matter though since the cells are small). In that quick test, there were less than 4 NPCs in the cell.

 

And of course I set MCM settings as "Scan Only" and Morality = High.

 

 

Can you also attach the updated psc file for me to look through?

 

 

 

 

Here is the source file.

 

I won't be able to test anything for a while because of RL issues.

 

My guess so far is that something is flagging the dead NPCs as 'not dead'.

 

Are these headless corpses coming from another mod?

 

 

Thanks. As for the IsDead problem, it's not related to the headless corpse. It was originally a vanilla NPC that got decapitated by a kill move. The dead NPC selection problem also occurs on corpses that still have their heads. I just used a decapitated one in the screenshot since that made it obvious the NPC was supposed to be dead.

 

I looked at the source code and the reason why the fix doesn't work is because it merged the IsDead check into the morality check, and the morality issue still isn't fixed.

 

 

Regarding the morality fix, the "Int X = 0" correction is a bug I didn't see. However, that doesn't address the main issue, which is what happens if the code loops through all the NPCs in the array and finds none fulfill the conditional checks. That block of code is associated with "If Dummy == None" but that condition will never be true.

 

The most obvious way I see to fix that is to have a counter to track the number of NPCs that fail the check, and change "If Dummy == None"  to "If counter == 4". Would prefer a more elegant solution but not seeing one immediately.

 

 

If Ashal can help me understand why SexLab.FindAvailableActor() is returning dead NPCs (post here), I could take a shot at fixing the morality and dead NPC issues.

Posted

Dummy is initialized with NPC[0]... which is filled by the result of a SexLab.FindAvailableActor().

This function can return None when it doesn't find anything, so Dummy == None can happen.

 

I looked at the morality conditions again and it seems they are simply inverted. Morality = 0 means very low morality, so it doesn't make any sense that value goes with the 'very high' morality setting from mcm.

 

I inverted the checks... let me know if this is working better.

 

 

sldn2_upkeep.pex

sldn2_upkeep.psc

Posted

Dummy is initialized with NPC[0]... which is filled by the result of a SexLab.FindAvailableActor().

This function can return None when it doesn't find anything, so Dummy == None can happen.

 

I looked at the morality conditions again and it seems they are simply inverted. Morality = 0 means very low morality, so it doesn't make any sense that value goes with the 'very high' morality setting from mcm.

 

I inverted the checks... let me know if this is working better.

 

The original morality conditions are actually correct. That mixed me up the first time I saw it as well because the definitions of the MCM setting are odd.

mcm.moral == "Low") || (NPC[X].GetActorValue("Morality") <= 2 && mcm.moral == "Medium") || (NPC[X].GetActorValue("Morality") <= 1 && mcm.moral == "High") || (NPC[X].GetActorValue("Morality") == 0 && mcm.moral == "Very High"

Moral Setting Definition:

  • Low: No moral limit (therefore no AV morality check)
  • Medium: Only highly moral people won't attack (so <=2)
  • High: Normal citizens won't attack (so <=1)
  • Very High: Only most lawless will attack (so morality=0 only)

 

As for my comment about  "If Dummy == None" the point there was that when the morality check fails, NPC[X] is set to None. However, this never impacts Dummy.

 

Therefore I think the fix should be changing "If Dummy == None" to the following:

If (NPC[0] == None && NPC[1] == None && NPC[2] == None && NPC[3] == None)
Posted

 

Dummy is initialized with NPC[0]... which is filled by the result of a SexLab.FindAvailableActor().

This function can return None when it doesn't find anything, so Dummy == None can happen.

 

I looked at the morality conditions again and it seems they are simply inverted. Morality = 0 means very low morality, so it doesn't make any sense that value goes with the 'very high' morality setting from mcm.

 

I inverted the checks... let me know if this is working better.

 

The original morality conditions are actually correct. That mixed me up the first time I saw it as well because the definitions of the MCM setting are odd.

mcm.moral == "Low") || (NPC[X].GetActorValue("Morality") <= 2 && mcm.moral == "Medium") || (NPC[X].GetActorValue("Morality") <= 1 && mcm.moral == "High") || (NPC[X].GetActorValue("Morality") == 0 && mcm.moral == "Very High"

Moral Setting Definition:

  • Low: No moral limit (therefore no AV morality check)
  • Medium: Only highly moral people won't attack (so <=2)
  • High: Normal citizens won't attack (so <=1)
  • Very High: Only most lawless will attack (so morality=0 only)

 

As for my comment about  "If Dummy == None" the point there was that when the morality check fails, NPC[X] is set to None. However, this never impacts Dummy.

 

Therefore I think the fix should be changing "If Dummy == None" to the following:

If (NPC[0] == None && NPC[1] == None && NPC[2] == None && NPC[3] == None)

 

I tried compiling the script myself, but I'm getting errors on the SL Framework scripts. Error messages below (note I cut out the start of the paths on purpose):

 

 

Compiling "sldn2_upkeep"...

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(299,31): variable NiOverride is undefined

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(299,42): none is not a known user-defined type

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(300,19): variable NiOverride is undefined

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(300,30): none is not a known user-defined type

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(305,5): variable NiOverride is undefined

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(305,16): none is not a known user-defined type

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(306,5): variable NiOverride is undefined

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(306,16): none is not a known user-defined type

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(715,31): variable NiOverride is undefined

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(715,42): none is not a known user-defined type

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(716,5): variable NiOverride is undefined

\Skyrim\Data\Scripts\Source\sslActorAlias.psc(716,16): none is not a known user-defined type

\Skyrim\Data\Scripts\Source\sslSystemConfig.psc(696,61): variable NiOverride is undefined

\Skyrim\Data\Scripts\Source\sslSystemConfig.psc(696,72): none is not a known user-defined type

\Skyrim\Data\Scripts\Source\sslSystemConfig.psc(696,91): cannot compare a none to a int (cast missing or types unrelated)

\Skyrim\Data\Scripts\Source\sslSystemConfig.psc(696,91): cannot relatively compare variables to None

No output generated for sldn2_upkeep, compilation failed.

 

Batch compile of 1 files finished. 0 succeeded, 1 failed.

Failed on sldn2_upkeep

 

Not sure what the problem is... I'm using the CK's Script Manager. Do I have to compile using an older version of SL Framework source scripts? Or is there something else I'm missing?

  • 2 weeks later...

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