# HoN Avatar Manager

## Recommended Posts

[WIP] HoN Avatar Manager

Content

• How it works
• How to install
• How to update
• How to run
• Examples

Hello everyone! Recently I've been searching for the good old HoN mods that replace the default hero avatars with an existed from the game (some EA only avatars are just too good ). Turns out that they are all pretty outdated and broken, so I decided to make some myself. Thanks to the @RedBear I've managed to find pretty useful information about the HoN modding on an old forum that helps me a lot during the initial research.

Turns out that all the models, effects, sounds, etc. could be extracted directly from the game files, so this is exactly what I've done

Using this program you will be able to replace the default avatar with any other from the game.

Any suggestions and contributions are welcome!

Currently, there is only a CLI (command line interface) for the HoN Avatar Manager. Creating a GUI application is not the first priority since there is still a lot of work to do and test. Also, cross-platform support could be expected after the core program will be finished and tested on Windows.

How it works

To create a resources file with the hero avatar, the program does several things:

• Extracts the /heroes/%heroname% folder from the corresponding resourcesXXX.s2z file into a temporary directory.
• Changes the /heroes/%heroname%/hero.entity file, replacing the hero attributes and child nodes with the corresponding values from the altavatar node.
• Packs the /heroes directory into a .s2z (zip) archive.
• Copies the resources_%heroname%.s2z file into a /game HoN directory.

How to install

Note: The current implementation of this program relies on PowerShell Core and works only on Windows (tested only on Windows 10).

1. Install PowerShell Core
2. Run PowerShell Core as Administrator
3. Run Install-Module HoNAvatarManager

How to update

1. Run PowerShell Core as Administrator
2. Run Install-Module HoNAvatarManager -Force

How to run

1. Run PowerShell Core as Administrator
2. Run Import-Module HoNAvatarManager
3. To make the completion process easier, run Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
4. If you have HoN installed into directory other than C:\Program Files (x86)\Heroes of Newerth, run Set-HoNPath -Path "path\to\hon"

Examples

• Set HoN path
Set-HoNPath -Path "D:\Games\Heroes of Newerth"
• Set Aluna avatar to Stardust Aluna
Set-HeroAvatar -Hero "Aluna" -Avatar "Stardust Aluna"
• Remove Devourer avatar
Remove-HeroAvatar -Hero "Devourer"
• Remove all avatars
Remove-HeroAvatar -All

• See a list of all available heroes: after typing Set-HeroAvatar -Hero  press Tab and "y" key to see all available heroes.
• See a list of all available hero avatars: after typing Set-HeroAvatar -Hero "%heroname%" -Avatar  press Tab key to see all available hero avatars.

Video guide

Sorry for the poor video quality, I might re-upload it later.

Edited by FoxTail
0.1.10 Release
• 2
• Replies 62
• Created

#### Popular Posts

[WIP] HoN Avatar Manager Latest release: 0.1.10 Content About How it works How to install How to update How to run Examples Links About

Hey, @FoxTail. Sorry I'm late to reply. Actually @Anakonda has already answered your question. In short, the number of animations and their order in the avatar model.mdf should be the same as in

@MrCactusMy main priority right now is to finish the avatar related work (there are still many broken animations and stuff that needs to be managed), but the announcer features is definitely somethin

Awesome work!

If it doesn't already, I'd suggest you to add the announcer-disabler feature (replacing all of them with the default one i guess)

##### Share on other sites

@MrCactusMy main priority right now is to finish the avatar related work (there are still many broken animations and stuff that needs to be managed), but the announcer features is definitely something that could be included next.
Thanks

• 1
##### Share on other sites
On 10/7/2020 at 2:52 AM, MrCactus said:

Awesome work!

If it doesn't already, I'd suggest you to add the announcer-disabler feature (replacing all of them with the default one i guess)

Is my mod not working anymore or what?

##### Share on other sites

hey im having problems getting this to work.. is there anyway you would be able to make a video that would be really helpful.. thanks in advance and can't wait to use it. Or even more specific instructions for example giving us the command for using a certain avatar for reference.

Edited by kaboomking
##### Share on other sites

Okay so i got it working and you're doing gods work seriously.. I've been waiting for avatar mods but it seems the hon mod community is out of the loop nowadays and honestly so thankful.. Thanks again and would you have to be updating the manager all the time for these mods to work?

##### Share on other sites
Quote

Thanks again and would you have to be updating the manager all the time for these mods to work?

I don't think that the structure of s2z files are changing with the new patches, so it should be working fine. The only updates required is adding new avatars.

Quote

Or even more specific instructions for example giving us the command for using a certain avatar for reference.

There is already an instruction, see Examples article.

If you're struggling to find the right hero/avatar combination, try this out:

2. Type Set-HeroAvatar -Hero
3. Press Tab - this will give you the list of all possible heroes. Select one with arrows and Enter key.
4. Type -Avatar
5. Press Tab - this will give you the list of all possible avatars for the selected hero. Select one with arrows and Enter key.

I understand why the Command Line Interface could be difficult to use, that's why I'm planning on creating a GUI app as well as a standalone version (a set of .s2z files for each avatar that could be manually put into a game folder).

##### Share on other sites

"Cannot bind argument to parameter 'Avatar' because it is an empty string." It says this when I try to use the command "Set-HeroAvatar -Hero". Also was wondering if we had to go through the process of installing and updating it everytime we want to change a avatar or not? Thanks in advance

##### Share on other sites

@kaboomking after you type Set-HeroAvatar -Hero, don't press Enter, type Space and then press Tab.

Quote

Also was wondering if we had to go through the process of installing and updating it everytime we want to change a avatar or not?

No, you could set as many avatars as you want without updating the program.

##### Share on other sites

Great project!

The structure of the s2z files will be changing in a future patch (right now we plan for the change to either happen in 4.8.7 or 4.8.8). Just wanted to give a heads up in advance - right now, the heroes/ folder distribution isn't in alphabetical order & is done in a weird way to make the resource distribution even. We plan to fix that in a future patch so that it makes sense to anyone browsing through the game file while still maintaining relatively uniform resource distribution.

If you wanted to prepare in advance, here is the projected split when that patch comes:

Quote

:/game/heroes/a*, 1
:/game/heroes/b*, 1
:/game/heroes/c*, 1
:/game/heroes/d*, 1
:/game/heroes/e*, 1
:/game/heroes/f*, 2
:/game/heroes/g*, 2
:/game/heroes/h*, 2
:/game/heroes/i*, 2
:/game/heroes/j*, 2
:/game/heroes/k*, 2
:/game/heroes/l*, 2
:/game/heroes/m*, 3
:/game/heroes/n*, 3
:/game/heroes/o*, 3
:/game/heroes/p*, 3
:/game/heroes/q*, 3
:/game/heroes/r*, 3
:/game/heroes/s*, 4
:/game/heroes/t*, 4
:/game/heroes/u*, 4

resources1 should stay exactly the same, though the rest will change & there will be a resources4.s2z file to help offload the space-heavy folders from s-u.

Yes, this does mean that resources0 will have the remaining entries (v-z) so it's still a little bit out of order, but this way there won't be as much of a change in the manifest (which means less files the player has to redownload). In other words, the order of the hero entity files will go from resources 1-4 alphabetically, then back to resources0.

Edited by ElementUser
• 1
##### Share on other sites

Hey @RedBearor @ElementUser, you might know something about it: I'm trying to implement some kind of hot reload for mods testing. Is there a way to delete a resource file while the game is running and load a new resource file instead? I've tried to do something like this:

ResourceCmd /heroes/parasite unregister

...but the resources_Parasite.s2z file handle is still locked by the hon.exe

Edited by FoxTail
##### Share on other sites
Quote

This is the only console command I know that will enable hot reloading from files. I don't think model/texture files are affected by this though, and in general you're not supposed to directly edit the files inside of the resource files.

Sorry that's all I've got - maybe if you can get @HyperXewl's input on this, but he's very busy as well.

Edited by ElementUser
##### Share on other sites

Then add your files as loose files directly to the games folder, do not add them to s2z. When you are ready to publish then add them to s2z.

• 1
##### Share on other sites

idk if publishing that animations arent working here would help but malikens animation isn't working well and can't seem to get any avatars working for magmus or swiftblade.. thanks for your hard work!

##### Share on other sites
6 hours ago, kaboomking said:

idk if publishing that animations arent working here would help but malikens animation isn't working well and can't seem to get any avatars working for magmus or swiftblade.. thanks for your hard work!

The problem with animations has long been known. This is due to the difference in the number of animations in the model.mdf files of the default model and avatar model.

##### Share on other sites
• 2 weeks later...

Can you make a video of how to install and how to use that would be awesome thanks!

##### Share on other sites
4 hours ago, Omgitsemil said:

Can you make a video of how to install and how to use that would be awesome thanks!

Yea, I will probably do it this week since PowerShell is not something common everyone has experience using

##### Share on other sites
On 10/11/2020 at 12:33 PM, RedBear said:

The problem with animations has long been known. This is due to the difference in the number of animations in the model.mdf files of the default model and avatar model.

Hi,@RedBear do you know a way to fix this kind of issues with animations? For some reason an attack animation works fine in practice game, but bugs in ladder. I don't have an idea what's an issue here honestly

##### Share on other sites

In <hero> you set model to some .mdf file. mdf file is xml.

Server choses what animation should play based on name. Because it is much more efficient to send number than text it then sends something like "play 3rd animation in that file" because your modded file does not match it plays wrong animation.

You need to have animations in the same order as in the original.

This works in practice because you are the server so your files always match.

##### Share on other sites
42 minutes ago, Anakonda said:

mdf file is xml

Brilliant. All this time I thought it was a database file. Thanks!

Edited by FoxTail
##### Share on other sites

Hi all, I'm happy to bring this new big release of HoNAvatarManager!

What's new

• Added staff_%heroname%_ult_boost.entity file parsing - now SotM effects should correctly display for all avatars.
• Fixed throwback avatars parsing - it should now correctly parse hero and staff .entity files.
• Added early administrator check - now the program will fail at the start if not launched as Administrator rather than at the file copy time.
• Added Set-HeroAvatarUnpacked cmdlet for easier testing. However, you could use this command instead of the Set-HeroAvatar - it should work a bit faster.
• Tested, fixed and updated all avatars for the following heroes: Accursed, Adrenaline, Flint Beastwood, Moon Queen, Night Hound, Parasite, Pollywog Priest, Swiftblade, Thunderbringer and Voodoo Jester.
• Added Create an issue link for each custom exception. Now you could copy and paste the link to create an issue whenever you run into an error.
• Updated argument completion for Set-HeroAvatar command - it should be easier to pick the right hero or avatar.

How to update

1. Run PowerShell Core as Administrator
2. Run Install-Module HoNAvatarManager -Force

P.S. I don't have enough time recently to complete the video guide for the program, but I hope I will be able to this on the following weekend. Sorry for the delay.

Edited by Fox`Tail
##### Share on other sites

Hey brother appreciate the hard work and you for taking the time to do this for the hon mod community it means alot! I tried the recent avatars you updated and its working great. I was wondering if you can somehow get the Shadowblade avatars to work properly in match making? In practice the shift forms work perfectly but in match making it stays the same form as the original.. Also idk if the mod has an effect on the activation of Bombardiers Q cause in practice I can blow it up manually rather in game I have to let the timer go off cause I'm unable to re-activate it.

##### Share on other sites

Hey,@kaboomking thanks for reporting the problems, I will look into it and hopefully fix it in the next update.

##### Share on other sites

Whenever you throw the bomb onto someone and try to re-activate it to explode it, it doesnt let you. I tried it in practice mode and it works fine but match making it doesn't let me re-activate early so it can explode. It lets me throw the bomb however thats about it. And yes I updated it to the latest hon manager as well.

Edited by kaboomking