[Work-In-Progress] Dispatcher Profiler - Real-Time Lag Detection, Scoreboard Hijack, and Hybrid GUI/Jass Debug Tools

Level 3
Joined
Apr 17, 2025
Messages
6
Dispatcher Profiler.png

[Work-In-Progress] Dispatcher Profiler – Real-Time Lag Detection and Scoreboard System
“Has anyone else ever tried to do this? Or am I just deep in the rabbit hole now?”


Hi Hive. I'm currently on a sick semester from university (AI studies), and I somehow ended up here after accidentally spending 50+ hours deep in JASS and GUI spaghetti during the last four days.

What follows is a prototype system — a real-time task monitoring profiler for Warcraft III that logs and optionally displays which game logic is taking the most time to process per tick. It’s intended to help alpha testers report in-game lag and give mapmakers immediate insight into problematic code paths — ideally before players even finish their match.

This post isn't just to show off. It's to ask:
  • Has anyone done anything like this before?
  • Can this idea be useful to others?
  • Is anyone interested in collaborating with me to help make it real?
I’ve included deep research .txt files (linked below) with AI-powered digests of Hive threads, tech docs, and Reforged quirks. These could help with understanding desyncs, preloading, compiler limits, and more.

Screenshot 2025-04-17 172730.png

1. What is the Dispatcher Profiler?

It’s a system that:
  • Profiles how long each scheduled trigger or logic block takes per dispatcher cycle (every 0.03s+)
  • Tracks both runtime and execution count per task
  • Logs cumulative tick runtime and task count
  • Optionally displays top lag contributors in a GUI-compatible multiboard

Example goal: You have a Gabe AI, Bobby Kotick AI, and wave spawning triggers. One of them starts freezing your game every few seconds. This profiler system lets you see which task is to blame.


But it’s not working… yet.

We’ve confirmed that the backend works, and it leads to possible FPS improvements and faster pathing response. But our multiboard refuses to appear on-screen. We’ve tried everything from hijacking the faction scoreboard to brute-force ExecuteFunc calls, GUI trigger masking, and delayed creation logic.

No luck. But the profiler itself still runs — and logs valid data.



2. What Problem Is It Trying To Solve?

Modern Warcraft III maps have become more complex — with dozens of AI scripts, event systems, wave timers, and UI updates running concurrently. Even with the powerful dispatcher/timer model many use to regulate periodic logic, there's no good visibility into what's slowing the game down.

This profiler attempts to:
  • Identify which exact task or system is hogging performance
  • Highlight potential desync-causing logic before it becomes critical
  • Allow live in-game debugging during alpha test sessions
  • Empower players to report bugs, lag, and feedback during the game — not just post-replay

It’s a lag profiler, real-time scoreboard, and debug trigger system in one.

And it’s all designed with GUI compatibility in mind — no scary syntax necessary to integrate it into your map.

3. Core Features

  • Per-tick profiling — Each registered task or trigger is timed on every dispatcher cycle
  • Logging system — Cumulative runtime, frequency, and average time are recorded
  • Optional multiboard visualization — Displays the top most expensive tasks
  • Chat command toggles — e.g., -toggleprofiler (when it's working!)
  • Dev-only filters — Profiling tools are only visible to trusted players or in WorldEdit testing
  • Hijacks and replaces existing scoreboard (or tries to…)

4. Why Isn’t the Multiboard Working?

We don't fully know yet. But we've tried:
  • Calling MultiboardDisplay at different stages (Map Init, 30s delay, post-load)
  • Force-hiding GUI-created boards
  • Using ExecuteFunc and trigger hijacks to simulate GUI initialization
  • Disabling all GUI scoreboard triggers to avoid overwrite
  • Making sure board creation and update logic is running every few seconds

And it still doesn’t show up.

The profiler runs in the background. Logs update. Chat commands are accepted. But the board is invisible — either minimized, overwritten, or entirely discarded due to Reforged quirks.

If you’ve ever had a multiboard refuse to appear, we’d love your advice.

5. Powered by AI + BetterTriggers + Desperation

This project started as a rough JASS idea and quickly exploded into a BetterTriggers migration, AI-supported debugger, and file modularization experiment.

We are now:
  • Migrating a 100,000-line monolithic JASS file into ~7,000 modular BetterTriggers-compatible .j files
  • Using AI to auto-detect structural issues, malformed if/endif, invalid global declarations, etc.
  • Running Python + shell scripts to batch merge, verify, and deduplicate modular code
  • Working on a 10-step repair automation plan to recover malformed logic from legacy code

This isn't just one system. It's a whole workflow experiment. And it’s exhausting, but working.

6. Why Post This? — Collaboration & Curiosity

This post exists for a few reasons:

  • To ask: Has anyone else ever attempted something like this?
  • To offer: Do you want to collaborate? I’m very open to working with experienced mapmakers, AI engineers, or anyone deep in the JASS/GUI world.
  • To learn: There are hundreds of quirks in Warcraft III scripting — I want to learn the best practices and improve this system for real-world use.

This isn’t a finished product. It’s a prototype, built by someone who only touched World Editor for the first time 4 days ago. But progress has been fast — and it’s powered by 52 hours of straight focus and a lot of AI-powered research.

7. Roadmap and What’s Next

The current state of the Dispatcher Profiler system:
  • Core dispatcher profiling works
  • Multiboard tracking logic works
  • Chat toggles are stubbed in
  • Multiboard rendering is not visible yet
  • BetterTriggers migration in progress
  • AI-based modularization underway (~30% complete)

Next Steps:
  • Fix multiboard visibility once and for all
  • Enable player-specific toggle and visualization
  • Add better task registration API for map devs
  • Improve profiler load efficiency (detect overloads)
  • Finish full migration to BetterTriggers
  • Document and share templates for GUI-only users

8. Spaghetti Triggers Deserve Love Too

A note to all GUI developers: your map is not broken because it uses GUI.

JASS/LUA elitism has its place, but let’s be honest — World Editor is what made this game moddable in the first place. What this system aims to do is:
  • Work inside your spaghetti without judgment
  • Run alongside GUI triggers without overwriting or deleting anything
  • Empower debugging and optimization without forcing code rewrites
  • Be something that new and veteran mappers can plug in, benefit from, and ignore when not needed

If you’ve ever debugged a 200-trigger system with no visibility, this tool might be for you.

9. 📚 Deep Research Files – AI-Powered Summaries

Every part of this post has been written, refined, and organized in collaboration with AI — including this section you’re reading now. Why? Because it saves time and enables deep dive exploration far beyond a single human’s focus span. Transparency matters, so we want to be upfront about it.

What you’ll find below are downloadable .txt files containing summaries, breakdowns, and distilled knowledge from dozens of sources across Hive Workshop, Patch Notes, forums, legacy guides, and scripting posts.

These files were created using an AI-assisted workflow, and include carefully indexed references from trusted community sources.

Here’s what’s included:

  • Advanced Preloading Strategies26 Sources
    Breaks down Preload() vs PreloadGen, segmenting vs batching, and how to minimize impact on map init. Includes multiplayer safety tips.
  • JASS Compile-Time Errors & Limits19 Sources
    Every common (and obscure) JASS compile failure, matched with known causes and engine limits. Ideal for debugging 100K+ line maps.
  • Performance Optimization (GUI & JASS Hybrid)14 Sources
    What causes FPS drops in Reforged? Why are some maps more stable than others? This covers object handle bloating, timers, effects, and much more.
  • Preventing Desyncs in HD/SD Maps29 Sources
    Desyncs are the death of multiplayer. This file documents root causes, like randomization, visuals, and local calls — and how to work around them.
  • Suppressing Neutral Minimap Icons22 Sources
    Niche but vital: How to avoid cluttered minimaps using .mmp file manipulation and object data strategies. Includes modern Reforged notes.

You can open these in any text editor and search for key phrases — they’re made for both beginners and deep tech tinkerers alike.

If you’ve ever struggled with a weird crash, minimap bug, lag spike, or desync that had no obvious cause — these might help.

Files attached below as .txt



If you're interesting in helping me with this project or providing me with any advice, please contact me on discord at:
"larse."

I am also present in the community Hive Workshop discord!
 

Attachments

  • Advanced Preloading Strategies for Warcraft III Reforged Maps 26 Sources Deep AI Research.txt
    56.2 KB · Views: 5
  • Comprehensive List of JASS Compile-Time Errors and Engine Limits Deep Research AI 19 sources.txt
    34 KB · Views: 9
  • Optimizing Performance in Warcraft III Reforged Maps GUI JASS Hybrid Deep Research AI 14 Sources.txt
    58.1 KB · Views: 6
  • Preventing Desync in Warcraft III Reforged Maps HD or SD Deep Research AI 29 Sources.txt
    33.6 KB · Views: 3
  • Suppressing Neutral Minimap Icons in Reforged Lobby Preview Deep Research AI 22 Sources.txt
    17.4 KB · Views: 4
Last edited:
Level 18
Joined
Jun 13, 2016
Messages
586
But it’s not working… yet.
so why are you posting it here. making a profiler isn't rocket science

Using AI to auto-detect structural issues, malformed if/endif, invalid global declarations, etc.
my god you dont need an ai to syntax check jass

Working on a 10-step repair automation plan to recover malformed logic from legacy code

what?

now on to the files. its hallucinated nonsense. stop polluting the internet with llm-generated misinformation

However, Preload() alone doesn’t immediately load the file until you finalize the preload buffer.
nonsense

if every player runs Preload("file.mdx") at the same game time, they should all stay in sync. Problems arise if one player does a preload that others don’t.
nonsense

Never use GetLocalPlayer() to preload assets only for one player.
nonsense

## Applying These Strategies to Kings & Knights (JASS + Dispatcher + GUI)
Kings & Knights is a complex map with an open-source codebase.

what? why is this here? do you even proofread the shit you generate?

that first file is 56000 characters of slop and nonsense that basically amounts to "yeah you can use Preload to load assets and maybe use timers to stagger it" which has been a known thing in the community since fucking 2002

When the system detects one of the above issues, an automated fix should be applied very cautiously to avoid breaking the map’s GUI logic. Here are some safe repair approaches:

what? why? who is this for? why did you post this here?

Great — I’ll begin a deep search across HiveWorkshop for insights, overrides, or community-tested solutions on how to suppress neutral building icons (especially gold mines) from appearing in the Reforged lobby preview while keeping the in-game minimap intact.=
I’ll look into known .blp overrides, model hacks, unit-type filtering, and potential quirks with war3mapMap.dds versus war3mapPreview.tga. I’ll report back with concrete steps and any confirmed methods.

yeah im sure you will, buddy

gosh, it must've been so much effort to copy-paste this here
 
Top