HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

MultiBars

12-05-2007, 04:41 AM#1
Ammorth
Multibars version 1.20

Created by Ammorth

Please give credit if you use this in your map.



Multibars is an easy way to create dynamic and sexy looking progress bars for multiboards.

Included in this version are 11 different bartypes:
  • Build (based on the in-game construction bar)
  • Health (A red health bar)
  • Mana (A blue mana bar)
  • Experience (A purple experience bar)
  • Chunk (A green bar that displays in chunks, rather than smoothly)
  • Radio (A radioactive [yellow and black] bar)
  • Mac (resembles a Mac OS X loading bar)
  • Orange (An orange bar that displays in chunks, but chunks light up vs. appearing)
  • Hearts (Zelda style hearts)
  • Hearts Up (Upgraded Zelda style hearts [white outline])
  • Magic (Zelda style magic meter)

Also included in the pack is the photoshop document with all the borders and fills I used to make the bartypes in the map.

I am willing to make other bartypes on request and include them in different version/packs. Just include a picture or description on what you want it to look like.

As of version 1.20 there is both a standard Jass version and a vJass version. For those who do not have vJass, the Jass version is available.

Download Pack (version 1.20)
Download Jass Map Only (Jass version 1.20)
Download vJass Map Only (vJass version 1.20)

vJass

Expand vJass Read-Me:

Expand vJass Multibars:

Expand vJass MultibarHelper:

Jass

Expand Jass Read-Me:

Expand Jass Multibars:

Expand Jass MultibarHelper:
Attached Images
File type: jpgMultibars Logo.jpg (57.1 KB)
Attached Files
File type: w3xMultibars v1.20 Jass.w3x (152.8 KB)
File type: w3xMultibars v1.20 vJass.w3x (152.3 KB)
File type: zipMultibars Pack v1.20.zip (377.9 KB)
12-05-2007, 07:50 AM#2
Malf
Looks damned sweet. Does it automatically update Health, Mana and Experience bars or do I have to manually do so? I'm hoping it's automatic..
12-05-2007, 09:34 AM#3
MaD[Lion]
im gonna use this for ET2
12-05-2007, 02:18 PM#4
Ammorth
Currently, all you have to do is call method UpdateValue takes real newvalue, boolean update returns nothing to update it, but I can include linking bars to events (unit health, mana, exp, etc) so then the lazy people don't even need to call it.
12-05-2007, 04:32 PM#5
Oglog
Cool! I challenge you to make verticle ones as well.
12-05-2007, 10:16 PM#6
Ammorth
Vertical bars are going to be tricky since there is a small gap between the icons, height-wise. It is possible, but it would look funny with the gaps.
12-06-2007, 01:28 AM#7
moyack
Lovely!!

This resource would be almost perfect if you could add to the system a way to set a label for each bar, so you can give more customization to this system. If you do that I'll approve it at once.
12-06-2007, 02:17 AM#8
Ammorth
Explain what you mean by labels?

The new version is going to have unit bars (bars the update automatically for unit health, mana and exp), and bars are now truly classified as bartypes. You create a bartype with function CreateBarType takes string name, string filetype, string directory, integer divisions returns integer and then use that integer as your type when you create new bars.
12-06-2007, 08:17 AM#9
Pyritie
I'm guessing he means put some text either on the bar or besides the bar.
12-06-2007, 08:27 AM#10
Malf
I'm gonna wait on the new version ^^

I pray you could code linked experience bars, I don't know how to get the max exp needed for the next level and I think there's no GetExpRequiredToLevel(unit) function :P
12-06-2007, 11:29 AM#11
moyack
Quote:
Originally Posted by Ammorth
Explain what you mean by labels?

The new version is going to have unit bars (bars the update automatically for unit health, mana and exp), and bars are now truly classified as bartypes. You create a bartype with function CreateBarType takes string name, string filetype, string directory, integer divisions returns integer and then use that integer as your type when you create new bars.
For example, If I want to use your library to manage ammo, I'd want to put a label to the left or right side of the bar which indicates that bar is for ammo.
12-06-2007, 03:50 PM#12
Rising_Dusk
Quote:
I pray you could code linked experience bars, I don't know how to get the max exp needed for the next level and I think there's no GetExpRequiredToLevel(unit) function :P
There is no function like that, nor can you pull the required values to calculate it straight out of constants. You'd have to adjust that calculation for each individual map, which while inconvenient, is the only way to do it.

Quote:
For example, If I want to use your library to manage ammo, I'd want to put a label to the left or right side of the bar which indicates that bar is for ammo.
I think the general use of this is being able to incorporate it into already made multiboards as an additional row/column. It would be terribly static and useless if all the system did was create a new multiboard and the only thing it does is update the bars. If made properly, anyone that uses it would be able to mod their current MB to include a label should they desire it. I don't think that parameter should be encompassed by this system.

By the way, this is a cute system.
12-06-2007, 10:49 PM#13
Ammorth
Quote:
Originally Posted by Rising_Dusk
There is no function like that, nor can you pull the required values to calculate it straight out of constants. You'd have to adjust that calculation for each individual map, which while inconvenient, is the only way to do it.

Actually, the new (yet to be released) version does detect the XP required for the next upgrade without changing any constants (except for a max level). The idea revolves around a unit who has their level set will have the minimum XP to get to that level, which is the required XP for that particular level.

Collapse JASS:
globals
    private integer array GXPForLevel
    private integer DummyHeroUnit = 'Hpal'
endglobals

private function GetMaxXP takes integer level returns integer
    local unit u
    set level = level + 1
    if level <= 1 then
        return 0
    endif
    if GXPForLevel[level] == 0 then
        set u = CreateUnit(Player(12), DummyHeroUnit, 0., 0., 0.)
        call SetHeroLevel(u, level, false)
        set GXPForLevel[level] = GetHeroXP(u)
        call RemoveUnit(u)
        set u = null
    endif
    return GXPForLevel[level]
endfunction

This function takes the current level of the unit and returns the XP required for the next level-up (level 1, returns level 2 requirement). A level less than 2 requires 0 XP.


I think I will include labels, only because the health, mana, and XP bars are already automatic. It would be a waste of calculations for a person to then find the values outside the system and update the board.

Look for the new version some-time tonight or tomorrow evening. If you have any ideas for bartypes, tell me now, and I may include them in the next release.
12-06-2007, 11:33 PM#14
JetFangInferno
very unique and will greatly benefit the warcraft modding community. +rep.
12-07-2007, 06:35 AM#15
Rising_Dusk
Quote:
The idea revolves around a unit who has their level set will have the minimum XP to get to that level, which is the required XP for that particular level.
That works I suppose, but it's rather clunky. Well shit though, the very fact it works is enough to merit its use. Reminds me of how Pitzer once did the GetItemCost function. (At least I think that's what it was... It used the same method you used, basically) Whatever works dude, rock on.