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

A new TESH Syntax Highlighter for Warcraft 3

Level 14
Joined
Dec 12, 2012
Messages
1,007
That worked actually faster than expected... some boundary check managed to slip through and caused the crash. Should be fixed now.

Update to version 0.9.2
  • Fixed a lexer bug that could crash the editor
  • Fixed width of whitespace with fonts and font sizes
  • Fixed error on loading files from path with non-ASCII characters
  • Removed external interface (was unused anyway)
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
It doesn't throw errors any more, but it is as if tesh does not load at all when running from inside a folder with greek characters.

Hm ok, I only tried loading files (like style.txt) from paths containing greek characters. I didn't try putting the whole tesh into a folder with greek characters.

I will take a look soon at this, thanks for the report.
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
New version available that accounts for the new patches and WEX versions.


Update to version 0.9.3
  • Added all new natives of patch 1.29 to the keywords database.
  • Trigger editor name no longer restricted to "Trigger Editor" but all international names are supported now automatically.
  • Now opens correctly when placed in paths containing non-ASCII characters (took a bit).
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
Thanks also @MindWorX for providing the list with international trigger editor names.

Would be nice if people who have a native version of Wc3 or the trigger editor with one of the languages listed below could confirm that the new TESH is working with the native title.

I will then update the list to ensure that it is working with all languages correctly.


Language
Trigger Editor NameTested

English
Trigger EditorYes

German
Auslöser-EditorYes

Spanish
Editor de detonadoresNo

French
Editeur de déclencheurNo

Italian
Editor di triggerNo

Korean
트리거 에디터No

Polish
Edytor wyzwalaczyNo

Russian
Редактор триггеровNo

Chinese (simplified)
触发事件编辑器No

Chinese (TW)
觸發編輯器No
 
Last edited:
Level 12
Joined
Feb 11, 2008
Messages
809
New version available that accounts for the new patches and WEX versions.


Update to version 0.9.3
  • Added all new natives of patch 1.29 to the keywords database.
  • Trigger editor name no longer restricted to "Trigger Editor" but all international names are supported now automatically.
  • Now opens correctly when placed in paths containing non-ASCII characters (took a bit).

awesome man thanks for the good work and btw i think you missed one

Error.png

its the TriggerRegisterPlayerMouseEventBJ
and TriggerRegisterPlayerMouseEvent

EDIT*

btw its working for the english version

EDIT**

also missing the EVENTs for those calls

another error.png

annnndddddd here it still says "this is version 0.9.3" lol a little picky on that one but my OCD got me.
 
Last edited:
Level 14
Joined
Dec 12, 2012
Messages
1,007
awesome man thanks for the good work and btw i think you missed one


its the TriggerRegisterPlayerMouseEventBJ
and TriggerRegisterPlayerMouseEvent

EDIT**

also missing the EVENTs for those calls

Hm, seems like I missed those. I took the list of new natives from this post, but apparently not all new keywords (natives, events, etc.) are listed there. Is there somewhere a full list of all new keywords for patch 1.29? I will add the missing keywords then.

Btw: They still implement BJ-Versions? Does anyone know why?

EDIT*

btw its working for the english version

Thanks for the feedback, I will update the list accordingly. Any other feedback about the remaining languages is appreciated.


annnndddddd here it still says "this is version 0.9.3" lol a little picky on that one but my OCD got me.

Hm, that should be ok, since the latest version is 0.9.3... or do you mean something different?
 
Level 12
Joined
Feb 11, 2008
Messages
809
Um nvm on the version i just misunderstood but all of the events and bjs are in the mpq files i just pulled then out with war3 model editor

Again thanks for updating tesh man

EDIT*

i attached it to the post for you
 

Attachments

  • common.j.txt
    174.5 KB · Views: 116
Last edited:
Level 18
Joined
Nov 21, 2012
Messages
835
Few new "Blz" natives comes with "takes" together with native name.
JASS:
BlzGetAbilityCooldowntakes
BlzGetAbilityExtendedTooltiptakes
BlzGetAbilityManaCosttakes
BlzGetAbilityResearchTooltiptakes
BlzGetItemDescriptiontakes
BlzIsUnitInvulnerabletakes
BlzSetAbilityExtendedTooltiptakes
BlzSetAbilityResearchTooltiptakes
BlzSetItemDescriptiontakes
BlzSetSpecialEffectTimeScaletakes
BlzUnitDisableAbilitytakes
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
Um nvm on the version i just misunderstood but all of the events and bjs are in the mpq files i just pulled then out with war3 model editor

Again thanks for updating tesh man

EDIT*

i attached it to the post for you

Thanks, I will go through the list and add all missing items.

Few new "Blz" natives comes with "takes" together with native name.

Thanks, seems like there went something wrong with these keywords...
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
I confirm, didn't work on spanish on default.

If you want make it work, u have to edit trigger_editor_name.ini and change the name of default value.

That is strange... can you please upload the "trigger_editor_name.ini" file which worked for you?

I don't remember much about Win32, but can you not find the window class and select based on that, regardless of the language?

Unfortunatly not since the class is not unique. For example, the trigger editor window has class #32770, which is used for many other WE windows, like object editor, sound editor and others.
 
Level 9
Joined
Jul 20, 2018
Messages
176
Hello, I found a bug in TESH.

I selected text, checked "Selected Test Only" and pressed "Replace All".
%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA-07-jpg.302936

And then I got this.
%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA-08-jpg.302937

For some reason textmacro name and contents were changed, but they were not selected!

JASS:
    static method getUpgradeData takes integer id returns integer
        local string name = GetObjectName(id)
        if SubString(name, UpgradeCodeStart, UpgradeCodeEnd) == UpgradeCode then
            set UpgradeId = S2I(SubString(name, UpgradeIdStart, UpgradeIdEnd))
            set UpgradeName = SubString(name, UpgradeNameStart, StringLength(name))
            return S2I(SubString(name, UpgradeTypeStart, UpgradeTypeEnd))
        endif
        return 0
    endmethod
endstruct

//! textmacro HeroAbilityPlayerData
struct HeroAbilityPlayerData
    boolean array upgrade[HeroAbilityUpgradesAmount]
 
    method operator [] takes integer i returns boolean
        return upgrade[i]
    endmethod
endstruct
//! endtextmacro
 

Attachments

  • Снимок 07.JPG
    Снимок 07.JPG
    75.6 KB · Views: 681
  • Снимок 08.JPG
    Снимок 08.JPG
    65.5 KB · Views: 748
Last edited:
Level 9
Joined
Jul 20, 2018
Messages
176
Here I found another issue.

%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA-09-jpg.302996

As I understood, TESH works bad with backslash (\). Everything began to display fine after I had removed first 2 strings of function.
 

Attachments

  • Снимок 09.JPG
    Снимок 09.JPG
    76.9 KB · Views: 759
Last edited:
Level 14
Joined
Dec 12, 2012
Messages
1,007
Hi everyone. First of all thanks for the feedback and sorry for the late response. Some clarification:

when next update will come?

Hi, tesh is not currently working with russian editor.

Hello, I found a bug in TESH.

Here I found another issue.

How to use it in the world editor 1.30

Thanks for pointing out these issues. There is a reason why I have not released any new updates yet.

Some months ago MindWorX told me that they plan to integrate TESH directly into the WE (of course I asked MindWorX for permission to post this info).

Therefore, I am currently not working on TESH, because if it will be integrated anyway into the WE, doing so would most likely result in double work and waste of time.


Does option 'Regular expression' work? if yes, how to use it?

I think it should work, since it uses the standard Scintialla regex options. Maybe the Scintilla/Scite documentation on regex does help?
 
Level 3
Joined
Dec 30, 2010
Messages
53
Good to hear. Working on triggers seems almost impossible to me without TESH. Even the font used by the default editor seems awful.

I get it that you don't want to bother having to update with each version, since there is a plan to integrate it, but if it is going to be integrated the same way that jasshelper was, you can at least keep improving the code.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
Good to hear. Working on triggers seems almost impossible to me without TESH. Even the font used by the default editor seems awful.
If you don't know the most important functions you need for something of course it's hard, but surely not impossible. It just forces you to think a bit and try to memorize them. Not having OOP doesn't mean it's awful, just like the font it's not that bad. What annoys me is people like you who aren't capable of adapting to the situations that aren't that good when before you had something that improved your life. Just shows 0 flexibility. Just because TESH is a great thing doesn't mean you can treat WE trigger editor like trash...nor you should be limited to TESH when coding, you should be prepared if you can't use it for a while.
 
Level 3
Joined
Dec 30, 2010
Messages
53
If you don't know the most important functions you need for something of course it's hard, but surely not impossible. It just forces you to think a bit and try to memorize them. Not having OOP doesn't mean it's awful, just like the font it's not that bad. What annoys me is people like you who aren't capable of adapting to the situations that aren't that good when before you had something that improved your life. Just shows 0 flexibility. Just because TESH is a great thing doesn't mean you can treat WE trigger editor like trash...nor you should be limited to TESH when coding, you should be prepared if you can't use it for a while.
I'm sorry, but it is trash. Even notepad allows you to change font. The default editor does absolutely nothing other than letting you type letters. And the "shortcuts" it has are awful. No ctrl+f to search, you have to manually go through the menus in order to search. And ctrl+z does not interact with the editor, you can easily remove actions or even whole triggers if you press ctrl+z while working on a custom trigger.
Any editor that is worse than a notepad is unacceptable.
And just because I'm forced to use another editor, doesn't mean I should be happy about it.
 
Level 9
Joined
Jul 20, 2018
Messages
176
I think it should work, since it uses the standard Scintialla regex options. Maybe the Scintilla/Scite documentation on regex does help?
Hm, maybe it was a mistake in usage that time or bug in TESH. If I come across again that issue, I will report.

By now, I know one bad thing while using JNGP: if Colorizer is enbaled (Grimoire\Enable Colorizer), drag&drop stops working in TESH.
 
Last edited:
Level 11
Joined
Dec 21, 2012
Messages
373
looking_for_help said:
Some months ago MindWorX told me that they plan to integrate TESH directly into the WE <...>
That's awesome man. Though it's been some time since any updates were out. Wonder when are they going to come.

Wrda said:
It just forces you to think a bit and try to memorize them.
Memorize the functions? Do you even know how many functions WC3 WE has, especially with the newest patches? Yeah, I would like to see how YOU memorized them, mate.

I can sort of agree, that a different font is not necessary, but a function list? It is.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
Memorize the functions? Do you even know how many functions WC3 WE has, especially with the newest patches? Yeah, I would like to see how YOU memorized them, mate.
Don't be stupid, no one would memorize all functions, that would be just pathetic. What I meant was about memorizing the basic functions, that you use the most.
My whole point was that TESH was great and useful, but it stopped working on newer patches because of reasons we already know, so we should adapt to the situation we are in and get used to it while we hope we will get TESH again, not to blatantly cry about like a spoiled kid.
They take quite a while for a patch update, but it's been ages since the last one I hope they didn't forget about us lol.
 
Level 7
Joined
Apr 17, 2017
Messages
316
:D Well I prefer notepadd++ because of its simplicity and some features like being able to customize your text, color, syntax and even define a language. Also it just takes 1 second to copy paste a text. You dont even have to save a thing. It just does it every 10 seconds.
 
Last edited:
Level 14
Joined
Dec 12, 2012
Messages
1,007
TESH now works with the latest patch (Version 1.32.9) of Warcraft 3.


Update to version 0.9.5
  • Ported the old TESH to 64 bit so that it works with the latest Version 1.32.9 of Warcraft 3.
  • Added a loading mechanism so that TESH does not rely anymore on other tools like JNGP or SharpCraft, which are not supported anymore.

For more information and installation, refer to the revised A new TESH Syntax Highlighter for Warcraft 3 main post.
 

AGD

AGD

Level 16
Joined
Mar 29, 2016
Messages
688
Seems like not all the new keywords are added to tesh database yet, such as those that work with object editor data. Also I think it is better if it reads common.j, blizzard.j, etc. at startup (if present) so that anyone can update them if needed.

Optionally, you can set this exe as default program for Wc3 maps so that you can open them directly via double-click with TESH. In Windows 10: Click the Windows Start button->Apps->Default Apps->Choose default apps by file type. In this list, search for the .w3m file extension and set the
WorldEditorTESH.[COLOR=color: #666666]exe[/COLOR]
as default application.

After this, you can directly start Wc3 maps in the Refored World Editor with TESH via double-click.
Is it possible to make this work with patch 1.31?
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
Prometheus3375 said:
Can someone share the dark theme presented in the post?

Here you go.

AGD said:
Seems like not all the new keywords are added to tesh database yet, such as those that work with object editor data.

True, I will add them with the next update to the database.

AGD said:
Also I think it is better if it reads common.j, blizzard.j, etc. at startup (if present) so that anyone can update them if needed.

I prefer the current solution because it is much more efficient and so startup is quicker. In principle, it is already possible to extend the keywords because the tesh_keywords.db is just a standard SQLite database, which can be modified by everyone.

It is also possible to put functions in the includes/includes.txt file in the meantime, which are then added as user includes. These are essentially treated like normal functions, so they will have syntax highlighting, autocompletion, calltips and are also listed in the function list, in the section "User includes". The style of user includes can also be customized in the options dialog.

AGD said:
Is it possible to make this work with patch 1.31?

You mean the direct start via double-click? This should be possible with basically all versions of Wc3 (also without TESH), using command line arguments -launch -loadfile "%1". The new TESH only needs "%1", it generates the rest automatically.
 

Attachments

  • styles_dark.7z
    1.7 KB · Views: 91
Last edited:

AGD

AGD

Level 16
Joined
Mar 29, 2016
Messages
688
You mean the direct start via double-click? This should be possible with basically all versions of Wc3 (also without TESH), using command line arguments
-launch -loadfile "%1"
. The new TESH only needs
"%1"
, it generates the rest automatically.
It works now, just found out it's a problem with my registry =).
 
Level 9
Joined
Jul 20, 2018
Messages
176
Made several screenshots of different styles. They do not have gray "bars" of editor (as screenshots in the main post), because WE is running on Win10 with Win7 compatibility.
@looking_for_help, you may add them to the main post.


Снимок экрана 2020-12-23 042833.png



Снимок экрана 2020-12-24 095430.png



Снимок экрана 2020-12-23 043040.png



For making them I was using this template.
I also attached my styles.
 

Attachments

  • standard.txt
    920 bytes · Views: 52
  • styles.7z
    1.6 KB · Views: 75
Top