World Activity System

v0.3

Debug Window Guide

Monitor, test, and optimize events with the Event Scheduler Debug Window.

Overview

The Event Scheduler Debug Window provides real-time monitoring, testing, and performance analysis for temporal events. It features 5 specialized tabs for comprehensive debugging:

Dashboard

Event status overview and quick controls

Timeline

Gantt-chart visualization with zoom controls

Performance

Cache statistics and optimization metrics

History

Event audit trail with filtering and CSV export

Tools

Manual triggers and state manipulation

Opening the Debug Window

Access the Debug Window while in Play Mode:

Unity Menu: Window → Game Creator → Event Scheduler Debug

Requirements: Window only functions in Play Mode. Enter Play Mode before opening for full functionality.

Dashboard Tab

The Dashboard provides an at-a-glance view of all events and their current states.

Features

Event List

Displays all temporal events with real-time status:

  • Inactive - Not currently running
  • Queued - Waiting to trigger
  • Active - Currently running
  • Cooldown - Cannot re-trigger yet

Quick Stats

Top of Dashboard shows:

  • Active Events: Count of currently running events
  • Queued Events: Events waiting in priority queue
  • Current Game Time: In-game time display
  • Scheduler Status: Enabled/Disabled indicator

Quick Controls

Buttons for each event:

[Details] - View full event info
[Trigger] - Force trigger event
[End] - Stop active event
[Reset] - Clear cooldown

Timeline Tab

Gantt-chart style visualization showing event schedules, durations, and conflicts.

Controls & Features

Zoom Controls

Adjust timeline scale to view different time ranges:

1x (1 hour)
2x (2 hours)
5x (5 hours)
10x (10 hours)
24x (24 hours)

Timeline Display

Visual elements:

  • Active events (currently running)
  • Scheduled events (future)
  • Past events
  • Current time marker (vertical red line)

Conflict Detection

Overlapping events on timeline indicate conflicts. Use to identify:

  • Incompatible events scheduled simultaneously
  • Resource contention (e.g., multiple merchants in same spot)
  • Priority conflicts needing adjustment

Performance Tab

Monitor scheduler performance with cache statistics and optimization metrics.

Key Metrics

MetricTargetDescription
Cache Hit Rate> 80%Percentage of checks using cached results
Total Checks-Number of prerequisite checks performed
Cached Checks-Number using cache (faster)
Uncached Checks-Number requiring full evaluation (slower)
Average Check Time< 1msMean duration for prerequisite check
Cache Size-Number of cached prerequisite results

Good Performance: Cache hit rate >80%, average check time <1ms. System is well-optimized.

Needs Optimization: Cache hit rate <60% indicates complex prerequisites. Simplify conditions or reduce event count.

History Tab

Complete audit trail of all event activity during the current play session.

Features

Event Log

Chronological log showing:

  • Timestamp: When event occurred
  • Event Name: Which event triggered
  • Action: Triggered, Completed, Failed, etc.
  • Details: Additional context (priority, duration, reason for failure)

Filtering

Filter history by:

Event Name
Action Type
Time Range
Success/Failure

CSV Export

Export complete history to CSV file for analysis in Excel/Google Sheets. Useful for identifying patterns, debugging frequency issues, and performance analysis.

Tools Tab

Manual controls for testing and debugging events during development.

Manual Controls

Force Trigger

Immediately trigger any event, bypassing prerequisites and cooldowns.

Use case: Test event behavior without waiting for natural triggers

End Event

Stop an active event immediately, executing completion callbacks.

Use case: Test event cleanup and completion logic

Reset Cooldown

Clear cooldown timer, allowing event to trigger again immediately.

Use case: Test repeatable events without waiting for cooldown

Clear Cache

Invalidate all cached prerequisite results, forcing fresh evaluation.

Use case: Test cache invalidation logic or debug stale cache issues

Time Simulation

Advance game time by 1 hour, 6 hours, or 24 hours to test time-based events.

Use case: Quickly test dawn/noon/dusk events without waiting

Common Debug Workflows

Workflow 1: Event Won't Trigger

  1. Open Dashboard tab → Check event status
  2. If "Inactive", check prerequisites in Inspector
  3. Click [Details] → Review prerequisite evaluation
  4. Go to History tab → Filter by event name
  5. Look for "Failed" entries with failure reason
  6. Fix prerequisites or use Tools tab → [Trigger] to test

Workflow 2: Optimize Performance

  1. Open Performance tab
  2. Check cache hit rate - aim for >80%
  3. If <60%, identify events with low cache hits
  4. Simplify complex prerequisites
  5. Use [Clear Cache] in Tools to reset
  6. Monitor improvement over time

Workflow 3: Balance Event Frequency

  1. Open Timeline tab → Set zoom to 24x (full day view)
  2. Observe event distribution across day
  3. Look for gaps (too infrequent) or overlaps (too frequent)
  4. Go to History tab → Export CSV
  5. Analyze trigger frequency in spreadsheet
  6. Adjust intervals/cooldowns to balance