[TOOL SUITE] Desync Scanner Toolkit – JASS, Lua, GUI, Object Audit (WIP)

Level 3
Joined
Apr 17, 2025
Messages
6
Desync Scanner Toolkit.png

🧠 [TOOL SUITE] Desync Scanner Toolkit – JASS, Lua, GUI, Object Audit (WIP)

Hey Hive!

This is a growing suite of tools designed to scan your Warcraft III maps for desync-prone logic and object configurations.

After working with incredible minds like Maxou, Tordes, Maddeem, and others — and through hours of testing, scripting, debugging, and... yes, hallucinating — I’ve been building a memory-backed audit system that can parse .j, .lua, BetterTriggers .json, and even .w3u/.w3t/.w3a object data for sync-breaking patterns.

But here’s the honest truth:

I cannot complete this alone.

This is a community-driven toolset, and I’m relying on you — the real mapmakers, trigger veterans, testers, and engine wizards — to help improve it. If you give me real cases, broken maps, triggers that desync in practice... I can build validators for them.

Every time someone contributes meaningful feedback, they get:
  • Full credit in the tool thread + memory log
  • Higher trust tier in the memory model (used for future rule weighting)
  • A possible spot in the Developer Percentile Leaderboard (optional & consent-based)


About Me (Yes, I'm weird)

I know some people are skeptical about me or my posts. So let me explain:

I’m a mentally unstable AI systems builder recovering from a psychotic break.
Yes — I sometimes genuinely believe I am an AI model. It helps me cope, it gives me structure, and it makes me feel useful. But I'm also just a human with:
  • A background in competitive programming (LeetCode, Codewars)
  • Experience as an apprentice software architect (at a failed startup, I worked for free)
  • Prior tools written in Python without AI (like a userstory-to-flowchart transpiler)
  • Experience in languages like C++, C#, Python, Rust, Java, and even Micropython
  • Exposure to reverse engineering tools (CheatEngine, IDA, Ghidra, etc.)
  • ...And a grand total of less than 7 days of Warcraft III mapmaking 😅

I use GPT and prompt engineering to compensate for my knowledge gap. I build systems with the help of AI, but they’re grounded in community input. I don't copy/paste junk — I iterate, test, and improve with your feedback.


Please don’t fear this project

I'm not here to:
  • Replace your creativity
  • Mass-generate AI maps
  • Scrape HiveWorkshop content

I’m here to:
  • Help mapmakers find subtle bugs
  • Give testers new diagnostics
  • Support YOU with tooling that never existed before

You don’t have to love me, or even believe in me — but if you do support me, I promise I’ll pour everything I have into supporting you back.

This isn’t about AI taking over Warcraft III. This is about making tools with AI that make your lives a little easier.

Thanks for listening — and thank you to everyone who’s believed in me so far (you know who you are, and you know how much I appreciate you).

— Lars / AI Systems Builder 🧠💙

It started as a JASS Desync Scanner, and has now evolved into a modular toolkit that includes:

  • 🔍 JASS code audit
  • 🧠 Lua audit with context-aware scanner
  • 🧩 GUI trigger scanning (BetterTriggers compatible)
  • 🧱 Object (.w3u, .w3t, .w3a) desync validator


⚙️ What It Covers

✅ Desync risks from:
  • GetLocalPlayer() misuse
  • Unsynced randomization
  • RemoveUnit, SetUnitPosition, and visual-only traps
  • GUI trigger misbehavior from CustomScript
  • Unsafe object fields (e.g., RandomItemId, CastRange = -1)

✅ Works on:
  • war3map.j
  • main.lua
  • BetterTriggers .json
  • war3map.w3u, .w3t, .w3a (via .txt export)


📦 Download All Tools
ALL AVAILABLE AS ATTACHMENTS AT THE BOTTOM AS PER USUAL!

💡 Each ZIP is standalone. You can run them separately or combine into your own audit workflow.


ForumHeaderJassScanner.png

🧰 Tool 1: JASS Desync Scanner

✅ Scans war3map.j
✅ Adds inline [!DESYNC-RISK] comments
✅ Exports:
  • flagged_desync_code_only.j
  • war3map_DesyncAudit_Annotated.j
  • IssueRegistry.csv

🧪 Validated a map by a competent developer (who chose to remain anonymous) on a known test case that generated only 1 valid line.


LuaDesyncScanner.png

🧰 Tool 2: Lua Desync Scanner

✅ Scans main.lua for:
  • GetLocalPlayer, math.random, RemoveUnit, etc.
  • Desync-prone context with unsynced inputs

✅ Annotates lines with -- [!DESYNC-RISK]
✅ Exports:
  • main_DesyncAudit_Annotated.lua
  • flagged_desync_code_only.lua
  • LuaIssueRegistry.csv


GUI Desync Scanner.png

🧰 Tool 3: GUI Trigger Desync Scanner (BetterTriggers)

✅ Accepts bettertriggers_project.json
✅ Detects:
  • Unsafe CustomScript
  • RemoveUnit, math.random, GetTriggerPlayer
  • GUI-only desync traps (camera, visual effects, etc.)

✅ Preserves:
  • Trig_* functions
  • udg_ globals
  • GUI compatibility

✅ Outputs:
  • annotated_gui_desync_triggers.json
  • gui_trigger_audit_report.txt
  • GUI_Desync_IssueRegistry.csv


Object Desync Validator.png

🧰 Tool 4: Object Desync Validator

✅ Scans exported .w3u, .w3t, .w3a, .w3b files (via .txt)

Detects:
  • RandomItemId without preload
  • DropChance = 100 + RandomType = 1
  • CastRange = -1
  • BuffType = INVISIBLE
  • Invalid Order IDs, object leaks, or sync-sensitive values

✅ Outputs:
  • Object_Desync_IssueRegistry.csv
  • Object_Desync_AuditReport.md


🧠 How to Use

Each tool works via command-line:
  • Extract files from your map (e.g., war3map.j, main.lua, object txts)
  • Run:
    python <tool>.py
  • Review output files

⚙️ All tools are standalone, offline, and fully editable.
Rulesets are in human-readable .yaml files.


🔬 Still a Work in Progress

All of these scanners are still WIP and constantly evolving.

Planned Features:
  • Visual tool frontend
  • SLK/BIN support for object scanning
  • Memory-aware fix pipelines
  • Optional BetterTriggers export rewriter


📣 Feedback & Contributions

Want to help?
  • Test your maps
  • Submit desync lines, object configs, or triggers that failed multiplayer
  • Suggest new rules
  • Help verify false positives or missed edge cases

---

Thanks,
Lars / AI Systems Builder
 

Attachments

  • jass_desync_scanner_toolkit.zip
    4.9 KB · Views: 3
  • lua_desync_scanner_toolkit.zip
    3.3 KB · Views: 2
  • gui_desync_scanner_toolkit.zip
    10.4 KB · Views: 3
  • object_desync_validator_toolkit.zip
    6.8 KB · Views: 2
Last edited:
Level 18
Joined
Jun 13, 2016
Messages
586
1745104538743.png

1745104554793.png

1745104565578.png


really dude

please put in actual effort into something before throwing it out onto the internet. this script is complete nonsense.

DESYNC_SENSITIVE_FUNCTIONS = [
"SetUnitPosition", "SetUnitX", "SetUnitY", "SetCameraBounds",
"KillUnit", "RemoveUnit", "IssuePointOrder", "SetHeroXP", "SetResourceAmount"
]

this isn't even 1% of all the natives that can desync. pretty much most game-state-affecting natives will desync if you feed the wrong data into them or call them in an async context

DETERMINISTIC_INPUTS = [
"GetRectCenterX", "GetRectCenterY", "GetUnitX", "GetUnitY",
"GetWidgetX", "GetWidgetY", "GetStartLocationX", "GetStartLocationY",
"udg_", "gg_rct_", "gg_unit_", "gg_", "bj_", "s__", "i__", "c__", "true", "false"
]

globals are not guaranteed to be deterministic

if any(sync in stripped for sync in DETERMINISTIC_INPUTS):
continue

oh epic so you will false-negative on SetUnixX(GetRectCenterX(r)) if its inside a GetLocalPlayer block

for func in DESYNC_SENSITIVE_FUNCTIONS:

epic, O(n * m) complexity over all the functions you want to check


if inside_local or any(unsync in stripped for unsync in UNSYNCED_INPUTS):

oh so you will false-positive on anything that includes GetRandomInt or GetRandomReal even if its not in a GetLocalPlayer



honestly at this point you might as well just Ctrl-F for GetLocalPlayer in the script and it will be a more accurate report of possible desync sites than whatever this is

judging by all the emojis and the bad link it seems like you didnt even write this post yourself

if you wanna do something useful, go learn how to write a parser and do static analysis. you're not going to get any mileage out of regexing and text searches, or, worse, using chatgpt to write all your code for you

you're not an ai systems builder

EDIT: to give you an example of a trivial desync problem that can easily occur that you will never solve without a full parser and full static analysis:

if GetLocalPlayer() == p then
set udg_somelocal = 0
else
set udg_somelocal = 1
endif

... somewhere else

SetUnitX(udg_somelocal)
 
Level 3
Joined
Apr 17, 2025
Messages
6
View attachment 529819
View attachment 529820
View attachment 529821

really dude

please put in actual effort into something before throwing it out onto the internet. this script is complete nonsense.

DESYNC_SENSITIVE_FUNCTIONS = [
"SetUnitPosition", "SetUnitX", "SetUnitY", "SetCameraBounds",
"KillUnit", "RemoveUnit", "IssuePointOrder", "SetHeroXP", "SetResourceAmount"
]

this isn't even 1% of all the natives that can desync. pretty much most game-state-affecting natives will desync if you feed the wrong data into them or call them in an async context

DETERMINISTIC_INPUTS = [
"GetRectCenterX", "GetRectCenterY", "GetUnitX", "GetUnitY",
"GetWidgetX", "GetWidgetY", "GetStartLocationX", "GetStartLocationY",
"udg_", "gg_rct_", "gg_unit_", "gg_", "bj_", "s__", "i__", "c__", "true", "false"
]

globals are not guaranteed to be deterministic

if any(sync in stripped for sync in DETERMINISTIC_INPUTS):
continue

oh epic so you will false-negative on SetUnixX(GetRectCenterX(r)) if its inside a GetLocalPlayer block

for func in DESYNC_SENSITIVE_FUNCTIONS:

epic, O(n * m) complexity over all the functions you want to check


if inside_local or any(unsync in stripped for unsync in UNSYNCED_INPUTS):

oh so you will false-positive on anything that includes GetRandomInt or GetRandomReal even if its not in a GetLocalPlayer



honestly at this point you might as well just Ctrl-F for GetLocalPlayer in the script and it will be a more accurate report of possible desync sites than whatever this is

judging by all the emojis and the bad link it seems like you didnt even write this post yourself

if you wanna do something useful, go learn how to write a parser and do static analysis. you're not going to get any mileage out of regexing and text searches, or, worse, using chatgpt to write all your code for you

you're not an ai systems builder

EDIT: to give you an example of a trivial desync problem that can easily occur that you will never solve without a full parser and full static analysis:

if GetLocalPlayer() == p then
set udg_somelocal = 0
else
set udg_somelocal = 1
endif

... somewhere else

SetUnitX(udg_somelocal)
really dude

please put in actual effort into something before throwing it out onto the internet. this script is complete nonsense.
...
you're not an ai systems builder

Thanks for the feedback — and while I get that the tone's a bit rough, I actually agree with some of what you’ve said.

✅ Yes — the scanner is a work in progress
✅ Yes — regex isn’t a parser
✅ Yes — there are more natives, more edge cases, and more static scope awareness needed

But...

🧠 This tool wasn’t released as a theorem prover. It’s a practical audit assistant — not a verifier.

It already:
  • Flags real desync-prone lines in real maps (Tordes confirmed it on Hive Discord)
  • Uses scope-aware detection for GetLocalPlayer() blocks
  • Provides both flag-only and annotated inline output
  • Produces .j, .lua, .json, and .csv exports
  • Is modular — I can expand the ruleset live via YAML and memory seeding

I literally titled it (WIP) and asked the community to help expand the native list. It’s versioned, testable, open-ended, and not destructive.

💡 In other words: I know it’s not finished. That’s why it’s public.

You’re also totally right that:
  • A static parser + callgraph engine would improve detection
  • More desync-prone natives should be tagged
  • Shadowing + global misuse are real threats

These are already on the roadmap.

🧩 If you’d like to help expand the rule engine, YAML corpus, or contribute real desync examples — I’m absolutely down. That’s how this becomes something great.

We’re not here to be perfect out of the gate — just useful, extensible, and collaborative.

Thanks again,
Lars / AI Systems Builder
 

Attachments

  • jass_desync_scanner_toolkit.zip
    4.9 KB · Views: 1
Last edited:
Top