Simple HUD mod

SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
<div class="IPBDescription">example mod</div>hey everyone,

i sat down today for an hour to finally make a mod again, this time it's just UI and the main purpose was to give a small example for a mod. please don't request any additional features, i will most likely not update it, but feel free to ask questions here or copy the code.

the texture used is very basic, i know it's not looking very beautiful but it serves the purpose.

screenshots:

<img src="http://img853.imageshack.us/img853/9319/2012082500002.jpg" border="0" class="linked-image" />
<img src="http://img440.imageshack.us/img440/1410/2012082500001.jpg" border="0" class="linked-image" />


[attachment=36126:simplehud.zip]

Comments

  • fanaticfanatic This post has been edited. Join Date: 2003-07-23 Member: 18377Members, Constellation, Squad Five Blue
    Neat, could be very useful for aliens.
  • ArkantiArkanti pub baddie Join Date: 2011-07-22 Member: 111781Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow
    I like! Only thing that bothers me a little is that they're entirely opaque in the middle of the screen, perhaps a little bit of transparency on them would be nice :)
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    <!--quoteo(post=1966743:date=Aug 25 2012, 07:45 PM:name=Arkanti)--><div class='quotetop'>QUOTE (Arkanti @ Aug 25 2012, 07:45 PM) <a href="index.php?act=findpost&pid=1966743"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I like! Only thing that bothers me a little is that they're entirely opaque in the middle of the screen, perhaps a little bit of transparency on them would be nice :)<!--QuoteEnd--></div><!--QuoteEEnd-->

    find the variable you need to adjust! :)
  • ArkantiArkanti pub baddie Join Date: 2011-07-22 Member: 111781Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow
    edited August 2012
    <!--quoteo(post=1966748:date=Aug 26 2012, 10:27 AM:name=Sewlek)--><div class='quotetop'>QUOTE (Sewlek @ Aug 26 2012, 10:27 AM) <a href="index.php?act=findpost&pid=1966748"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->find the variable you need to adjust! :)<!--QuoteEnd--></div><!--QuoteEEnd-->


    Bad things happen when I attempt basic stuff like this.
  • falcfalc Join Date: 2011-03-18 Member: 87128Members
    The look totally reminds me of the hud mod i used in World of Warcraft years ago. I like it! :)
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    Here are some rounds using the mod:
    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/UStDijM4Bk8"></param><embed src="http://www.youtube.com/v/UStDijM4Bk8" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/cNQeZGJk9kU"></param><embed src="http://www.youtube.com/v/cNQeZGJk9kU" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>

    Overall, I do like it, but there are a few things I'd like to see changed.
    - The marine bars need more contrast as it was difficult to see them against the map colors
    - It'd be nice if the marine w/a levels and alien upgrades were still available (I think putting them on the right side of the screen when you pull up the minimap would be the best)
  • TwiggehTwiggeh Join Date: 2010-09-24 Member: 74165Members
    <!--quoteo(post=1966877:date=Aug 26 2012, 05:57 PM:name=falc)--><div class='quotetop'>QUOTE (falc @ Aug 26 2012, 05:57 PM) <a href="index.php?act=findpost&pid=1966877"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The look totally reminds me of the hud mod i used in World of Warcraft years ago. I like it! :)<!--QuoteEnd--></div><!--QuoteEEnd-->

    My thought exactly :D
    Think it was ArcHUD.
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    I'd be cool to see a version of this simple hud with small straight horizontal meters in the corners, rather than up near the crosshair.
  • jeffcojeffco Join Date: 2011-02-14 Member: 81785Members
    Thanks for sharing. I was looking for a mod like this (since it is quite difficult to observe the alien health bar in combat). Having the HUD near the crosshair should fix this.

    I remodeled the bar element and simplified the health bar a bit more. Also, I added a medium sized minimap, the weapon/armor level indicicator and window size based scaling. The result looks like this:

    <a href="http://imageshack.us/photo/my-images/835/je2mod2.jpg/" target="_blank"><img src="http://img835.imageshack.us/img835/3373/je2mod2.jpg" border="0" class="linked-image" /></a>
    <a href="http://imageshack.us/photo/my-images/99/je2mod.jpg/" target="_blank"><img src="http://img99.imageshack.us/img99/8103/je2mod.jpg" border="0" class="linked-image" /></a>

    <a href="http://host07.ath.cx/download/NS2/build217-je2mod-0.1.zip" target="_blank">build217-je2mod-0.1.zip</a>
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    nice. but i think it would be still necessary to have an armor bar. the one thing that i wanted to address with the mod was to show the armor and health separately. even if armor would be displayed only as a number somewhere, but the health bar should only show the health, always. currently this shared health/armor display is not accurate enough in my opinion
  • jeffcojeffco Join Date: 2011-02-14 Member: 81785Members
    I die pretty much instantly no matter how much health or armor i have. Hence, I see no point in knowing exact health or armor values. My version of the unified health bar uses the health value (without armor) for tinting the bar. So, someone who is good at differentiating colors might be able to guess the health and armor values. :)

    simplehud and je2mod-0.1 do not play well with the exo:
    <a href="http://imageshack.us/photo/my-images/337/je2mod3.jpg/" target="_blank"><img src="http://img337.imageshack.us/img337/9349/je2mod3.jpg" border="0" class="linked-image" /></a>

    That bug is fixed in je2mod-0.3: <a href="http://host07.ath.cx/download/NS2/build217-je2mod-0.3.zip" target="_blank">build217-je2mod-0.3.zip</a>

    I tried to add some code to display the "heatAmount" of the minigun in the ability bar. I came up with code like this:
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->                if activeWeapon:isa("ExoWeaponHolder") then
                        local weapons = { Shared.GetEntity(activeWeapon.leftWeaponId), Shared.GetEntity(activeWeapon.rightWeaponId) }
                        local heat, maxHeat = 0, 0
                        for _, weapon in ipairs(weapons) do
                            if weapon and weapon:isa("Minigun") then
                              heat = heat + weapon.heatAmount
                              maxHeat = maxHeat + 1
                            end
                        end
                        return (maxHeat - heat) / maxHeat
                    end<!--c2--></div><!--ec2-->
    It works, but... I am not sure if this a "good" way of doing this.
  • SatanHimselfSatanHimself Join Date: 2012-10-07 Member: 161795Members
    Just an idea, but you might fade out the health/ammo bars if you are full. As a player you only really care about the values when they are depleted. Looks great though!
Sign In or Register to comment.