Configuration
Configuration
Section titled “Configuration”Witness configuration is managed through JSON files in config/witness/.
Main Configuration
Section titled “Main Configuration”Location: config/witness/config.json
Structure
Section titled “Structure”{ "cinematicCamera": { "enabled": true, "defaultDistance": 8.0, "transitionSpeed": 0.05, "minDistance": 4.0, "maxDistance": 16.0 }, "mlCamera": { "enabled": false, "learningRate": 0.01, "saveInterval": 300, "minDataPoints": 100 }, "playerProtection": { "preventDamage": true, "preventHunger": true, "freezePosition": true, "hideInventory": true }, "battleFormats": { "singles": { "enabled": true, "defaultCameraProfile": "singles_standard" }, "doubles": { "enabled": true, "defaultCameraProfile": "doubles_wide" } }, "sequences": { "moveReactions": true, "damageReactions": true, "faintReactions": true }}Configuration Options
Section titled “Configuration Options”Cinematic Camera
Section titled “Cinematic Camera”- enabled: Enable/disable the cinematic camera system
- defaultDistance: Default camera distance from Pokemon (blocks)
- transitionSpeed: Speed of camera transitions (0.0-1.0)
- minDistance: Minimum camera distance
- maxDistance: Maximum camera distance
ML Camera
Section titled “ML Camera”- enabled: Enable machine learning camera adaptation
- learningRate: How quickly the system learns (0.001-0.1)
- saveInterval: Seconds between saving ML data
- minDataPoints: Minimum data points before ML activates
Player Protection
Section titled “Player Protection”- preventDamage: Prevent player damage during cinematics
- preventHunger: Prevent hunger depletion
- freezePosition: Lock player position during camera
- hideInventory: Hide inventory GUI during sequences
Battle Formats
Section titled “Battle Formats”Configure camera profiles per battle format:
{ "singles": { "enabled": true, "defaultCameraProfile": "singles_standard" }}Sequences
Section titled “Sequences”Enable/disable camera reactions:
- moveReactions: React to move usage
- damageReactions: React to damage taken
- faintReactions: React to Pokemon fainting
Camera Profiles
Section titled “Camera Profiles”Location: config/witness/camera_profiles.json
{ "singles_standard": { "name": "Singles Standard", "baseDistance": 8.0, "heightOffset": 2.0, "angleOffset": 15.0, "orbitSpeed": 0.02, "focusMode": "active_pokemon" }, "doubles_wide": { "name": "Doubles Wide", "baseDistance": 12.0, "heightOffset": 3.0, "angleOffset": 20.0, "orbitSpeed": 0.03, "focusMode": "battlefield_center" }}Profile Options
Section titled “Profile Options”- baseDistance: Default camera distance
- heightOffset: Camera height above ground
- angleOffset: Downward angle in degrees
- orbitSpeed: Speed of orbit movement
- focusMode: What the camera focuses on
active_pokemon: Focus on active Pokemonattacking_pokemon: Focus on attackerbattlefield_center: Focus on centerdynamic: ML-driven focus
Event Configuration
Section titled “Event Configuration”Location: config/witness/events.json
Configure camera reactions to specific battle events:
{ "events": [ { "trigger": "move_used", "conditions": { "moveNames": ["Thunder", "Thunderbolt", "Thunder Punch"], "moveType": "electric" }, "camera": { "sequence": "electric_impact", "duration": 60, "priority": 5 } }, { "trigger": "critical_hit", "camera": { "sequence": "zoom_impact", "duration": 40, "priority": 8 } }, { "trigger": "pokemon_faint", "camera": { "sequence": "dramatic_pan", "duration": 80, "priority": 10 } } ]}Event Triggers
Section titled “Event Triggers”Available triggers:
move_used: When a move is usedmove_hit: When a move connectsmove_miss: When a move missescritical_hit: When a critical hit occurssuper_effective: Super effective movenot_very_effective: Resisted movepokemon_faint: When a Pokemon faintspokemon_sent_out: When Pokemon enters battlebattle_start: Battle beginsbattle_end: Battle ends
Conditions
Section titled “Conditions”Filter when events trigger:
{ "conditions": { "moveNames": ["Hyper Beam", "Giga Impact"], "moveType": "normal", "minDamage": 50, "damagePercent": 0.5, "userSpecies": ["charizard", "blaziken"], "targetSpecies": [], "hpThreshold": 0.25 }}ML Configuration
Section titled “ML Configuration”Location: config/witness/ml_config.json
Advanced ML camera settings:
{ "features": { "trackPlayerPreference": true, "trackCameraQuality": true, "trackObstructions": true, "adaptToFormat": true }, "weights": { "distance": 0.3, "angle": 0.25, "height": 0.2, "orbit": 0.15, "focus": 0.1 }, "training": { "batchSize": 10, "epochs": 5, "validationSplit": 0.2 }, "quality": { "obstructionPenalty": 0.5, "boundaryPenalty": 0.3, "distancePenalty": 0.2 }}Best Practices
Section titled “Best Practices”For Performance
Section titled “For Performance”- Disable ML if not needed
- Use longer
saveIntervalon busy servers - Limit
maxDistanceon large battles
For Cinematic Quality
Section titled “For Cinematic Quality”- Lower
transitionSpeedfor smoother cameras - Enable all sequence reactions
- Use battle format-specific profiles
For Player Experience
Section titled “For Player Experience”- Enable player protection features
- Test sequences before events
- Provide opt-out command for players
Reloading Configuration
Section titled “Reloading Configuration”Reload config without restart:
/witness reload