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. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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.

[RenderEdge] Graphic modification for Warcraft III

Discussion in 'Warcraft Editing Tools' started by ENAleksey, Sep 20, 2016.

  1. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1

    Update v0.2.5a


    • Added new native function GUILoadFont;
    • Added new native function CtrlSetFont;
    • Deleted GUISetFont function;
    • Fixed crashes when setting some fonts (e.g. "Times New Roman");
    • Fixed the height of single-line text.

    CtrlSetFont


    native CtrlSetFont takes integer id, string fontName, integer iSize returns nothing
    Sets the font for UI element. By default, used "Consolas" font with a height of 13.
    war3 2017-07-24 17-35-32-60.png
    Code
    Code (vJASS):
    function TestFonts takes nothing returns nothing
       call CtrlNew(1001, 400, 300, 0, 0)
       call CtrlSetFont(1001, "Arial", 16)
       call CtrlSetText(1001, "Arial 16", false)

       call CtrlNew(1002, 400, 335, 0, 0)
       call CtrlSetFont(1002, "Consolas", 11)
       call CtrlSetText(1002, "Consolas 11", false)

       call CtrlNew(1003, 400, 350, 0, 0)
       call CtrlSetFont(1003, "Segoe Script", 20)
       call CtrlSetText(1003, "Segoe Script 20", false)

       call CtrlNew(1004, 500, 315, 0, 0)
       call CtrlSetFont(1004, "Times New Roman", 18)
       call CtrlSetText(1004, "Times New Roman 18", false)

       call CtrlNew(1005, 400, 380, 0, 0)
       call CtrlSetFont(1005, "Jokerman", 35)
       call CtrlSetText(1005, "Jokerman 35", false)

       call CtrlNew(1006, 400, 440, 0, 0)
       call CtrlSetFont(1006, "Harrington", 30)
       call CtrlSetText(1006, "Harrington 30", false)
    endfunction


    GUILoadFont


    native GUILoadFont takes string fileName returns nothing
    Loads a font from the map or game archives into memory.

    For example, you can load the standard Warcraft font and then use it (but it don't support Bold and Italic):
    Code (vJASS):
    call GUILoadFont("Fonts\\FRIZQT__.ttf")
    call CtrlSetFont(id, "Nimrod MT", size)

    war3 2017-07-24 17-57-44-26.png
     
    Last edited: Jul 24, 2017
  2. HB.

    HB.

    Joined:
    May 6, 2017
    Messages:
    44
    Resources:
    0
    Resources:
    0
    Is it safe to use on BattleNet?
     
  3. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,671
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    For now, yes. Possibly not safe in ladder though.
     
  4. Gismo359

    Gismo359

    Joined:
    Jul 14, 2011
    Messages:
    773
    Resources:
    44
    Packs:
    4
    Maps:
    40
    Resources:
    44
    Wait, isnt it only 1.26a? Or is it up to date with Wc3 but the OP is not updated?
     
  5. pyf

    pyf

    Joined:
    Mar 21, 2016
    Messages:
    2,391
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Still 1.26a only atm afaik.

    His widescreen fix supports more game versions, though
     
  6. HB.

    HB.

    Joined:
    May 6, 2017
    Messages:
    44
    Resources:
    0
    Resources:
    0
    It works in 1.28.5. I tested it yesterday.
     
  7. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1

    Update v0.2.6a


    • Removed 512p limit in .blp textures (thanks to Karaulov);
    • Added new native function CtrlSetZOrder;
    • Added new native function EnableAnisoFiltering;
    • Added new native function HideInterface;
    • Added new native functions: EditMinimap, EditCommandBarButton, EditHeroBarButton, EditItemBarButton, EditMinimapButton, EditUpperButtonBarButton;
    • Changed SetPortrait and SetBlackBorders function names to EditPortrait and EditBlackBorders;
    • Fixed a lot of bugs in RenderEdge_loader.dll and RenderEdge.exe;
    • Fixed incorrect line breaking in wrapped text that uses the "|n" control character;
    • Fixed a lot of bugs in GUI system (e.g. bug in CtrlSetTexture function, bug then restarting map);
    • Optimized GUI system. Some functions was rewritten from scratch;
    • Optimized Font and Texture Managers;
    • Updated detours.lib and libjpeg.lib to latest version;
    • Improved and optimized debug log.

    Removed 512p limit in .blp textures


    before.png after.png
    4096p .blp texture before and after fix

    CtrlSetZOrder


    Code (vJASS):
    native CtrlSetZOrder takes integer id, integer iZOrder returns nothing

    Controls with larger ZOrder values will draw above controls with smaller ZOrder values. Controls with the same ZOrder will simply draw in the order they were added.

    EnableAnisoFiltering


    Code (vJASS):
    native EnableAnisoFiltering takes boolean bEnable, integer maxAnisotropy returns nothing

    Sets anisotropic filtering for textures with anisotropy level between 2 and 16.

    War3GUI API


    war3 2017-10-01 20-38-17-02.png
    Introduced new native functions for editing standard interface:
    Code (vJASS):
    native HideInterface takes nothing returns nothing
    native EditBlackBorders takes integer upperHeight, integer bottomHeight returns nothing
    native EditPortrait takes integer anchor, integer x, integer y, integer width, integer height returns nothing
    native EditMinimap takes integer anchor, integer x, integer y, integer width, integer height returns nothing
    native EditCommandBarButton takes integer row, integer column, integer anchor, integer x, integer y, integer width, integer height returns nothing
    native EditHeroBarButton takes integer buttonId, integer anchor, integer x, integer y, integer width, integer height returns nothing
    native EditItemBarButton takes integer buttonId, integer anchor, integer x, integer y, integer width, integer height returns nothing
    native EditMinimapButton takes integer buttonId, integer anchor, integer x, integer y, integer width, integer height returns nothing
    native EditUpperButtonBarButton takes integer buttonId, integer anchor, integer x, integer y, integer width, integer height returns nothing
     
    Last edited: Oct 5, 2017
  8. dtnmang

    dtnmang

    Joined:
    Apr 20, 2010
    Messages:
    500
    Resources:
    7
    Models:
    3
    Tutorials:
    4
    Resources:
    7
    OMG :eek::eek::eek::eek::eek::eek:
     
  9. pyf

    pyf

    Joined:
    Mar 21, 2016
    Messages:
    2,391
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Is XP support still being considered?
     
  10. DrTema

    DrTema

    Joined:
    Dec 31, 2013
    Messages:
    92
    Resources:
    0
    Resources:
    0
    it's still only for 1.26a? 512 limit removal looks interesting, it's possible to remove it as single option?
     
  11. CHEATER

    CHEATER

    Joined:
    Jun 14, 2017
    Messages:
    2
    Resources:
    0
    Resources:
    0
    anyone knows how to make it work in icefrog map?
     
  12. cacbo

    cacbo

    Joined:
    Oct 4, 2008
    Messages:
    19
    Resources:
    0
    Resources:
    0
    Did you consider making this work with higher resolutions like 4k? For example: leave UI rendered at the center of the screen, and render everything around it normally without any scaling..
     
  13. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
  14. cacbo

    cacbo

    Joined:
    Oct 4, 2008
    Messages:
    19
    Resources:
    0
    Resources:
    0
    I'm sorry I guess I wasn't clear enough.

    If wc3 by default renders 480x480(in-game coord system), your widescreen fix made it render something like 520(?) x 480 so instead of being streched, now you just render more map on left and right side of screen.

    My questions is: is it possible to make wc3 render 4 times that for 4k screen resolution?

    Few posts below you linked to, TriggerHappy said that this is probably not possible to do, but since you already did it I guess you figured it out?

    Thanks.
     
  15. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    He wrote about the size of the map and not the screen. RenderEdge don't modify map size, only projection matrix of camera. It already supports all possible screen resolutions, whether it's 4k or 8k.
    BTW, if you need only widescreen fix, use this version of RenderEdge: [RenderEdge] Widescreen Fix
     
  16. cacbo

    cacbo

    Joined:
    Oct 4, 2008
    Messages:
    19
    Resources:
    0
    Resources:
    0
    Ah I'm an idiot :D
    Of course it works!

    What I actually need/want is 4 times zoom-out so that units are same size on screen as on 1080p res.

    It would be great addition if you could keep actual versus in-game unit size constant across all screen resolutions.
     
    Last edited: Dec 19, 2017
  17. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    It's not necessary. You will not see any difference in size when using 4k and 1080p resolution, the screen resolution will not affect the size of objects, only the size of the monitor affects them.
     
    Last edited: Dec 19, 2017
  18. cacbo

    cacbo

    Joined:
    Oct 4, 2008
    Messages:
    19
    Resources:
    0
    Resources:
    0
    I am sitting in front of 55 inch 4k tv which has similar pixel density on 4k res like 1080p monitor. When I run wc3 fullscreen @4k res I pretty much get everything 4x zoomed in comparison with running it in 1080p windowed mode.

    Look at this image: Screenshot

    Background is screenshot of 1080p windowed mode while that glued image on it in square is cut off from 4k screenshot while running wc3 fullscreen at 4k

    edit: to be more clear: when I'm running wc3 in 1080p, I'm doing it in windowed mode while tv(windows) resolution is in 4k. I have to do this since I'm sitting 60 to 70cm away from it.
     
    Last edited: Dec 19, 2017
  19. Dracaratos

    Dracaratos

    Joined:
    Mar 20, 2014
    Messages:
    67
    Resources:
    0
    Resources:
    0
    So I'm a bit confused, your original screenshot looks great, but others screenshots have been different looking from your originals in your first post

    What does this change, can I use it if everyone else does not, and what are the current bugs still?
     
  20. ENAleksey

    ENAleksey

    Joined:
    Nov 29, 2014
    Messages:
    189
    Resources:
    1
    Tools:
    1
    Resources:
    1
    What screenshots are you talking about? Can you give an example?