1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

A new TESH Syntax Highlighter for Warcraft 3

Discussion in 'Warcraft Editing Tools' started by looking_for_help, Dec 28, 2013.

  1. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    New Update Available

    This update brings a new feature, namely that each trigger now has its own, independent Undo history. So if a trigger is now modified, deselected and selected again, the Undo history of this trigger is still available, making the illusion of a native editor almost perfect.

    Furthermore, the issue that the Hook.dll caused the editor to crash if Window Manager programs were used in combination with the TESH is also fixed now. A smaller enhancement is, that weathereffect char-keys are now also included to the char specific autocomplete list. Attached is a screenshot showing the new weathereffect icon.

    [​IMG]


    Finally, the TESH menu got improved further by adding more functionality. It contains now options to convert all tabs of the current selection to spaces and vice versa, as well as conversion to upper- and lowercase. Also several new trigger templates were added to the menu to make system or testing/benchmarking creation easier.

    [​IMG]


    And here a full change list:

    Update to Version 0.8.5
    - Each trigger has now an independent Undo history
    - Fixed a bug that could cause a crash in combination with window manager programs
    - Added Conversion to upper/lower case to the TESH Menu
    - Added Conversion from Spaces to Tabs and from Tabs to Spaces to the TESH Menu
    - Added new trigger templates to the TESH Menu, e.g. for scope with timer
    - Added weathereffect rawcodes to the the char-specific autocomplete list
     
  2. Bannar

    Bannar

    Joined:
    Mar 19, 2008
    Messages:
    3,087
    Resources:
    20
    Spells:
    5
    Tutorials:
    1
    JASS:
    14
    Resources:
    20
    The idea in regard to "inits" is nice and all, tho if you really want to do this, then you have to implement more options like: struct init with timer and so on. It's not like we use init-timer just within scopes :)

    Also, switching the "inits" options overwrites everything, even the code that has been previously implemented. Meaby there could be a possibility to "append" inits instead of overwritting?
    Anyway, TESH2 owns.
     
  3. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Hm yes, those are good points.

    I'm still not 100% sure how to design this template stuff, but I can include struct/timer and so on in the next update.
     
  4. Bannar

    Bannar

    Joined:
    Mar 19, 2008
    Messages:
    3,087
    Resources:
    20
    Spells:
    5
    Tutorials:
    1
    JASS:
    14
    Resources:
    20
    Imho if you really want templates then probably you could organize them in tree form:

    Code (vJASS):
    Templates
       Initializers
           Library
               func initializer
               func initializer + timer
           Scope
               func initializer
               func initializer + timer
           Struct
               method onInit
               method onInit + timer
           Module
               method onInit
               method onInit + timer
        Structs
            array struct
                spell - create / destroy / callback
                basic - create / destroy
                static struct
            generic struct
                spell - callback

    You could provide additional window when e.g struct menu option is clicked: "Provide your type name:", thus your template would append base code with already added type name.

    It's hard to decide what should/should not be added since everyone seems to have different style - we are not an organization or team i.e we don't have someone in charge that sets some general rules of how to write / name / syntax our code. Bribe's JPAG describes most of general things, yet a) decision is still up to user b) there is ton of stuff that it doesn't stadarize e.g doesn't enforce module inits naming -> "init" or <struct type> + "Init"? Why do I mentioned that? Because someone who likes the second version (like me, I like to know the struct type my module init is going to be implemented to) may be discouraged to use your templates just because it's called "init".

    And yes, lol, ppl might be pedantic and care about such things.
     
  5. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,611
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    Wow this is getting really good progress wise.

    I just gotta throw some more rep your, way :p keep it up.
     
  6. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Yeah, that a treeform like that is maybe the best solution, I will think a bit more about that. However, I'm not sure about the appending of those templates to current source code. The main purpose to use those templates is that when you write a new library/struct, you don't have to rewrite the basics of such a library like initializers. If you already have Source Code in your current trigger, you will most likely already have setup such things before, making the use of such a template quite useless.

    Thanks :)
    I'm confident that within the next months I can finally release version 1.0, although before there might be some more updates.
     
  7. Bannar

    Bannar

    Joined:
    Mar 19, 2008
    Messages:
    3,087
    Resources:
    20
    Spells:
    5
    Tutorials:
    1
    JASS:
    14
    Resources:
    20
    It's not like some systems doesn't use 2x module initializer cuz those might implement multiple strucy types instead of just one. As of now, I can not write two inits without overwritting the first one.
     
  8. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Yes thats right, but its not possible to provide templates for every special situation that might occur anyway, at least not with a reasonable amount of templates. The templates should just provide a fast way to load a common code configuration on trigger creation (because the default one which you get by converting GUI is really bad), and are not meant to extend existing code.

    Because if you start something like this, the possible combinations grow exponentially. You then can add library with struct init, with module init, with timer and struct init, with timer and module init, with two struct inits, with two struct inits and timer, with two module inits, two module inits and timer, one module init and one struct init, one module init and one struct init with timer, and so on. Same for scope, same for everything again but not within a library (struct without library) and so on. No one will be able to overlook that amount of templates.

    Realizing all this combinations will make the tree (and therfore the template menu) unreasonably huge and it might take more time to navigate to the correct template than just typing out everything.

    And if you really are about to design a system with 2 module initializers (which is quite rare), you can do this very easily by just loading the one-initializer template and copy/paste the initializer. This is still much faster than writing everything by hand.
     
  9. Cokemonkey11

    Cokemonkey11

    Wurst Reviewer

    Joined:
    May 9, 2006
    Messages:
    3,240
    Resources:
    18
    Tools:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    2
    JASS:
    7
    Resources:
    18
    Downloading latest version. Congrats on the release, LFH.

    Is it possible to provide the code open-source, or at least keep version history in the original post?
     
  10. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Thanks :)

    I added a version history to the original post with links to the all the corresponding updates.

    I will publish the source code some day, but not in near future because without a proper documentation it is pretty much not useable.
     
  11. Cokemonkey11

    Cokemonkey11

    Wurst Reviewer

    Joined:
    May 9, 2006
    Messages:
    3,240
    Resources:
    18
    Tools:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    2
    JASS:
    7
    Resources:
    18
    Cool, thanks :)

    I suggest reading git flow: https://guides.github.com/introduction/flow/index.html which might help explain why it's no disadvantage to publicize what you have so far.

    Regards,
     
  12. Imp Midna

    Imp Midna

    Joined:
    May 6, 2013
    Messages:
    125
    Resources:
    0
    Resources:
    0
    So, what would it take to make this thing compatible to the 1.26 version of the world editor?
     
  13. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,427
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Most likely an update to grimoire (since TESH is injected via grimoire). I don't know how difficult that task would be though.
     
  14. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Hi,

    what exactly is the 1.26 Version of the world editor? I only know the latest Patch for TFT which is Version 1.26 (which I use). However, my WE is Version 1.21b - Is there a seperated patch just for the WE which isn't automatically applied when installing the latest patch for Wc3? And is this an official patch?
     
  15. edo494

    edo494

    Joined:
    Apr 16, 2012
    Messages:
    3,855
    Resources:
    5
    Spells:
    1
    JASS:
    4
    Resources:
    5
    no, but the jngp uses the older version(1.21) of the editor for some reason
     
  16. Imp Midna

    Imp Midna

    Joined:
    May 6, 2013
    Messages:
    125
    Resources:
    0
    Resources:
    0
    Not sure how the versions history looks like, i bought warcraft 3 the day that the 1.26 patch came out, and my world editor calls itself "version 1.26" (6059, which i asume is the build number) in the help page; the only other version number i've ever came across is "version 7" (which is what the editor tells itself while saving a map), and since integer version numbers sort of blow, i went with the 1.26.

    updating the entire grimoire library would surely be a lot of work, but i guess TESH doesn't need all of its features, does it? Just looking through the grimoire manual, i guess most of the functions are probably not required (testmap with cmd line, -window and -opengl parameter, -run, which probably doesn't work anymore to begin with, doodad limit and map sizes, oe hack, all doesn't seem like its needed for TESH), and the ones that seem to be (clickevent, compilemap, disable normal WE syntax checker, and most likely some way to add a menu point, which is a feature i don't even see in the manual) should be fairly easy to do for me, as I've already spent quite a few days finding these things.
     
  17. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Ok, I didn't know that... Have to check later.

    Actually I don't use grimoire at all, I made all this stuff on my own. I just need someone who loads the dll on start-up, nothing else.

    However, does JNGP itself work with this WE-Version? Because if not it wouldn't make sense to use a TESH in the first place if vJass itself doesn't work, right?
     
  18. Imp Midna

    Imp Midna

    Joined:
    May 6, 2013
    Messages:
    125
    Resources:
    0
    Resources:
    0
    It doesn't, as the version grimoire is made for (1.21, iirc), has quite a lot of differences in its binary (it seems to me that somewhere between 1.21 and 1.26, blizzard must have found the /O parameter of their compiler).

    Not that adding vJass compatibility would be too much to do (i'D say about 1 or 2 hours of work), but i can't use vJass anyway. I'm currently working at a 2 (or 2 and a half) man project, and my partner doesn't want to use jngp or vJass. (not that i have a problem with that, i like the challange.) Since I've replicated most of the jngp features (and even features that jngp doesn't have) on my own, the only real thing missing for me right now is a syntax highlighter, so i hoped for a way to port this one (cause it looks pretty damn awesome).
     
  19. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    961
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Alright, in principle it should work without any problems. If you "replicated" (what do you mean with that, actually?) JNGP you also hooked into the WE, right? Because then you could just load the tesh.dll which should automatically do the rest. Did you try that?
     
  20. Imp Midna

    Imp Midna

    Joined:
    May 6, 2013
    Messages:
    125
    Resources:
    0
    Resources:
    0
    I just made my own version of the most important functions (-window on testmap startup, custom menu entries, custom exe execution on map compile etc.)

    I tried it, but just loading it into the process memory doesn't seem to do the trick (i can see the dll in the process memory, but it doesn't seem to change anything), so i figured there would be some sort of dependencies on features of jngp (like, special dlls with special functions that have to be loaded beforehand.)