Remove Cuda and Group Iterations Count Options#1
Conversation
📝 WalkthroughWalkthroughRemoved CUDA and group-iteration UI controls and their configuration entries from the MCM; renamed Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Source/Scripts/FSMPM.psc`:
- Line 212: The config key in the keys array is misspelled with a capital S
("maxSubSteps") causing a case mismatch with UI accesses; update the keys entry
(keys[18]) to use the exact lowercase key "maxSubsteps" so it matches
JMap.getStr(..., "maxSubsteps", ...), setOpenedSlider(..., "maxSubsteps", ...),
and setIntTag("maxSubsteps", ...) ensuring the slider reads and writes the same
config key.
- Line 253: The loop currently uses a hardcoded bound "23" in the condition
"While (index < 23);keys.Length)" — replace this with the array length by
changing the condition to "while (index < keys.Length)" (fix the casing if
needed, remove the stray semicolon and stray text) so the loop uses keys.Length
and avoids the magic number; locate the loop that references index and keys in
FSMPM.psc and update its condition accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5cd62a07-d706-4ea5-a810-ae3cbe82aa24
📒 Files selected for processing (3)
Scripts/FSMPM.pexScripts/FSMPMPlayerScript.pexSource/Scripts/FSMPM.psc
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Source/Scripts/FSMPM.psc (1)
311-333: 🧹 Nitpick | 🔵 TrivialConsider replacing magic numbers with constants for section boundaries.
The loop bounds
14,19, and23are hardcoded magic numbers representing section boundaries. While line 253 correctly useskeys.Length, these loops will break silently if thekeysarray is modified in the future.♻️ Suggested refactor using constants
Add constants at the top of the file to define section boundaries:
int smpSectionEnd = 14 ; keys[0..13] = smp section int solverSectionEnd = 19 ; keys[14..18] = solver section int windSectionEnd = 23 ; keys[19..22] = wind sectionThen update the loops:
- While (index < 14) + While (index < smpSectionEnd) ... EndWhile result += " </smp>\n <solver>\n" - While (index < 19) + While (index < solverSectionEnd) ... EndWhile result += " </solver>\n <wind>\n" - While (index < 23) + While (index < windSectionEnd) ... EndWhile🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Source/Scripts/FSMPM.psc` around lines 311 - 333, Replace the hardcoded loop bounds (While (index < 14), While (index < 19), While (index < 23)) with named constants (e.g., smpSectionEnd, solverSectionEnd, windSectionEnd) defined near the top of the script, and update each loop to compare index against those constants (and guard against keys.Length by using the smaller of the constant and keys.Length where appropriate); locate the loops that call JMap.getStr(configMapId, tag, "") and entaggedValue(tag, value) and swap the numeric literals for the new constants so section boundaries are explicit and robust.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Source/Scripts/FSMPM.psc`:
- Line 212: The keys array entry keys[18] is using "maxSubsteps" but the XML
uses a capital 'S' ("maxSubSteps"), so update the string at keys[18] to
"maxSubSteps" so the tag lookup (the code that builds tags via "<" + tag + ">")
matches case-sensitively and the parser reads the configured value; ensure no
other occurrences of "maxSubsteps" remain in the file.
---
Outside diff comments:
In `@Source/Scripts/FSMPM.psc`:
- Around line 311-333: Replace the hardcoded loop bounds (While (index < 14),
While (index < 19), While (index < 23)) with named constants (e.g.,
smpSectionEnd, solverSectionEnd, windSectionEnd) defined near the top of the
script, and update each loop to compare index against those constants (and guard
against keys.Length by using the smaller of the constant and keys.Length where
appropriate); locate the loops that call JMap.getStr(configMapId, tag, "") and
entaggedValue(tag, value) and swap the numeric literals for the new constants so
section boundaries are explicit and robust.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 25166f06-f987-4e61-a4fd-368a8ef170de
📒 Files selected for processing (2)
Scripts/FSMPM.pexSource/Scripts/FSMPM.psc
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Source/Scripts/FSMPM.psc (1)
311-333: 🧹 Nitpick | 🔵 TrivialConsider defining constants for XML section boundaries.
The hardcoded loop bounds (14, 19, 23) are correct but could become a maintenance burden if the keys array is modified again. Defining constants for these section boundaries would improve clarity and reduce the risk of mismatches.
♻️ Suggested approach
+int SECTION_SMP_END = 14 +int SECTION_SOLVER_END = 19 +int SECTION_WIND_END = 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 < SECTION_SMP_END) ; ... EndWhile result += " </smp>\n <solver>\n" - While (index < 19) + While (index < SECTION_SOLVER_END) ; ... EndWhile result += " </solver>\n <wind>\n" - While (index < 23) + While (index < SECTION_WIND_END) ; ... EndWhile🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Source/Scripts/FSMPM.psc` around lines 311 - 333, Replace the magic numbers used as loop bounds with named constants to document the XML section boundaries and avoid future mismatches: define constants (e.g., SMP_END = 14, SOLVER_END = 19, WIND_END = 23) near the top of FSMPM.psc or above the code block, then update the three While conditions that reference the hardcoded bounds (the loops that iterate using index and keys, calling JMap.getStr and entaggedValue and appending to result) to use SMP_END, SOLVER_END, and WIND_END respectively; ensure the constants are used consistently so the same named symbols appear in all three loops and any related logic that depends on those boundaries.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@Source/Scripts/FSMPM.psc`:
- Around line 311-333: Replace the magic numbers used as loop bounds with named
constants to document the XML section boundaries and avoid future mismatches:
define constants (e.g., SMP_END = 14, SOLVER_END = 19, WIND_END = 23) near the
top of FSMPM.psc or above the code block, then update the three While conditions
that reference the hardcoded bounds (the loops that iterate using index and
keys, calling JMap.getStr and entaggedValue and appending to result) to use
SMP_END, SOLVER_END, and WIND_END respectively; ensure the constants are used
consistently so the same named symbols appear in all three loops and any related
logic that depends on those boundaries.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: ee5f33d7-88b4-4548-9d94-758e7d96ec08
📒 Files selected for processing (7)
SKSE/Plugins/hdtSkinnedMeshConfigs/configs.xmlSKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Debug.xmlSKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Performance.xmlSKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Quality.xmlSKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Reasonable.xmlScripts/FSMPM.pexSource/Scripts/FSMPM.psc
💤 Files with no reviewable changes (5)
- SKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Reasonable.xml
- SKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Debug.xml
- SKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Performance.xml
- SKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Quality.xml
- SKSE/Plugins/hdtSkinnedMeshConfigs/configs.xml
Remove the Cuda Toggle and Group Iterations Count from the MCM.
Summary by CodeRabbit
Removed Features
UI Changes
Bug Fixes