• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Better Triggers (Custom Trigger Editor)

Info

Changelog


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

It 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 does not bundle trigger data (.wtg) with your map, but saves the data in a project folder in your filesystem. This also means you cannot swap back and forth between this editor and the World Editor's trigger editor. Although, it is possible to port existing triggers from a map to this editor from the 'New Project' window.

Feature Highlights:

  • Source files outside your map
  • External changes to scripts are automatically picked up by the editor
  • Port an existing map's triggers to Better Triggers
  • "Starcraft II"-inspired GUI
  • Local variables in GUI
  • 2D GUI arrays
  • More natives in GUI, including frames
  • Improved GUI to custom script conversion
  • Editor color themes

Full documentation/guide can be found here: Better Triggers Guide

GitHub repository can be found here: Source Code


Requirements:

Version 1.2.5 (November 15, 2023)

General:
  • Now opens all opened tabs from previous session when loading a project.

Fixes:
  • Fixed a crash when attempting to copy triggers from a map (sorry, didn't catch that until now).
Version 1.2.4 (October 29, 2023)

General:
  • Updated runtime to .NET 6.
  • Added a 'project settings' window.
  • It is now possible to collaborate on triggers with multiple people, as the editor now generates random id's for triggers and variables.
  • Selecting a trigger in the 'Changed Triggers' window will now bring the selected trigger into view in the trigger explorer.

Fixes
  • Fixed a bug where local variables lead to script errors in Lua mode.
Version 1.2.3.2 (August 26, 2023)

Fixes:
  • Fixed a bug where pre-placed items would not be set correctly in the script, leading to null variables for all preplaced items.
  • You can now use local variables as conditionals in if-statements.
  • Fixed an issue where the 'Recent Files' list could reset.
Version 1.2.3.1 (May 9, 2023)

Fixes:
  • The tool now correctly reloads map data after your map has finished saving.
Version 1.2.3 (April 16, 2023)

General:
  • Game directory now defaults to "C:/Program Files (x86)/Warcraft III" when launching the first time.
  • The map selection window now uses Window's native folder picker.

Fixes:
  • Fixed a first time use crash when the map had script errors when validating the script.
  • Fixed a bug where the tool would not apply script changes to Lua mode maps.
Version 1.2.2.2 (April 3, 2023)

Fixes:
  • Fixed a crash when testing a map and the application was installed in a path with whitespaces.
  • Fixed a crash when a user had an empty DVD drive on their system.
Version 1.2.2.1 (March 15, 2023)

Hotfix
Version 1.2.2 (March 13, 2023)

New Features:
  • Option to select between different editor color themes.
  • Added an option to show/hide trigger category icons inside the 'Trigger Element Menu'.

General:
  • Regular map files (.w3x and .w3m) are now supported. Your map is no longer required to be in folder mode.
  • The tool now only replaces the map script for the test map and exported map, and not for the source map.

Fixes:
  • Fixed an edge case bug when generating the script for unit/destructible item tables.
Version 1.2.1 (February 22, 2023)

General:
  • You can now Ctrl + scroll in the script editor to change font size.
  • Added a script font style setting.
  • Added all natives, BJ functions, constants and more to the script editor's autocomplete.

Fixes:
  • Fixed a rare crash when swapping between game versions.
  • Fixed a bug where the text editor would attempt to autocomplete every keystroke.
Version 1.2 (February 12, 2023)

New Features:
  • You can now create frames in GUI!
  • More GUI natives.
  • CliCli-style trigger editor mode option.
  • All open tabs can now be closed from a right-click menu.
  • Added system-wide hotkey option (hotkey presses register without the window being in focus) for the following actions:
    • Validate Triggers
    • Test Map
    • Build Map

General:
  • Projects now load significantly faster.
  • The 'Trigger Converter' has been removed from the 'Tools' menu, and is now only accessible in the 'New Project' window.
  • Added 'imagefile' parameter control that displays War3 icons.

Fixes:
  • Fixed a bug where 'handle' type parameters were not listed in the parameter selection window.
  • For Lua mode, 'TriggerRegisterVariableEvent' in GUI now works correctly. Lua mode in the World Editor handles this native differently than everything else, and I only caught it by pure luck.
Version 1.1.4 (January 24, 2023)

General:
  • App settings are now stored in AppData/Local.
  • Improved search functionality.

Fixes:
  • Fixed a crash when the user would create files with unknown extensions in the src folder.
  • Fixed a bug where array index links were not rendered.
  • Fixed a bug where variable initial values were not checked when saving your map, leading to script errors.
  • Fixed an issue where files and folders would move to the cursor location after closing the right-click menu.
  • Fixed various local variable bugs.
  • The editor now correctly displays modified object data names for 1.33+ maps.
Version 1.1.3 (December 20, 2022)

General:
  • Supports WC3 patch 1.35.

Fixes:
  • Fixed some filesystem bugs.
  • Fix for jumpy trigger elements. When creating a new trigger element on double-click and then holding and dragging after the dialog menu closed, the element could jump to the last 'parent' used in a 'move' command, which could be an invalid trigger element location.
  • Fixed an error where WESTRINGs for some presets were not correctly fetched, leading to a crash when adding them as parameters.
  • Empty strings are now allowed in parameters.
Version 1.1.2 (December 10, 2022)

General:
  • Updated icon.
  • Added a new 'New Project' window.
  • The map path is now saved with the project when converting triggers from a map.

Fixes:
  • Fixed misc errors.
Version 1.1.1 (December 2, 2022)

General:
  • Local variables now actually use locals in the script, so GUI users can get the best benefits of locals. However, the option for arrays has been removed.
Version 1.1 (December 1, 2022)

New Features:
  • Local variables are now available for GUI triggers.
  • Added editor versioning.
  • Default parameters for new trigger elements.
  • Keybinding menu.
  • Global variables menu.
  • "Copy as text" for GUI triggers.
  • Search functionality for the trigger explorer.
  • Option to switch between game versions.

General:
  • Improved undo/redo to handle changes to GUI triggers and variables more properly.

Fixes:
  • Fixed a bug where "Value Of Real Variable" event would not accept variables.
  • Fixed a bug where empty arrays would count as valid parameters.
  • Fixed a crash that could occur in the parameter menu.
  • Fixed a crash when trying to disable/enable elements in the trigger explorer.
  • Fixed a crash when attempting to copy/cut/paste or enable/disable trigger elements with the context menu while no element was selected.
  • Fixed a crash when attempting to drag-drop trigger elements while editing their name.
  • Misc. fixes.
Version 1.0.4 (August 19, 2022)

General:
  • The trigger explorer now remembers what folders were expanded in a project.
  • Added GUI ECA's from 1.33.
  • Added a few missing types and keywords for Jass syntax highlighting.
  • Improved 'Set Variable' parameter selection. Array index values are kept when changing to a variable with the same number of dimensions.
Fixes:
  • Fixed a crash that could occur when loading different projects too many times.
  • Selected variable parameters now scroll into view when clicking on the parameter link.
Version 1.0.3 (August 13, 2022)

General:
  • Added a rename option for the right-click menu in the trigger explorer.
  • Partial non-ASCII name support for variables, triggers, regions, cameras etc. etc.
  • Object data now displays 'Editor Suffix'.
Fixes:
  • Fixed a crash when variables with references were deleted (through the filesystem) while Better Triggers wasn't running. The next time someone would load and test a project it would crash.
  • Custom units now show up for the correct race.
  • Units now have the correct icon.
  • Fixed an issue where trigger elements could jump to the cursor point after creating new trigger elements/parameters.
Version 1.0.2 (August 5, 2022)

Fixes:
  • Fixed a crash when converting certain maps with the Trigger Converter.
  • Fixed a crash that could occur when cut/pasting trigger elements.
  • Fixed a crash when attempting to select abilities, buffs and more from the parameter list.
  • Fixed some edge case compile errors.
  • Fixed a bug where a variable type change was not correctly changed for the initial value.
Version 1.0.1 (August 3, 2022)

General:
  • Subtree now expands when creating special trigger elements.
  • You can now double click parameter values.

Fixes:
  • Fixed a bug when copy/pasting special trigger elements.
  • Fixed name searching for some parameter values.
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.
 
Level 1
Joined
Sep 12, 2023
Messages
2
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:
Level 2
Joined
Dec 19, 2013
Messages
6
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.
 
Level 2
Joined
Dec 19, 2013
Messages
6
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 :)
 
Level 2
Joined
Dec 19, 2013
Messages
6
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:
Level 2
Joined
Dec 19, 2013
Messages
6
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.
 
Level 2
Joined
Jan 11, 2024
Messages
4
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.
 
Top