• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Better Triggers (Custom Trigger Editor)

Info

Changelog


Better Triggers is a custom, standalone trigger editor for Warcraft III.

Intro

The editor expands with new features and aims to improve the overall user experience for both GUI users and scripters.
To support the new features this editor saves your trigger data in a project folder in your filesystem, keeping it separate from the World Editor's save format (.wtg). This also means the changes you make in Better Triggers aren't synced with the triggers in the World Editor.

However, if you decide that you no longer want to use Better Triggers, there is an option to move all the changes in Better Triggers back into the map. Of course, this is not possible if you use 'Better Trigger'-only features.

Full documentation/guide can be found here: Better Triggers Guide
GitHub repository can be found here: Source Code
All previous releases can also be found on GitHub: Releases


Compatibility

The editor works with the following Warcraft III versions:
  • Reforged 2.0.0
  • "Old" Reforged (1.32 -> 1.36.2)
  • 1.31.1
  • 1.30.4
  • 1.29.2
  • 1.28.5


Feature Highlights
  • Source files outside your map
  • External changes to scripts are automatically picked up by the editor
  • Copy an existing map's triggers to Better Triggers
  • "Starcraft II"-inspired GUI
  • Local variables in GUI
  • 2D GUI arrays
  • Custom action- condition- and function definitions
  • More natives in GUI, including frames
  • Improved GUI to custom script conversion
  • Editor color themes
  • Map compression and protection


Requirements

Contents

Better Triggers (Binary)

Reviews
eejin
I love the quick edit at the bottom of GUI triggers, saves having to go through multiple windows and dialogs. Some minor points: Auto detection of the game folder would be sweet (Almost always C:/Program Files(x86)/Warcraft III) The startup popup...
This is extremely minor, but would be cool.
Yeah easy to add too. I don't have time to work on the tool these days tho :/

What is the flow of working between Better Trigger and the World Editor?
Better Triggers detects changes to your map every time you save it in the World Editor, so you can freely edit your map and use the tool at the same time :)

I'll admit it's not described in the docs. I'll update it sometime.
 
Is this program outdated/incompatible with current WC3 patch? I can add new triggers, but Events, Conditions, Local Variables and Actions are all greyed out. If i load an existing map, it shows the map name and imported triggers in russian for some reason?

Edit: Nvm, im just stupid. Still no idea why everything gets auto-translated to russian tho 🙈
 
Last edited:
Is this program outdated/incompatible with current WC3 patch? I can add new triggers, but Events, Conditions, Local Variables and Actions are all greyed out. If i load an existing map, it shows the map name and imported triggers in russian for some reason?

Edit: Nvm, im just stupid. Still no idea why everything gets auto-translated to russian tho 🙈
No the tool works with the latest patch. Can you provide more information about the russian auto-translation or take a screenshot of your issue?
 
Last edited:
I'm enjoying this tool a lot, thanks -- however, I've run into some problems. I'm working in Lua, and whenever I attempt to convert a GUI trigger to a custom script, the program crashes. This seems to happen reliably. I've also experienced the language randomly switching from Lua -> JASS, despite the preferences saying Lua (i.e. new scripts created are .j). The solution seems to be switch to to JASS and back to Lua, although it has reverted at least once.
 
I'm enjoying this tool a lot, thanks -- however, I've run into some problems. I'm working in Lua, and whenever I attempt to convert a GUI trigger to a custom script, the program crashes. This seems to happen reliably. I've also experienced the language randomly switching from Lua -> JASS, despite the preferences saying Lua (i.e. new scripts created are .j). The solution seems to be switch to to JASS and back to Lua, although it has reverted at least once.
Thx for reporting, I’ll fix these things for next update.
 
Thx for reporting, I’ll fix these things for next update.
Sounds good. Also, how long should it take a previous map to convert? I have an old map I'm trying to port to this system. It's about 3MB and has 500+ triggers. Whenever I try to convert it I get a progress bar and I can see that it's using about 10x of the map's memory, but not really using the CPU and not writing to disk. I've left it running for over an hour and no new files were populated outside of the default directories it creates on initialization. Any ideas? It also doesn't let me click the "Cancel" button during the conversion process, although that's minor since I can just X out of it.

It might just be this particular map, because I have another old map I work on that's 7MB and it converted instantly. Any advice would still be much appreciated!

Edit: It's possible that the first map I described is simply not compatible due to having vJASS code?
 
Last edited:
Sounds good. Also, how long should it take a previous map to convert? I have an old map I'm trying to port to this system. It's about 3MB and has 500+ triggers. Whenever I try to convert it I get a progress bar and I can see that it's using about 10x of the map's memory, but not really using the CPU and not writing to disk. I've left it running for over an hour and no new files were populated outside of the default directories it creates on initialization. Any ideas? It also doesn't let me click the "Cancel" button during the conversion process, although that's minor since I can just X out of it.

It might just be this particular map, because I have another old map I work on that's 7MB and it converted instantly. Any advice would still be much appreciated!
Older maps are not supported yet, but I'm actually working on adding support for them atm.

The current solution is to open the old map in the newest World Editor, save it, and then convert it in Better Triggers :)
 
Older maps are not supported yet, but I'm actually working on adding support for them atm.

The current solution is to open the old map in the newest World Editor, save it, and then convert it in Better Triggers :)
Thank you -- this seems to work! Was having problems compiling my map in 1.36 at first but then realized that JassHelper is not enabled by default for some reason...

Update: This worked in theory, but there are inconsistencies. For some reason I'm unable to find a few units that are placed on the map despite them being valid in the Reforged editor. There's also some weird coordinate shenanigans happening, not quite sure what's up with that. Also, everything was converted into a .trg, even fully vJASS files which have custom script enabled. Not sure if this is the intended behavior, but it'll mean that I have to manually create .j files and copy and paste my triggers into them it seems.
 
Last edited:
Sorry to be adding so much information/questions. I've spent a good number of hours with this tool now and unfortunately there seem to be inconsistencies and gamebreaking issues with BT.

1. Variables do not appear to be handled in the same manner as WE. I'm trying to figure out exactly why, but there must be something changed in initialization between the two since I have many scripts that don't behave the same after being ported to BT, especially regarding the location of units placed in the map. I'm guessing this is because of some initialization ordering change, although I'm not sure why it would happen as the structure of the triggers seems to have been maintained in BT.

2. Setting global variables in BT has inconsistent results. If you set a global variable by clicking on the "Variables" tab and choosing the initial value, it will either crash BT, or it will set the variable, but next time you load BT the value will not be set to the default. However, if you set the initial value by clicking on the variable directly (as if it were a trigger), then it gets stored correctly across multiple sessions. Also, I'm not sure if this was the intended behavior, but the initial value of ALL of my variables have been corrupted to nothing when my map was ported to BT.

I really do like this program and I recognize you're dedicating your free time to getting it working. It is very impressive and I want to use it so badly. However, it doesn't seem like it's at a state where I can work on existing, complex projects reliably, although I hope it'll get there eventually.
 
Sorry to be adding so much information/questions. I've spent a good number of hours with this tool now and unfortunately there seem to be inconsistencies and gamebreaking issues with BT.

1. Variables do not appear to be handled in the same manner as WE. I'm trying to figure out exactly why, but there must be something changed in initialization between the two since I have many scripts that don't behave the same after being ported to BT, especially regarding the location of units placed in the map. I'm guessing this is because of some initialization ordering change, although I'm not sure why it would happen as the structure of the triggers seems to have been maintained in BT.

2. Setting global variables in BT has inconsistent results. If you set a global variable by clicking on the "Variables" tab and choosing the initial value, it will either crash BT, or it will set the variable, but next time you load BT the value will not be set to the default. However, if you set the initial value by clicking on the variable directly (as if it were a trigger), then it gets stored correctly across multiple sessions. Also, I'm not sure if this was the intended behavior, but the initial value of ALL of my variables have been corrupted to nothing when my map was ported to BT.

I really do like this program and I recognize you're dedicating your free time to getting it working. It is very impressive and I want to use it so badly. However, it doesn't seem like it's at a state where I can work on existing, complex projects reliably, although I hope it'll get there eventually.

I'm sorry to hear that. The World Editor has many weird quirks, which I'm sure I haven't covered them all.

Thanks for trying the tool though and thanks for valuable feedback! I'll look into the issues.
 
LaZzy Godt Arbejde!

Is there any chance for Naga units from the tft campaign to be added? or is it something we need to pay for?
 
LaZzy Godt Arbejde!

Is there any chance for Naga units from the tft campaign to be added? or is it something we need to pay for?
I don't understand what it has to do with this tool. Did you mean to post this on my Direct Strike map thread? In which case no, there are no plans to add Naga units.
 
@LazZ a great thanks to you for this usefull tool.

I came by some minor problems I want to point out:
  • Cannot enter real value in GUI only integer. I tried with shift ".", pavnum "." and the "," but nothing worked.
  • Also in GUI, when I click on Custom script to the text catcher is not on focus, that would save a huge amount of time to be so, at least when its a new one.
  • And I agreed with Barade on the find & replace that could be awesome.
    Just had another idea while working with a GUI trigger mixed with JASS. You could add a find&replace text dialog which works on all custom script actions in a GUI trigger if it is not already supported.
 
Recently I got a new problem with this error when I try to test my map :
1717271801072.png


I seen it for the first when installing the last update 1.3.1 and now also with the version 1.2.5, I came back to it because it seem to correct this error at least in the beginning...
The button "Validate Map Trigger" also seem to lead to crash Better Trigger without any crash message.

It happen even when I get back to a previous version that worked soon before...

UPDATE :
I found that in all my condition using local variable where display as null and after had actualised them the Validate Map Trigger worked, helping me to correct another issue that may have cause the first error.
I hope this will do the trick...
 
Last edited:
Had a quick play around with the editor and its really beautifully designed! one thing that really interested me was Local Variables, do they auto delete after the trigger has run? Do we have a way to delete them manually? Normally this is the case but you never know when working with Warcraft :thumbs_up:
 
Last edited:
HI,A few suggestions

  • For Chinese users, Blizzard's localization is not very good, or rather very poor. We have loaded translated text from local resources to handle trigger translation. I am not sure if it can support reading localized files -- <retail\ui\triggerstrings.txt>
  • As you may know, Blizzard added some new physical editor projects and triggers after rebooting, but the official editor did not provide support. I noticed that you provided UI functions, which is very good, but I am not sure if you can provide additional support for the physical editor. The main focus is on the addition of single bit commands with no target - priority attack skills and unit target - UD's dagger
  • Do you know if the tool has plans to support multiple languages?

Please forgive my English, this is a message from machine translation
 
Had a quick play around with the editor and its really beautifully designed! one thing that really interested me was Local Variables, do they auto delete after the trigger has run? Do we have a way to delete them manually? Normally this is the case but you never know when working with Warcraft :thumbs_up:
Yes they get deleted, although you still need to take care of object leaks as usual: Memory Leaks

HI,A few suggestions

  • For Chinese users, Blizzard's localization is not very good, or rather very poor. We have loaded translated text from local resources to handle trigger translation. I am not sure if it can support reading localized files -- <retail\ui\triggerstrings.txt>
  • As you may know, Blizzard added some new physical editor projects and triggers after rebooting, but the official editor did not provide support. I noticed that you provided UI functions, which is very good, but I am not sure if you can provide additional support for the physical editor. The main focus is on the addition of single bit commands with no target - priority attack skills and unit target - UD's dagger
  • Do you know if the tool has plans to support multiple languages?

Please forgive my English, this is a message from machine translation
The editor is English-only. I don't know if it will ever support multiple languages, because I would also need to translate every string that is exclusively in this tool.
 
I've created custom GUI Function Definitions, but it is not clear on how to use them. Where is this located?

Edit: Please fix being unable to copy-paste custom action definitions within a trigger. Crashes.

Edit2: Actually, at time of writing, custom action definitions are damn-near unusable, and I recommend people avoid them in the current state.
 
Last edited:
Been reading through the comments and I'm unfortunately still confused by how I create a playable copy of my map with the triggers I wrote in this trigger editor.

1. After I export my map, how would I host the version of it that has all the added triggers from this UI?

2. When I want to open my map in WE, I should open the one map that I initially imported triggers from or should I open the map file that's created when exporting?

Sorry I know you've answered these questions/similar questions a lot, but I've still been struggling to wrap my head around how the map file gets associated with the exported triggers.

Really appreciate what you've made though, its a huge boon to those of us who don't really want to dive into code just yet.
 
Been reading through the comments and I'm unfortunately still confused by how I create a playable copy of my map with the triggers I wrote in this trigger editor.

1. After I export my map, how would I host the version of it that has all the added triggers from this UI?

2. When I want to open my map in WE, I should open the one map that I initially imported triggers from or should I open the map file that's created when exporting?

Sorry I know you've answered these questions/similar questions a lot, but I've still been struggling to wrap my head around how the map file gets associated with the exported triggers.

Really appreciate what you've made though, its a huge boon to those of us who don't really want to dive into code just yet.
1. You drag the exported map file to the War3 map folder '.../Documents/Warcraft III/Maps/'
2. Yes, you open the map you initially imported from in the WE. The exported map should only be used as the map you distribute online. When exporting you can enable protection options, making it unopenable in the editor, so it doesn't make sense to use the exported map as your source when editing, since it corrupts and deletes editor-only files.

You can read the documentation linked in the description of this resource, but if anything is unclear just ask :)
 
1. You drag the exported map file to the War3 map folder '.../Documents/Warcraft III/Maps/'
2. Yes, you open the map you initially imported from in the WE. The exported map should only be used as the map you distribute online. When exporting you can enable protection options, making it unopenable in the editor, so it doesn't make sense to use the exported map as your source when editing, since it corrupts and deletes editor-only files.

You can read the documentation linked in the description of this resource, but if anything is unclear just ask :)
Thanks for replying so quickly! Your answers demystified the workflow for me and I'm happy to say I've been able to make a lot of progress today thanks to you :thumbs_up:
 
Let's go! Love the update. It addresses a few issues i've been having. I hope you find the time to look into 2d arrays as well, because they seem to break under unknown circumstances. I can try and replicate it if you'd like.
I've not encountered any issues with 2d arrays so any hint is much appreciated :)
 
2d arrays have been working since my comment - must've been an issue with code potentially, oh well.

I have a question: are params in custom actions leakless? If I pass in a region or a point, should I destroy the param? Or will destroying it actually destroy what was passed in?
 
2d arrays have been working since my comment - must've been an issue with code potentially, oh well.

I have a question: are params in custom actions leakless? If I pass in a region or a point, should I destroy the param? Or will destroying it actually destroy what was passed in?
Destroying it will destroy what you passed in. It's just a reference to the point or region, not a copy.
 
Wow. This is pretty cool. Now make one for sc2 please.. lol.

Jokes aside, this is quite a piece of art you have created here. Well done. If I still edited warcraft3 models, and warcraft3, I would have found this tool to be a work of art. what a nice little package you have created here. well done.
 
Been awhile since I've been on the hive and working on my game. Stumbled on this right away since I'm on here trying to learn how I'm gonna debug my map and prevent so many desyncs. I think the main problem is leaks, but I immediately found a missing object of a variable and an incorrectly defined variable in one of my triggers on opening up my triggers in this tool. I have high hopes for this tool going forward. At the least it can hopefully keep my laptop cooler not having worldedit running all the time, but I'm sure I'll get other uses out of it. Can't thank you enough for this improvement.
 
Last edited:
It works on my other maps, but here is an error when I try to import triggers from my current working map:

View attachment 489746

I didn't fount anything about the problem in the manual.

I attached my map, maybe it will help you to fix it.
It appears you have been using a modified editor, because it cannot even open in the standard World Editor.
 
I saw it. 1.26 never ever be supported? Like it's ever not planned ?
1.26 or older uses the old executable files for both game and editor (war3.exe and worledit.exe). And this tool is only looking for the installation folder with the new executables (Warcraft III.exe and World Editor.exe). So if you attempt to choose the WC3 installation path, it fails.
Also, Blizzard added plethora of new natives with the latest patches that made them incompatible with older patches. I think that might be the reason.
Those were undocumented, but I'm pretty sure you can ONLY use this tool on versions beyond 1.26.
 
1.26 or older uses the old executable files for both game and editor (war3.exe and worledit.exe). And this tool is only looking for the installation folder with the new executables (Warcraft III.exe and World Editor.exe). So if you attempt to choose the WC3 installation path, it fails.
Also, Blizzard added plethora of new natives with the latest patches that made them incompatible with older patches. I think that might be the reason.
Those were undocumented, but I'm pretty sure you can ONLY use this tool on versions beyond 1.26.
Ehhh. I understand that current modding is on newer versions. But in some cases 1.26a still usable, and for me i prefer that patch. So it's very sad that it's not supported then. :(
 
Back
Top