• 🏆 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...
Released Better Triggers V1.1

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.
 
Last edited:
Level 2
Joined
Dec 3, 2022
Messages
1
An interesting tool!

I do have some feedback i would like to share in order to perhaps shed some light on a few unclear aspects to help make the tool better!
However, I want to clarify that this is an opinion, with the goal of helping and ultimately improving the documentation and hopefully the usage of this tool as i do believe this tool being more than useful and a great addition to Triggering!


My first project was simply to learn how this tool works, I created a new project, right clicked on the 'root' name of the project which was 'NEW'.
And i was greeted with an error: "Object reference is not set to an instance of an object ". So do NOT right click your top 'file' in the 'Better Triggers', it crashes the application.
However, i could create a folder and then a trigger with ease just by using the buttons provided, or by clicking 'new'. Easy!

Next step was to create a new project within the World Editor, packed with some basic 'melee init' triggers, perfect for getting started with the conversion tool!
Unfortunately i got stuck, and went back to the documentation called "Convert an existing map's trigger". It doesn't really guide you on 'how' to do it so i suppose i'm on my own here.
Luckily it's pretty straight forward from here, you click 'Tools -> Trigger Converter'. This could be worth having in the documentation even if it's 'easy' to do.

Next up is figuring out what: Select Map Folder Mode & Select Project Destination - means.. Is the map folder for the project i'm working on or the world editor? What is the project destination, is it my project or is it.. WE?

Turns out i have to locate Map.w3x folder (which is what it means with Map Folder Mode i'm guessing) <-- Could also be worth sharing in the docs
Unfortunately when converting... an infinite loop. (I figured i'd wait 15 minutes at most before closing it down).
OS Windows 11.



I Wish to continue giving feedback but i'm sort of at a stand still at the moment and sort of gave up at this point.
I figure i want to come back in future versions - maybe i've missed something?


All in all - the feature provides rich Quality of life improvements on an already outdated triggering editor that will make your life so much easier in the long run!
I think you've done a great job here, and i encourage anybody who sees this to give it a shot.
If you think that my feedback was confusing or unhelpful, please let me know!

-AnotherApple
 
@SomeRandomApple
Thanks for your feedback!
I agree the documentation should be more thorough when getting started. I guess I'm just used to the tool so everything feels natural to me :gg:

I was unable to replicate the 'root' right-click crash and Trigger Converter infinite loop. I did find a Trigger Converter CRASH when converting empty maps, so could be related. Thank you for pointing me to that.


What are the legal ownership rights if I create a trigger with this? Can I create triggers for a separate game engine using this if I felt like it, or how does that work?

(Do I own my creation in that case?)
I don't know. This editor targets War3 1.32+ so I guess it falls under Blizzard's ownership rules.
 
Level 14
Joined
Feb 7, 2020
Messages
387
This is a dream tool to eliminate the copy and paste nightmare of scripting ever since ceres went defunct, but I have been running into some issues with implementing it in my development process (Win 11):

  • (main issue) can't get Export Map to work - I see the map in /dist update, but it doesn't have new test contents created in Better Triggers, and /map is empty (I tried poking around the source: is it supposed to export a new file to /map per this config skeleton?) - tried admin permission to see if it was a folder permission issue, but no luck.

  • (minor) creating multiple folders and nested script assets with the right click menu sometimes causes the next opened asset to move up one directory; doesn't seem to break anything though (I can't figure out the exact sequence that causes it, only happens occasionally, usually after multiple nested items).

  • (one-off) during initial testing I somehow broke the right-click menu and new assets weren't appearing, which led to a corrupt project file on close + reopen (no object reference error) - I didn't keep the test project around but will look out for it happening again.
 
@Planetary
Thx for trying the tool!

  1. I have not seen this behavior before. Internally the tool uses the same code both when testing the map (launching WC3) and exporting it. Could you send your map to me so I can try and reproduce it?
    The /map folder is just a convenience. When you create a new project from scratch it puts a new map there. The file you linked to is part of the automated tests I'm running for the software (as is anything in the Tests directory in the repo).
  2. Yeah this one is a UI related bug I thought was fixed. I guess that needs more attention.
  3. Not sure what this could be. I'll try to hammer the menu with user input next time I test.

Since w3ce is now exists, I wonder if there will be an update that this tool will support war3 1.29
There are no plans to support previous patches, except maybe 1.31 but I need to get my hands on a better library that reads previous versions of the CASC.
But as far as I know they plan to support newer maps with W3CE all the way up to retail, so you could in theory make a map with the retail editor and play it on W3CE.
 
Last edited:
Level 14
Joined
Feb 7, 2020
Messages
387
I think I got #1 figured out. I thought everything was contained to the Better Triggers project folder, but the export puts new stuff into the original converted map folder (which I see updating properly).

Is it expected for new assets such as GUI to show in the editor node structure? I do see the Better Trigger code being added to the map script. This might be what this meant from the documentation To support the new features this editor does not bundle trigger data (.wtg) with your map.

Edit: I was able to get #3 to happen again. I think it might be stuff I'm doing with VS code settings, but not sure. DMed the map files.

1673360075336.png
 
Last edited:
Any new files you create for your Better Triggers project such as GUI, scripts and variables will not be bundled with the map's original trigger data. Only the map script is replaced. As an example Better Triggers supports local variables in GUI which is a feature the vanilla editor does not have, so it wouldn't make sense to recreate the .wtg from Better Triggers's trigger data.
 
Last edited:
Level 25
Joined
Feb 2, 2006
Messages
1,689
I haven't really tried this tool but I would really consider using it if you would list conditions in filters in an expandable list like multiple conditions and multiple actions for unit groups/forces instead of one single line.
It is annoying that you have to specify all filter conditions next to each other with And/Or and cannot add more dynamically like for conditions.

The local variables feature seems really really useful for GUI users.

Another thing that is missing in Warcraft's trigger editor is a search input field for trigger names.
In my map I have like 500 or even more triggers in folders and a quick search would help be to find only matching triggers.
 
conditions in filters in an expandable list like multiple conditions and multiple actions for unit groups/forces instead of one single line.
Good idea. I can't promise it will get in there but I'll put it on my todo-list.

Another thing that is missing in Warcraft's trigger editor is a search input field for trigger names.
a8e8f2991a0ab7ad4d516bb794ae89fa.gif

A very bare-bones implementation is already there ;) There's no button in the menu dropdown yet but you can Ctrl+F to bring it up.
 
Last edited:
Is a system-wide shortcut for test map and export map a possibility (i.e. doesn't require window in focus)?

It'd be cool to use CTRL+SHIFT+F9 to test map from anywhere, for example. Mainly to stay within the context of your IDE. I'm a sucker for minimizing task context.
It's a possibility yeah. I'll put it on my todo-list.
 
Released Better Triggers V1.2

Frames.gif

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.
 
Level 11
Joined
Jul 4, 2016
Messages
627
I was looking to utilize this with vscode and this was an fantastic addition. However, the size of the text can be awfully small. Would it be a possibility that you can add a way to change the size of the text similar to tesh by scrolling.
 
Last edited:
I was looking to utilize this with vscode and this was an fantastic addition. However, the size of the text can be awfully small. Would it be a possibility that you can add a way to change the size of the text similar to tesh by scrolling.
Sure. I generally recommend working in external text editors, but I could definitely improve this tool's text editor in some areas.
 
Level 14
Joined
Feb 7, 2020
Messages
387
Scripting will never be the same. This tool is great. I've been using it for weeks.

I am trying to pinpoint one last issue where my map contents (imports) get erased every now and then - it might be my OneDrive setup and not the tool, since I can't figure out the steps to reproduce. Remember to create back-ups! Has anyone else experienced this?

I was looking to utilize this with vscode and this was an fantastic addition. However, the size of the text can be awfully small. Would it be a possibility that you can add a way to change the size of the text similar to tesh by scrolling.

I'm using VS Code exclusively with Better Triggers as the sync and test-map mechanism.

Do you need to use GUI? If you use Total Initialization and get VS Code set up for Emmy Notation with common/blizzard.j then you wouldn't have to touch GUI after a bit of practice and pattern adoption. Then you can alter your IDE to have whatever zoom/formatting/syntax-highlighting you desire.
 
I am trying to pinpoint one last issue where my map contents (imports) get erased every now and then - it might be my OneDrive setup and not the tool, since I can't figure out the steps to reproduce. Remember to create back-ups! Has anyone else experienced this?
It's unfortunately a common issue with War3 and happens more often with folder mode maps. I've had it happen multiple times to me before I started developing this tool.
 
Level 11
Joined
Jul 4, 2016
Messages
627
I am getting this error specially only when using the jass helper from the better triggers but not when saving in 1.35 world editor.
 

Attachments

  • error.png
    error.png
    27.5 KB · Views: 39
Level 25
Joined
Feb 2, 2006
Messages
1,689
Did you provide GUI functions for all common.j functions? This is really cool. I would love to see even more GUI functions based on generic stuff people need like StringUtils, more math, group, rect etc. utils. Maybe you should start a separate project with customized Blizzard.j and the new TriggerData.txt and TriggerStrings.txt files where people could make wishes for new GUI functions.

Why can I only select a map folder and not a map file to copy triggers in the beginning? Doesn't the tool have MPQ support?

How does it work with generated variables like units, sounds etc. Are they supported? Is it automatically connected to the map from the project folder and always knows which variables exist? Again it would be cool to connect it with a map file from the beginning and then create a folder from it.

You should definitively add the icons when listing trigger functions. It helps to distinguish the categories faster.

Maybe make the default UI with white background so it looks more like the official trigger editor and you can see the trigger action button.

Again I would love to see the search input bar over the trigger names and in the functions lists for big triggers. Searching fast really helps.

Where are triggers which are only comments? I use them for ChangeLogs.

Can you add a menu item/option to convert Custom Script Triggers into Custom Scripts (from Reforged)?

This tool is really nice. Does it convert JASS back to GUI triggers or just undo the conversion? If it is the first feature, this is really awesome.

Maybe add some option to preview the whole generated map script and export/copy it. It sometimes help to see some stuff there.

Great tool, keep updating it, really useful especially with more GUI functions, local variables and search functionality.

Btw. selecting units with lots of generated units in the map is REALLY slow in the official trigger editor. If this is fast here then I will probably switch to this tool for my map.
 
Did you provide GUI functions for all common.j functions?
I didn't add all common.j functions for GUI, but I added GetLocalPlayer, RemoveLocation, and DestroyGroup and some of the latest stuff like frames, queued orders, and sync natives.

Why can I only select a map folder and not a map file to copy triggers in the beginning? Doesn't the tool have MPQ support?
I work in folder mode and I hardcoded the tool to only read folder mode maps... Which is not great. I may change this.

How does it work with generated variables like units, sounds etc. Are they supported?
Yes they are supported. The only difference is your GUI triggers must reference a unit to generate the unit variable.

Maybe make the default UI with white background so it looks more like the official trigger editor and you can see the trigger action button.
Planned feature but not a priority.

Btw. selecting units with lots of generated units in the map is REALLY slow in the official trigger editor. If this is fast here then I will probably switch to this tool for my map.
Remember this is a standalone tool, so anything where you can select things in the WE you can't do here. Instead, all units and destructibles are selectable in a searchable list view. Performance here is very fast though, and the application is very fast overall.


Thanks for your inputs. I'd say the remaining ones are only 'perhaps' ideas in my book, but you never know.

The rest of your questions are answered in the official doc.
 
Level 3
Joined
Mar 3, 2023
Messages
17
Does anyone have resources that show you how to create your triggers into a "folder" to allow this tool to work?
 
Level 3
Joined
Mar 3, 2023
Messages
17
My god, I'm crying inside after not understanding what that meant... Thank you once again for helping me SmitingDevil but this time was much more embarrassing.
 
Level 31
Joined
Aug 6, 2015
Messages
636
I am a bit confused, As a Common GUI/Jass User, after I import my data from an already existing map, and I edit some triggers - then I save and now I am left with some files in a folder.
  • How can I use that for players to play it like map after?
  • How can I edit unit stats and map objects and the world after?
(sorry maybe these questions are dumb I just don't really understand how to use that software properly)

Update:
  • Found Out I can Export Map via BT (Better Triggers)
  • Though I still have a question, after editing in BT, will the map open and be editable in the wc3 official editor? (since BT adds new features)
 
Last edited:
Though I still have a question, after editing in BT, will the map open and be editable in the wc3 official editor? (since BT adds new features)
I gave an answer to this a couple months ago:
Any new files you create for your Better Triggers project such as GUI, scripts and variables will not be bundled with the map's original trigger data. Only the map script is replaced. As an example Better Triggers supports local variables in GUI which is a feature the vanilla editor does not have, so it wouldn't make sense to recreate the .wtg from Better Triggers's trigger data.
So yes, you can absolutely open it. This editor will not touch your original trigger data.
 
does this program make the map un-editable on WE? someone is 'stealing' my map and deleting all WE triggers, using this program as justification to 'encrypt' the map.
No, this tool is an alternative trigger editor with extended features, and you can edit your map simultaneously while using it. It does not encrypt your map.
 
Level 31
Joined
Aug 6, 2015
Messages
636
So yes, you can absolutely open it. This editor will not touch your original trigger data.
K, another question (sorry to bother you).
After editing the map in the program and adding some custom stuff -> after which I open the map in the default editor and make some changes -> Open it again in the program - would the added things from the first time I opened the program be saved - even though they are not supported in the editor and the map was edited in the editor?
 
K, another question (sorry to bother you).
After editing the map in the program and adding some custom stuff -> after which I open the map in the default editor and make some changes -> Open it again in the program - would the added things from the first time I opened the program be saved - even though they are not supported in the editor and the map was edited in the editor?
I don't totally understand the question.

When you choose to copy trigger data from an existing map, it is only copied ONCE. The trigger data in your map and in your Better Triggers project are not synced, because this tool offers more features, so it cannot sync. However, this tool DOES reload all other map data like object data, sound data, preplaced units, destructibles, regions etc. when you save your map in the WE.

You can still save your map in the WE and it will use your triggers from the WE. It is only when you export your map in Better Triggers that it uses those triggers. I guess I can improve the UI to make it more clear.
Hope that answers it.
 
Last edited:

eejin

Tool Moderator
Level 12
Joined
Mar 6, 2017
Messages
221
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 asking whether you would like to download .net does nothing when clicking yes
  • It would be very nice to have a native file picker instead. The current one, apart from being very barebones, also does not show certain items that are in my folder (note the msising stack folders)
    1681569664353.png
  • I clicked validate map triggers and it crashed the application (see attached map)
 

Attachments

  • MCFC 7.2.w3x
    5.5 MB · Views: 4
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 asking whether you would like to download .net does nothing when clicking yes
  • It would be very nice to have a native file picker instead. The current one, apart from being very barebones, also does not show certain items that are in my folder (note the msising stack folders)
  • I clicked validate map triggers and it crashed the application (see attached map)
Implemented and fixed some of this in v1.2.3.
Not sure how to disable the .NET download pop-up. It's a Microsoft thing.

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.
Seems like a niché thing, but still useful. Can't promise tho.
 
Last edited:
Level 2
Joined
Apr 2, 2011
Messages
17
No, this tool is an alternative trigger editor with extended features, and you can edit your map simultaneously while using it. It does not encrypt your map.

Weird. I cannot save map in WE when Better Triggers is open with the map triggers, so every time I need to modify the map I have to close Better Triggers then save the map and then reopen Better Triggers. Am I doing something wrong?

Edit: Also, apparently, there is no way to callback local variable in conditionals:

  • Events
  • Conditions
  • Actions
    • Set Variable,Set RandomNumber = (Random integer number between 1 and 3)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Number of units in (Units in (Playable Map Area))) Equal to 0
      • Then - Actions
      • Else - Actions
There is no option to set RandomNumber instead of (Number of units in (Units in (Playable Map Area))) without using custom script. In action it does displays Variable option along with Function and Value.
 
Last edited:
Level 29
Joined
May 14, 2021
Messages
1,115
Hey you guys I have some problem to Install this Toll, I recived this Error View attachment 445402
Check the description above. There is an important requirement you must install before running this tool, which is .NET Desktop Runtime 5.0.
For .NET 5.0, you MUST install it manually because recent OS still have .NET 4.x (probably 4.8) being integrated after the installation.
 
Level 1
Joined
Oct 24, 2023
Messages
2
Everytime i declare a local var it bricks the map(cant test map end up in lobby without even opening the map).
do i miss somthing?
 

Attachments

  • 1.PNG
    1.PNG
    6.5 KB · Views: 12
  • 2.PNG
    2.PNG
    10.4 KB · Views: 12
Level 1
Joined
Oct 24, 2023
Messages
2
It would be cool if we could have local timers in gui
Also we would need access to PauseTimer(timer), ResumeTimer(timer) and DestroyTimer(timer)
example.PNG
 
Last edited:
It would be cool if we could have local timers in gui
Also we would need access to PauseTimer(timer), ResumeTimer(timer) and DestroyTimer(timer)
Unfortunately, local timers is something that's not possible in jass, and I need to make sure the GUI features are supported by both lua and jass.
 
local timers is something that's not possible in jass
Is your issue just the scoping? I used to create tons of local timers in jass

JASS:
globals
    hashtable TIMER_DATA = InitHashtable()
endglobals

function Trig_Foo_TestTimer_Expire takes nothing returns nothing
    local timer TestTimer = GetExpiredTimer()
    local unit triggerUnit = LoadUnitHandle(TIMER_DATA, GetHandleId(TestTimer), StringHash("GetTriggerUnit"))
    call CreateNUnitsAtLocFacingLocBJ(1, 'hfoo', Player(0), GetRectCenter(GetPlayableMapRect()), GetUnitLoc(triggerUnit))
endfunction

function Trig_Foo_Actions takes nothing returns nothing
    local timer TestTimer = CreateTimer()
    call SaveUnitHandle(TIMER_DATA, GetHandleId(TestTimer), StringHash("GetTriggerUnit"), GetTriggerUnit())
    call TimerStart(TestTimer, 30.00, true, function Trig_Foo_TestTimer_Expire)
endfunction

The above code was written off the top of my head, without testing, but should in theory match the intention of the @Spakulatius gui shown above, shouldn't it? Even if we find 1 or 2 errors in my brainstorm, I think the concept of what I was doing should be sound
 
Is your issue just the scoping? I used to create tons of local timers in jass
Yeah I was only thinking about scoping. I guess your example works, but I would need to implement custom GUI function definitions you can pass to the TimerStart native. Not impossible, but a lot of work.
 
Level 19
Joined
Jan 3, 2022
Messages
320
Edit: Also, apparently, there is no way to callback local variable in conditionals:
That's because if conditions are always separate functions as implemented by GUI triggers.

Is your issue just the scoping? I used to create tons of local timers in jass
@LazZ local handle variables must be nulled before exiting a function, the WE code generator can't do that?
 
Level 2
Joined
Dec 12, 2023
Messages
2
Hi can someone help me figure out how to use this? I'm confused because I would expect when I click "Export Map", that the map it creates in the dist folder would contain all the triggers in the Better Triggers app, but that is not the case. Sorry I've read all the comments in this thread but still can't make sense of it.

Here is what I am doing:
1. Open Better Triggers --> New Project --> Empty Project
2. Project Name: "Something", I also create a new folder to be the destination folder. --> Create Project
3. I create a new Trigger, just for the sake of testing. Map Initialization, Create a unit etc
4. I hit "Export Map"
5. I open the map that is in the dist folder, however in the Trigger editor it only contains the default Melee Initialization trigger.

Is there a step I am missing? I've also tried "Import Triggers" and importing the WTG file in the maps folder, but no result.
Thanks in advance, I must be dumb because it looks like everyone else figured this out but me :bored:
 
Top