Skip to content

Remove Cuda and Group Iterations Count Options#1

Merged
DaymareOn merged 3 commits intoDaymareOn:mainfrom
KaninHop:Task-Remove_CUDA_and_Group_Iteration_Count
Mar 26, 2026
Merged

Remove Cuda and Group Iterations Count Options#1
DaymareOn merged 3 commits intoDaymareOn:mainfrom
KaninHop:Task-Remove_CUDA_and_Group_Iteration_Count

Conversation

@KaninHop
Copy link
Copy Markdown
Contributor

@KaninHop KaninHop commented Mar 26, 2026

Remove the Cuda Toggle and Group Iterations Count from the MCM.

Summary by CodeRabbit

  • Removed Features

    • CUDA enable option removed from quality settings
    • Group-simulation quality slider removed from configuration UI
  • UI Changes

    • Slowdown/solver slider key and dialog metadata renamed for consistency
  • Bug Fixes

    • Configuration export and preset files updated so saved settings no longer include the removed options and persist correctly

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 26, 2026

📝 Walkthrough

Walkthrough

Removed CUDA and group-iteration UI controls and their configuration entries from the MCM; renamed maxSubsteps tag usage to maxSubSteps; reduced the config schema from 25 to 23 entries and updated initialization/serialization loop bounds. Corresponding XML presets and default configs had <enableCuda> and <groupIterations> removed.

Changes

Cohort / File(s) Summary
Configuration & UI
Source/Scripts/FSMPM.psc
Removed SliderGroupIterations and ToggleCuda UI states and their registrations; renamed slider tag usage from maxSubstepsmaxSubSteps; adjusted slider dialog metadata; shortened keys/defaultValues arrays (25→23); initMap() uses keys.Length; buildConfigString() loop bounds updated so <smp>, <solver>, and <wind> sections omit CUDA and group-iteration tags.
Default config file
SKSE/Plugins/hdtSkinnedMeshConfigs/configs.xml
Removed <enableCuda> from <smp> and <groupIterations> from <solver> (XML entries deleted).
Presets
SKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Debug.xml, .../Performance.xml, .../Quality.xml, .../Reasonable.xml
Removed <enableCuda> from each preset's <smp> section and removed <groupIterations> from each preset's <solver> section; other preset values unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nibbled code beneath the moon,
Cleared a toggle, slid a tune,
From twenty-five to twenty-three,
The config hops more lightly now—whee!
A tiny burrow, neat and new.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Remove Cuda and Group Iterations Count Options' directly and clearly summarizes the primary changes across all modified files: removal of CUDA and group iterations settings from MCM UI and configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3faff2c and fe8bec7.

📒 Files selected for processing (3)
  • Scripts/FSMPM.pex
  • Scripts/FSMPMPlayerScript.pex
  • Source/Scripts/FSMPM.psc

Comment thread Source/Scripts/FSMPM.psc
Comment thread Source/Scripts/FSMPM.psc Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🔵 Trivial

Consider replacing magic numbers with constants for section boundaries.

The loop bounds 14, 19, and 23 are hardcoded magic numbers representing section boundaries. While line 253 correctly uses keys.Length, these loops will break silently if the keys array 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 section

Then 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

📥 Commits

Reviewing files that changed from the base of the PR and between fe8bec7 and 125a073.

📒 Files selected for processing (2)
  • Scripts/FSMPM.pex
  • Source/Scripts/FSMPM.psc

Comment thread Source/Scripts/FSMPM.psc Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🔵 Trivial

Consider 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

📥 Commits

Reviewing files that changed from the base of the PR and between 125a073 and 0025d3b.

📒 Files selected for processing (7)
  • SKSE/Plugins/hdtSkinnedMeshConfigs/configs.xml
  • SKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Debug.xml
  • SKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Performance.xml
  • SKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Quality.xml
  • SKSE/Plugins/hdtSkinnedMeshConfigs/configsPresets/Reasonable.xml
  • Scripts/FSMPM.pex
  • Source/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

@DaymareOn DaymareOn merged commit c6889a6 into DaymareOn:main Mar 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants