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

Introducing the Trigger Viewer

Status
Not open for further replies.

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
As some of you might know, I slave away making changes to the site and logging them in my changelog. Sometimes these changes are nice and helpful but not worthy of news but sometimes they can be quite significant.
Today I am happy to announce to you the "Preview Triggers" function. On every map without map protection in the maps and spells section you will find a little link right next to the famous "View Resources In Use" called "Preview Triggers":
Screenshot 2017-07-15 20.46.13.png

This shows you a replica of the World Editor's Trigger Editor with all triggers of the map. These triggers can be copy-pasted into [trigger] tags with correct indentation and each trigger also has a link so you can reference it in a post.
Screenshot 2017-07-15 20.47.14.png

This will be a useful tool in many situations: when showing examples of how things are made in the World Editor Help Zone, when spell and map moderators take a quick look at the source of a map to form an opinion, when browsing for a spell and looking at how its made before deciding to download it and many more.

This tool also brought along with it a much more exact specification for the war3map.wtg file format which is big progress for the modding community. Now we are one step closer to knowing everything there is to know about the file formats in maps so we can one day seize control and make our own full alternative World Editor!

Please post all feedback related to this tool in Site Discussion / Bug Reports. I am very interested in differences between the World Editor and this Trigger Viewer in terms of rendering text. I know there are a few cases where they are not the same. Please help me make it more accurate :).
 
Level 12
Joined
Jan 4, 2014
Messages
543
Holy shit man. You just created the solution to all the "can someone unprotect this map so I can see how he/she made this trigger". You also simultaneously turned hive into an amazing open source for triggers/code resource. Praise be to Ralle the one true king of hivesteros!
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
Thanks everyone!

Looks great, Ralle. I almost said that we could probably get rid of the rule in the Spell Section where submissions musnt include code / triggers in the description until I noticed that syntax highlighting isn't supported.
Syntax highlighting is on the list of things to do. I just had a vanilla trigger viewer as my focus to begin with.

Now to those of you who like homework. I would like examples of triggers using the following types of data:
Code:
destructablecode
ordercode
techcode
 

Shar Dundred

Community Moderator
Level 72
Joined
May 6, 2009
Messages
5,862
Awesome new tool, indeed.

I want to point out, though, that it doesn't seem to work for campaigns,
showing the message that the map was protected.

Just suggesting to replace the message for campaigns or, if that is not possible,
change it to "This map is protected or a campaign file".
Not a big deal, though, just wanted to let you know. =)
 
Awesome new tool, indeed.

I want to point out, though, that it doesn't seem to work for campaigns,
showing the message that the map was protected.

Just suggesting to replace the message for campaigns or, if that is not possible,
change it to "This map is protected or a campaign file".
Not a big deal, though, just wanted to let you know. =)

Campaign is not a map file, it's a collection of maps.

The button shouldn't even be included for campaigns.
 

EdgeOfChaos

E

EdgeOfChaos

Very nice feature! Thank you
Only one issue: there's no syntax highlighting for JASS codes

The part I'm most excited about is the .w3g format specification. Maybe now I can finally write some GUI restoration tools... I've tried to parse these before, couldn't understand it at all.
 
Last edited by a moderator:

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
Ah yes, campaigns. It's on my list. Would be nice if each map was extracted and available with a trigger viewer each.
The part I'm most excited about is the .w3g format specification. Maybe now I can finally write some GUI restoration tools... I've tried to parse these before, couldn't understand it at all.
Ah. With this new spec I believe it should be easier, but I think this topic is too close to talking about map de-protection which we aren't permitted to.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Did you have any plans of open sourcing the code? I'm working on recreating the trigger editor for DotA 2 and it would be nice to see some of the styling and the mechanics used in trigger files.
 
Level 12
Joined
May 20, 2009
Messages
822
This is a fucking amazing idea and so cool and seems perfectly executed. <3
The only thing that really seems to be missing is the ability to copy it right off the site and paste it directly into WC3.

Is this going to work with Galaxy Script for StarCraft II maps as well?
 
Level 12
Joined
May 20, 2009
Messages
822
@deepstrasz It's not about being lazy, it's about further convenience and simplification of the process to make it even easier for people to grab code off the site to put into their map. You shouldn't even have to download the map just to get some code, I mean it's possible for someone to just put all of their JASS/vJASS code into a Forum Thread or even in the description of a map in the Maps/Spells/Systems section with no actual downloading or opening in the Editor of the map required. This can only actually be done with JASS/vJASS though because GUI variables are handled in the Variable Manager which you don't get direct copy/pasting capability to like with JASS/vJASS, at least not without also using JASS. his could probably be got around by making it copy the variables section of the Trigger View as a normal trigger that has all the variables in it like those maps.
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
Did you have any plans of open sourcing the code? I'm working on recreating the trigger editor for DotA 2 and it would be nice to see some of the styling and the mechanics used in trigger files.
I don't know. Most of the work lies in parsing those exotic file formats and cross referencing names of objects. The rest is UI in HTML/CSS which you can read off the site directly. I don't think that in your case it will really be much help.
The only thing that really seems to be missing is the ability to copy it right off the site and paste it directly into WC3.
Now THAT would be awesome. I have no idea how to do that. Not sure if I can create such rich copy-paste on the web.
Is this going to work with Galaxy Script for StarCraft II maps as well?
That wasn't planned and due to how inactive SC2 is, I am not sure it will be worth it.
 
Level 12
Joined
May 20, 2009
Messages
822
Not sure if I can create such rich copy-paste on the web.

Is there no just direct byte editing of the clipboard? Maybe there are some exploits you could do with certain text or image formats that could make the data of said text or image correspond directly to how a trigger get's put into the clipboard when copying from in the Trigger Editor?

Maybe when it is finally possible to make that fully community-made World Editor, like you mentioned in OP, it could be much easier because it could interpret text as a trigger (So you could just copy the text from the website and paste it in the Trigger Editor and it'll create a new trigger). I dunno.
 

Ralle

Owner
Level 77
Joined
Oct 6, 2004
Messages
10,101
Is there no just direct byte editing of the clipboard? Maybe there are some exploits you could do with certain text or image formats that could make the data of said text or image correspond directly to how a trigger get's put into the clipboard when copying from in the Trigger Editor?
I don't think that's possible.

Maybe when it is finally possible to make that fully community-made World Editor, like you mentioned in OP, it could be much easier because it could interpret text as a trigger (So you could just copy the text from the website and paste it in the Trigger Editor and it'll create a new trigger). I dunno.
That is still possible. Both if it is 100% web based but also if it's a new desktop app which I think people would prefer anyway.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Is there no just direct byte editing of the clipboard? Maybe there are some exploits you could do with certain text or image formats that could make the data of said text or image correspond directly to how a trigger get's put into the clipboard when copying from in the Trigger Editor?

Not sure exactly what you want but of course one could inspect the clipboard data the WE trigger editor employs as it already has copy/paste. The other question is if there is binary clipboard setting functionality in web development, which I have not seen before but oh well, a short google search -> Copy to clipboard BINARY data in browsers

What I would like to see on the download page is additional player/force data information, basically the slots you see in the game lobby because when we had our Funmap Evenings before for example, you would have to host/open the map in order to know the setup to then decide if the map makes sense to play with the currently available playerbase. The force/player information is in .w3i. You can check out GitHub - inwc3/wc3libs: general java wc3libs (wc3libs/W3I.java at master · inwc3/wc3libs · GitHub). I am currently busy IRL, maybe Frotty can help you out further if required.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
What I would like to see on the download page is additional player/force data information, basically the slots you see in the game lobby because when we had our Funmap Evenings before for example, you would have to host/open the map in order to know the setup to then decide if the map makes sense to play with the currently available playerbase. The force/player information is in .w3i. You can check out GitHub - inwc3/wc3libs: general java wc3libs (wc3libs/W3I.java at master · inwc3/wc3libs · GitHub).
Thats smart. What do you think @Ralle
 
Status
Not open for further replies.
Top