How do you view the hud_main_menu.xml file? What program will view the file?
Use any normal text editor, don't try to open it as an XML (with Internet Explorer or something) cause that won't work.
Nothing shows up in the game.Are you sure the "SetMenuStringValue" command is suppose to do this? I read the OBSE docs description on it but could not understand it from just command description. The sampe they show seems to be about text not icons.
:shrug:
Oh wait, it could just be due to a typo, the function needs a
| between the 'trait to set' and the 'new texture path'
setMenuStringValue "hudmain_statusbars\hudmain_Weapon_Icon\filename|Textures\DP\glassflask.dds" 1004
If it still won't work then the rest of my post (what I initially wanted to post) may be of interest. Or if you decide replacing the entire weapon icon isn't as nice as you had thought.
--------------------------------
I noticed something similar when I tried to dynamically change the HUD's spell icon, no matter what I did or how fast the code ran the icon would not be updated. I suspect it has something to do with the engine overriding any change immediately thus the icon remains unchanged.
But there are a few alternatives, perhaps even better than what you are doing right now.
Firstly you can try using the 'status icon' for the weapon (you know, is it stolen, enchanted, etc.) with something like this
setMenuFloatValue "hudmain_statusbars\hudmain_Weapon_Icon\user0" 1004 1 ;This needs to be non-zero for the status icon to appearsetMenuStringValue "hudmain_statusbars\hudmain_Weapon_Icon\user1|YourArrowCross.dds" 1004
If it is good enough to show just a 2 for the ammo count you can try changing this (which is the trait that determines the amount of ammo left that will be displayed)
setMenuFloatValue "hudmain_statusbars\hudmain_Weapon_Icon\user3" 1004 2
Hope it helps, and good luck with the rest of the mod, I'm keeping my eyes on it.
-kyoma