Quick Start #

End-to-end flow for your first TekkenScript module using SDK2 (_SDK.sdk2 + Register:submit()).

1. Prerequisites #

Item Notes
TekkenScript launcher Inject / load the engine into Tekken 8
Script root x64/Release/script/ (or Debug while developing)
Editor Built-in Lua IDE (S2), VS Code, or Notepad++

2. Create the script folder #

Each script lives in its own directory; the entry file name must match the folder name.

script/scripts/QuickStartDemo/
  QuickStartDemo.lua    ← entry file (required name)
1
2

Engine loads: require('scripts.QuickStartDemo.QuickStartDemo')

3. Paste the demo #

Create QuickStartDemo.lua with the sample below. It registers a script, logs frame data, runs a simple counter on frame advantage ≥ 17, and exposes an ImGui menu.

-- script/scripts/QuickStartDemo/QuickStartDemo.lua
-- CharId 7 = Bryan; change or remove isNotCharacter for any character.

if isNotCharacter(7) then
    return
end

local sdk2 = require("_SDK.sdk2")
local enums = sdk2.enums
local Menu = sdk2.Menu

local script = sdk2.Register:New("Quick Start Demo", "\xef\x93\xbe")

local config = {
    enabled = true,
    logEvery = 120,
}
local tickCount = 0

script:onTick(function(self, enemy)
    if not config.enabled then
        return
    end
    tickCount = tickCount + 1
    if tickCount % config.logEvery == 1 then
        print("[Demo] FA=", getLocalFrameAdvantage(),
            "oppAtk=", getOpponentLastAttackType())
    end
    local fa = getLocalFrameAdvantage()
    if not isCounterAttackPossible(fa) then
        return
    end
    if fa >= 17 then
        DisableKeyboardInput()
        executeMacro(enums.Input.FORWARD, enums.Input.R_HAND, 3, enums.InputType.KEY_PRESS)
        EnableKeyboardInput()
    end
end)

script:onMenu(function()
    Menu.Begin("Quick Start Demo")
    config.enabled = Menu.checkbox("Enable demo", config.enabled)
    config.logEvery = Menu.sliderInt("Log every N frames", config.logEvery, 30, 600)
    Menu.help("Reads frame advantage each tick; demo counter on FA >= 17.")
    Menu.End()
end)

script:submit({ config = config })
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

4. Enable in game #

  1. Launch Tekken 8 with TekkenScript.
  2. Open the overlay → Scripts.
  3. Find Quick Start Demo → enable the checkbox.
  4. Open the script menu panel → toggle Enable demo / adjust sliders.

You should see [Demo] FA= lines in the engine console when logging is active.

5. Iterate (hot reload) #

  1. Edit QuickStartDemo.lua on disk and save.
  2. Toggle the script off/on in Scripts, or reload from the launcher — the engine picks up the new .lua.
  3. Use print(...) freely; output appears in the script console with file:line prefix.
Topic Link
SDK2 lifecycle (onTick / onMenu / submit) SDK2 Register
Full API reference SDK API
Paid / encrypted modules Script Encryption