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. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. 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.

WE String Editor (Object Editor) Integrated Colorizer

Discussion in 'Warcraft Editing Tools' started by Risc, Jun 9, 2008.

  1. Risc

    Risc

    Joined:
    Jun 5, 2007
    Messages:
    81
    Resources:
    1
    Tools:
    1
    Resources:
    1
    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 (Text):

    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: Jul 6, 2008
  2. Earth-Fury

    Earth-Fury

    Joined:
    Feb 18, 2004
    Messages:
    538
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    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.)
     
  3. PitzerMike

    PitzerMike

    Joined:
    Nov 25, 2003
    Messages:
    204
    Resources:
    3
    Tools:
    3
    Resources:
    3
    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?)
     
  4. Risc

    Risc

    Joined:
    Jun 5, 2007
    Messages:
    81
    Resources:
    1
    Tools:
    1
    Resources:
    1
    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.
     
  5. Risc

    Risc

    Joined:
    Jun 5, 2007
    Messages:
    81
    Resources:
    1
    Tools:
    1
    Resources:
    1
    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: Jun 10, 2008
  6. Risc

    Risc

    Joined:
    Jun 5, 2007
    Messages:
    81
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Bump..
    Fixed the attachment in the first post.
     
  7. PitzerMike

    PitzerMike

    Joined:
    Nov 25, 2003
    Messages:
    204
    Resources:
    3
    Tools:
    3
    Resources:
    3
    It's cool, I'll give you a reppy as soon as I'm allowed to give it to you again. :D
     
  8. Risc

    Risc

    Joined:
    Jun 5, 2007
    Messages:
    81
    Resources:
    1
    Tools:
    1
    Resources:
    1
    No need to. Just happy to provide something to the community that has been providing me with so much since 2003.
     
  9. DrazharLn

    DrazharLn

    Joined:
    Nov 29, 2007
    Messages:
    368
    Resources:
    0
    Resources:
    0
    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.
     
  10. Risc

    Risc

    Joined:
    Jun 5, 2007
    Messages:
    81
    Resources:
    1
    Tools:
    1
    Resources:
    1
    BTW. Should I transfer this to the tools-section?
     
  11. emperor_d3st

    emperor_d3st

    Joined:
    Apr 13, 2008
    Messages:
    1,423
    Resources:
    0
    Resources:
    0
    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.
     
  12. peq

    peq

    Joined:
    May 13, 2007
    Messages:
    171
    Resources:
    1
    Maps:
    1
    Resources:
    1
    It does not work for me :cry:

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

    Attached Files:

  13. emperor_d3st

    emperor_d3st

    Joined:
    Apr 13, 2008
    Messages:
    1,423
    Resources:
    0
    Resources:
    0
    Are you sure you followed the instructions correctly? I think it should work regardless of the language.
    Did you add that line to the .ini file?
     
  14. DrazharLn

    DrazharLn

    Joined:
    Nov 29, 2007
    Messages:
    368
    Resources:
    0
    Resources:
    0
    Yeah, I think so. The other tool makers might want to use your .NET tool too.
     
  15. Risc

    Risc

    Joined:
    Jun 5, 2007
    Messages:
    81
    Resources:
    1
    Tools:
    1
    Resources:
    1
    It only works with english versions, since the app searches for the right window. "Edit Unit Value - String", "Edit Ability Value - String" etc..
     
  16. PitzerMike

    PitzerMike

    Joined:
    Nov 25, 2003
    Messages:
    204
    Resources:
    3
    Tools:
    3
    Resources:
    3
    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 ...
     
  17. emperor_d3st

    emperor_d3st

    Joined:
    Apr 13, 2008
    Messages:
    1,423
    Resources:
    0
    Resources:
    0
    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)."

    Here are the details of the error message:
    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.
     
  18. peq

    peq

    Joined:
    May 13, 2007
    Messages:
    171
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.
     
  19. Risc

    Risc

    Joined:
    Jun 5, 2007
    Messages:
    81
    Resources:
    1
    Tools:
    1
    Resources:
    1
    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?
     
  20. Risc

    Risc

    Joined:
    Jun 5, 2007
    Messages:
    81
    Resources:
    1
    Tools:
    1
    Resources:
    1
    You will see that in the next version.