Phase 3: Add FMOD modification guide and extraction script

- Added docs/FMOD_MODIFICATION_GUIDE_PHASE3.md with step-by-step FMOD Studio instructions
- Added tools/ExtractBanks.ps1 for automated bank extraction workflow
- Covers voice limits, ducking, enemy indicator improvements in FMOD
This commit is contained in:
2026-03-22 13:43:06 -04:00
parent 71712b834c
commit 8f162dc103
2 changed files with 367 additions and 0 deletions

View File

@@ -0,0 +1,264 @@
# Phase 3: FMOD Bank Modifications Guide
## Overview
This phase covers extracting and modifying FMOD audio banks using FMOD Studio and AssetRipper.
**Prerequisites:**
- FMOD Studio 2.02.x installed (free from fmod.com)
- AssetRipper installed
- Game installed at: `C:\apps\steam\steamapps\common\Homura Hime\`
---
## Step 1: Extract FMOD Banks with AssetRipper
### 1.1 Launch AssetRipper
```
Location: C:\projects\HomuraHime-Mods\tools\AssetRipper\AssetRipper.exe
```
### 1.2 Load HomuraHime
1. Click **File****Load** (or drag folder)
2. Navigate to: `C:\apps\steam\steamapps\common\Homura Hime\HomuraHime_Data\`
3. Select the folder and click **Open**
### 1.3 Export Settings
1. Click **File****Export**
2. Choose **Resources** (not Asset Directories)
3. Set output path: `C:\projects\HomuraHime-Mods\extracted_assets\`
### 1.4 Locate FMOD Banks
After export, find banks at:
```
C:\projects\HomuraHime-Mods\extracted_assets\StreamingAssets\FMOD\Desktop\
```
---
## Step 2: Open Banks in FMOD Studio
### 2.1 Launch FMOD Studio
```
Location: C:\Program Files\FMOD Studio\FMOD Studio.exe
```
### 2.2 Open Project (or Banks Directly)
**Option A:** If you have the original FMOD project (unlikely for commercial game):
- File → Open Project → Select `.fprojekt` file
**Option B:** Open bank files directly:
- File → Open Bank → Select `Master.bank` from the extracted folder
- FMOD will automatically load related banks
### 2.3 Bank Organization
In FMOD Studio, you'll see:
- **Events**: Sound events (grouped by banks: SFX, Ambience, BGM, Voice)
- **Audio Tables**: Banks, VCA groups, snapshots
- **Mixer**: Master output with routing
---
## Step 3: Voice Limit Improvements
### 3.1 Find Problematic Events
Search for events with high polyphony:
1. In FMOD Studio, select **SFX.bank** in the Banks panel
2. Look at event properties in the Inspector
3. Check **Maximum Instances** ( polyphony)
### 3.2 Adjust Voice Aging
For events that cause glitches:
1. Right-click event → **Properties**
2. Go to **Voices** tab
3. Settings to adjust:
```
Max Instances: 16 (from default 32)
Voice Stealing: Steal Oldest
Voice Aging: 1.0 seconds (faster cleanup)
```
### 3.3 Key Events to Check
In `SFX.bank`:
- Attack impact sounds (often triggered rapidly)
- Footstep/landing sounds (PreLoad banks)
- Enemy alert/warning sounds
- UI feedback sounds
---
## Step 4: Audio Ducking Improvements
### 4.1 Access Mixer
1. Click **Mixer** tab in FMOD Studio
2. You'll see VCA groups and the Master bus
### 4.2 Configure Ducking Groups
Look for:
- **Speech** (Voice channel)
- **SFX** (Sound effects)
- **Music** (BGM)
### 4.3 Adjust Ducking Parameters
For the Master or speech bus:
1. Right-click → **Add Effect** → **Duck**
2. Configure:
```
Threshold: -20 dB (triggers at this volume)
Rate: 100% (fade speed)
Attack: 10 ms (fast attack)
Release: 200 ms (slower release)
```
### 4.4 Create/Modify Snapshots
Snapshots control ducking behavior:
1. In the **Audio Tables** panel, select **Snapshots**
2. Find existing battle/start snapshots
3. Modify duck amounts:
```
Music Duck Amount: -12 dB (not too aggressive)
SFX Duck Amount: -6 dB
```
---
## Step 5: Enemy Behavior Indicator Improvements
### 5.1 Locate Enemy Audio Events
**In `Ambience.bank`:**
- `enemy_idle_loop` - Enemy ambient when not engaged
- `enemy_alert` - Enemy noticing player
- `enemy_chase` - Enemy pursuing
**In `SFX.bank`:**
- Attack indicator sounds
- Danger/warning cues
### 5.2 Increase Volume on Behavior Sounds
1. Find enemy-related events
2. Select the event → Inspector
3. **Volume** slider: Increase by 3-6 dB
```
Before: 0.0 dB
After: +3.0 dB to +6.0 dB
```
### 5.3 Add Pitch Variation
For more distinct enemy states:
1. Select enemy event (e.g., alert)
2. Add **Pitch** automation or randomizer
3. Set variation:
```
Center: 0 semitones
Range: ±2 semitones random
```
### 5.4 Add 3D Positioning
For directional audio:
1. Select event → **3D** checkbox
2. Configure:
```
Min Distance: 1.0 m
Max Distance: 20.0 m
Rolloff: Linear
```
3. This makes enemy sounds come from their position
### 5.5 Create State Layers
For distinct enemy behavior indicators, add parameters:
1. Right-click event → **Add Parameter**
2. Name: `EnemyState`
3. Values: `0=Idle, 1=Alert, 2=Attacking`
4. Add automation for volume/effect per state
---
## Step 6: Reimport Modified Banks
### 6.1 Save Changes
1. In FMOD Studio: **File** → **Save**
2. Banks will auto-update in the project folder
### 6.2 Export Banks
1. **File** → **Export** → **banks**
2. Choose the extracted `Desktop\` folder
3. Confirm overwrite
### 6.3 Verify Export
Check that modified `.bank` files have new timestamps.
---
## Step 7: Backup Original Banks
**CRITICAL - Before testing:**
```
mkdir "C:\projects\HomuraHime-Mods\backup_banks_original"
copy "C:\projects\HomuraHime-Mods\extracted_assets\StreamingAssets\FMOD\Desktop\*.bank"
"C:\projects\HomuraHime-Mods\backup_banks_original\"
```
---
## File Locations Reference
### Game Banks (Read-Only Backup)
```
C:\apps\steam\steamapps\common\Homura Hime\HomuraHime_Data\StreamingAssets\FMOD\Desktop\
```
### Extracted for Editing
```
C:\projects\HomuraHime-Mods\extracted_assets\StreamingAssets\FMOD\Desktop\
```
### Modified Banks (Copy to Game)
```
C:\projects\HomuraHime-Mods\modified_banks\FMOD\Desktop\
```
### Backup Original
```
C:\projects\HomuraHime-Mods\backup_banks_original\
```
---
## Banks to Prioritize
| Priority | Bank | Reason |
|----------|------|--------|
| HIGH | `SFX.bank` | Contains attack/impact sounds that glitch |
| HIGH | `Ambience.bank` | Enemy behavior indicators |
| MEDIUM | `Master.bank` | Contains mixer and routing |
| MEDIUM | `Voice.bank` | May need voice limit adjustments |
| LOW | `BGM*.bank` | Background music - less critical |
---
## Verification Checklist
After modifications:
- [ ] Banks export successfully from FMOD Studio
- [ ] New bank files are in `modified_banks\`
- [ ] Original banks backed up
- [ ] Test game loads without FMOD errors
- [ ] Audio glitches reduced in combat
- [ ] Enemy indicators more audible
---
## Next Steps
After completing FMOD modifications:
- Phase 4: BepInEx plugin deployment
- Phase 5: Testing and iteration
- Phase 6: Distribution