How cipherxof/w3ts works
w3ts is a TypeScript API for Warcraft III custom maps. Map authors use its handle wrappers to operate on players, units, world objects, UI, and gameplay events; timer, sync, and host-detection utilities support runtime coordination. The map preserves the documented breadth of the handle API and the sampled sync/host workflow. Source evidence is uneven: unsampled subsystems are represented by exact directories, and only supported relationships are connected.
Main entry points: index.ts w3ts API · sync.ts Player sync · player.ts Players · unit.ts Units and orders
Components 19
Game handles
- Players
handles/player.ts - Units and orders
handles/unit.ts - World objects
handles - UI and scoreboards
handles - Handle identity
handles/handle.ts
Events and hooks
- Triggers
handles/trigger.ts - Script hooks
hooks/index.ts
Runtime coordination
- Timers
handles/timer.ts - Player sync
system/sync.ts - Host detection
system/host.ts - Elapsed time
system/gametime.ts
Data utilities
- Base64 codec
system/base64.ts - Binary reader
system/binaryreader.ts - Binary writer
system/binarywriter.ts - File access
system/file.ts - Color helpers
utils/color.ts
Other components
- Map author
- w3ts API
index.ts - Warcraft III runtime
Connections 29
- Map author → w3ts API: uses
README.md - w3ts API → Players: exports
index.ts - w3ts API → Units and orders: exports
index.ts - w3ts API → World objects: exports
index.ts - w3ts API → UI and scoreboards: exports
index.ts - w3ts API → Triggers: exports
index.ts - w3ts API → Player sync: exports
index.ts - w3ts API → File access: exports
index.ts - Players → Handle identity: extends
handles/player.ts - Units and orders → Handle identity: extends
handles/unit.ts - World objects → Handle identity: wraps handles
handles/unit.ts - Triggers → Handle identity: extends
handles/trigger.ts - Units and orders → Players: uses owners
handles/unit.ts - Units and orders → World objects: uses objects
handles/unit.ts - Triggers → Players: registers events
handles/trigger.ts - Triggers → Units and orders: registers events
handles/trigger.ts - Host detection → Player sync: requests sync
system/host.ts - Host detection → Players: selects host
system/host.ts - Host detection → Timers: schedules check
system/host.ts - Host detection → Script hooks: registers hook
system/host.ts - Player sync → Base64 codec: encodes packets
system/sync.ts - Player sync → Binary reader: reads packets
system/sync.ts - Player sync → Binary writer: writes packets
system/sync.ts - Player sync → Players: sends as player
system/sync.ts - Player sync → Timers: starts timeout
system/sync.ts - Player sync → Elapsed time: measures elapsed
system/sync.ts - Script hooks → Warcraft III runtime: wraps entry points
hooks/index.ts - Players → Warcraft III runtime: calls game API
- Units and orders → Warcraft III runtime: calls game API