• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to deal with madness related to a single line that breaks all the game system?

Level 12
Joined
Aug 24, 2022
Messages
434
Hello everyone! Right now, I feel relief by finding an error that broke my entire Boss Fight System in my project. A damn "Wait for 0.3 seconds" line stopped everything working, and I spent almost one day trying to find what broke my system. I've checked every line on every change that I made, and finally found the problem.

Basically, the wait line on the music system just stops everything else to be executed. I solved te problem by just taking the entire music system to a diferent trigger, and then, ordering its execution in parallel (It was working in sequence). After that, I've noted that this was a trainee error, putting every system inside the main system, but, this problem almost made me crazy.

I could lost almost 3 days of work, because on my daily backups, only the one three days ago, the system worked fine. How do you deal with this kind of problem, to not drive you crazy? It was just A line, just ONE line, that made that mess haha!
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
How do you deal with this kind of problem, to not drive you crazy? It was just A line, just ONE line, that made that mess haha!
To say one line definitively caused a problem in your map is disingenuous. There is simply something you don’t understand about waits, threads, triggers, nested functions, or sounds.

The vast majority of things mapmakers calls “bugs” on this forum are not in any way bugs, but are symptoms of a lack of knowledge or understanding. Despite this being an old game and that Blizzard has treated Reforged horribly, it is quite stable and doesn’t do things randomly without provocation.

You didn’t provide enough details to say for sure what chain of events that Wait set in motion, but I am certain it wasn’t anything unexpected.
 
Level 20
Joined
Jan 3, 2022
Messages
364
If I were to develop a map, I would save it in folder mode and commit every describable change to git. Changed unit stats? Commit. Finished a new trigger? Commit. Changed old trigger? Commit.
This would allow backup recovery (like when WE erases all files in folder mode if some file was blocked by an open program) and would allow you to trace such problems much faster, iteratively. "git bisect" cuts history in half with every iteration, in 3-6 steps you'd have found the exact change that broke between yesterday and today.

The tools for this workflow are still lacking, but it's the best you can do.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
In actual game engines a "debugger" is used to help diagnose these issues. You can step threw the script line by line and see what is happening including where it breaks and what errors and exceptions are thrown.

StarCraft II has such a debugger as an example. Most scripting issues could be trivially fixed using it as long as they could be recreated reliably.

Warcraft III is extremely oldschool by not having one. Instead you need to rely on manually tracing the code to try and find where the logic is going wrong. You might then need to make multiple test code pieces to try and figure out why it is breaking there.
 
Top