1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
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. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    My god that looks beautiful. Great stuff, lfh. Hoping @MindWorX can also include this to his JNGP.
     
  2. Ruke

    Ruke

    Joined:
    Sep 19, 2011
    Messages:
    517
    Resources:
    7
    Tools:
    1
    Spells:
    5
    Wurst:
    1
    Resources:
    7
    Excellent work man, four suggestions:

    1 - Allow to search fonts
    2 - Allow to change font line space
    3 - Allow to export/import config (want to install my theme?, here)
    4 - Allow to list & change (installed?) themes/configs
     
    Last edited: Mar 27, 2017
  3. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,563
    Resources:
    9
    Models:
    1
    Icons:
    2
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    9
    I agree..
     
  4. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    995
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Thanks guys, I am glad you like it.

    Please report any bugs/problems you encounter (or also things you like), looking forward for your feedback.

    You can already change the font: the font dialog enumerates all installed fonts, if you want to add new ones just install them (they will be automatically added the next time you open the dialog).

    This is not supported by Scintilla due to performance reasons.

    You can already export/exchange your config: just share your styles.ini file (or your options.ini file if you want to share your general/autocomplete options). In those two files, all information about your current config is stored.

    However, I will probably add the option to load a different style file at runtime, but I think the way it is now is already quite flexible.
     
    Last edited: Mar 27, 2017
  5. Ruke

    Ruke

    Joined:
    Sep 19, 2011
    Messages:
    517
    Resources:
    7
    Tools:
    1
    Spells:
    5
    Wurst:
    1
    Resources:
    7
    1 - Allow to search fonts

    I meant an input to search for installed fonts ^^.
     
  6. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    995
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Why?

    The list is already sorted alphabetically, so it should be straightforward to find the desired font. Also the list is sensitive to typing, so you can basically already search for installed fonts by just typing the name. The list itself is the input: it will scroll automatically to the matching font while you type its name. This is also pretty much the standard way how it is done in the common ChooseFont dialog from the Win API.

    Every new feature should provide a real and measurable benefit for the user.
     
  7. Hotwer

    Hotwer

    Joined:
    Mar 10, 2013
    Messages:
    370
    Resources:
    0
    Resources:
    0
    Looking forward to check it out.
     
  8. kokorombom

    kokorombom

    Joined:
    Feb 15, 2017
    Messages:
    6
    Resources:
    0
    Resources:
    0
    Default font and style makes it impossible to differentiate between q and g in raw codes.
     
  9. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    995
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    It has always been like that, even in the first TESH by SFilip, its nothing specific to this TESH.

    TESH 2.0 keeps the default styling as close to the original as possible (with very few exceptions).

    If you don't like this, just change the styling for raw codes to a style were you can differentiate between those. Thats exactly what the new options dialog was made for.
     
  10. Kazeon

    Kazeon

    Joined:
    Oct 12, 2011
    Messages:
    3,299
    Resources:
    38
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    3
    JASS:
    4
    Resources:
    38
    This piece of code was posted here from the JNGP using your tesh:
    Code (vJASS):

        globals
            private constant real    INTERVAL                         = 0.0312500
            private constant real    RELOCATION_RATE                = 0.01
            private constant real    GRAVITY                         = 9.8*INTERVAL
            // Accuracy to calculate slope
            private constant real    SLOPE_DETECTION_RADIUS         = 0.1
            // Higher accuracy will result different trajectory
            // Consumes more memory but  guaranted to produce more realistic trajectory
            private constant integer SLOPE_DETECTION_ACCURACY         = 5
            private constant real    SLOPE_SPEED_INCREMENT_STRENGTH = 0.05
            private constant real    SLOPE_SPEED_REDUCTION_STRENGTH = 0.05
            // Higher value makes slopes have higher to move speed
            private constant real    SLOPE_STRENGTH_FACTOR             = 1.25
            private constant real    MAXIMUM_SLOPE_SPEED_BONUS_RATE    = 1.5
       
            private constant real   MAX_WALKABLE_SLOPE             = 85.0*bj_DEGTORAD
            private constant real   SLIP_MAXIMUM_SPEED             = 522.0*INTERVAL
            private constant real   SLIP_TURN_RATE                 = 15.0*bj_DEGTORAD
            private constant real   ABSOLUTE_SPEED_LIMIT             = 1044.0*INTERVAL
       
            // Minimum slope to indicate take-off
            private constant boolean IDLE_DEACCELERATION            = false
            private constant real   MINIMUM_TAKE_OFF_TILTNESS         = 45.0*bj_DEGTORAD
            private constant real   RANGE_UNIT_ATTACK_RANGE         = 600.0
            private constant real   MELEE_UNIT_ATTACK_RANGE         = 128.0
            private constant real   GENERAL_UNIT_BACKSWING_POINT    = 0.800
            private constant real   GENERAL_UNIT_TURN_RATE            = 5.0*bj_DEGTORAD
            private constant real   GENERAL_UNIT_ACCELERATION        = 16.0*INTERVAL
            private constant real    GENERAL_UNIT_DEACCELERATION    = 5.0*INTERVAL
            private constant real   GENERAL_UNIT_MASS                = 2.0*INTERVAL
       
        endglobals


    Whereas it looks neat already in WE:
    asd.jpg

    Can you fix it?

    Anyway, this is a lot of improvements of the older tesh, nicey job!
    It will be cool tho if it can put user declared functions and variables inside the auto complete list.
     
  11. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    995
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Interesting, but this is not TESH related. It seems there is a difference between the richtext editor component of the forum and raw BB code editor, i.e. how they handle indentation in code.

    If I fix your code within the TESH using tabs (same applies for spaces) and post it here in the richtext component using jass-blocks I get:

    Richtext code

    Code (vJASS):

     globals
            private constant real    INTERVAL                       = 0.0312500
            private constant real    RELOCATION_RATE               = 0.01
            private constant real    GRAVITY                       = 9.8*INTERVAL
            // Accuracy to calculate slope
            private constant real    SLOPE_DETECTION_RADIUS           = 0.1
            // Higher accuracy will result different trajectory
            // Consumes more memory but  guaranted to produce more realistic trajectory
            private constant integer SLOPE_DETECTION_ACCURACY       = 5
            private constant real    SLOPE_SPEED_INCREMENT_STRENGTH   = 0.05
            private constant real    SLOPE_SPEED_REDUCTION_STRENGTH   = 0.05
            // Higher value makes slopes have higher to move speed
            private constant real    SLOPE_STRENGTH_FACTOR           = 1.25
            private constant real    MAXIMUM_SLOPE_SPEED_BONUS_RATE   = 1.5
     
            private constant real   MAX_WALKABLE_SLOPE               = 85.0*bj_DEGTORAD
            private constant real   SLIP_MAXIMUM_SPEED               = 522.0*INTERVAL
            private constant real   SLIP_TURN_RATE                   = 15.0*bj_DEGTORAD
            private constant real   ABSOLUTE_SPEED_LIMIT           = 1044.0*INTERVAL
     
            // Minimum slope to indicate take-off
            private constant boolean IDLE_DEACCELERATION           = false
            private constant real   MINIMUM_TAKE_OFF_TILTNESS       = 45.0*bj_DEGTORAD
            private constant real   RANGE_UNIT_ATTACK_RANGE           = 600.0
            private constant real   MELEE_UNIT_ATTACK_RANGE           = 128.0
            private constant real   GENERAL_UNIT_BACKSWING_POINT   = 0.800
            private constant real   GENERAL_UNIT_TURN_RATE           = 5.0*bj_DEGTORAD
            private constant real   GENERAL_UNIT_ACCELERATION       = 16.0*INTERVAL
            private constant real    GENERAL_UNIT_DEACCELERATION   = 5.0*INTERVAL
            private constant real   GENERAL_UNIT_MASS               = 2.0*INTERVAL
     
        endglobals
     



    If I paste the same code in the BB code editor I get:

    BB code

    Code (vJASS):

     globals
            private constant real    INTERVAL                       = 0.0312500
            private constant real    RELOCATION_RATE                = 0.01
            private constant real    GRAVITY                        = 9.8*INTERVAL
            // Accuracy to calculate slope
            private constant real    SLOPE_DETECTION_RADIUS         = 0.1
            // Higher accuracy will result different trajectory
            // Consumes more memory but  guaranted to produce more realistic trajectory
            private constant integer SLOPE_DETECTION_ACCURACY       = 5
            private constant real    SLOPE_SPEED_INCREMENT_STRENGTH = 0.05
            private constant real    SLOPE_SPEED_REDUCTION_STRENGTH = 0.05
            // Higher value makes slopes have higher to move speed
            private constant real    SLOPE_STRENGTH_FACTOR          = 1.25
            private constant real    MAXIMUM_SLOPE_SPEED_BONUS_RATE = 1.5
       
            private constant real   MAX_WALKABLE_SLOPE              = 85.0*bj_DEGTORAD
            private constant real   SLIP_MAXIMUM_SPEED              = 522.0*INTERVAL
            private constant real   SLIP_TURN_RATE                  = 15.0*bj_DEGTORAD
            private constant real   ABSOLUTE_SPEED_LIMIT            = 1044.0*INTERVAL
       
            // Minimum slope to indicate take-off
            private constant boolean IDLE_DEACCELERATION            = false
            private constant real   MINIMUM_TAKE_OFF_TILTNESS       = 45.0*bj_DEGTORAD
            private constant real   RANGE_UNIT_ATTACK_RANGE         = 600.0
            private constant real   MELEE_UNIT_ATTACK_RANGE         = 128.0
            private constant real   GENERAL_UNIT_BACKSWING_POINT    = 0.800
            private constant real   GENERAL_UNIT_TURN_RATE          = 5.0*bj_DEGTORAD
            private constant real   GENERAL_UNIT_ACCELERATION       = 16.0*INTERVAL
            private constant real    GENERAL_UNIT_DEACCELERATION    = 5.0*INTERVAL
            private constant real   GENERAL_UNIT_MASS               = 2.0*INTERVAL
       
        endglobals
     



    As you can see, indentation is broken in the richtext component, in the raw BB code edior eveything is fine.

    This problem persists in the old TESH and even without any TESH (just the raw WE text edit component).

    So this is a bug on the forum side, not related to TESH. As a workaround, until this is fixed, just use BB code when posting code.

    Thanks. Yes, would be cool, but at the moment this is out of scope (maybe some day).
     
  12. Kazeon

    Kazeon

    Joined:
    Oct 12, 2011
    Messages:
    3,299
    Resources:
    38
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    3
    JASS:
    4
    Resources:
    38
    Are you sure? I mean, for example:
    Code (vJASS):


        /************************************************************************************
        *                                                                                   *
        *                          Special Creep Engine v3.2                                *
        *                                         *****                                     *
        *                                     by: Dalvengyr                                 *
        *                                                                                   *
        *  This engine generates special behavior to creep units. Makes your RPG become     *
        *  much more alive. Give some brains to those shrimp-head creeps. They can flee,    *
        *  they have sight area (you can sneak behind them), they are able to help each     *
        *  other, they become aggressive and not aggressive as well. And many more!         *
        *                                                                                   *
        *  External dependencies:                                                           *
        *   (required)                                                                      *
        *     - Table                                                                       *
        *     - UnitIndexer                                                                 *
        *     - GetClosestWidget                                                            *
        *     - Any DDS                                                                     *
        *   (optional)                                                                      *
        *     - TimerUtils                                                                  *
        *                                                                                   *
        *  Implementation:                                                                  *
        *     - Copy paste SCE folder into your map                                         *
        *     - Give two player slots for passive and aggresive player, better just         *
        *        leave'em as closed slot                                                    *
        *     - Configure the system                                                        *
        *     - Done.                                                                       *
        *                                                                                   *
        *  Credits:                                                                         *
        *     - GDD by Weep                                                                 *
        *     - GetClosestWidget by Bannar                                                  *
        *     - UnitIndexer by Nestharus                                                    *
        *     - TimerUtils by Vexorian                                                      *
        *     - Table by Bribe                                                              *
        *                                                                                   *
        *   (You can read more info at READ ME trigger)                                     *
        *                                                                                   *
        *************************************************************************************
        *                                                                                   *
        *                                CONFIGURATION                                      */

     

    It was before updated using your tesh. And this is how it looks afterward (I renamed the system):
    Code (vJASS):

        /************************************************************************************
        *                                                                                   *
        *                           RPG Threat System v3.2c                                 *
        *                                         *****                                     *
        *                                       by: Quilnez                                 *
        *                                                                                   *
        *  This system generates special behavior to creep units. Gives some brains to        *
        *  those shrimp-head creeps. They can flee, they have artificial sight area            *
        *  (you can sneak behind them), they are able to help each other, they become        *
        *  aggressive or not aggressive as well. And many more!                             *
        *                                                                                   *
        *  External dependencies:                                                           *
        *   (required)                                                                      *
        *     - Table                                                                       *
        *     - UnitIndexer                                                                 *
        *     - GetClosestWidget                                                            *
        *     - Any DDS                                                                     *
        *   (optional)                                                                      *
        *     - TimerUtils                                                                  *
        *                                                                                   *
        *  Implementation:                                                                  *
        *     - Copy paste RPG Threat System folder into your map                            *
        *     - Give two player slots for passive and aggresive player, better just         *
        *       leave'em as empty player slot                                               *
        *     - Configure the system & start defining your creep behavior                    *
        *     - Done.                                                                       *
        *                                                                                   *
        *  Credits:                                                                         *
        *     - GDD by Weep                                                                 *
        *     - GetClosestWidget by Bannar                                                  *
        *     - UnitIndexer by Nestharus                                                    *
        *     - TimerUtils by Vexorian                                                      *
        *     - Table by Bribe                                                              *
        *                                                                                   *
        *   (You can read more info at READ ME trigger)                                     *
        *                                                                                   *
        *************************************************************************************
        *                                                                                   *
        *                                CONFIGURATION                                      */


    You see the only parts that got wrongly indented are only the ones I modified with your tesh. So I think the older tesh doesn't have this problem.
     
  13. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    995
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Hm, please be more specific... are you talking now about the code in the WE itself? Or only about how the code is displayed here on this site within jass blocks?

    With the code you posted, I cannot reproduce the problem, because the first code is indented correctly when I paste it into the WE with the new TESH.

    Can you upload a minimal example map that contains code of your example above (only the renamed system)?
     
  14. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    It seems the new TESH crashes the editor when you try to save it after opening the Trigger Editor.

    Saving map without opening Trigger Editor
    NoCrash.gif


    Saving map after opening Trigger Editor
    Crash.gif


    As you can see with the second GIF, all I do is open the Trigger Editor and immediately close.
     
  15. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    995
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    The bug has been confirmed on the forum side in the meantime, so I am pretty sure that it is not TESH related. If you have indications that it could be different, please share them.

    Hm, I cannot reproduce this behavior, I can safe and close without any problems... I need more details:

    • Which OS and which version of Wc3 are you using?
    • This only happens when actually closing the whole WE, not when just saving, right?
    • Does this also happen if you close without saving (click "No" button)?
    • Does this always happen (i.e. reproducable) or does it sometimes work?
    • Did you open any sub-windows of the TESH before (like function list etc.)?
     
  16. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Windows 10 64 Bit / 1.27b

    Yes

    Never gave it a try. I will try once i reinstall WC3 because patch 1.28 has some issues.

    Yes it always happened, which is how I was able to record the GIF :D I was able to figure out what was causing the crash because I was reviewing a few submissions in the Spell Section.

    Nope. All I did was open the Trigger Editor, close it, and then closed the WE.
     
  17. Kazeon

    Kazeon

    Joined:
    Oct 12, 2011
    Messages:
    3,299
    Resources:
    38
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    3
    JASS:
    4
    Resources:
    38
    Yep you're right. That's my bad for reporting without testing the older tesh. In fact I just tested it a few moments ago : p
     
  18. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Back with an update, lfh.

    Saving doesn't crash it. However, if you save, and then close the map after, it still crashes.

    Yes. It also happens when I click on the "No" button

    100% of the time. All I have to do is open the Trigger Editor, close it, and close the map.
     
  19. looking_for_help

    looking_for_help

    Joined:
    Dec 12, 2012
    Messages:
    995
    Resources:
    5
    Spells:
    2
    JASS:
    3
    Resources:
    5
    Ok, thats good to know, thanks for checking that again.

    Thanks for the detailed explanation, I will try to fix that ASAP. However, I am still not able to reproduce the bug, maybe thats something Win10 specific... (I use Win7).
     
  20. Glowackos

    Glowackos

    Joined:
    Feb 28, 2011
    Messages:
    15
    Resources:
    0
    Resources:
    0
    Awesome! Will give feedback after giving it a test ride.

    Thanks very much for constantly addressing all the points everyone raises. I'm already loving what I've read in the changelog.

    I'd give you more rep, but website won't let me yet. :p