OBody NG Preset Distribution Assistant NG

Addition to OBody NG for Automated Preset Distribution for UBE and CBBE, distribution manager and many more functions for Skyrim Special Edition

A lightweight SKSE DLL that processes simple rules written in INI, similar to SPID but called PDA, to automatically manage the OBody_presetDistributionConfig.json file without direct intervention, avoiding human errors and reading time.

It allows applying predefined presets for NPCs, races, factions, and complete plugins. If you decide to apply a different preset in-game using the 'O' menu, this will take precedence over the INI modification, so there are no configuration issues. ๐Ÿˆ

๐Ÿ”
Automatic INI Search
โšก
Fast Processing
๐Ÿ›ก๏ธ
Unicode Management Security
๐ŸŽฎ
SE, AE, GOG and VR Compatibility
๐Ÿ“œ
Simple Preset Management, keys and a system similar to SPID but for Presets
๐Ÿ’ƒ
Apply predefined OBody Preset to NPC without touching JSON
๐Ÿ‘๏ธ
Automatic Blacklisted UBE and Application UBE presets in UBE NPCs
๐Ÿ‘“
Automatic Preset Management List Analyzer, recorded in logs

Main Features

๐Ÿ”

Intelligent Search

Automatically searches for installed presets presets*.xml to automatically divide them among CBBE, 3BA, UBE, HIMBO, BHUNP. Leaves incompatible presets with NPCs separated: HIMBO with males, UBE with UBE NPCs, and the rest with NPCs that actually belong to those types

โš™๏ธ

Rule Processing PDA

Processes rules in a SPID-like format: Key = Element|PresetA,PresetB,...|Mode with a very high level of customization. Allows modifying OBody's master JSON without having to manually edit it, preset presets for NPCs or races, and keep the JSON well organized

๐ŸŽฏ

Advanced Modes

Applies different modes: |, |-, |*, |Key and many more combinations. Divided into basic, medium, and advanced levels, including blacklists. Allows customization so presets, plugins, races, or other elements aren't managed by OBody by player choice

๐Ÿ‘ฅ

NPC Distribution

With the Smart_Cleaning system, once presets are managed in the JSON, a review of names and preset existence will be performed. This way there will be no problems with OBody's automatic randomization and all presets in the JSON will be the ones you actually have in your playthrough

๐Ÿ’ƒ

Race Control

Can apply presets to entire races, predefined sets, and prevent issues where UBE NPCs are skinny by default. Now they'll have bodies as they should be, and you'll be able to manage them without problems

โš”๏ธ

Faction Management

You can manage factions, races, specific NPCs, complete plugins. The customization is in your decisions or in the modder's who provides you with their INI

Available Modes (press the boxes)

|

Simple Application

Always checks and applies the preset, my preferred mode

|1

Once

Applies preset once, then deactivates, updates INI to |0

|0

Disabled

Skips rule, makes no changes, generally used by the mod itself

|-

Clean Preset

Searches and cleans specific preset from the rule in json

|*

Priority Preset

Cleans complete preset entry in particular and applies the rule preset

|Keys

Preset Plus Modes

Various search modes to apply presets to json

*-1

One-Time Application

Explanation how 1* and 1- elements are incorporated into all modes (advanced use)

5,%&

Element Not Considered

Any unconsidered element is converted to 0

Important note: The mode that is in green (leaving space empty) is the one that will be used by default and is the one that fulfills the function of distributing the preset.
The modes that are in red color are for advanced use and can generate actions such as cleaning presets that you no longer want to use, or applying presets in the JSON only once. I created them for testing or for you to find a use for them, but they are not very used. I recommend just going for the empty space, that's enough.

Interactive INI PDA NG Rule Generator

Rule generator in a simple way. It only requires knowing the name of what you are going to apply the preset to (whether NPC, faction, plugin, or race) and knowing whether it will apply one or more presets to this element. Remember that if you choose more than one preset for an element, it will be chosen randomly from the ones you write, limiting the variability between the presets you specify.

If you don't know how to get the IDs or factions, you can use the codes I left on Nexus. They are used in SSEdit and generate a complete list with a lot of information about each NPC. With those, you can do whatever you like, such as SPIDs or these PDAs.

For more information about the OBody master JSON and its internal structure, check the official OBody NG JSON Configuration Guide. It is recommended to read only if you want to delve deeper into OBody configurations. If you just want to create rules and not complicate your life too much, it is not necessary to read the guide; the mod already does everything a user might need.

Rule Configuration

๐Ÿ“‹ Generated Rule

                
๐Ÿ”ง Advanced Options

Log File Analyzer

Drag and drop your "OBody_NG_Preset_Distribution_Assistant-NG_List-Helper.log" file here to extract all preset names and organize them by category.

๐Ÿ“

Drag & Drop your log file here

Only accepts: OBody_NG_Preset_Distribution_Assistant-NG_List-Helper.log

๐Ÿ“ธ Show Example Rule ImageCLICK HERE
Example Image
โš”๏ธ Faction From CSV Base GameCLICK HERE

INI Rules

๐Ÿ“„ OBodyNG_PDA_(MOD NAME).ini

Rule Description

npcFormID

Applies presets based on the specific NPC FormID (e.g.: xx0001). Not recommended much as IDs usually change with updates.

npc (recommended for NPC)

Applies presets by NPC EditorID (e.g.: Serana, Lydia, Aela). The one I use the most, as it's difficult for an EditorID to change.

factionFemale/factionMale

Applies presets to NPCs of a specific faction by gender. Useful when an NPC joins a faction, the body changes accordingly.

npcPluginFemale/npcPluginMale

Applies presets to NPCs from a specific element (.esp) by gender. Recommended for giving presets to an entire mod and its NPCs from the plugin.

raceFemale/raceMale

Applies presets to NPCs of a specific race by gender. I use it a lot, it's easy to adjust for all of Skyrim.

blacklisted

This rule serves to apply presets, plugins, NPCs, races, clothing sets to the blacklist and prevent incorrect auto-applications by OBody.

Installation

Requirements

โš™๏ธ
SKSE - Skyrim Script Extender

Required for the plugin to function

๐Ÿ‘ค
OBody Next Generation

The base mod to be configured

๐Ÿ“š
Address Library for SKSE Plugins

Library required for modern SKSE plugins

Installation Steps

1

Download Mod Plugin

Get the latest version of the SKSE OBody NG PDA plugin from Nexus

2

Install Mod Plugin

Install in your mod list, whether MO2 or Vortex

3

Done

If it's ready, you can create your INI files or install mods that require PDA as a requirement

File Structure

The structure is simple: you only need to place files with the OBodyNG_PDA_*.ini pattern in a zip or rar and publish it as a mod, then install it in your mod list. The plugin will detect them automatically and distribute the preset rules without additional configuration.

Mod Archive (ZIP/RAR) โ”œโ”€โ”€ OBodyNG_PDA_*.ini (e.g., OBodyNG_PDA_MyMod.ini) โ””โ”€โ”€ (Optional: other mod files)

System Architecture

๐Ÿ“

Rule Configuration

Creation of INI files with distribution rules

โ†’
โš™๏ธ

Rule Processing

The SKSE plugin reads and processes the rules automatically

โ†’
๐Ÿ”„

Presets Update

Safe modification of the OBody JSON file

โ†’
โœ…

Changes Application

The presets are applied in the game automatically

Data Flow

The system reads INI files with distribution rules, processes them through the SKSE plugin, updates the OBody JSON files safely, and applies the changes preserving the integrity of existing data.

Operational Flowcharts

It is a visual representation of how the mod works and how actions are gradually implemented. This section is extensive and not necessary to understand the mod; if you are a normal user of the mod, the INI files will suffice. However, if you want to know more about how the project is improving, you can read these flowcharts. I tend to use them a lot in all my projects.

โœจ Show/Hide Flowchart v1.6.0

โœจ Flowchart v1.6.0: This is the first public version. Although it has proven stable for beta testers, we plan to enhance the backup system in upcoming releases. The workflow is straightforward: it begins by reviewing the INI files, then checks for the JSON file, applies the necessary changes, verifies the structure, and performs a simple backup if this option is enabled in the configuration INI.

flowchart TD A[๐Ÿš€ SKSE Plugin Load Game starts] --> B[๐Ÿ“ Basic Initialization
GetDocumentsPath + GetGamePath
CreateDirectoryIfNotExists] B --> C[โš™๏ธ Read Backup Config INI
ReadBackupConfigFromIni
Create if not exists with Backup=1] C --> D[๐Ÿ” BASIC JSON Check
Simple existence check] D --> E{โ“ Master JSON
Exists?} E -->|NO| F[โŒ END PROCESS
JSON Not Found
WITHOUT automatic restore] E -->|YES| G{๐Ÿ”„ Backup
Config?} G -->|Backup=1| H[๐Ÿ’พ BASIC Backup
PerformJsonBackup] G -->|Backup=0| I[๐Ÿ“– Read Existing JSON
ReadCompleteJson
Basic parseOrderedPlugins] H --> J[โœ๏ธ Update INI
UpdateBackupConfigInIni
Backup = 0] J --> I I --> K{โœ… JSON Read
readSuccess?} K -->|NO| L[โŒ END PROCESS
JSON READ FAILED
WITHOUT recovery system] K -->|YES| M[๐Ÿ“‚ Scan Data Folder
directory_iterator
OBodyNG_PDA_*.ini] M --> N[๐Ÿ“ Process INI Rules
Basic ParseRuleLine
Add/Remove Presets/Plugins
Simple counts] N --> O[๐Ÿ”ข Update INI Counts
UpdateIniRuleCount
Basic decrement] O --> P[๐Ÿ“Š Basic Log Summary
Simple statistics
Rules/Files/Presets] P --> Q[๐Ÿ—๏ธ Update JSON
UpdateJsonSelectively
Basic preserve original] Q --> R[๐Ÿ’พ BASIC Write
Direct write to file] R --> S{โœ… Write
Successful?} S -->|NO| T[โŒ WRITE ERROR
WITHOUT backup restore
Process failed] S -->|YES| U[๐Ÿ” BASIC FORMAT
PrettyPrintJson
Simple indentation] U --> V{๐Ÿ“ Format
Applied?} V -->|NO| W[โœ๏ธ BASIC REFORMAT
4 simple spaces
WITHOUT isEmptyBlock helper] V -->|YES| X[โœ… Basic JSON Complete
Simple format applied] W --> Y{โœ… Basic
Reformat OK?} Y -->|NO| Z[โŒ FORMAT ERROR
Process with warnings] Y -->|YES| X X --> AA[๐Ÿ“Š Basic Final Log
Process completed
Basic JSON formatting] Z --> AA T --> AA AA --> BB[๐Ÿ’ฌ Basic Console Message
OBody Assistant: Basic process completed!] BB --> CC[๐Ÿ END: Basic Process Complete
JSON with simple format] F --> DD[๐Ÿ END: JSON Not Found
WITHOUT automatic recovery
CONTACT MODDER OR REINSTALL!] L --> EE[๐Ÿ END: Read Error] %% Styles classDef startEnd fill:#e1f5fe,stroke:#01579b,stroke-width:3px,color:#333 classDef process fill:#f3e5f5,stroke:#4a148c,stroke-width:2px,color:#333 classDef decision fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#333 classDef error fill:#ffebee,stroke:#b71c1c,stroke-width:2px,color:#333 classDef backup fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px,color:#333 classDef basicFeature fill:#f5f5f5,stroke:#616161,stroke-width:2px,color:#333 classDef logFeature fill:#f1f8e9,stroke:#558b2f,stroke-width:2px,color:#333 class A,CC,DD,EE startEnd class B,C,I,M,N,O,P,Q,R process class E,G,K,S,V,Y decision class F,L,T,Z error class H,J backup class D,U,W,X basicFeature class AA,BB logFeature
๐Ÿงฐ Show/Hide Flowchart v1.7.0

๐Ÿงฐ Flowchart v1.7.0: This new version was created to improve the backup system, featuring more elaborate logic, structure analysis, and automatic restoration. It was designed to handle exceptionally large templates, including master JSON files exceeding 7,000 lines. As one of the first versions to incorporate this level of logical review, the process is swift when everything runs smoothly. However, if any issues are detected, the system will automatically create and restore from backups to ensure data integrity.

flowchart TD A[๐Ÿš€ SKSE Plugin Load Game starts] --> B[๐Ÿ“ Secure Initialization
GetDocumentsPath + GetGamePath
CreateDirectoryIfNotExists] B --> C[โš™๏ธ Read Backup Config INI
ReadBackupConfigFromIni
Create if not exists with Backup=1] C --> D[๐Ÿ” SIMPLE JSON Validation
PerformSimpleJsonIntegrityCheck
Structure, balance, OBody keys] D --> E{โ“ Master JSON
Valid?} E -->|NO| F[โŒ END PROCESS
Corrupt JSON - CRITICAL ERROR
No automatic restore in V1.7.2] E -->|YES| G{๐Ÿ”„ Backup
Config?} G -->|Backup=1| H[๐Ÿ’พ LITERAL Backup
PerformLiteralJsonBackup
Byte-by-byte copy] G -->|Backup=true| H1[๐Ÿ’พ LITERAL Backup
Always Active Mode
Do not update INI] G -->|Backup=0/false| I[๐Ÿ“– Read Master JSON
ReadCompleteJson
Parse 8 valid keys] H --> J[โœ๏ธ Update INI
UpdateBackupConfigInIni
Backup = 0] H1 --> K[โ„น๏ธ Keep INI
Backup = true without changes] J --> I K --> I I --> L{โœ… JSON Read
readSuccess?} L -->|NO| M[๐Ÿ”„ Restore from Backup
RestoreJsonFromBackup
Manual restoration attempt] M --> N[๐Ÿ“ Move Corrupted
MoveCorruptedJsonToAnalysis
Unique timestamp โ†’ Analysis] N --> O[๐Ÿ”„ Retry Read
ReadCompleteJson] O --> P{โœ… Read OK
after restore?} P -->|NO| Q[โŒ END PROCESS
JSON READ FAILED] P -->|YES| R[๐Ÿ“‚ Scan Data Folder
directory_iterator
OBodyNG_PDA_*.ini] L -->|YES| R R --> S[๐Ÿ“ Process INI Rules
ParseRuleLine + validKeys
Add/Remove Presets/Plugins
Dynamic counts] S --> T[๐Ÿ”ข Update INI Counts
UpdateIniRuleCount
Automatic decrement] T --> U[๐Ÿ“Š Detailed Log Summary
Complete statistics
Rules/Files/Presets/Plugins] U --> V[๐Ÿ—๏ธ Preserve Original
PreserveOriginalSections
Update only modified keys
Exact 4-space format] V --> W[๐Ÿ’พ ATOMIC Write
WriteJsonAtomically
.tmp file + PerformTripleValidation] W --> X{โœ… Write
Successful?} X -->|NO| Y[๐Ÿ”„ Restore Backup
RestoreJsonFromBackup
Write failure] X -->|YES| Z[๐Ÿ” INDENTATION CORRECTION
CorrectJsonIndentation
Basic - WITHOUT advanced detection] Z --> AA{๐Ÿ“ Indentation
Already Correct?} AA -->|YES| BB[โœ… JSON Already Perfect
4 basic spaces
Without advanced multi-line detection] AA -->|NO| CC[โœ๏ธ BASIC REFORMAT
4 spaces per level
Without advanced isEmptyBlock helper] CC --> DD{โœ… Basic
Reformat Complete?} DD -->|NO| EE[๐Ÿ”„ Restore Backup
Indentation correction failure] DD -->|YES| FF[๐Ÿ” Final TRIPLE Validation
PerformTripleValidation
Structure + Integrity + Keys] BB --> FF FF --> GG{โœ… Final JSON
Valid?} GG -->|NO| HH[๐Ÿ”„ Restore Backup
+ Forensic Analysis
MoveCorruptedJsonToAnalysis] GG -->|YES| II[๐Ÿ“Š Final Log Success
Process completed successfully
Basic 4-space formatting] Y --> JJ[๐Ÿ“Š Log Backup Restore
JSON restored after write failure] EE --> KK[๐Ÿ“Š Log Backup Restore
JSON restored after indent failure] HH --> LL[๐Ÿ“Š Log Critical Error
Could not restore from backup] JJ --> II KK --> II LL --> II II --> MM[๐Ÿ’ฌ Console Message
OBody Assistant: Process completed!] MM --> NN[๐Ÿ END: Process Complete
JSON with basic format
4-space hierarchy without optimizations] F --> OO[๐Ÿ END: Corrupt JSON
Without automatic restore
CONTACT MODDER OR REINSTALL!] Q --> PP[๐Ÿ END: Critical Error
JSON read failed] %% Styles classDef startEnd fill:#e1f5fe,stroke:#01579b,stroke-width:3px,color:#333 classDef process fill:#f3e5f5,stroke:#4a148c,stroke-width:2px,color:#333 classDef decision fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#333 classDef error fill:#ffebee,stroke:#b71c1c,stroke-width:2px,color:#333 classDef backup fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px,color:#333 classDef basicFeature fill:#e8eaf6,stroke:#5c6bc0,stroke-width:2px,color:#333 classDef logFeature fill:#f1f8e9,stroke:#558b2f,stroke-width:2px,color:#333 class A,NN,OO,PP startEnd class B,C,I,R,S,T,U,V,W process class E,G,L,P,X,AA,DD,GG decision class F,Q,Y,EE,HH error class H,H1,J,K,M,N backup class D,Z,CC,FF,BB basicFeature class II,JJ,KK,LL,MM logFeature
โฉ Show/Hide Flowchart v1.7.5

โฉ Flowchart v1.7.5: This is the fifth revision of version 1.7. Although the previous version performed its function perfectly, we decided to further enhance the structure, simplify some messages to prevent confusion, and include a 3-step reading and structure analysis. Additionally, a more advanced method for modifying and incorporating rules has been implemented. The entire procedure, while seemingly extensive, executes in a fraction of a second, ensuring it is both fast and robust. This level of polish was achieved thanks to the valuable feedback from our beta testers.

flowchart TD A[๐Ÿš€ SKSE Plugin Load Game starts] --> B[๐Ÿ“ Secure Initialization
GetDocumentsPath + GetGamePath
CreateDirectoryIfNotExists] B --> C[โš™๏ธ Read Backup Config INI
ReadBackupConfigFromIni
Create if not exists with Backup=1] C --> D[๐Ÿ” SIMPLE JSON Validation
PerformSimpleJsonIntegrityCheck
Structure, balance, OBody keys] D --> E{โ“ Master JSON
Valid?} E -->|YES| G{๐Ÿ”„ Backup
Config?} E -->|NO| F1[๐Ÿ”„ AUTOMATIC RESTORE
RestoreJsonFromBackup
Attempt to recover from backup] F1 --> F2{โœ… Restoration
Successful?} F2 -->|YES| F3[๐Ÿ“Š Log: JSON Restored
Continue normal process] F2 -->|NO| F[โŒ END PROCESS
Corrupt JSON without valid backup
CRITICAL ERROR + recommended actions] F3 --> G G -->|Backup=1| H[๐Ÿ’พ LITERAL Backup
PerformLiteralJsonBackup
Byte-by-byte copy to Backup_OBody_DPA] G -->|Backup=true| H1[๐Ÿ’พ LITERAL Backup
Always Active Mode
Do not update INI โ†’ Backup_OBody_DPA] G -->|Backup=0/false| I[๐Ÿ“– Read Master JSON
ReadCompleteJson
Parse 8 valid keys] H --> J[โœ๏ธ Update INI
UpdateBackupConfigInIni
Backup = 0] H1 --> K[โ„น๏ธ Keep INI
Backup = true without changes] J --> I K --> I I --> L{โœ… JSON Read
readSuccess?} L -->|NO| M[๐Ÿ”„ Restore from Backup
RestoreJsonFromBackup
Backup_OBody_DPA] M --> N[๐Ÿ“ Move Corrupted
MoveCorruptedJsonToAnalysis
Unique timestamp โ†’ Analysis] N --> O[๐Ÿ”„ Retry Read
ReadCompleteJson] O --> P{โœ… Read OK
after restore?} P -->|NO| Q[โŒ END PROCESS
JSON READ FAILED] P -->|YES| R[๐Ÿ“‚ Scan Data Folder
directory_iterator
OBodyNG_PDA_*.ini] L -->|YES| R R --> S[๐Ÿ“ Process INI Rules
ParseRuleLine + validKeys
Add/Remove Presets/Plugins
Dynamic counts] S --> T[๐Ÿ”ข Update INI Counts
UpdateIniRuleCount
Automatic decrement] T --> U[๐Ÿ“Š Detailed Log Summary
Complete statistics
Rules/Files/Presets/Plugins] U --> V[๐Ÿ—๏ธ Preserve Original
PreserveOriginalSections
Update only modified keys
Exact 4-space format] V --> W[๐Ÿ’พ ATOMIC Write
WriteJsonAtomically
.tmp file + PerformTripleValidation] W --> X{โœ… Write
Successful?} X -->|NO| Y[๐Ÿ”„ Restore Backup
RestoreJsonFromBackup
Write failure] X -->|YES| Z[๐Ÿ” INDENTATION CORRECTION
CorrectJsonIndentation
Detect Multi-line Empty Containers] Z --> AA{๐Ÿ“ Indentation
Already Correct?} AA -->|YES| BB[โœ… JSON Already Perfect
4 spaces + inline empty
Multi-line empty detection] AA -->|NO| CC[โœ๏ธ FULL REFORMAT
isEmptyBlock Helper
Empty containers inline
With content 4 spaces] CC --> DD{๐Ÿ”ง isEmptyBlock
Multi-line + inline?} DD -->|Empty Container| EE[๐Ÿ“ Write inline
containers or arrays same line] DD -->|With Data| FF[๐Ÿ“ Standard format
4 spaces per level] EE --> GG[๐Ÿ”„ Continue parsing
Next container] FF --> GG GG --> HH{โœ… Reformat
Complete?} HH -->|NO| II[๐Ÿ”„ Restore Backup
Indentation correction failure] HH -->|YES| JJ[๐Ÿ” Final TRIPLE Validation
PerformTripleValidation
Structure + Integrity + Keys] BB --> JJ JJ --> KK{โœ… Final JSON
Valid?} KK -->|NO| LL[๐Ÿ”„ Restore Backup
+ Forensic Analysis
MoveCorruptedJsonToAnalysis] KK -->|YES| MM[๐Ÿ“Š Final Log Success
Process completed successfully
Perfect 4-space formatting] Y --> NN[๐Ÿ“Š Log Backup Restore
JSON restored after write failure] II --> OO[๐Ÿ“Š Log Backup Restore
JSON restored after indent failure] LL --> PP[๐Ÿ“Š Log Critical Error
Could not restore from backup] NN --> MM OO --> MM PP --> MM MM --> QQ[๐Ÿ’ฌ Console Message
OBody Assistant: Process completed!] QQ --> RR[๐Ÿ END: Process Complete
JSON with perfect format
Inline empty + 4-space hierarchy
Folder: Backup_OBody_DPA] F --> SS[๐Ÿ END: Corrupt JSON
No valid backup available
CONTACT MODDER OR REINSTALL!] Q --> TT[๐Ÿ END: Critical Error
JSON read failed] %% Styles classDef startEnd fill:#e1f5fe,stroke:#01579b,stroke-width:3px,color:#333 classDef process fill:#f3e5f5,stroke:#4a148c,stroke-width:2px,color:#333 classDef decision fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#333 classDef error fill:#ffebee,stroke:#b71c1c,stroke-width:2px,color:#333 classDef backup fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px,color:#333 classDef newFeature fill:#e3f2fd,stroke:#0277bd,stroke-width:3px,color:#333 classDef inlineFeature fill:#fff9c4,stroke:#f57f17,stroke-width:3px,color:#333 classDef logFeature fill:#f1f8e9,stroke:#558b2f,stroke-width:2px,color:#333 classDef autoRestore fill:#e8eaf6,stroke:#3f51b5,stroke-width:3px,color:#333 class A,RR,SS,TT startEnd class B,C,I,R,S,T,U,V,W process class E,G,L,P,X,AA,DD,HH,KK,F2 decision class F,Q,Y,II,LL error class H,H1,J,K,M,N backup class D,Z,CC,JJ newFeature class EE,FF,GG,BB inlineFeature class MM,NN,OO,PP,QQ,F3 logFeature class F1 autoRestore
๐Ÿš€ Show/Hide Flowchart v1.7.12

๐Ÿš€ Flowchart v1.7.12: This is likely the final and most polished revision of the 1.7 branch, designed to be exceptionally fail-proof. Its logic is engineered to prevent all types of issues by first initializing and verifying the environment. The process continues by reading the INI rules, checking the integrity of the master JSON, and then performing a backup. It re-verifies if new rules need to be applied, leaving the master JSON untouched if no changes are necessary. This is followed by a 3-step structural review, a method that minimizes direct modifications to the JSON, preventing file corruption by only writing when explicitly required. The entire operation is extremely fast, executing in less than a second, and supports highly complex JSON files, even those exceeding 7,000 lines or 50 MBโ€”a scale we don't anticipate being common. Following this release, development will focus on version 1.8, which will introduce rules for automatic blacklisting and is expected in a few months.

flowchart TD A[๐Ÿš€ SKSE Plugin Load Game starts] --> B[๐Ÿ“ Secure Initialization
GetDocumentsPath + GetGamePath
CreateDirectoryIfNotExists] B --> C[โš™๏ธ Read Backup Config INI
ReadBackupConfigFromIni
Create if not exists with Backup=1] C --> D[๐Ÿ” SIMPLE JSON Validation
PerformSimpleJsonIntegrityCheck
Structure, balance, OBody keys] D --> E{โ“ Master JSON
Valid?} E -->|YES| G{๐Ÿ”„ Backup
Config?} E -->|NO| F1[๐Ÿ”„ AUTOMATIC RESTORE
RestoreJsonFromBackup
Attempt to recover from backup] F1 --> F2{โœ… Restoration
Successful?} F2 -->|YES| F3[๐Ÿ“Š Log: JSON Restored
Continue normal process] F2 -->|NO| F[โŒ END PROCESS
Corrupt JSON without valid backup
CRITICAL ERROR + recommended actions] F3 --> G G -->|Backup=1| H[๐Ÿ’พ LITERAL Backup
PerformLiteralJsonBackup
Byte-by-byte copy to Backup_OBody_DPA] G -->|Backup=true| H1[๐Ÿ’พ LITERAL Backup
Always Active Mode
Do not update INI โ†’ Backup_OBody_DPA] G -->|Backup=0/false| I[๐Ÿ“– Read Master JSON
ReadCompleteJson
Parse 8 valid keys] H --> J[โœ๏ธ Update INI
UpdateBackupConfigInIni
Backup = 0] H1 --> K[โ„น๏ธ Keep INI
Backup = true without changes] J --> I K --> I I --> L{โœ… JSON Read
readSuccess?} L -->|NO| M[๐Ÿ”„ Restore from Backup
RestoreJsonFromBackup
Backup_OBody_DPA] M --> N[๐Ÿ“ Move Corrupted
MoveCorruptedJsonToAnalysis
Unique timestamp โ†’ Analysis] N --> O[๐Ÿ”„ Retry Read
ReadCompleteJson] O --> P{โœ… Read OK
after restore?} P -->|NO| Q[โŒ END PROCESS
JSON READ FAILED] P -->|YES| R[๐Ÿ“‚ Scan Data Folder
directory_iterator
OBodyNG_PDA_*.ini] L -->|YES| R R --> S[๐Ÿ“ Process INI Rules
ParseRuleLine + validKeys
Add/Remove Presets/Plugins
Dynamic counts] S --> T[๐Ÿ”ข Update INI Counts
UpdateIniRuleCount
Automatic decrement] T --> U[๐Ÿ“Š Detailed Log Summary
Complete statistics
Rules/Files/Presets/Plugins] U --> V[๐Ÿ—๏ธ Preserve Original
PreserveOriginalSections
Update only modified keys
Exact 4-space format] V --> VV{๐Ÿ” VERIFY CHANGES
Needed?} VV -->|YES| W[๐Ÿ’พ ATOMIC Write
WriteJsonAtomically
.tmp file + PerformTripleValidation] VV -->|NO| Z[๐Ÿ” INDENTATION CORRECTION
CorrectJsonIndentation
Detect Multi-line Empty Containers] W --> X{โœ… Write
Successful?} X -->|NO| Y[๐Ÿ”„ Restore Backup
RestoreJsonFromBackup
Write failure] X -->|YES| Z Z --> AA{๐Ÿ“ Indentation
Already Correct?} AA -->|YES| BB[โœ… JSON Already Perfect
4 spaces + inline empty
Multi-line empty detection] AA -->|NO| CC[โœ๏ธ FULL REFORMAT
isEmptyBlock Helper
Empty containers inline
With content 4 spaces] CC --> DD{๐Ÿ”ง isEmptyBlock
Multi-line + inline?} DD -->|Empty Container| EE[๐Ÿ“ Write inline
containers or arrays same line] DD -->|With Data| FF[๐Ÿ“ Standard format
4 spaces per level] EE --> GG[๐Ÿ”„ Continue parsing
Next container] FF --> GG GG --> HH{โœ… Reformat
Complete?} HH -->|NO| II[๐Ÿ”„ Restore Backup
Indentation correction failure] HH -->|YES| JJ[๐Ÿ” Final TRIPLE Validation
PerformTripleValidation
Structure + Integrity + Keys] BB --> JJ JJ --> KK{โœ… Final JSON
Valid?} KK -->|NO| LL[๐Ÿ”„ Restore Backup
+ Forensic Analysis
MoveCorruptedJsonToAnalysis] KK -->|YES| MM[๐Ÿ“Š Final Log Success
Process completed successfully
Perfect 4-space formatting] Y --> NN[๐Ÿ“Š Log Backup Restore
JSON restored after write failure] II --> OO[๐Ÿ“Š Log Backup Restore
JSON restored after indent failure] LL --> PP[๐Ÿ“Š Log Critical Error
Could not restore from backup] NN --> MM OO --> MM PP --> MM MM --> QQ[๐Ÿ’ฌ Console Message
OBody Assistant: Process completed!] QQ --> RR[๐Ÿ END: Process Complete
JSON with perfect format
Inline empty + 4-space hierarchy
Folder: Backup_OBody_DPA] F --> SS[๐Ÿ END: Corrupt JSON
No valid backup available
CONTACT MODDER OR REINSTALL!] Q --> TT[๐Ÿ END: Critical Error
JSON read failed] %% Styles classDef startEnd fill:#e1f5fe,stroke:#01579b,stroke-width:3px,color:#333 classDef process fill:#f3e5f5,stroke:#4a148c,stroke-width:2px,color:#333 classDef decision fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#333 classDef error fill:#ffebee,stroke:#b71c1c,stroke-width:2px,color:#333 classDef backup fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px,color:#333 classDef newFeature fill:#e3f2fd,stroke:#0277bd,stroke-width:3px,color:#333 classDef inlineFeature fill:#fff9c4,stroke:#f57f17,stroke-width:3px,color:#333 classDef logFeature fill:#f1f8e9,stroke:#558b2f,stroke-width:2px,color:#333 classDef autoRestore fill:#e8eaf6,stroke:#3f51b5,stroke-width:3px,color:#333 classDef verification fill:#fce4ec,stroke:#ad1457,stroke-width:3px,color:#333 class A,RR,SS,TT startEnd class B,C,I,R,S,T,U,V,W process class E,G,L,P,X,AA,DD,HH,KK,F2,VV decision class F,Q,Y,II,LL error class H,H1,J,K,M,N backup class D,Z,CC,JJ newFeature class EE,FF,GG,BB inlineFeature class MM,NN,OO,PP,QQ,F3 logFeature class F1 autoRestore class VV verification
๐Ÿ’ƒ Show/Hide Flowchart v2.2.5

๐Ÿ’ƒ Flowchart v2.2.5: Version 2.2.5 adds a Smart Cleaning system with 6 levels of intelligent preset matching (exact, decoded, normalized, filename, normalized map, variations) that automatically detects incorrect or missing preset names and corrects or removes them as appropriate, with protection lists for critical presets like "Zeroed Sliders". THIS IS COMPLETELY CONFIGURABLE IN THE MOD'S CONFIGURATION INI. It incorporates automatic UBE preset detection through XML file analysis that identifies conflicting groups (3BA/3BBB/CBBE) and automatically distributes 22 UBE races (11 base + 11 vampire), adding presets to blacklist and races based on whether they have "UBE" in the name or not, with an exclusion list for special presets. It generates three specialized logs: Doctor.log lists all XMLs found in the BodySlide folder, SmartCleaning.log shows extracted internal names and filename-to-internal mappings, and Helper.log includes random usage examples with user presets and complete list separated into NORMAL vs UBE categories. It adds granular configuration through 5 independent flags (presetsSmartCleaning, blacklistedPresetsSmartCleaningFromRandomDistribution, blacklistedPresetsSmartCleaningFromAll, outfitsForceReSmartCleaning, modeUBE) that control cleaning behavior by section. It implements automatic truncation of preset names at ; and , delimiters, replacement of generic "CustomPreset" with real filename, improved multi-language support with triple fallback UTF-8โ†’CP_ACPโ†’ASCII safe, and deep XML information extraction with HTML entity decoding {which for some reasons presets use and took me a long time to realize, hahaha.

flowchart TD A[๐Ÿš€ SKSE Plugin Load] --> B[๐Ÿ“ Secure Initialization
GetDocumentsPath + GetGamePath
CreateDirectoryIfNotExists] B --> C[โš™๏ธ Read Config INI
ReadConfigFromIni
Backup, ModeUBE, Smart Cleaning flags] C --> D[๐Ÿ” SIMPLE JSON Validation
PerformSimpleJsonIntegrityCheck
Structure, balance, OBody keys] D --> E{โ“ Master JSON
Valid?} E -->|YES| G{๐Ÿ”„ Backup
Config?} E -->|NO| F1[๐Ÿ”„ AUTOMATIC RESTORE
RestoreJsonFromBackup
Attempt recovery from backup] F1 --> F2{โœ… Restoration
Successful?} F2 -->|YES| F3[๐Ÿ“Š Log: JSON Restored
Continue normal process] F2 -->|NO| F[โŒ END PROCESS
CRITICAL ERROR
No valid backup available] F3 --> G G -->|Backup=1| H[๐Ÿ’พ LITERAL Backup
PerformLiteralJsonBackup
Byte-by-byte copy] G -->|Backup=true| H1[๐Ÿ’พ LITERAL Backup
Always Active Mode
Keep INI unchanged] G -->|Backup=0/false| I[๐Ÿ“– Read Master JSON
ReadCompleteJson
Parse all valid keys] H --> J[โœ๏ธ Update INI
Backup = 0] H1 --> K[โ„น๏ธ Keep INI
Backup = true unchanged] J --> I K --> I I --> L{โœ… JSON Read
Success?} L -->|NO| M[๐Ÿ”„ Restore from Backup
RestoreJsonFromBackup] M --> N[๐Ÿ“ Move Corrupted
MoveCorruptedJsonToAnalysis
Timestamp โ†’ Analysis] N --> O[๐Ÿ”„ Retry Read
ReadCompleteJson] O --> P{โœ… Read OK
after restore?} P -->|NO| Q[โŒ END PROCESS
JSON READ FAILED] P -->|YES| R[๐Ÿ“‚ Scan Data Folder
OBodyNG_PDA_*.ini files] L -->|YES| R R --> DD[๐Ÿ“‹ Generate Doctor Log
GenerateDoctorLog
List all XML files found] DD --> S[๐Ÿ—๏ธ Build Preset Map
BuildPresetNameMap
Extract internal names from XML] S --> SS[๐Ÿ“‹ Generate Smart Cleaning Log
GenerateSmartCleaningLog
Preset reference list] SS --> T[๐Ÿ“ Process INI Rules
ParseRuleLine
Add/Remove Presets/Plugins] T --> U[๐Ÿ”ข Update INI Counts
UpdateIniRuleCount
Automatic decrement] U --> V[๐Ÿงน Smart Cleaning
PerformSmartCleaning
Intelligent preset matching] V --> V1{๐Ÿ›ก๏ธ Smart Cleaning
Enabled?} V1 -->|YES| V2[๐Ÿ” Match Presets
FindPresetMatch
6-level matching algorithm] V2 --> V3[โœ‚๏ธ Remove Non-Existent
๐Ÿ”ง Correct Preset Names
๐Ÿ“Š Log Missing Presets] V1 -->|NO| W V3 --> W[๐ŸŽฎ UBE XML Scan
ProcessUBEXmlPresets
Detect UBE + conflicts] W --> W1{๐Ÿ” UBE Groups
Found?} W1 -->|YES| W2[๐Ÿ“Š Analyze XML Groups
AnalyzeXmlGroups
Detect 3BA/3BBB/CBBE conflicts] W2 --> W3{โš ๏ธ Conflict
Detected?} W3 -->|YES + UBE in name| W4[โœ… Add to Blacklist + Races
Allow in UBE races] W3 -->|YES + NO UBE in name| W5[โœ… Add to Blacklist ONLY
Exclude from UBE races] W3 -->|NO Conflict| W6[โœ… Add to Blacklist + Races
Pure UBE preset] W1 -->|NO| X W4 --> X[๐ŸŽฏ Apply UBE to JSON
ApplyUBEPresetsToJson
Blacklist + 22 UBE Races] W5 --> X W6 --> X X --> Y[๐Ÿ“‹ Generate Helper Log
GenerateHelperLog
Preset list + INI examples] Y --> Z[๐Ÿ—๏ธ Preserve Original
PreserveOriginalSections
Update only modified keys] Z --> ZZ{๐Ÿ” VERIFY CHANGES
CheckIfChangesNeeded?} ZZ -->|YES| AA[๐Ÿ’พ ATOMIC Write
WriteJsonAtomically
.tmp + PerformTripleValidation] ZZ -->|NO| BB[โ„น๏ธ Skip Write
No changes detected] AA --> CC{โœ… Write
Successful?} CC -->|NO| YY[๐Ÿ”„ Restore Backup
Write failure] CC -->|YES| DD1[๐Ÿ” INDENTATION CORRECTION
CorrectJsonIndentation
4-space hierarchy] BB --> DD1 DD1 --> EE{๐Ÿ“ Indentation
Correct?} EE -->|YES| FF[โœ… JSON Already Perfect
4 spaces verified] EE -->|NO| GG[โœ๏ธ FULL REFORMAT
4 spaces per level
Empty containers inline] GG --> HH{โœ… Reformat
Complete?} HH -->|NO| II[๐Ÿ”„ Restore Backup
Indentation failure] HH -->|YES| JJ[๐Ÿ” Final TRIPLE Validation
PerformTripleValidation
Structure + Keys] FF --> JJ JJ --> KK{โœ… Final JSON
Valid?} KK -->|NO| LL[๐Ÿ”„ Restore Backup
+ Forensic Analysis] KK -->|YES| MM[๐Ÿ“Š Final Log Summary
Complete statistics
All operations logged] YY --> NN[๐Ÿ“Š Log Backup Restore] II --> OO[๐Ÿ“Š Log Backup Restore] LL --> PP[๐Ÿ“Š Log Critical Error] NN --> MM OO --> MM PP --> MM MM --> QQ[๐Ÿ’ฌ Console Message
OBody Assistant: Process completed!] QQ --> RR[๐Ÿ END: Success
Perfect 4-space format
Doctor/Helper/SmartCleaning logs generated
UBE presets distributed] F --> SS1[๐Ÿ END: Critical Error] Q --> TT[๐Ÿ END: JSON Read Failed] %% Styles classDef startEnd fill:#e1f5fe,stroke:#01579b,stroke-width:3px,color:#333 classDef process fill:#f3e5f5,stroke:#4a148c,stroke-width:2px,color:#333 classDef decision fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#333 classDef error fill:#ffebee,stroke:#b71c1c,stroke-width:2px,color:#333 classDef backup fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px,color:#333 classDef newFeature fill:#e3f2fd,stroke:#0277bd,stroke-width:3px,color:#333 classDef smartCleaning fill:#fff9c4,stroke:#f57f17,stroke-width:3px,color:#333 classDef ubeFeature fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px,color:#333 classDef logFeature fill:#f1f8e9,stroke:#558b2f,stroke-width:2px,color:#333 class A,RR,SS1,TT startEnd class B,C,I,R,T,U,Z,AA process class E,G,L,P,CC,EE,HH,KK,F2,ZZ,V1,W1,W3 decision class F,Q,YY,II,LL error class H,H1,J,K,M,N backup class D,DD1,GG,JJ newFeature class V,V1,V2,V3,SS smartCleaning class W,W1,W2,W3,W4,W5,W6,X ubeFeature class DD,SS,Y,MM,NN,OO,PP,QQ,F3 logFeature
๐Ÿ”ฅ Show/Hide Flowchart v2.4.1

๐Ÿ”ฅ Flowchart v2.4.1: This version introduces comprehensive HIMBO support alongside UBE, bringing the total to 44 UBE races (22 UBE + 22 HIMBO), intelligent conflict resolution system that automatically detects and resolves rule conflicts based on file modification timestamps, 43 different rule modes including KeyWord, KeyWordChart, KeyAuthor with filter, exclusive, and removal variants, INI Analysis Log generation that provides detailed statistics of all INI files, multi-preset extraction from single XML files, and enhanced smart cleaning with independent flags for each JSON section.

flowchart TD A[๐Ÿš€ SKSE Plugin Load - Version 2.4.1] --> B[๐Ÿ“ Secure Initialization
GetDocumentsPath + GetGamePath
CreateDirectoryIfNotExists] B --> C[โš™๏ธ Read Config INI
ReadConfigFromIni
Backup, ModeUBE, ModeHIMBO
Smart Cleaning flags
Conflict Resolution flag] C --> D[๐Ÿ” SIMPLE JSON Validation
PerformSimpleJsonIntegrityCheck
Structure, balance, OBody keys] D --> E{โ“ Master JSON
Valid?} E -->|YES| G{๐Ÿ”„ Backup
Config?} E -->|NO| F1[๐Ÿ”„ AUTOMATIC RESTORE
RestoreJsonFromBackup
Attempt recovery from backup] F1 --> F2{โœ… Restoration
Successful?} F2 -->|YES| F3[๐Ÿ“Š Log: JSON Restored
Continue normal process] F2 -->|NO| F[โŒ END PROCESS
CRITICAL ERROR
No valid backup available] F3 --> G G -->|Backup=1| H[๐Ÿ’พ LITERAL Backup
PerformLiteralJsonBackup
Byte-by-byte copy] G -->|Backup=true/2| H1[๐Ÿ’พ LITERAL Backup
Always Active Mode
Keep INI unchanged] G -->|Backup=0/false| I[๐Ÿ“– Read Master JSON
ReadCompleteJson
Parse all valid keys] H --> J[โœ๏ธ Update INI
Backup = 0] H1 --> K[โ„น๏ธ Keep INI
Backup = true unchanged] J --> I K --> I I --> L{โœ… JSON Read
Success?} L -->|NO| M[๐Ÿ”„ Restore from Backup
RestoreJsonFromBackup] M --> N[๐Ÿ“ Move Corrupted
MoveCorruptedJsonToAnalysis
Timestamp โ†’ Analysis] N --> O[๐Ÿ”„ Retry Read
ReadCompleteJson] O --> P{โœ… Read OK
after restore?} P -->|NO| Q[โŒ END PROCESS
JSON READ FAILED] P -->|YES| R[๐Ÿ“‚ Scan Data Folder
OBodyNG_PDA_*.ini files] L -->|YES| R R --> R1[๐Ÿ“‹ Generate INI Analysis Log
GenerateINIAnalysisLog
Scan all INI files + statistics] R1 --> DD[๐Ÿ“‹ Generate Doctor Log
GenerateDoctorLog
List all XML files found] DD --> S[๐Ÿ—๏ธ Build Preset Map
BuildPresetNameMap
Extract internal names from XML
Multi-preset support + HTML entity decoding] S --> SS[๐Ÿ“‹ Generate Smart Cleaning Log
GenerateSmartCleaningLog
Preset reference list + mapping] SS --> T[๐Ÿ“ Parse & Prioritize INI Rules
ParseRuleLine + GetRulePriority
Sort by priority: Standard โ†’ Filter โ†’ Remove โ†’ Exclusive] T --> T1{๐Ÿ” Detect
Conflicts?} T1 -->|YES| T2[๐Ÿšจ Track Exclusive Conflicts
RuleConflictTracker
File modification timestamps] T1 -->|NO| U T2 --> T3{โš™๏ธ Smart Resolution
Enabled?} T3 -->|YES| T4[๐Ÿ”ง Resolve Conflicts
ResolveConflicts
Newest file wins โ†’ Update older count to 0] T3 -->|NO| T5[โš ๏ธ Skip All Conflicting Rules
Log conflicts only] T4 --> T6[๐Ÿ“‹ Generate Conflict Report
GenerateConflictReport
Detailed resolution log] T5 --> T6 T6 --> U U[๐ŸŽฏ Process INI Rules
Apply by priority order
Add/Remove Presets/Plugins
Support 43 rule modes] U --> U1[๐Ÿ”‘ Process KEY Filtering Modes
KeyWord/KeyWordChart/KeyAuthor
KeyNormal/KeyUBE/KeyHIMBO
With asterisk, dash, 1 variants] U1 --> U2[๐Ÿ“Š Update INI Counts
UpdateIniRuleCount
Automatic decrement for ONCE modes] U2 --> V[๐Ÿงน Smart Cleaning Evaluation
Check enabled flags per section] V --> V1{๐Ÿ›ก๏ธ Presets
Smart Cleaning?} V1 -->|YES| V2A[๐Ÿ” Clean General Presets
6-level matching algorithm
Protected presets exemption] V1 -->|NO| V3A V2A --> V3A{๐Ÿ›ก๏ธ Blacklisted Presets
FromRandomDistribution?} V3A -->|YES| V4A[๐Ÿ” Clean Blacklist Random
PerformSmartCleaning] V3A -->|NO| V5A V4A --> V5A{๐Ÿ›ก๏ธ Blacklisted Presets
FromAll?} V5A -->|YES| V6A[๐Ÿ” Clean All Blacklists
PerformSmartCleaning] V5A -->|NO| V7A V6A --> V7A{๐Ÿ›ก๏ธ OutfitsForceRe
Smart Cleaning?} V7A -->|YES| V8A[๐Ÿ” Clean Outfits ForceRefit
PerformSmartCleaning] V7A -->|NO| W V8A --> W W[๐ŸŽฎ UBE/HIMBO XML Processing
ProcessUBEXmlPresets + ProcessHIMBOXmlPresets
Multi-preset extraction] W --> W1{๐Ÿ” ModeUBE
Enabled?} W1 -->|YES| W2[๐Ÿ“Š Analyze UBE XMLs
AnalyzeXmlGroups
Detect 3BA/3BBB/CBBE conflicts] W1 -->|NO| W9 W2 --> W3{โš ๏ธ UBE Conflict
Detected?} W3 -->|YES + UBE in name| W4[โœ… Add to Blacklist + UBE Races
Allow in 22 UBE races] W3 -->|YES + NO UBE in name| W5[โœ… Add to Blacklist ONLY
Exclude from UBE races] W3 -->|NO Conflict| W6[โœ… Add to Blacklist + UBE Races
Pure UBE preset] W4 --> W7 W5 --> W7 W6 --> W7 W7[๐ŸŽฏ Apply UBE to JSON
Blacklist + 22 UBE Races] W7 --> W9 W9{๐Ÿ” ModeHIMBO
Enabled?} W9 -->|YES| W10[๐Ÿ“Š Analyze HIMBO XMLs
AnalyzeXmlGroups
Detect conflicts] W9 -->|NO| X W10 --> W11{โš ๏ธ HIMBO Conflict
Detected?} W11 -->|YES + HIMBO in name| W12[โœ… Add to Blacklist + HIMBO Races
Allow in 22 HIMBO races] W11 -->|YES + NO HIMBO in name| W13[โœ… Add to Blacklist ONLY
Exclude from HIMBO races] W11 -->|NO Conflict| W14[โœ… Add to Blacklist + HIMBO Races
Pure HIMBO preset] W12 --> W15 W13 --> W15 W14 --> W15 W15[๐ŸŽฏ Apply HIMBO to JSON
Blacklist + 22 HIMBO races] W15 --> X X[๐Ÿ“‹ Generate Helper Log
GenerateHelperLog
Preset lists + INI examples
NORMAL vs UBE vs HIMBO categorization] X --> Z[๐Ÿ—๏ธ Preserve Original
PreserveOriginalSections
Update only modified keys
Exact 4-space format] Z --> ZZ{๐Ÿ” VERIFY CHANGES
CheckIfChangesNeeded?} ZZ -->|YES| AA[๐Ÿ’พ ATOMIC Write
WriteJsonAtomically
.tmp + PerformTripleValidation] ZZ -->|NO| BB[โ„น๏ธ Skip Write
No changes detected] AA --> CC{โœ… Write
Successful?} CC -->|NO| YY[๐Ÿ”„ Restore Backup
Write failure] CC -->|YES| DD1[๐Ÿ” INDENTATION CORRECTION
CorrectJsonIndentation
4-space hierarchy + inline empty] BB --> DD1 DD1 --> EE{๐Ÿ“ Indentation
Correct?} EE -->|YES| FF[โœ… JSON Already Perfect
4 spaces verified] EE -->|NO| GG[โœ๏ธ FULL REFORMAT
isEmptyBlock Helper
Empty containers inline
With content 4 spaces] GG --> HH{โœ… Reformat
Complete?} HH -->|NO| II[๐Ÿ”„ Restore Backup
Indentation failure] HH -->|YES| JJ[๐Ÿ” Final TRIPLE Validation
PerformTripleValidation
Structure + Keys] FF --> JJ JJ --> KK{โœ… Final JSON
Valid?} KK -->|NO| LL[๐Ÿ”„ Restore Backup
+ Forensic Analysis] KK -->|YES| MM[๐Ÿ“Š Final Log Summary
Complete statistics
All operations logged
INI Analysis/Doctor/Helper/SmartCleaning logs] YY --> NN[๐Ÿ“Š Log Backup Restore] II --> OO[๐Ÿ“Š Log Backup Restore] LL --> PP[๐Ÿ“Š Log Critical Error] NN --> MM OO --> MM PP --> MM MM --> QQ[๐Ÿ’ฌ Console Message
OBody Assistant v2.4.1: Process completed!] QQ --> RR[๐Ÿ END: Success
Perfect 4-space format
4 logs generated
UBE + HIMBO distributed
43 rule modes supported
Conflict resolution applied] F --> SS1[๐Ÿ END: Critical Error] Q --> TT[๐Ÿ END: JSON Read Failed] %% Styles classDef startEnd fill:#e1f5fe,stroke:#01579b,stroke-width:3px,color:#333 classDef process fill:#f3e5f5,stroke:#4a148c,stroke-width:2px,color:#333 classDef decision fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#333 classDef error fill:#ffebee,stroke:#b71c1c,stroke-width:2px,color:#333 classDef backup fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px,color:#333 classDef newFeature fill:#e3f2fd,stroke:#0277bd,stroke-width:3px,color:#333 classDef smartCleaning fill:#fff9c4,stroke:#f57f17,stroke-width:3px,color:#333 classDef ubeFeature fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px,color:#333 classDef himboFeature fill:#e1bee7,stroke:#6a1b9a,stroke-width:3px,color:#333 classDef logFeature fill:#f1f8e9,stroke:#558b2f,stroke-width:2px,color:#333 classDef conflictFeature fill:#ffccbc,stroke:#d84315,stroke-width:3px,color:#333 classDef keyFeature fill:#b2dfdb,stroke:#00695c,stroke-width:3px,color:#333 class A,RR,SS1,TT startEnd class B,C,I,R,Z,AA process class E,G,L,P,CC,EE,HH,KK,F2,ZZ,V1,V3A,V5A,V7A,W1,W3,W9,W11,T1,T3 decision class F,Q,YY,II,LL error class H,H1,J,K,M,N backup class D,DD1,GG,JJ newFeature class V,V2A,V4A,V6A,V8A,SS smartCleaning class W,W2,W3,W4,W5,W6,W7 ubeFeature class W10,W11,W12,W13,W14,W15 himboFeature class DD,R1,SS,X,MM,NN,OO,PP,QQ,F3 logFeature class T2,T4,T5,T6 conflictFeature class T,U,U1,U2 keyFeature
๐Ÿ“œ Show/Hide Flowchart v2.4.9 and v2.5.1

๐Ÿ“œ Flowchart v2.4.9 and v2.5.1: This version introduces 5-log generation system with new INI Analysis Log for detailed file statistics, dynamic INI auto-update that decrements ONCE mode counters in real-time, Master Preset Map for centralized preset validation, enhanced automatic conflict resolution that modifies older INI files by setting conflicts to 0, comprehensive HIMBO support alongside UBE with 44 body races (22 UBE + 22 HIMBO), 43 rule modes including KeyWord variants with filter and exclusive options, outfit smart cleaning bypass system, multi-preset XML extraction, and independent cleaning flags per JSON section. Revision 2.5.1 is the same mod, I just cleaned up a lot of the loose code I left and some improvements in repetition and loops, minimal ones.

flowchart TD A[๐Ÿš€ SKSE Plugin Load - Version 2.4.9] --> B[๐Ÿ“ Secure Initialization
GetDocumentsPath + GetGamePath
CreateDirectoryIfNotExists] B --> C[โš™๏ธ Read Config INI
ReadConfigFromIni
Backup, ModeUBE, ModeHIMBO
Smart Cleaning flags
Conflict Resolution flag] C --> D[๐Ÿ” SIMPLE JSON Validation
PerformSimpleJsonIntegrityCheck
Structure, balance, OBody keys] D --> E{โ“ Master JSON
Valid?} E -->|YES| G{๐Ÿ”„ Backup
Config?} E -->|NO| F1[๐Ÿ”„ AUTOMATIC RESTORE
RestoreJsonFromBackup
Attempt recovery from backup] F1 --> F2{โœ… Restoration
Successful?} F2 -->|YES| F3[๐Ÿ“Š Log: JSON Restored
Continue normal process] F2 -->|NO| F[โŒ END PROCESS
CRITICAL ERROR
No valid backup available] F3 --> G G -->|Backup=1| H[๐Ÿ’พ LITERAL Backup
PerformLiteralJsonBackup
Byte-by-byte copy] G -->|Backup=true/2| H1[๐Ÿ’พ LITERAL Backup
Always Active Mode
Keep INI unchanged] G -->|Backup=0/false| I[๐Ÿ“– Read Master JSON
ReadCompleteJson
Parse all valid keys] H --> J[โœ๏ธ Update INI
Backup = 0] H1 --> K[โ„น๏ธ Keep INI
Backup = true unchanged] J --> I K --> I I --> L{โœ… JSON Read
Success?} L -->|NO| M[๐Ÿ”„ Restore from Backup
RestoreJsonFromBackup] M --> N[๐Ÿ“ Move Corrupted
MoveCorruptedJsonToAnalysis
Timestamp โ†’ Analysis] N --> O[๐Ÿ”„ Retry Read
ReadCompleteJson] O --> P{โœ… Read OK
after restore?} P -->|NO| Q[โŒ END PROCESS
JSON READ FAILED] P -->|YES| R[๐Ÿ“‚ Scan Data Folder
OBodyNG_PDA_*.ini files] L -->|YES| R R --> R0[๐Ÿ“‹ ๐Ÿ†• Generate INI Analysis Log
GenerateINIAnalysisLog
Scan all INI files
Line-by-line rule detection
Statistics per file] R0 --> R1[๐Ÿ“‹ Generate Doctor Log
GenerateDoctorLog
List all XML files found] R1 --> DD[๐Ÿ—๏ธ ๐Ÿ†• Build MASTER Preset Map
BuildPresetNameMap
Phase 1: Master reference
Extract internal names from XML
Multi-preset support + HTML decoding] DD --> SS[๐Ÿ“‹ Generate Smart Cleaning Log
GenerateSmartCleaningLog
Preset reference list + mapping] SS --> SSS[๐Ÿ“‹ Generate Helper Log
GenerateHelperLog
Complete preset list + examples] SSS --> T[๐Ÿ“ Parse & Prioritize INI Rules
ParseRuleLine + GetRulePriority
Sort by priority: Standard โ†’ Filter โ†’ Remove โ†’ Exclusive] T --> T1{๐Ÿ” Detect
Conflicts?} T1 -->|YES| T2[๐Ÿšจ Track Exclusive Conflicts
RuleConflictTracker
File modification timestamps] T1 -->|NO| U T2 --> T3{โš™๏ธ Smart Resolution
Enabled?} T3 -->|YES| T4[๐Ÿ”ง ๐Ÿ†• Resolve Conflicts Automatically
ResolveConflicts
Newest file wins โ†’ Update older count to 0
UpdateIniRuleCount for disabled rules] T3 -->|NO| T5[โš ๏ธ Skip All Conflicting Rules
Log conflicts only] T4 --> T6[๐Ÿ“‹ ๐Ÿ†• Generate Conflict Report
GenerateConflictReport
Append to INI Analysis Log
Detailed resolution + timestamps] T5 --> T6 T6 --> U U[๐ŸŽฏ Process INI Rules
Apply by priority order
Add/Remove Presets/Plugins
Support 43 rule modes] U --> U1[๐Ÿ”‘ Process KEY Filtering Modes
KeyWord/KeyWordChart/KeyAuthor
KeyNormal/KeyUBE/KeyHIMBO
With asterisk, dash, 1 variants] U1 --> U2[๐Ÿ“Š ๐Ÿ†• Update INI Counts Dynamically
UpdateIniRuleCount
Automatic decrement for ONCE modes
Write back to INI files in real-time] U2 --> V[๐Ÿงน Smart Cleaning Evaluation
Check enabled flags per section
Using Master Preset Map] V --> V1{๐Ÿ›ก๏ธ Presets
Smart Cleaning?} V1 -->|YES| V2A[๐Ÿ” Clean General Presets
6-level matching algorithm
Protected presets exemption
Master Map validation] V1 -->|NO| V3A V2A --> V3A{๐Ÿ›ก๏ธ Blacklisted Presets
FromRandomDistribution?} V3A -->|YES| V4A[๐Ÿ” Clean Blacklist Random
PerformSmartCleaning] V3A -->|NO| V5A V4A --> V5A{๐Ÿ›ก๏ธ Blacklisted Presets
FromAll?} V5A -->|YES| V6A[๐Ÿ” Clean All Blacklists
PerformSmartCleaning] V5A -->|NO| V7A V6A --> V7A{๐Ÿ›ก๏ธ OutfitsForceRe
Smart Cleaning?} V7A -->|YES| V8A[๐Ÿ” Clean Outfits ForceRefit
PerformSmartCleaning
๐Ÿ†• BYPASSED: Preserved as-is] V7A -->|NO| W V8A --> W W[๐ŸŽฎ UBE/HIMBO XML Processing
ProcessUBEXmlPresets + ProcessHIMBOXmlPresets
Multi-preset extraction] W --> W1{๐Ÿ” ModeUBE
Enabled?} W1 -->|YES| W2[๐Ÿ“Š Analyze UBE XMLs
AnalyzeXmlGroups
Detect 3BA/3BBB/CBBE conflicts] W1 -->|NO| W9 W2 --> W3{โš ๏ธ UBE Conflict
Detected?} W3 -->|YES + UBE in name| W4[โœ… Add to Blacklist + UBE Races
Allow in 22 UBE races] W3 -->|YES + NO UBE in name| W5[โœ… Add to Blacklist ONLY
Exclude from UBE races] W3 -->|NO Conflict| W6[โœ… Add to Blacklist + UBE Races
Pure UBE preset] W4 --> W7 W5 --> W7 W6 --> W7 W7[๐ŸŽฏ Apply UBE to JSON
Blacklist + 22 UBE Races] W7 --> W9 W9{๐Ÿ” ModeHIMBO
Enabled?} W9 -->|YES| W10[๐Ÿ“Š Analyze HIMBO XMLs
AnalyzeXmlGroups
Detect conflicts] W9 -->|NO| X W10 --> W11{โš ๏ธ HIMBO Conflict
Detected?} W11 -->|YES + HIMBO in name| W12[โœ… Add to Blacklist + HIMBO Races
Allow in 22 HIMBO races] W11 -->|YES + NO HIMBO in name| W13[โœ… Add to Blacklist ONLY
Exclude from HIMBO races] W11 -->|NO Conflict| W14[โœ… Add to Blacklist + HIMBO Races
Pure HIMBO preset] W12 --> W15 W13 --> W15 W14 --> W15 W15[๐ŸŽฏ Apply HIMBO to JSON
Blacklist + 22 HIMBO races] W15 --> X X[๐Ÿ—๏ธ Preserve Original
PreserveOriginalSections
Update only modified keys
Exact 4-space format] X --> ZZ{๐Ÿ” VERIFY CHANGES
CheckIfChangesNeeded?} ZZ -->|YES| AA[๐Ÿ’พ ATOMIC Write
WriteJsonAtomically
.tmp + PerformTripleValidation] ZZ -->|NO| BB[โ„น๏ธ Skip Write
No changes detected] AA --> CC{โœ… Write
Successful?} CC -->|NO| YY[๐Ÿ”„ Restore Backup
Write failure] CC -->|YES| DD1[๐Ÿ” INDENTATION CORRECTION
CorrectJsonIndentation
4-space hierarchy + inline empty] BB --> DD1 DD1 --> EE{๐Ÿ“ Indentation
Correct?} EE -->|YES| FF[โœ… JSON Already Perfect
4 spaces verified] EE -->|NO| GG[โœ๏ธ FULL REFORMAT
isEmptyBlock Helper
Empty containers inline
With content 4 spaces] GG --> HH{โœ… Reformat
Complete?} HH -->|NO| II[๐Ÿ”„ Restore Backup
Indentation failure] HH -->|YES| JJ[๐Ÿ” Final TRIPLE Validation
PerformTripleValidation
Structure + Keys] FF --> JJ JJ --> KK{โœ… Final JSON
Valid?} KK -->|NO| LL[๐Ÿ”„ Restore Backup
+ Forensic Analysis] KK -->|YES| MM[๐Ÿ“Š ๐Ÿ†• Final Log Summary
Complete statistics
All operations logged
4 logs generated:
- INI Analysis NEW
- Doctor
- Smart Cleaning
- Helper] YY --> NN[๐Ÿ“Š Log Backup Restore] II --> OO[๐Ÿ“Š Log Backup Restore] LL --> PP[๐Ÿ“Š Log Critical Error] NN --> MM OO --> MM PP --> MM MM --> QQ[๐Ÿ’ฌ Console Message
OBody Assistant v2.4.9: Process completed!] QQ --> RR[๐Ÿ END: Success
Perfect 4-space format
๐Ÿ†• 5 logs generated:
- Main Log
- INI Analysis NEW
- Doctor
- Smart Cleaning
- Helper
๐Ÿ†• INI auto-update for ONCE modes
๐Ÿ†• Smart Conflict Resolution
UBE + HIMBO distributed
43 rule modes supported] F --> SS1[๐Ÿ END: Critical Error] Q --> TT[๐Ÿ END: JSON Read Failed] %% Styles classDef startEnd fill:#e1f5fe,stroke:#01579b,stroke-width:3px,color:#333 classDef process fill:#f3e5f5,stroke:#4a148c,stroke-width:2px,color:#333 classDef decision fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#333 classDef error fill:#ffebee,stroke:#b71c1c,stroke-width:2px,color:#333 classDef backup fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px,color:#333 classDef newFeature fill:#e3f2fd,stroke:#0277bd,stroke-width:3px,color:#333 classDef smartCleaning fill:#fff9c4,stroke:#f57f17,stroke-width:3px,color:#333 classDef ubeFeature fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px,color:#333 classDef himboFeature fill:#e1bee7,stroke:#6a1b9a,stroke-width:3px,color:#333 classDef logFeature fill:#f1f8e9,stroke:#558b2f,stroke-width:2px,color:#333 classDef conflictFeature fill:#ffccbc,stroke:#d84315,stroke-width:3px,color:#333 classDef keyFeature fill:#b2dfdb,stroke:#00695c,stroke-width:3px,color:#333 classDef newv249Feature fill:#fff3e0,stroke:#ff6f00,stroke-width:4px,color:#333,font-weight:bold class A,RR,SS1,TT startEnd class B,C,I,R,X,AA process class E,G,L,P,CC,EE,HH,KK,F2,ZZ,V1,V3A,V5A,V7A,W1,W3,W9,W11,T1,T3 decision class F,Q,YY,II,LL error class H,H1,J,K,M,N backup class D,DD1,GG,JJ newFeature class V,V2A,V4A,V6A,V8A smartCleaning class W,W2,W3,W4,W5,W6,W7 ubeFeature class W10,W11,W12,W13,W14,W15 himboFeature class R1,SS,SSS,MM,NN,OO,PP,QQ,F3 logFeature class T2,T5,T6 conflictFeature class T,U,U1 keyFeature class R0,DD,U2,T4,V8A newv249Feature
๐Ÿต Show/Hide Flowchart v2.7.3

๐Ÿต Flowchart v2.7.3: This version introduces MCM-ready activation system with Control INI monitoring via startAct1 boolean flag for external trigger support enabling dynamic reactivation cycles, HIMBO selective cleaning by INI pre-scan that detects male races with explicit INI rules (raceMale = NordRace|...) and performs targeted automatic HIMBO preset removal only from those detected races while preserving all 22 automatic HIMBO distributions intact for races without custom INI rules, and new PHASE 3.3 integration with PreScanMaleRacesInINI and CleanHIMBOFromSpecificMaleRaces functions executing between conflict resolution and rule application phases.

flowchart TD A[๐Ÿš€ SKSE Plugin Load - Version 2.7.3] --> B[๐Ÿ“ Secure Initialization
GetDocumentsPath + GetGamePath
CreateDirectoryIfNotExists] B --> C[โš™๏ธ Read Config INI
ReadConfigFromIni
Backup, ModeUBE, ModeHIMBO
Smart Cleaning flags
Conflict Resolution flag] C --> D[๐Ÿ” SIMPLE JSON Validation
PerformSimpleJsonIntegrityCheck
Structure, balance, OBody keys] D --> E{โ“ Master JSON
Valid?} E -->|YES| G{๐Ÿ”„ Backup
Config?} E -->|NO| F1[๐Ÿ”„ AUTOMATIC RESTORE
RestoreJsonFromBackup
Attempt recovery from backup] F1 --> F2{โœ… Restoration
Successful?} F2 -->|YES| F3[๐Ÿ“Š Log: JSON Restored
Continue normal process] F2 -->|NO| F[โŒ END PROCESS
CRITICAL ERROR
No valid backup available] F3 --> G G -->|Backup=1| H[๐Ÿ’พ LITERAL Backup
PerformLiteralJsonBackup
Byte-by-byte copy] G -->|Backup=true/2| H1[๐Ÿ’พ LITERAL Backup
Always Active Mode
Keep INI unchanged] G -->|Backup=0/false| I[๐Ÿ“– Read Master JSON
ReadCompleteJson
Parse all valid keys] H --> J[โœ๏ธ Update INI
Backup = 0] H1 --> K[โ„น๏ธ Keep INI
Backup = true unchanged] J --> I K --> I I --> L{โœ… JSON Read
Success?} L -->|NO| M[๐Ÿ”„ Restore from Backup
RestoreJsonFromBackup] M --> N[๐Ÿ“ Move Corrupted
MoveCorruptedJsonToAnalysis
Timestamp โ†’ Analysis] N --> O[๐Ÿ”„ Retry Read
ReadCompleteJson] O --> P{โœ… Read OK
after restore?} P -->|NO| Q[โŒ END PROCESS
JSON READ FAILED] P -->|YES| R[๐Ÿ“‚ Scan Data Folder
OBodyNG_PDA_*.ini files] L -->|YES| R R --> R0[๐Ÿ“‹ ๐Ÿ†• Generate INI Analysis Log
GenerateINIAnalysisLog
Scan all INI files
Line-by-line rule detection
Statistics per file] R0 --> R1[๐Ÿ“‹ Generate Doctor Log
GenerateDoctorLog
List all XML files found] R1 --> DD[๐Ÿ—๏ธ ๐Ÿ†• Build MASTER Preset Map
BuildPresetNameMap
Phase 1: Master reference
Extract internal names from XML
Multi-preset support + HTML decoding] DD --> SS[๐Ÿ“‹ Generate Smart Cleaning Log
GenerateSmartCleaningLog
Preset reference list + mapping] SS --> SSS[๐Ÿ“‹ Generate Helper Log
GenerateHelperLog
Complete preset list + examples] SSS --> T[๐Ÿ“ Parse & Prioritize INI Rules
ParseRuleLine + GetRulePriority
Sort by priority: Standard โ†’ Filter โ†’ Remove โ†’ Exclusive] T --> T1{๐Ÿ” Detect
Conflicts?} T1 -->|YES| T2[๐Ÿšจ Track Exclusive Conflicts
RuleConflictTracker
File modification timestamps] T1 -->|NO| T7 T2 --> T3{โš™๏ธ Smart Resolution
Enabled?} T3 -->|YES| T4[๐Ÿ”ง ๐Ÿ†• Resolve Conflicts Automatically
ResolveConflicts
Newest file wins โ†’ Update older count to 0
UpdateIniRuleCount for disabled rules] T3 -->|NO| T5[โš ๏ธ Skip All Conflicting Rules
Log conflicts only] T4 --> T6[๐Ÿ“‹ ๐Ÿ†• Generate Conflict Report
GenerateConflictReport
Append to INI Analysis Log
Detailed resolution + timestamps] T5 --> T6 T6 --> T7 T7[๐Ÿ” ๐Ÿ†• PHASE 3.3: Pre-Scan Male Races
PreScanMaleRacesInINI
Detect raceMale with INI rules] T7 --> T8{โ“ Male Races
with INI Rules?} T8 -->|YES| T9[๐Ÿงน ๐Ÿ†• Selective HIMBO Cleaning
CleanHIMBOFromSpecificMaleRaces
Remove HIMBO only from detected races
Other races preserve all HIMBO] T8 -->|NO| U T9 --> U U[๐ŸŽฏ Process INI Rules
Apply by priority order
Add/Remove Presets/Plugins
Support 43 rule modes] U --> U1[๐Ÿ”‘ Process KEY Filtering Modes
KeyWord/KeyWordChart/KeyAuthor
KeyNormal/KeyUBE/KeyHIMBO
With asterisk, dash, 1 variants] U1 --> U2[๐Ÿ“Š ๐Ÿ†• Update INI Counts Dynamically
UpdateIniRuleCount
Automatic decrement for ONCE modes
Write back to INI files in real-time] U2 --> V[๐Ÿงน Smart Cleaning Evaluation
Check enabled flags per section
Using Master Preset Map] V --> V1{๐Ÿ›ก๏ธ Presets
Smart Cleaning?} V1 -->|YES| V2A[๐Ÿ” Clean General Presets
6-level matching algorithm
Protected presets exemption
Master Map validation] V1 -->|NO| V3A V2A --> V3A{๐Ÿ›ก๏ธ Blacklisted Presets
FromRandomDistribution?} V3A -->|YES| V4A[๐Ÿ” Clean Blacklist Random
PerformSmartCleaning] V3A -->|NO| V5A V4A --> V5A{๐Ÿ›ก๏ธ Blacklisted Presets
FromAll?} V5A -->|YES| V6A[๐Ÿ” Clean All Blacklists
PerformSmartCleaning] V5A -->|NO| V7A V6A --> V7A{๐Ÿ›ก๏ธ OutfitsForceRe
Smart Cleaning?} V7A -->|YES| V8A[๐Ÿ” Clean Outfits ForceRefit
PerformSmartCleaning
๐Ÿ†• BYPASSED: Preserved as-is] V7A -->|NO| W V8A --> W W[๐ŸŽฎ UBE/HIMBO XML Processing
ProcessUBEXmlPresets + ProcessHIMBOXmlPresets
Multi-preset extraction] W --> W1{๐Ÿ” ModeUBE
Enabled?} W1 -->|YES| W2[๐Ÿ“Š Analyze UBE XMLs
AnalyzeXmlGroups
Detect 3BA/3BBB/CBBE conflicts] W1 -->|NO| W9 W2 --> W3{โš ๏ธ UBE Conflict
Detected?} W3 -->|YES + UBE in name| W4[โœ… Add to Blacklist + UBE Races
Allow in 22 UBE races] W3 -->|YES + NO UBE in name| W5[โœ… Add to Blacklist ONLY
Exclude from UBE races] W3 -->|NO Conflict| W6[โœ… Add to Blacklist + UBE Races
Pure UBE preset] W4 --> W7 W5 --> W7 W6 --> W7 W7[๐ŸŽฏ Apply UBE to JSON
Blacklist + 22 UBE Races] W7 --> W9 W9{๐Ÿ” ModeHIMBO
Enabled?} W9 -->|YES| W10[๐Ÿ“Š Analyze HIMBO XMLs
AnalyzeXmlGroups
Detect conflicts] W9 -->|NO| X W10 --> W11{โš ๏ธ HIMBO Conflict
Detected?} W11 -->|YES + HIMBO in name| W12[โœ… Add to Blacklist + HIMBO Races
Allow in 22 HIMBO races] W11 -->|YES + NO HIMBO in name| W13[โœ… Add to Blacklist ONLY
Exclude from HIMBO races] W11 -->|NO Conflict| W14[โœ… Add to Blacklist + HIMBO Races
Pure HIMBO preset] W12 --> W15 W13 --> W15 W14 --> W15 W15[๐ŸŽฏ Apply HIMBO to JSON
Blacklist + 22 HIMBO races] W15 --> X X[๐Ÿ—๏ธ Preserve Original
PreserveOriginalSections
Update only modified keys
Exact 4-space format] X --> ZZ{๐Ÿ” VERIFY CHANGES
CheckIfChangesNeeded?} ZZ -->|YES| AA[๐Ÿ’พ ATOMIC Write
WriteJsonAtomically
.tmp + PerformTripleValidation] ZZ -->|NO| BB[โ„น๏ธ Skip Write
No changes detected] AA --> CC{โœ… Write
Successful?} CC -->|NO| YY[๐Ÿ”„ Restore Backup
Write failure] CC -->|YES| DD1[๐Ÿ” INDENTATION CORRECTION
CorrectJsonIndentation
4-space hierarchy + inline empty] BB --> DD1 DD1 --> EE{๐Ÿ“ Indentation
Correct?} EE -->|YES| FF[โœ… JSON Already Perfect
4 spaces verified] EE -->|NO| GG[โœ๏ธ FULL REFORMAT
isEmptyBlock Helper
Empty containers inline
With content 4 spaces] GG --> HH{โœ… Reformat
Complete?} HH -->|NO| II[๐Ÿ”„ Restore Backup
Indentation failure] HH -->|YES| JJ[๐Ÿ” Final TRIPLE Validation
PerformTripleValidation
Structure + Keys] FF --> JJ JJ --> KK{โœ… Final JSON
Valid?} KK -->|NO| LL[๐Ÿ”„ Restore Backup
+ Forensic Analysis] KK -->|YES| MM[๐Ÿ“Š ๐Ÿ†• Final Log Summary
Complete statistics
All operations logged
5 logs generated:
- Main Log
- INI Analysis
- Doctor
- Smart Cleaning
- Helper] YY --> NN[๐Ÿ“Š Log Backup Restore] II --> OO[๐Ÿ“Š Log Backup Restore] LL --> PP[๐Ÿ“Š Log Critical Error] NN --> MM OO --> MM PP --> MM MM --> QQ[๐Ÿ’ฌ Console Message
OBody Assistant v2.7.3: Process completed!] QQ --> ZZZ{๐Ÿ” ๐Ÿ†• WIP MCM ACTIVATION?
Check Control INI exists} ZZZ -->|YES| ZZZ1[โœ๏ธ ๐Ÿ†• WIP RESET CONTROL INI
WriteControlIniValue
startAct1 = false
Ready for next activation] ZZZ -->|NO| RR ZZZ1 --> RR[๐Ÿ END: Success
Perfect 4-space format
๐Ÿ†• MCM Activation System WIP
๐Ÿ†• Selective HIMBO Cleaning
๐Ÿ†• 5 logs generated
๐Ÿ†• INI auto-update for ONCE modes
๐Ÿ†• Smart Conflict Resolution
UBE + HIMBO distributed
43 rule modes supported] F --> SS1[๐Ÿ END: Critical Error] Q --> TT[๐Ÿ END: JSON Read Failed] %% Styles classDef startEnd fill:#e1f5fe,stroke:#01579b,stroke-width:3px,color:#333 classDef process fill:#f3e5f5,stroke:#4a148c,stroke-width:2px,color:#333 classDef decision fill:#fff3e0,stroke:#e65100,stroke-width:2px,color:#333 classDef error fill:#ffebee,stroke:#b71c1c,stroke-width:2px,color:#333 classDef backup fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px,color:#333 classDef newFeature fill:#e3f2fd,stroke:#0277bd,stroke-width:3px,color:#333 classDef smartCleaning fill:#fff9c4,stroke:#f57f17,stroke-width:3px,color:#333 classDef ubeFeature fill:#f3e5f5,stroke:#7b1fa2,stroke-width:3px,color:#333 classDef himboFeature fill:#e1bee7,stroke:#6a1b9a,stroke-width:3px,color:#333 classDef logFeature fill:#f1f8e9,stroke:#558b2f,stroke-width:2px,color:#333 classDef conflictFeature fill:#ffccbc,stroke:#d84315,stroke-width:3px,color:#333 classDef keyFeature fill:#b2dfdb,stroke:#00695c,stroke-width:3px,color:#333 classDef newv273Feature fill:#ffebee,stroke:#c62828,stroke-width:4px,color:#333,font-weight:bold class A,RR,SS1,TT startEnd class B,C,I,R,X,AA process class E,G,L,P,CC,EE,HH,KK,F2,ZZ,V1,V3A,V5A,V7A,W1,W3,W9,W11,T1,T3,T8,ZZZ decision class F,Q,YY,II,LL error class H,H1,J,K,M,N backup class D,DD1,GG,JJ newFeature class V,V2A,V4A,V6A,V8A smartCleaning class W,W2,W3,W4,W5,W6,W7 ubeFeature class W10,W11,W12,W13,W14,W15 himboFeature class R1,SS,SSS,MM,NN,OO,PP,QQ,F3 logFeature class T2,T5,T6 conflictFeature class T,U,U1 keyFeature class R0,DD,U2,T4,V8A,T7,T9,ZZZ,ZZZ1 newv273Feature

Advanced Features

๐ŸŒ

Unicode Support

UTF-8 with ANSI fallbacks for international characters

๐Ÿ’พ

Automatic Backup

An automatic backup of the JSON is performed before any modification, can be configured from an ini

๐Ÿ”’

Data Preservation

Preserves existing data and order during updates

๐Ÿ“

Detailed Logging

Detailed logs for debugging and monitoring

๐ŸŽฎ

Universal Compatibility

Supports SE, AE, GOG and VR editions

๐Ÿ“Š

JSON Structure

Maintains JSON structure and element order

Security and Reliability

๐Ÿ›ก๏ธ

Backup System

Complete automatic backup before any modification:

  • Backup of the original JSON before changes
  • Support for Backup = true/false
  • Backup = 1: Performs backup once, not recommended
  • Backup = 0: Disables backup, same as false
  • File integrity verification
  • Automatic recovery in case of error
๐Ÿ”

Robust Validation

Multiple layers of validation to prevent errors:

  • Robust error handling in file processing
  • INI rule format validation
  • JSON structure verification
  • Early detection of corrupted files
๐ŸŒ

Unicode Compatibility

Full support for international characters:

  • Unicode-safe handling for all character types
  • UTF-8 encoding with ANSI fallbacks
  • Compatibility with non-ASCII paths
  • Prevention of crashes due to encoding
๐Ÿ’พ

Memory Management

Optimization and security in resource handling:

  • Safe memory management in all operations
  • Automatic resource release
  • Memory leak prevention
  • Safety limits in processing
๐Ÿ‘ฅ

Multi-Mod Support

Automatic identification of various preset mods and organization to prevent bugs:

  • CBBE
  • 3BBB
  • UBE
  • HIMBO
  • BHUNP
  • COtR

Acknowledgments

Beta Testers

Special thanks to our dedicated beta testers who helped make this project possible:

Cryshy

Cryshy

Beta review, observation of future applications

IAleX

IAleX

Beta review

Lucas

Lucas

JSON analysis and observation of corrections in ini parameters

OpheliaMoonlight

OpheliaMoonlight

Testing Unicode support, multiple betas reviewed

storm12

storm12

Mod betatester in complex mod list

Thalzamar

Thalzamar

Beta tester

iDeadSea

iDeadSea

Beta tester for COtR and multi-language analysis

AdrienMassenot

AdrienMassenot

Thanks to his observations on the HIMBO system, which led to improvements in it

Edsley

Edsley

Advisor on templates and free web addons

Triberzis

Triberzis

Advice/ideas for system modes and keys

djdunha

djdunha

Beta tester for the GOG platform, communicated through Nexus.

Additional Credits

Cryshy

Beta review: UBE users who with their help I managed to better understand the world of this type of bodies. Thanks to their observations and ideas I implemented the automation system for UBE presets in the blacklist, and default application to UBE races. With this, NPCs with UBE will no longer appear skinny by default, but will be able to have UBE presets for them from the start. Thank you very much.

Triberzis

Thanks to your observation about the use of keys, the system has been modified and implemented with a more comprehensive preset search system based on the presets installed in the player's game. Thank you very much for the idea, which has been implemented in the latest version.

Lucas, OpheliaMoonlight, Thalzamar, iDeadSea, AdrienMassenot

I thank you for testing the betas and giving me your respective observations across your different game versions and mod organizers. Thank you very much.

AdrienMassenot

Thanks to his cooperation with HIMBO system testing, which led to significant improvements in the male body preset distribution logic.

iDeadSea

Thanks to his cooperation with multiple beta tests, he provided information from his Skyrim version in Cyrillic, with which it was decided that different Skyrim versions handle different default names for each NPC depending on the language in which the game is played, so it was decided to correct these and add new functions. Thank you.

CommonLibSSE NG

Fundamental framework for developing modern SKSE plugins.

SKSE Team

For the continuous development and support of the Skyrim Script Extender.

OBody NG Team

For creating the base that makes this functionality possible.

Modding Community

For the constant feedback and ideas for improvements.

Music Skyrim

Thanks to the original authors of Skyrim for the music played directly from YouTube.

Flowchart, Whiteboard and Graphics

Thanks to Mermaid, Excalidraw and Graphics for being free and very useful tools for drawing and creating diagrams.

Project Schedule Outline

Design timeline

This is the progress of several projects I'm working on this year. I'll be uploading them as they are concluded, thanks to everyone who supports me with comments,

thanks for being so patient ๐Ÿ˜ฟ

Final Note

This project is open source MIT and available to the community. Contributions, bug reports, and suggestions are always welcome. Together we can make Skyrim a more welcoming and comfortable place.