• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

WE String Editor (Object Editor) Integrated Colorizer

Status
Not open for further replies.
Level 5
Joined
Jun 5, 2007
Messages
73
I'm finished with the colorizer.
You'll need Grimoire and the .NET Framework 2 to use this. Just place all files in Grimoire's "bin" folder and add:
Code:
loaddll("bin\\PELoader.dll")
to "we.conf.lua" and you're all set.

The colorizer shows whenever you edit a string-value. Since it's searching for those windows it may take half a second to show before you see it.
If you experience any problems with this or have any suggestions, please leave a comment so I can fix them.

EDIT: The version posted here is obsolete. Get the newest version from http://www.hiveworkshop.com/forums/resource.php?t=89904

//Risc
 
Last edited:
Level 11
Joined
Feb 18, 2004
Messages
394
Would be nice if you caught enter key presses on multi-line dialogues, replacing them with |n (newline control char) As well, going from color-codes + control chars -> formatted display string upon the dialogue opening would be a nice addition. Gradients too. (A necessity of any semi-advanced color-editor! ;) )

I think it would be better to just replace the whole window's contents with a customized editing interface, with a custom "OK" button generating the code and passing it to the default control.

Oh, and you don't hook in to the Game interface string editing dialogue. (Would also be nice if you included this functionality in stuff like the loading screen window and the map description window as well.)
 
Level 8
Joined
Nov 25, 2003
Messages
208
Cool, it works. I have some suggestions mainly concerning usability.

1) When the window opens and it loads the original string into the textbox it would be nice if it interpreted existing color codes and colored them accordingly in the textbox. This is really important I believe, since you often go back and forth editing your tooltips.

2) Right now the original Ok button has the focus so when you hit enter, the window closes without applying the changes. Would be nice if hitting enter had the same effect as the Generate button end then closes the window.

3) Some of the strings support linebreaks (you can test this in the original textbox by hitting CTRL + Enter to add a linebreak). Your textbox should also support linebreaks in that case. You can probably detect if linebreaks are supported based on the window height. Maybe convert them to |n in the final result also.

4) Instead of periodically calling FindWindow you could wrap CreateWindow (or CreateWindowEx) to detect the creation of an editing window. This would get rid of the delay but I don't know if this is possible in .NET other than with some unmanaged C++ code. But on the other hand I don't know if it's worth the effort (what do other users think?)
 
Level 5
Joined
Jun 5, 2007
Messages
73
Thanks for answering. I know it's not very well featured, but the main point was to showcase .NET support in Grimoire.

I noticed that it's not possible to press Enter to generate a new line before releasing, but since the the original editor did the same thing (separating line-breaks by |n), I decided to leave it like that. Converting from color-codes to color will be fixed in the next version.
 
Level 5
Joined
Jun 5, 2007
Messages
73
New version!

EDIT: Oops forgot to check for the Game Interface dialog.. Fixed now.

Version history
---------------
0.2 - Beta
-Now colorizes text from the original string-editor on load
-Generate a custom color from a predefined color
-CTRL+N to create a new line
-Various bugfixes
-Help-dialog
-EDIT: Fixed Game Interface dialog

0.1 - Alpha
Initial version, for testing purposes only.
 
Last edited:
Level 8
Joined
Nov 29, 2007
Messages
371
I just found this resource you made, and I have to say its great! This is seriously the best tooltip helper there is.
Having said that, some of the features that the other tools have would be nice. [the best of the rest is Warcraft 3 Item Creator.]

One thing that would make your tool a lot better and would probably be very easy is a tool to change the background colour. Using the same font as in-game would be good too.

EDIT: Forgot to say, +rep.
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
Hiya, I tested your tool, it's great help, much better than having to alt+tab between an image editor and WE and type the color tags, but I would like to suggest three things if I may.
1.) Please change the white background to an ingame tooltop background since colors look totally different on white and the ingame dark tooltip background.

2.) When I open a field for editing the cursor will position to your tool's Memo Box (or textbox or what is that called in C) and when you edit the text there and press enter the text won't save. Not unless you press the generate button instead of enter.
When I don't want to color my text, just simply edit it fast it's annoying to have to click generate every time. It slows down my work, so would you please make enter apply the changes to the field?

3.) There is a minor glitch with the buttons. When you edit a tip or an ubertip the cancel and the ok button is only half-visible.

I hope it was understandable, I wrote this in a hurry.
 

peq

peq

Level 6
Joined
May 13, 2007
Messages
171
It does not work for me :cry:

I think its because I am using the German Editor. (attached Screenshot)
 

Attachments

  • tooltipcreen.JPG
    tooltipcreen.JPG
    215.8 KB · Views: 577
Level 8
Joined
Nov 25, 2003
Messages
208
It only works with english versions, since the app searches for the right window. "Edit Unit Value - String", "Edit Ability Value - String" etc..

It seems those are luckily not localized (unlike the titles of the bigger windows)
At least in my German version they're still English.

EDIT: Oh, the screenshot tells me that I'm wrong. I thought I had made sure the English strings were not injected ...
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
I have encountered a bug(?) today (or something like that).
I was editing hundreds of tooltips, I opened another tooltip for editing when my computer started to lag very heavily, I thought UMSWE is going to crash for the first time but it didn't.
A bug message dialog popped up from Microsoft .NET Framework saying:
"Unhandled Exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.

There is not enough memory to execute this order (this last message was in hungarian, but it should be something like this in english)."

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception: A parancs végrehajtásához nincs elég tárolóhely
at System.Windows.Forms.Form.UpdateLayered()
at System.Windows.Forms.Form.OnHandleCreated(EventArgs e)
at System.Windows.Forms.Control.WmCreate(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmCreate(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
testtest
Assembly Version: 1.0.0.0
Win32 Version:
CodeBase: file:///D:/Games/Warcraft%20III%20-%20Roc/Maps/-%20Project%20Heroes/-%20Tools/Newgen/bin/CLILoader.dll
----------------------------------------
Colorizer
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/Games/Warcraft%20III%20-%20Roc/Maps/-%20Project%20Heroes/-%20Tools/Newgen/bin/Colorizer.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

As I said I was editing a gazillion tooltips before the error. Since then this error message pops up every time I want to edit a tooltip, forcing me to click on "continue". Nothing else to mention, I think.
 

peq

peq

Level 6
Joined
May 13, 2007
Messages
171
It only works with english versions, since the app searches for the right window. "Edit Unit Value - String", "Edit Ability Value - String" etc..

Ok, I changed the window-titles in my WordEditStrings.txt to the english titles and it works.

Its a nice tool, but as emperor_d3st already sayed you should change the background.
Also it would be nice if you had a palette with ~5 custom colors so you can access your most used colors faster.
 
Level 5
Joined
Jun 5, 2007
Messages
73
Ok, I changed the window-titles in my WordEditStrings.txt to the english titles and it works.

Its a nice tool, but as emperor_d3st already sayed you should change the background.
Also it would be nice if you had a palette with ~5 custom colors so you can access your most used colors faster.

You will see that in the next version.
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
Hmm... Strange, sounds like the garbage collector isn't doing its job. Did you say that it continues to show every time you edit a tooltip? Even after you restart WE?

Update:
Nope, once I restart WE it works fine. Actually, I didn't even have to restart WE, after some time that window stopped popping up. I guess I have closed some other programs I ran in the background (firefox, dictionary, stuff like that), but it's odd since my RAM and virtual memory wasn't really used much.
 
Level 5
Joined
Jun 5, 2007
Messages
73
Hmm I appreciate that you reported this issue. If you want to help me investigate this then you should write down how much memory the world editor utilizes when you have loaded your map and changed/viewed a few tooltips and then write down how much memory it utilized when it starts to lag/error shows.

You can see how much memory a process uses in the Task Manager (CTRL+ALT+DEL)
Thanks in advance.
 
Status
Not open for further replies.
Top