Thread: How to mod the UI

Page 1 of 5 12345 LastLast
Results 1 to 20 of 97
  1. #1
    Offline
    Account Icon
    Join Date
    Jul 2009
    Posts
    444

    How to mod the UI

    How to Mod HoN's UI: Basics

    First off, extract the file called "resources0.s2z" using your favourite zip extractor (I recommend 7-zip), found in your /game directory into a folder on your desktop. The game folder can be found here:

    Linux: /home/<username>/HoN/game/
    Windows 7: C:\Program Files\Heroes of Newerth\game\
    Windows Vista: C:\Program Files\Heroes of Newerth\game\
    Windows XP: C:\Program Files\Heroes of Newerth\game\
    Mac:
    1. Press Finder
    2. Press Applications
    3. Right click 'Heroes of Newerth', and press Show containing files
    4. Open Game folder
    5. Move file here
    The s2z extension is just a .zip (uncompressed) renamed.

    Next your going to want to find the .template or .package that you want to modify.

    Most of the ones you are going to want are in the ui folder.

    Go back to your /game directory and put the single file you want to edit in the game directory. For example if I wanted to edit game_lobby.interface (the file for editing a game's lobby, obviously...) you would copy it into the folder:

    Code:
    C:\Program Files\Heroes of Newerth\game\ui\game_lobby.interface
    This will allow for quick reloads when editing.

    Now open up the file (game_lobby.interface) in a word editor (I suggest notepad++ Which you can then go to Language>XML for syntax hiliting.).

    Now Start up HoN and login. Get to the place where you want to modify the game. For example if you're editing the game lobby, create a game.

    Now to test changes you simple have to hit

    Code:
    crt-F8
    and type

    Code:
    reloadinterface <interface_name>
    For example interface name for game_lobby.interface is game_lobby.

    You can also type reloadinterfaces to reload all interfaces. Barter suggests "You can also bind reloadinterfaces in a key, personally I bound it to "]", just write in the console: bind ] reloadinterfaces "

    Now every time you make a change save it get back in the game and type reloadinterface ... and you can test your changes immediately. No need to restart HoN every time.


    When you're done and you want to package it up. You're going to want to zip up the file with no compression and rename it resourceXXX.s2z where the XXX is any number.

    So you should have a .s2z file with the folder "ui" and inside that folder "game_lobby.interface" (or whichever interface you edited.)



    For more information on the type of scripting used (XAML) check out the wiki we have been updating over at HoNWiki.net http://honwiki.net/wiki/Category:Modding

    P.S. I wrote this really quick, if you have any questions ask away. (But don't ask for mods, this is not the thread for that) <3 Picklefish
    Last edited by MaxGhost; 01-29-2010 at 01:14 PM.

  2. #2
    Offline
    Account Icon
    Join Date
    Jul 2009
    Posts
    444
    Other Info

    Links:
    The Mod Repository (For more mods)
    HoNWiki (For Modding Info)



    Tips:
    1. Add comments to your code to help other people, and yourself find it as well as modify it themselves. Examples:
    <!-- Mod --> or <!-- Buff Panel --> or <!-- Stats Tooltip -->
    You can see how I did this here: [UI Mod] Quick Player Stats in Game Lobby

    2. If you are having trouble creating an s2z when your mod is done, just copy and open an old s2z(not the main huge one), delete the files in it and put yours in it. Then save it.

    Last edited by MaxGhost; 01-29-2010 at 01:14 PM.

  3. #3
    Offline
    Account Icon
    Join Date
    Jul 2009
    Posts
    444
    reserved

  4. #4
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Thanks alot for the console command... I didn't know how to do that. It'll make my modding much easier

    Nitpick -> "Which you can then go to Language>XML for syntax hiliting." -> highlighting

  5. #5
    Offline
    Account Icon
    Join Date
    Jul 2009
    Posts
    444
    Quote Originally Posted by MaxGhost View Post
    Thanks alot for the console command... I didn't know how to do that. It'll make my modding much easier

    Nitpick -> "Which you can then go to Language>XML for syntax hiliting." -> highlighting
    I work for a software company that spells it hiliting.

  6. #6
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Quote Originally Posted by picklefish View Post
    I work for a software company that spells it hiliting.
    O_o they're weirdos then.

    Edit: Well alright... I got a question on a modding specific. I want to make a hotkey option toggle (hit hotkey once, send console command with true, hit 2nd time, send as false, reset) My problem is, I don't know where hotkey things are handled. So, where? Please and thx.
    Last edited by MaxGhost; 08-18-2009 at 04:11 AM.

  7. #7
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Brazil
    Posts
    442
    You can also bind reloadinterfaces in a key, personally I bound it to "]", just write in the console: bind ] reloadinterfaces

  8. #8
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Quote Originally Posted by Barter View Post
    You can also bind reloadinterfaces in a key, personally I bound it to "]", just write in the console: bind ] reloadinterfaces
    Oooh. lovely. Thanks

  9. #9
    Offline
    Account Icon
    Join Date
    Jul 2009
    Posts
    444
    If anyone has anything they are stuck on feel free to ask it here.

  10. #10
    I'm looking around in the game.interface file and I want to alter the buffs and debuffs you can see when you select a target, as they show up in the bottom right. I know it's around line 2000. Does anyone know which widget or instance that refers to?

  11. #11
    Offline
    Account Icon
    Join Date
    Jun 2009
    Posts
    286
    just a public service announcement -- if anyone makes a useful mod that they think others will enjoy and they put it on the forums, please have decency to COMMENT WHERE YOUR CUSTOM CODE STARTS, too many users just drop their code in the middle of a few thousand line file and expect me to dig through it just so i can combine a few mods? It's ridiculous and simply bad coding practice to not comment

    just a simple comment like <!-- Mod --> or <!-- Buff Mod --> or <!-- My Mod -->
    in the places where you made changes, hell you could even explain the changes like a real comment should

    well that's all for my rant, be considerate when you mod

  12. #12
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Quote Originally Posted by Revolution View Post
    just a public service announcement -- if anyone makes a useful mod that they think others will enjoy and they put it on the forums, please have decency to COMMENT WHERE YOUR CUSTOM CODE STARTS, too many users just drop their code in the middle of a few thousand line file and expect me to dig through it just so i can combine a few mods? It's ridiculous and simply bad coding practice to not comment

    just a simple comment like <!-- Mod --> or <!-- Buff Mod --> or <!-- My Mod -->
    in the places where you made changes, hell you could even explain the changes like a real comment should

    well that's all for my rant, be considerate when you mod
    Or, you can use my mod.
    Or, you can download Notepad++ and it's comparing add-on.
    Or, you can use theli's mod merging tool.

    Search the forums next time?

  13. #13
    Offline
    Account Icon
    Join Date
    Jul 2009
    Posts
    444
    Quote Originally Posted by Revolution View Post
    just a public service announcement -- if anyone makes a useful mod that they think others will enjoy and they put it on the forums, please have decency to COMMENT WHERE YOUR CUSTOM CODE STARTS, too many users just drop their code in the middle of a few thousand line file and expect me to dig through it just so i can combine a few mods? It's ridiculous and simply bad coding practice to not comment

    just a simple comment like <!-- Mod --> or <!-- Buff Mod --> or <!-- My Mod -->
    in the places where you made changes, hell you could even explain the changes like a real comment should

    well that's all for my rant, be considerate when you mod
    I did this in mine, and placed it at the bottom <3 I will add this tip.

  14. #14
    What program are you using to extract the .s2z files?

  15. #15
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Jul 2009
    Location
    Ottawa, Canada, Earth, Sol Sector, Alpha Quadrant, Milky Way, Local Group, Universe
    Posts
    5,408
    Quote Originally Posted by Jiggaboo View Post
    What program are you using to extract the .s2z files?
    none. s2z is a renamed .zip... so do the opposite. rename the extention from .s2z to .zip and tada. don't forget to re-name it back to s2z when you're done or the game wont recognize it.

  16. #16
    Offline
    Account Icon
    Join Date
    Jul 2009
    Posts
    444
    Quote Originally Posted by Jiggaboo View Post
    What program are you using to extract the .s2z files?
    Any of these should do the trick.

    http://en.wikipedia.org/wiki/Compari...file_archivers

    I use winrar currently because it was installed.

    Just make sure when you are zipping it back up you don't compress it.

    Most people use 7-zip since it's free.

  17. #17
    Haha .. wow. Thanks for the quick response guys. I feel like noob. I was just confused because I have WinRAR and I would right click and go to extract .. and the option to do so wasn't there. Had to either open it or rename it, heh

  18. #18
    Offline
    Account Icon
    Join Date
    Jul 2009
    Location
    Brazil
    Posts
    442
    I just use 7-zip, don't even need to rename to extract, 7-zip just puts its option on every file you right-click :P

  19. #19
    Offline
    Account Icon
    Join Date
    Jun 2009
    Posts
    286
    Quote Originally Posted by MaxGhost View Post
    Or, you can use my mod.
    Or, you can download Notepad++ and it's comparing add-on.
    Or, you can use theli's mod merging tool.

    Search the forums next time?
    You're telling me to search the forums? Why has this topic been addressed before? Your mod is pointless unless someone wants exactly those mods you combined.

    No matter how you phrase it, you're wrong. It's bad coding practice to now include comments and i find it disrespectful not to include comments when others might want to either
    1- look at what you did to see how they can mod
    2- combine the mods themselves


    Also 7zip gave me some problems (though there's no reason it should've), switched to winrar and everythings working fine now

  20. #20
    How can I make panels that follow the cursor?

Page 1 of 5 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •