View Full Version : How to mod the UI
picklefish
08-18-2009, 02:12 AM
How to Mod HoN's UI: Basics
First off, extract the file called "resources0.s2z" using your favourite zip extractor (I recommend 7-zip (http://www.7-zip.org/)), 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:
C:\Program Files\Heroes of Newerth\game\ui\game_lobby.interfaceThis will allow for quick reloads when editing.
Now open up the file (game_lobby.interface) in a word editor (I suggest notepad++ (http://notepad-plus.sourceforge.net/uk/site.htm) 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
crt-F8and type
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
picklefish
08-18-2009, 02:12 AM
Other Info
Links:
The Mod Repository (http://forums.heroesofnewerth.com/showthread.php?t=39854) (For more mods)
HoNWiki (http://honwiki.net/wiki/Category:Modding) (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 (http://forums.heroesofnewerth.com/showthread.php?p=153644)
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.
picklefish
08-18-2009, 02:13 AM
reserved
MaxGhost
08-18-2009, 02:18 AM
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
picklefish
08-18-2009, 02:38 AM
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. :)
MaxGhost
08-18-2009, 02:40 AM
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.
Barter
08-18-2009, 05:59 AM
You can also bind reloadinterfaces in a key, personally I bound it to "]", just write in the console: bind ] reloadinterfaces
MaxGhost
08-18-2009, 11:19 AM
You can also bind reloadinterfaces in a key, personally I bound it to "]", just write in the console: bind ] reloadinterfaces
Oooh. lovely. Thanks :)
picklefish
08-18-2009, 02:06 PM
If anyone has anything they are stuck on feel free to ask it here.
auren
08-18-2009, 03:11 PM
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?
Revolution3
08-18-2009, 03:24 PM
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
MaxGhost
08-18-2009, 03:26 PM
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? :)
picklefish
08-18-2009, 03:34 PM
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.
Jiggaboo
08-18-2009, 03:46 PM
What program are you using to extract the .s2z files?
MaxGhost
08-18-2009, 03:48 PM
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.
picklefish
08-18-2009, 03:48 PM
What program are you using to extract the .s2z files?
Any of these should do the trick.
http://en.wikipedia.org/wiki/Comparison_of_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.
Jiggaboo
08-18-2009, 03:54 PM
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
Barter
08-18-2009, 04:05 PM
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
Revolution3
08-18-2009, 07:05 PM
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
Sky0Hunter
08-18-2009, 07:34 PM
How can I make panels that follow the cursor?
picklefish
08-18-2009, 08:50 PM
How can I make panels that follow the cursor?
Check out the GameLobbyTooltip instance in game_lobby.interface. It's an floater(fixed) in there. Cheers
<floater
y="-1.2h" x="-1.8h"
valign="bottom"
align="left"
color="invisible"
visible="false" grow="true"
watch="GameLobbyTooltip"
ontrigger="SetVisible(param0);"
noclick="true" passivechildren="true"
>
<frame texture="/ui/frames/tooltip_bg.tga" color="0 0 0 .8" borderthickness=".6h" align="left" valign="top" noclick="1"/>
<frame texture="/ui/frames/roundframe.tga" color="#A0A0A0" borderthickness=".6h" noclick="1"/>
<label
y="0.8h" x="0.8h"
textalign="left" textvalign="top"
fitx="true" fitxmax="24h" fity="true"
wrap="true"
fitxpadding="0.8h" fitypadding="0.8h"
color="white" font="dyn_10"
watch="GameLobbyTooltip"
ontrigger="SetText(param1);"
/>
</floater>
They made a trigger that they throw with data (show/hide = true false) and the string.
Trigger(\'GameLobbyTooltip\', true, Translate(\'gamelobby_add_friend_tip\', \'name\', \'' # param1 # '\'));
This is called inside mouseover, the translate call returns a string
picklefish
08-18-2009, 08:51 PM
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?
Did you figure this out?
MaxGhost
08-18-2009, 10:49 PM
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
I never said it was bad practice... I agree with you.
I suggested my mod because what you were saying made it look like you were trying to merge some mods together (I'm taking requests for custom combinations of mods, btw).
I suggested Notepad++ because it has a comparing feature that shows you the exact differences between two files (or two versions of the same file) and that's exactly how I achieved to merge together the mods.
I suggested theli's merging mod for the same reason I suggested my mod.
But personally, I think you're being disrespectful to the people who actually took the time to make the mod. Many of these mods were made in a rush because there was high demand for them. If you really have such a hard time finding where changes were made, then like I said, use Notepad++ and it's Compare plugin (downloaded from their site).
Sky0Hunter
08-19-2009, 04:49 AM
Okay.. thanks for the help with the floater :)
But now I need to know how to change the color of a text inside of "SetText"
For example:
SetText( 'BLUE and RED and GREEN')
I tried to use color="blue" etc. inside the SetText command but that gave me errors...
Thanks for help :)
Edit:
Hmm, I found the command "SetColor(0,0,0)" with that command I can change the color one time but when I have for example this:
SetText(SetColor(255,0,0)#'BLUE'#SetColor(0,255,0) #'THIS IS NOW BLUE TOO'#SetColor(0,0,255)#'AND AGAIN BLUE')
!Edit2: Ok the "SetColor" works not like i thought. :D The last "SetColor" is the dominating one.!
Just the first "SetColor" is used... is there a command/symbol to stop that?
Or is there just a better way to colorize text inside of a "SetText"??
picklefish
08-19-2009, 10:46 AM
Okay.. thanks for the help with the floater :)
But now I need to know how to change the color of a text inside of "SetText"
For example:
SetText( 'BLUE and RED and GREEN')
I tried to use color="blue" etc. inside the SetText command but that gave me errors...
Thanks for help :)
Edit:
Hmm, I found the command "SetColor(0,0,0)" with that command I can change the color one time but when I have for example this:
SetText(SetColor(255,0,0)#'BLUE'#SetColor(0,255,0) #'THIS IS NOW BLUE TOO'#SetColor(0,0,255)#'AND AGAIN BLUE')
!Edit2: Ok the "SetColor" works not like i thought. :D The last "SetColor" is the dominating one.!
Just the first "SetColor" is used... is there a command/symbol to stop that?
Or is there just a better way to colorize text inside of a "SetText"??
Just put ^000 - ^999 or ^r (red ^b (blue) etc before the text you want colored.
http://groentjuh.eu/savagecolors/
MaxGhost
08-25-2009, 12:31 AM
M-m-m-m-mega bump!!!!!
Can this please get a sticky? :D
iHigh
08-25-2009, 12:33 AM
M-m-m-m-mega bump!!!!!
Can this please get a sticky? :D
I second that :D
This guy was the only reason I found this. PAGE 4 FFS!
MaxGhost
08-27-2009, 03:08 AM
This really needs a bump and sticky again...
thx. this really helped me.
Xceeder
08-29-2009, 10:10 PM
bump
DemonFTW
09-01-2009, 02:44 PM
Does this only work with the Interface files that i found when i extracted the resources0.s2z or can i modify the Package files that are in there with this method also ?
Eccentrikit
09-01-2009, 02:45 PM
You can modify packages too.
DemonFTW
09-01-2009, 03:12 PM
Thanks, i'm still trying to work out which files relate to what and what everything inside them means :D Then i'll have to decide what i actually want to look different ^^
Edit: How do i use the params from 2 different watches in the same line of text ? e.g. i want it to say Health: X/Y, Regen: Z all on one line, is this possible ?
Thanks for any help.
MaxGhost
09-01-2009, 03:51 PM
Thanks, i'm still trying to work out which files relate to what and what everything inside them means :D Then i'll have to decide what i actually want to look different ^^
Edit: How do i use the params from 2 different watches in the same line of text ? e.g. i want it to say Health: X/Y, Regen: Z all on one line, is this possible ?
Thanks for any help.
watch=
watch0=
ontrigger=
ontrigger0=
you can use any numbers infront (don't know if you can go into double-digit numbers tho)
DemonFTW
09-01-2009, 04:04 PM
Thanks for the quick help, so if i used watch=health and watch0=regen do i have to do 2 different ontriggers or can i use settext() and use both watchs params within that one line ?
MaxGhost
09-01-2009, 04:15 PM
Thanks for the quick help, so if i used watch=health and watch0=regen do i have to do 2 different ontriggers or can i use settext() and use both watchs params within that one line ?
Think you have to do it seperately... I never experimented with that.
DemonFTW
09-02-2009, 07:20 AM
Is it possible to do ontrigger=CreateFloat(CurrentHP, param0) and then use that variable in the line which is normally just used to show regen ?
(Or any other method which allows me to use the params from 2 watches into one SetText line).
picklefish
09-02-2009, 02:38 PM
Is it possible to do ontrigger=CreateFloat(CurrentHP, param0) and then use that variable in the line which is normally just used to show regen ?
(Or any other method which allows me to use the params from 2 watches into one SetText line).
If you create a float it will be in memory reguardless of the trigger etc. Then you just write CurrentHP somewhere and get the value.
DemonFTW
09-03-2009, 06:59 AM
If you create a float it will be in memory reguardless of the trigger etc. Then you just write CurrentHP somewhere and get the value.
Sorry to bug but how would i go about doing this ?
I know that i need to create the float using the params from ActiveHealth but i'm not sure how to create/refer to a Watch outside of the label tag (which is where i found it).
Edit: Ok, i've managed to make it store and display the variable, but only for the value it was at when i did reloadinterfaces, any help on how to make it update in real-time like the other numbers in there do ?
tekPwn
09-10-2009, 02:43 AM
can you make a simple tutorial for example that would say hello world, i am having trouble understanding where to beging, for example i would like to make a another window pop up when you open up shop. Thanks i just need a little nudge in the direction then i am good to go
Disco69
09-11-2009, 03:42 AM
is it possible to edit the textures of the ui aswell? just edit the files in the textures.sz2? or is it possible there aswell to just put the files in the right position without even sz2ing it? ty
Sticky!! If only for reloadinterfaces.
*edit*
Is there a reload command for fontsizes set in core_en.resources?
hsram
09-23-2009, 11:09 AM
Or, you can use theli's mod merging tool.
what? where?
also, i've been meaning to ask...where can i access the spell icon portion for heroes? thinking about making a theorycrafting mod like the one that exists for WoW for abilities (text on top of but at the bottom of the icon and more detailed information in the tooltip)
if someone could help point me in the right direction i think a lot of people would actually enjoy that mod
Johansson
10-10-2009, 02:14 PM
I have a small question. I just started modding the file "alt_info_hero.interface". I want to change the health/mana bar over the players heads to show a label of the current health aswell. So it worked fine and I have a label that shows the percent. It is watching "AltInfo0HealthPercent". But I want to show the current health, right. I can't find any working watch for it. Anyone know which?
Ah, disabled. I get it. :P
Notausgang
10-10-2009, 05:36 PM
It IS possible, Ryxian, but it's a challenge ;)
BOLOS_BACK
10-10-2009, 08:44 PM
would mods have a chance to screw your UI over and result in re-installing game??? :S
MaxGhost
10-10-2009, 09:15 PM
BOLOS, no because they never directly change game files. If you have a problem with the mod, you can delete the resources999.s2z file in the Heroes of Newerth\game folder.
Fukle
11-15-2009, 04:43 AM
Hey I am just wondering what I would have to mod and what I would have to code so that when I press a button in-game it sends a message to my teammates. :)
MaxGhost
11-15-2009, 10:50 AM
Hey I am just wondering what I would have to mod and what I would have to code so that when I press a button in-game it sends a message to my teammates. :)
Take a look at Bard's UI. It already does that, with customizable messages.
Fukle
11-16-2009, 02:51 AM
Thanks for the reply but I had a look through and couldn't find where the TeamChat() string is.
Sorry I don't know much XML.
MaxGhost
11-16-2009, 04:22 PM
Thanks for the reply but I had a look through and couldn't find where the TeamChat() string is.
Sorry I don't know much XML.
Why not just use Bard's UI instead of making your own mod?
Fukle
11-17-2009, 12:16 AM
Because I would like to learn how to mod Hon, also it would help with learning xml. :)
MaxGhost
11-17-2009, 12:31 AM
Because I would like to learn how to mod Hon, also it would help with learning xml. :)
In that case, I'll find the code for you.
In the file bard_libs_missButtons.package, <template name="bUI_missButton"> is a template that can be called (sort-of like a function or class) for use in his code. The template is an outline of the button itself and it lets people input their own values for the button, like the text that gets output, the text on the button, the size, etc.
TeamChat(bUI_btn{index}_left_string) is the code he uses to output the text. Since there are many buttons, there's an index which is used (like an array).
Fukle
11-17-2009, 03:00 AM
Thanks. :D
If I were to change: TeamChat(bUI_btn{index}_left_string)
to: TeamChat("Hey")
Would it ouput "Hey" in team chat?
MaxGhost
11-17-2009, 03:22 AM
Thanks. :D
If I were to change: TeamChat(bUI_btn{index}_left_string)
to: TeamChat("Hey")
Would it ouput "Hey" in team chat?
Yep. I'm not entirely sure, but it might be with single quotes instead. That's where testing comes in.
I think you should actually look at QuickCommands mod instead of Bard's because his templates aren't really good to learn with. QuickCommands mod is much simpler code-wise, but it's not the most elegant solution in-game.
Fukle
11-17-2009, 03:33 AM
Alright, thanks for your help. :D
Guldfisck
11-28-2009, 05:45 AM
You're going to want to zip up the file with no compression and rename it resourceXXX.s2z where the XXX is any number.
How to do that?
I can't choose no compression only these
Store
Fastest
Fast
Normal
Good
Best
Sephinator
11-28-2009, 06:16 AM
How to do that?
I can't choose no compression only these
Store
Fastest
Fast
Normal
Good
Best
Right Click -> Send to compressed folder
or something.
Notausgang
11-28-2009, 06:19 AM
How to do that?
I can't choose no compression only these
Store
Fastest
Fast
Normal
Good
Best"Store" means "just store it, don't compress it", which is what you're looking for :)
Allnighte
11-30-2009, 04:30 AM
i can't even get the game to see my extracted interface.
main_lobby.interface
i've tried putting it in \game, \game\ui, even \game\ui\ui
and when i do "reloadinterface main_lobby.interface" it says "warning: interface main_lobby.interface not found"
and when i extract the whole resources and rename the resources0.s2z the game just looks funky :(
RogerMilko
11-30-2009, 01:31 PM
Hey..
How do you get around the, can't save cause the file is in use thing when you mod?
The reloadinterfaces thingy doesn't help me at all since I have to quit the game to be able to save the changes I made.
Thanks in advance!
MaxGhost
11-30-2009, 05:21 PM
You cant edit .s2z files while the game is running. If you make a folder in your game folder (Heroes Of Newerth/game/) called UI (assuming you're making a UI mod) and drop your files/packages in there, you can edit them directly while using reloadinterfaces to test your changes.
gwho1
12-03-2009, 09:41 PM
I work for a software company that spells it hiliting. :)
oh lol, i read that as "HILTING", and was like arg... technical language already, discouraging...
Alento
12-06-2009, 05:55 AM
hahaha ^^
Alento
12-06-2009, 05:57 AM
can u get pictures of how u do this, cuz i dont get it, its hard to follow ure instuctions =/
Allnighte
12-07-2009, 03:26 AM
You cant edit .s2z files while the game is running. If you make a folder in your game folder (Heroes Of Newerth/game/) called UI (assuming you're making a UI mod) and drop your files/packages in there, you can edit them directly while using reloadinterfaces to test your changes.
is this functionality still working with the recent patches? i can't get it to work.
Is there a console command for zooming out more than the standard one?
I'd really like to see more of the game on my screen.
thx for any help :D
MaxGhost
12-07-2009, 03:33 PM
is this functionality still working with the recent patches? i can't get it to work.
Depends what you're doing or what you're editing. But yeah, it still works the same way. They didn't change anything I don't think.
campbel
12-15-2009, 09:33 PM
Hey so I made a mod that I want to post on the forums for other if they need it. Whats the process for going about getting permission to post? Thanks for any help.
MaxGhost
12-16-2009, 12:13 AM
Hey so I made a mod that I want to post on the forums for other if they need it. Whats the process for going about getting permission to post? Thanks for any help.
Just make a thread on it, request a number in the repository (sticky in the main section), cross fingers, update your thread with your new number, and it'll get moved to the appropriate section afterwards.
xINSTiiNCT
12-16-2009, 05:21 PM
I want to make a mod so bad.... Bah! )';
Tiger0211
01-05-2010, 04:05 PM
... and rename it resourceXXX.s2z where the XXX is any number.
This isn't quite accurate. I've found that it works just as well using letters instead of numbers. :smile:
ChillFacToR
03-17-2010, 04:46 PM
To the people who are having problems editing the files in the UI folder because "The file is in use":
I had this same problem. Look at the properties of the folder. If you are using Windows like me you may have to change the permissions of the folder in order to edit files there. I had to give myself write permissions (I'm the Admin).
lol Windows
SteelCurve
04-16-2010, 11:24 PM
Ahhhh. I kinda of screwed me self over my resources0.s2z file isn't working anymore because my WinRar auto compressed itself and now everything but the background is in black and white sketches. Does anyone have a link for a up to date resources0.s2z file? I would download the game again but my bandwith is almost at it's cap.
MaxGhost
04-17-2010, 12:30 AM
Just re-install the client. You should still have the installer in your downloads folder. resources0.s2z is basically half the size of the game, so us uploading it for you wouldn't make much sense. I suggest you re-install and update your game.
Dasweb
04-22-2010, 06:10 PM
Which package would I need to open to work with heroes spells, such as a range mod
MaxGhost
04-22-2010, 11:31 PM
Heroes have nothing to do with the interface. They're in resources0.s2z\heroes\<heroname>\
Dasweb
04-23-2010, 12:45 AM
Heroes have nothing to do with the interface. They're in resources0.s2z\heroes\<heroname>\
Gotcha, so I should start there.
Thanks :)
Silv3ri
04-23-2010, 05:22 PM
For some or other reason any Watches that I try using in alt_info.interface don't seem to activate consistently (they do activate, but only one in ten times or under certain conditions - of which I can't yet find a pattern) unless they are one of the AltInfo{Something} Watches. Is there any specific known reason for this? Is it just me?
On a related note, I also noticed that if I create a custom Trigger in game.interface it's not accessible from alt_info.interface, but if I do it the other way around it does work. Is this because of the order the game loads/executes the files? Is this documented anywhere?
Snoopy
04-23-2010, 09:36 PM
Hey, I'm trying to edit a mod that was released by h3llsp4wn, it's the spectator logo. I'm pretty new to most of this, but I can follow most of the code. The biggest problem I'm having, is every time hon resets, it doesn't keep any height and width adjusts made.
Basically there are 4 options in your menu.
X
Y
Height
Width
It will remember the X and Y locations, but not the Height and Width locations. (all done with sliders)
I think this could be the area, but I'm not really doing so well at making changes.
<package>
<trigger name="sLOptions_changed" />
<panel
onload="Split(If(!VarExists(sL_showLogo), Cmd('SetSave sL_showLogo 1')), SetVisible(sL_showLogo));
Split(If(!VarExists(sL_width), Cmd('SetSave sL_width 100')), SetWidth(FtoA(sL_width,0)));
Split(If(!VarExists(sL_height), Cmd('SetSave sL_height 100')), SetHeight(FtoA(sL_height,0)));
Split(If(!VarExists(sL_x), Cmd('SetSave sL_x 80')), SetX(FtoA(sL_x,0) # '%'));
Split(If(!VarExists(sL_y), Cmd('SetSave sL_y 2')), SetY(FtoA(sL_y,0) # '%'));"
name="spectator_logo"
texture="/logo.tga"
noclick="1"
watch="sLOptions_changed"
ontrigger="SetVisible(sL_showLogo);
SetWidth(FtoA(sL_width,0));
SetHeight(FtoA(sL_height,0));
SetX(FtoA(sL_x,0) # '%');
SetY(FtoA(sL_y,0) # '%');"
/>
</package>
TurboJyri
05-02-2010, 02:43 PM
Tried to search quickly, but with no success. I made mod for some items, and now when I "activate" the mod I made, all hero and item textures / icons are chess colored. What might be causing that?
MaxGhost
05-02-2010, 02:51 PM
It means you messed up. Don't edit resources0.s2z directly, it'll do that.
TurboJyri
05-02-2010, 02:56 PM
It means you messed up. Don't edit resources0.s2z directly, it'll do that.
I didn't edit it directly, I put the file I modified to game/items/***/***/
folder, in similar way to the guide.
EDIT: is there way to receive modding support in real time somehow? Some irc-channel or?
Montis
05-02-2010, 05:12 PM
yes.
irc.s2games.com
#honlabs
Goodrilla
05-15-2010, 08:42 AM
EDIT: wrong thread..
allibabba
07-14-2010, 03:29 PM
the realodinterface does not work for me.
neither for package nor for interface
still tells me: "not found"
i packed it to game and game/ui folder. i called it with and without extention.
i like to edit game_end_stats.interface or game_end_stats_v2.package
what do i do wrong?
Silv3ri
07-14-2010, 04:01 PM
reloadinterfaces will always reload all the interfaces, but I think your problem might be that your using old interface files that the game itself never loads. The files in the folder ui that have to do with the in-game interface are all still used, but those that have to do with the rest of the game's interface are now in ui/fe2, but the old files can still be found in the ui folder.
In other words, ui/game_end_stats.interface might never be used and you should rather look for the corresponding file in ui/fe2.
Another example: ui/main.interface is never used, because it has been replaced with ui/fe2/main.interface.
allibabba
07-14-2010, 04:11 PM
but ingame scoreboard is not in fe2, i can only find it in ui.
i tried to put the "new" game_lobby in .../game/ui/fe2/game_lobby.package and reload. still no success.
edit: main.interface worked now, only interface possible? cant reload packages?
edit2: cant reload packages. find the interface that includes the package and reload this one.
example: main.interface and player_stats.package put in ui/fe2/ and reload main.interface if you like to edit player_stats.package
could be added to the guide, or did i missed that?
digipacman
08-07-2010, 05:22 PM
reloadinterface game_lobby fails for me. "interface game_lobby not found"
I extracted resources0.s2z into the /game directory so there is a /game/ui
Inside there I edited the file game_lobby.interface. But when I run that console command I get that error?
Imbisill
08-11-2010, 12:24 AM
Edit: Nvm, I found a nice guide.
Someone knows in which file is "music" coded (which plays from /music folder)?
bergLEEET
04-22-2011, 11:27 AM
If I want to make the flare from Flint another color, where do I have to search? I'm clueless..
Edit: I found the file, but I'm still clueless what to do... Help pls, thx
I know I suck, first tries :>
Alcapowned1
09-11-2011, 10:36 AM
Um. Is there any documentation or a list of functions that return game information(in a non-cheating way)?
I'm trying to make a mod that warns me with a soundfile when to creep pull as well as a mod that detects when your ward is about to run out.
I don't really know how to get the game time nor which interface package i should modify.
Just going through other peoples code (barter and hon) i think there is GetTime();?
Manu311
09-30-2011, 02:28 PM
@Alcapowned
I know there's a mod which already does that, I think it's Bang! Mia or Bang! Scrolling Everything or something like that.
Wooyadeen
10-05-2011, 12:03 PM
Um. Is there any documentation or a list of functions that return game information(in a non-cheating way)?
I'm trying to make a mod that warns me with a soundfile when to creep pull as well as a mod that detects when your ward is about to run out.
I don't really know how to get the game time nor which interface package i should modify.
Just going through other peoples code (barter and hon) i think there is GetTime();?
watch=MatchTime (for game time)
But there is already good mod for that sleyn_stacktimer (http://bit.ly/a3S1ut)
Wamba
01-09-2012, 07:34 PM
Now to test changes you simple have to hit
Code:
crt-F8
and type
Code:
reloadinterface <interface_name>
Friend, you made my day!
Thanks, this will help me a LOT. :)
Helland
05-10-2012, 07:55 AM
Hi, sorry for bumping this old thread, but I think this is the most
appropriate place to put this question.
I am trying to learn how to make HoN-mods, I found a old guide here:
http://www.elitepvpers.com/forum/heroes-newerth/371678-guide-making-hon-mods.html
I am trying to make a "Lock me and my friend" script, heres the script they use:
<!-- LOCK US BUTTON!-->
<panel color="invisible" x="8h" y="-2h" height="3h" width="3h" name="chat_lockh_panel" >
<image texture="/ui/lockh/LH.tga"/>
<button
texture="/ui/elements/button_bevel.tga"
onclick="AllChat('Can you lock me (DoubleDTheGreat) and ProButLags please? :)');"
onrightclick="AllChat('Pretty Please? :)');"
/>
</panel>
They add this code to the file game_lobby.interface, but that file doesn't exist anymore.
I tried to add this script to the Game_chat.interface, but it dint work.
Can you guys teach me how I make a simple script, that adds a button in the lobby which enters text in the all-chat when its clicked?