Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SKSE/Plugins/hdtSkinnedMeshConfigs/configs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<budgetMs>3</budgetMs>
<sampleSize>5</sampleSize>
<disable1stPersonViewPhysics>true</disable1stPersonViewPhysics>
<skipDeadActors>false</skipDeadActors>
</smp>
<solver>
<numIterations>16</numIterations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<budgetMs>3</budgetMs>
<sampleSize>5</sampleSize>
<disable1stPersonViewPhysics>true</disable1stPersonViewPhysics>
<skipDeadActors>false</skipDeadActors>
</smp>
<solver>
<numIterations>8</numIterations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<budgetMs>5</budgetMs>
<sampleSize>5</sampleSize>
<disable1stPersonViewPhysics>false</disable1stPersonViewPhysics>
<skipDeadActors>false</skipDeadActors>
</smp>
<solver>
<numIterations>20</numIterations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<budgetMs>3</budgetMs>
<sampleSize>5</sampleSize>
<disable1stPersonViewPhysics>true</disable1stPersonViewPhysics>
<skipDeadActors>false</skipDeadActors>
</smp>
<solver>
<numIterations>16</numIterations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<budgetMs>2.8</budgetMs>
<sampleSize>5</sampleSize>
<disable1stPersonViewPhysics>true</disable1stPersonViewPhysics>
<skipDeadActors>true</skipDeadActors>
</smp>
<solver>
<numIterations>8</numIterations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<budgetMs>5</budgetMs>
<sampleSize>5</sampleSize>
<disable1stPersonViewPhysics>false</disable1stPersonViewPhysics>
<skipDeadActors>false</skipDeadActors>
</smp>
<solver>
<numIterations>32</numIterations>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<budgetMs>4</budgetMs>
<sampleSize>5</sampleSize>
<disable1stPersonViewPhysics>false</disable1stPersonViewPhysics>
<skipDeadActors>false</skipDeadActors>
</smp>
<solver>
<numIterations>16</numIterations>
Expand Down
66 changes: 42 additions & 24 deletions Source/Scripts/FSMPM.psc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ bool bDependenciesOK = false
string sMissingDependencies = ""

int Function GetVersion()
Return 307
Return 310
EndFunction

; #################################################################################################
Expand Down Expand Up @@ -84,6 +84,11 @@ event OnVersionUpdate(int NewVersion)
sLastLoadedPresetName = ""
Debug.Notification("FSMP MCM updated to version 3.0.7.")
endif
if (NewVersion >= 310 && CurrentVersion < 310)
initConfig()
sLastLoadedPresetName = ""
Debug.Notification("FSMP MCM updated to version 3.1.0.")
endif
endEvent

event OnGameReload()
Expand Down Expand Up @@ -125,6 +130,7 @@ Event OnPageReset(String aPage)
AddHeaderOption("Disabling some SMP")
AddToggleOptionST("ToggleSMPHairWhenWigEquipped", "Disable SMP hair when there's a wig", JMap.getStr(configMapId, "disableSMPHairWhenWigEquipped", "") == "true")
AddToggleOptionST("Toggle1stPersonViewPhysics", "No SMP for your PC when in 1st person view", JMap.getStr(configMapId, "disable1stPersonViewPhysics", "") == "true")
AddToggleOptionST("ToggleSkipDeadActors", "Skip physics for dead actors", JMap.getStr(configMapId, "skipDeadActors", "") == "true")
;AddToggleOptionST("ToggleNPCFaceParts", "Enable NPC face parts", JMap.getStr(configMapId, "enableNPCFaceParts", "") == "true")
AddEmptyOption()
AddHeaderOption("Enabling nearest NPCs")
Expand Down Expand Up @@ -259,7 +265,7 @@ function initConfig()
Pages[6] = ""
Pages[7] = sLabelPresets

keys = new String[22]
keys = new String[23]
keys[0] = "logLevel"; first serie
keys[1] = "enableNPCFaceParts"; unused by FSMP...
keys[2] = "disableSMPHairWhenWigEquipped"
Expand All @@ -274,16 +280,17 @@ function initConfig()
keys[11] = "budgetMs"
keys[12] = "sampleSize"
keys[13] = "disable1stPersonViewPhysics"
keys[14] = "numIterations"; second serie
keys[15] = "erp"
keys[16] = "min-fps"
keys[17] = "maxSubSteps"
keys[18] = "enabled"; third serie
keys[19] = "windStrength"
keys[20] = "distanceForNoWind"
keys[21] = "distanceForMaxWind"

defaultValues = new String[22]
keys[14] = "skipDeadActors"
keys[15] = "numIterations"; second serie
keys[16] = "erp"
keys[17] = "min-fps"
keys[18] = "maxSubSteps"
keys[19] = "enabled"; third serie
keys[20] = "windStrength"
keys[21] = "distanceForNoWind"
keys[22] = "distanceForMaxWind"

defaultValues = new String[23]
defaultValues[0] = "0"; first serie
defaultValues[1] = "true"; unused by FSMP...
defaultValues[2] = "true"
Expand All @@ -298,14 +305,15 @@ function initConfig()
defaultValues[11] = "3.5"
defaultValues[12] = "5"
defaultValues[13] = "false"
defaultValues[14] = "10"; second serie
defaultValues[15] = "0.2"
defaultValues[16] = "60"
defaultValues[17] = "2"
defaultValues[18] = "true"; third serie
defaultValues[19] = "2.0"
defaultValues[20] = "50.0"
defaultValues[21] = "2500"
defaultValues[14] = "false"; skipDeadActors
defaultValues[15] = "10"; second serie
defaultValues[16] = "0.2"
defaultValues[17] = "60"
defaultValues[18] = "2"
defaultValues[19] = "true"; third serie
defaultValues[20] = "2.0"
defaultValues[21] = "50.0"
defaultValues[22] = "2500"

presetsInt = new int[50]
endfunction
Expand Down Expand Up @@ -415,23 +423,23 @@ string Function buildConfigString()
string result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configs>\n <smp>\n"
int index = 0
string value = ""
While (index < 14)
While (index < 15)
string tag = keys[index]
value = JMap.getStr(configMapId, tag, "")
string ev = entaggedValue(tag, value)
result += " " + ev + "\n"
index += 1
EndWhile
result += " </smp>\n <solver>\n"
While (index < 18)
While (index < 19)
string tag = keys[index]
value = JMap.getStr(configMapId, tag, "")
string ev = entaggedValue(tag, value)
result += " " + ev + "\n"
index += 1
EndWhile
result += " </solver>\n <wind>\n"
While (index < 22)
While (index < 23)
string tag = keys[index]
value = JMap.getStr(configMapId, tag, "")
string ev = entaggedValue(tag, value)
Expand Down Expand Up @@ -799,12 +807,22 @@ State Toggle1stPersonViewPhysics
Event OnSelectST()
toggleTag("disable1stPersonViewPhysics", "Toggle1stPersonViewPhysics")
EndEvent

Event OnHighlightST()
SetInfoText("Check to avoid calculating your character physics when in 1st person view")
EndEvent
EndState

State ToggleSkipDeadActors
Event OnSelectST()
toggleTag("skipDeadActors", "ToggleSkipDeadActors")
EndEvent

Event OnHighlightST()
SetInfoText("Check to skip physics for dead actors (corpses), to save performance. Never affects the player.")
EndEvent
EndState

State ToggleWind
Event OnSelectST()
toggleTag("enabled", "ToggleWind")
Expand Down
Loading