• 🏆 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!

[1.35+] Updated/Organized GUI Trigger Database Files

(MOST RECENT FILES HERE)​

Hey guys, attached, I have files that you can use locally to make your GUI triggering experience better.

How to use:​

As these are modified game files, you need to enable "local files" to use them. Follow this tutorial to do so. After that, drop these files in your install directory, under the folder path:
Code:
_retail_/UI

What does it do?​

Triggerdata.txt is the main ingredient here, this file has been organized so that 99.999% of all actions are grouped together by category. This file also adds functions to GUI, including, but not limited to: memory cleanup functions (remove location/region, destroy group/force), enable user control, change minimap image, item pool manipulation (including item pool variables), order queue natives, getlocalplayer (for conditions), etc. etc.
I have also added (LEAKS) to the end of a lot of functions that cause leaks

I do plan to organize more stuff and add more functions later, but I figured I'd share this now, as it is very useful to us GUI users.

IMPORTANT:​

If you have other people that you send your map to to work on, they must have these files as well if you use any of the new functions added, otherwise they will be replaced with Error lines on load. These files do not cause any issues with online play, and maps created with the assistance of these files can be played by people that do not have them.

To use the GetUnitGoldCost, GetUnitWoodCost, UnitAlive, and GetUnitBuildTime functions, this code must be present in your map header
JASS:
native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer
native UnitAlive takes unit id returns boolean
native GetUnitBuildTime takes integer unitid returns integer
OR
Lua:
//! endusercode
native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer
native UnitAlive takes unit id returns boolean
native GetUnitBuildTime takes integer unitid returns integer
//! beginusercode

  • Tauren, Dead, and Giant types for IsUnitType comparisons
  • RemoveLocation, RemoveRect, DestroyGroup, DestroyForce
  • SetUnitAnimationByIndex
  • EnableUserUI
  • BlzChangeMinimapTerrainTex (sets minimap image)
  • DisplayTextToPlayer (for displaying text to 1 player without having to worry about player group leaks)
  • Itempool and Unitpool manipulation (GUI Itempool/Unitpool variables, Destroy Itempool/Unitpool, Add Item/Unit Type to pool, Remove Item/Unit Type from pool, Place Random Item/Unit)
  • CreateUnitAtLoc (creates 1 unit at a location, doesn't set bj_lastCreatedUnit though)
  • Order queue natives (except for the "instant" ones because I have no idea what those are for)
  • GetUnitGoldCost and GetUnitWoodCost (although these do still need to be defined in your map header if you're using jass)
  • BlzGroupUnitAt (gets unit from group at specified index)
  • GetTriggerDestructible
  • GetLocalPlayer
  • All frame natives
  • BlzDecPlayerTechResearched
  • AddPlayerTechResearched
  • BlzDisplayChatMessage
  • BlzEnableCursor
  • BlzGetUnitAbilityByIndex
  • BlzGetAbilityId
  • BlzGetAnimName
  • BlzGetPlayerTownHallCount
  • BlzGetSpecialEffectScale
  • Cheat
  • ConvertPlayerColor
  • CripplePlayer
  • DisplayLoadDialog
  • EnableUserControl
  • FirstOfGroup
  • GetPlayerTypedUnitCount
  • GetUnitX
  • GetUnitY
  • IsUnitLoaded
  • IssueTargetOrderById
  • IssuePointOrderByIdLoc
  • IssueImmediateOrderById
  • BlzPauseUnitEx
  • GetLocationZ
  • SetUnitX, SetUnitY
  • UnitAlive
  • GetUnitBuildTime
  • GetTriggerWidget
 

Attachments

  • triggerdata.txt
    681 KB · Views: 38
  • triggerstrings.txt
    101.4 KB · Views: 32
  • worldeditstrings.txt
    477.5 KB · Views: 30
Last edited:
Today, I have finished adding all frame natives to GUI! I have also reordered some of the new functions I added in order to keep workflow closer to what it's been all these years, and I added the function to decrease the level of researched tech. Enjoy! Special thanks to the maintainers of the Jass documentation guide at wc3modding.info as well as @Tasyen, @TriggerHappy, and @Wrda for helping me understand frame stuff (I'm still not 100% how it all works lol but it's all here!)
 

Attachments

  • triggerdata.txt
    705.3 KB · Views: 14
  • triggerstrings.txt
    106.7 KB · Views: 9
  • worldeditstrings.txt
    481.2 KB · Views: 10
Last edited:
revision 4:
-Fixed BlzChangeMinimapTerrainTextHint
-Added Desync warnings to BlzFrameGetName/Value
-Added a warning to Comment about usage of percent signs
-Added DoNothingHint to make people feel bad for using DoNothing
-Added AddPlayerTechResearched, BlzDisplayChatMessage, BlzEnableCursor, BlzGetUnitAbilityByIndex, BlzGetAbilityId, BlzGetAnimName, BlzGetPlayerTownHallCount, BlzGetSpecialEffectScale, BlzGetUnitOrderCount, BlzUnitClearOrders, BlzUnitForceStopOrder, Cheat, ConvertPlayerColor, CripplePlayer, DisplayLoadDialog, EnableUserControl, FirstOfGroup, GetPlayerTypedUnitCount, GetUnitX, GetUnitY, IsUnitLoaded, IssueTargetOrderById, IssuePointOrderByIdLoc, IssueImmediateOrderById
Also added actions-frames.blp, an icon for the Frames category, which goes in
Code:
_retail_\replaceabletextures\worldeditui
 

Attachments

  • triggerdata.txt
    712.6 KB · Views: 8
  • triggerstrings.txt
    109 KB · Views: 5
  • worldeditstrings.txt
    481.2 KB · Views: 6
  • actions-frames.blp
    2.2 KB · Views: 6
I would suggest to make Itempool be created on default for globals, like groups & dialogs do.
itempool should use itemcode not integer, don't want to type in rawCodes as decnumber.

You might add shopping functions somthing quite nice, but lacking in GUI:
BuyUnitForPlayer=0,player,unit,unitcode
_BuyUnitForPlayer_Defaults=Player00,GetTriggerUnit,hfoo
_BuyUnitForPlayer_Category=TC_NEUTRALBUILDING
_BuyUnitForPlayer_ScriptName=IssueNeutralImmediateOrderById

BuyItemForPlayer=0,player,unit,itemcode
_BuyItemForPlayer_Defaults=Player00,GetTriggerUnit,bgst
_BuyItemForPlayer_Category=TC_NEUTRALBUILDING
_BuyItemForPlayer_ScriptName=IssueNeutralImmediateOrderById

I once added presets that were missing in my opinion, the none melee races, bj_isSinglePlayer, bj_dncIsDaytime, triggerNull, ...

RaceNage=0,race,ConvertRace(11),WESTRING_UE_UNITRACE_NAGA
RaceCommoner=0,race,ConvertRace(9),WESTRING_UE_UNITRACE_COMMONER
RaceCreep=0,race,ConvertRace(8),WESTRING_UE_UNITRACE_CREEPS
RaceCritters=0,race,ConvertRace(10),WESTRING_UE_UNITRACE_CRITTERS
RaceOther=0,race,RACE_OTHER,WESTRING_UE_UNITRACE_OTHER
RaceUnknown=0,race,null,WESTRING_UE_UNITRACE_UNKNOWN
 
Pretty neat stuff. I skimmed over everything and didn't see BlzPauseUnitEx(), is that in the list?

Also, did this get fixed?
  • Set VariableSet
And other weird grammatical errors like that?
no and no, but can add those into revision 5
I would suggest to make Itempool be created on default for globals, like groups & dialogs do.
itempool should use itemcode not integer, don't want to type in rawCodes as decnumber.

You might add shopping functions somthing quite nice, but lacking in GUI:
BuyUnitForPlayer=0,player,unit,unitcode
_BuyUnitForPlayer_Defaults=Player00,GetTriggerUnit,hfoo
_BuyUnitForPlayer_Category=TC_NEUTRALBUILDING
_BuyUnitForPlayer_ScriptName=IssueNeutralImmediateOrderById

BuyItemForPlayer=0,player,unit,itemcode
_BuyItemForPlayer_Defaults=Player00,GetTriggerUnit,bgst
_BuyItemForPlayer_Category=TC_NEUTRALBUILDING
_BuyItemForPlayer_ScriptName=IssueNeutralImmediateOrderById

I once added presets that were missing in my opinion, the none melee races, bj_isSinglePlayer, bj_dncIsDaytime, triggerNull, ...

RaceNage=0,race,ConvertRace(11),WESTRING_UE_UNITRACE_NAGA
RaceCommoner=0,race,ConvertRace(9),WESTRING_UE_UNITRACE_COMMONER
RaceCreep=0,race,ConvertRace(8),WESTRING_UE_UNITRACE_CREEPS
RaceCritters=0,race,ConvertRace(10),WESTRING_UE_UNITRACE_CRITTERS
RaceOther=0,race,RACE_OTHER,WESTRING_UE_UNITRACE_OTHER
RaceUnknown=0,race,null,WESTRING_UE_UNITRACE_UNKNOWN
thanks for the suggestions bb <3
 
rev5
-Itempool now uses itemcode instead of integer
-Fixed Set VariableSet typo
-Added more race presets (naga, commoner, critters, creep, other, unknown) (thanks, tasyen)
-Added BlzPauseUnitEx, IssueNeutralImmediateOrderById (buys units/items from shops)
-Fixed some bugs with BlzCreateFrame and BlzCreateSimpleFrame (mistyped function names)
-Itempools are now initialized by default as global variables
-Added Target Flag integer presets to make setting a unit's Targets Allowed fields easier

this is the same actions-frames.blp as rev4, just uploading it again for ease of access.
 

Attachments

  • actions-frames.blp
    2.2 KB · Views: 7
  • worldeditstrings.txt
    482.9 KB · Views: 9
  • triggerstrings.txt
    109.2 KB · Views: 8
  • triggerdata.txt
    718 KB · Views: 11
rev6
-Added a way to use custom scripted if conditions in GUI
-Added order id presets (integer based) and changed all order id based functions to use order id rather than normal integer

actions-frames.blp is still the same, just included for ease of access
 

Attachments

  • triggerdata.txt
    740.6 KB · Views: 9
  • triggerstrings.txt
    109.2 KB · Views: 8
  • worldeditstrings.txt
    498 KB · Views: 8
  • actions-frames.blp
    2.2 KB · Views: 8
Last edited:
rev7
-Added a category for memory cleanup actions so I could give them a cute lil icon
-Fixed a typo somewhere (I think it was start ability cooldown?)
-Added Smart to order id presets list
-Changed TOC File argument from string to anyfile
-Fixed a typo that broke GameEventCustomUIFrame
actions-frames is still the same, and actions-cleanup goes in the same folder

also, here's a little sneak peak of the future of my GUI modding project:
1680751096564.png
 

Attachments

  • triggerdata.txt
    740.8 KB · Views: 13
  • triggerstrings.txt
    109.2 KB · Views: 12
  • worldeditstrings.txt
    498.1 KB · Views: 11
  • actions-frames.blp
    2.2 KB · Views: 9
  • actions-cleanup.blp
    4.6 KB · Views: 9
Level 4
Joined
Jun 19, 2018
Messages
31
That's great! But can you add custom code as an option for every return type of functions like you can with the good old JNGP?
Like in the picture below. It converts to:
JASS:
call CreateNUnitsAtLoc(              (JASS CODE),                                     (JASS CODE),                     (JASS CODE),                       (JASS CODE),                        (JASS CODE) )
Various spacings were used to differentiate between custom code of different types in JNGP TriggerData patch. I am not sure it is necessary.
1683183471105.png
 
That's great! But can you add custom code as an option for every return type of functions like you can with the good old JNGP?
Like in the picture below. It converts to:
JASS:
call CreateNUnitsAtLoc(              (JASS CODE),                                     (JASS CODE),                     (JASS CODE),                       (JASS CODE),                        (JASS CODE) )
Various spacings were used to differentiate between custom code of different types in JNGP TriggerData patch. I am not sure it is necessary.
View attachment 432904
this is a possibility, sure

also an update on the GuiGui application: there's currently a bug with visual studio that causes the designer to freeze when a treeview is present in a tabpage so my hands are tied on development at the moment :(
 
Code:
rev8
-Fixed a typo in TriggerRegisterUnitInRangeSimple's entries (Limits line was input as a second Defaults line)
-A few other minor fixes (honestly don't remember where lol)
-Fixed BlzPauseUnitEx arguments (accidentally had them swapped)
-Changed DisplayTextToPlayer and DisplayTimedTextToPlayer default to Player 1
-Moved Custom Script conditions below Buff Comparison to preserve workflow
-Added GetLocationZ
 

Attachments

  • triggerdata.txt
    741 KB · Views: 8
  • triggerstrings.txt
    109.3 KB · Views: 7
  • worldeditstrings.txt
    498.1 KB · Views: 7
  • actions-cleanup.blp
    4.6 KB · Views: 6
  • actions-frames.blp
    2.2 KB · Views: 6
Code:
rev9
-Added SetUnitX, SetUnitY, UnitAlive, and GetUnitBuildTime
-Fixed "intger" typo in BlzSetAbilityIntegerField arguments list
-Fixed a broken argument (red value) in PingMinimapLocForForceEx
-Alphabetized categories for all function call types (except for returns handle because that's kinda not possible)
-Added WESTRINGs for Text Justify presets so they don't all show up blank anymore
 

Attachments

  • triggerdata.txt
    742.4 KB · Views: 5
  • triggerstrings.txt
    109.7 KB · Views: 4
  • worldeditstrings.txt
    498.3 KB · Views: 4
  • actions-cleanup.blp
    4.6 KB · Views: 3
  • actions-frames.blp
    2.2 KB · Views: 3
1698116288475.png

found a workaround for the treeview thing and have made great strides, GuiGui might actually be ready soon 🥳

This is not needed in Lua, it's erased. Blizzard's hidden jass2lua transpiler

Good job and great idea. I hope for some translation solution in the future.
it's not needed to use those in raw script, but for GUI, you will get an error without it
 
Last edited:
Code:
rev11
-Gave frameevents westrings oops lol
-BlzChangeMinimapTerrainTex now uses imagefile for its argument instead of string
-Added Widget Dies event
-Added GetTriggerWidget

widget dies and gettriggerwidget both say item here rather than widget, haven't tested but @TriggerHappy suggested this as a way to check when an item dies
 

Attachments

  • actions-cleanup.blp
    4.6 KB · Views: 4
  • actions-frames.blp
    2.2 KB · Views: 4
  • triggerdata.txt
    745.3 KB · Views: 4
  • triggerstrings.txt
    109.7 KB · Views: 4
  • worldeditstrings.txt
    499.4 KB · Views: 4
Top