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:
The s2z extension is just a .zip (uncompressed) renamed.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\
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
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:
This will allow for quick reloads when editing.Code:C:\Program Files\Heroes of Newerth\game\ui\game_lobby.interface
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
For example interface name for game_lobby.interface is game_lobby.Code:reloadinterface <interface_name>
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.
The Mod Repository (For more mods)
HoNWiki (For Modding Info)
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.
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
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.
If anyone has anything they are stuck on feel free to ask it here.
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?
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
What program are you using to extract the .s2z files?
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.
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
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