Skip to content
dota2-kotlin-types logo

dota2-kotlin-types

Kotlin type definitions for Dota 2 VScripts (Lua) and Panorama UI.


dota2-kotlin-types provides two Kotlin libraries that give you fully-typed access to the Dota 2 scripting APIs:

  • dota-lua-types — type stubs for the Dota 2 VScript (Lua) server-side API: game entities, abilities, items, enums, events, and more.
  • dota-panorama-types — type stubs for the Dota 2 Panorama JavaScript/TypeScript UI framework: panels, game events, CSS properties, and engine events.

Both libraries are generated from the @moddota/dota-data JSON definitions and published to Maven Central.

Example project: See ktox-dota-example for a complete addon setup using ktox-dota, dota-lua-types, dota-panorama-types, and the Panorama layout DSL together.

Key Features

  • Complete type coverage — interfaces and classes for every documented Dota 2 API object.
  • Idiomatic Kotlin — native names are mapped to camelCase properties and functions; @NativeName annotations preserve the original engine names.
  • Enum safety — all integer flag enums are represented as Kotlin enum class values.
  • Event system — strongly-typed game events with EventKey<T> and data class payloads.
  • Panorama panels — typed interfaces for every Panorama panel type and CSS property.
  • Panorama classes@PanoramaView classes give Panorama panels typed child selectors, generated bootstrap wiring, and optional snippet-based XML reuse.
  • Always up to date — types are auto-generated from the upstream dota-data JSON definitions.

Quick Start

Add the dependency to your build.gradle.kts:

dependencies {
    // Dota 2 VScript (server-side Lua) types
    implementation("io.github.isycat:dota-lua-types:<version>")

    // Dota 2 Panorama UI types
    implementation("io.github.isycat:dota-panorama-types:<version>")
}

See the Usage page for detailed setup instructions, or browse the API reference in the tabs above.