• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Mana Bars (yet another thread)

Status
Not open for further replies.
Level 30
Joined
Jan 31, 2010
Messages
3,551
Before anything else, yes, I did my best to find something similar to what I'm searching for, and found nothing.

I believe I've looked to over 30 threads and systems and still. Found nothing.

I am searching for a custom Health/Mana Bar system and models, that should look something like this:
24mud78.jpg
The systems I've found on THW didn't offer me fully functionality, were either slow or bugged, or didn't visually look good enough.

The best one I found so far is this one:
http://www.hiveworkshop.com/forums/...-v2-0-1-a-245414/?prev=search=bar&d=list&r=20

But I don't like how it looks overall, and the bars stay there after a unit dies (looking for a more "powerful" appearance, as it will only be used on hero units, while standard units will have regular HP bars, no mana bars at all for them).

Anyways, I've seen in few maps that something VERY similar to reference image I gave is used, but I can't find any of those maps to take a look at model names if nothing else.

I've also found this: http://www.thehelper.net/threads/loadingbars-tallybars-w-e-bars.142619/

Which I really like it's appearance, but cannot use it in the system I've linked (animation issues probably).

I'm asking for help to get the mana bar system, or to "fix" either the linked model or the system by TH to make it functional. I'm also open for other suggestions.

Thanks in foward!
 
Level 12
Joined
May 20, 2009
Messages
822
I don't know of an easy way to make it straight-up for a map, but there is a mod for WC3 called Nirvana that uses a custom executable to inject it's own code into WC3 and one thing it injects is a 100% functional mana bar. To actually use the custom mana bar without the rest of the mod isn't difficult at all unless you have no idea what you're doing.

Alternatively, some launchers, like ICCUP Launcher, use to have a "Mana Bar" option built-in.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
This is not possible in WC3? Sure you can customize the health/mana bars however I am not sure how you will define the segmentation mechanics. I certainly do not recall ever seeing a map that uses segmentation mechanics.

To clarify, segmentation mechanics is when the health or mana bar is divided into visible segments, each representing a standard quantity. For example in Heroes of the Storm the health bar is segmented into 250 health units. If you have a move that does 500 damage you know it will remove 2 segments from the bar. This mechanic is required to de-normalize unit health such that you can recognize tougher or weaker targets.

The segmentation mechanics are supported by SC2 engine and are shown off nicely in both the Heart of the Swarm campaign and Heroes of the Storm free to play AoS.
 
I suggest that you should make your own Life/Mana Bar with that look, which will have 10000 animations for every percentage of life and mana (for ex. Life is 90, and Mana is 100 -> (90 - 1)*100 + 100 -> 9000 animation id)

The first map to offer this feature/functionality is IID by Luorax, where they use a model that has animations same that I have mentioned above(but including the Level Value. so that would be 180000 animations if it the animations are precise)


Here is the link to the map:
http://www.hiveworkshop.com/forums/maps-564/iid-beta-v0-88b-227935/?prev=search=IID&d=list&r=20

Perhaps you could bring that down to 20*20*hero level(which is for ex. hero level = 10 -> 4000 animations) but it would be 20% less precise(but improves performance and less time to make as well). The idea of 400+ animations is that it checks life and mana for every 5% value


Using text tags would be cheap, but expensive in handles, and also it would take time to calculate the right height fit for the text tag. It will be also perfect if it takes account the selection size of a unit (health bars length are equal to selection diameter, or perhaps the collision diameter)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
No I dont think you need 10k+ animations.

If I am right, the casting bar system uses one animation and sets the animation speed to ... to make the duration.
I think that you can set the animation to very much for 0.03 seconds and then back to 0.
If that is true, you can have your own health bar with one animation... 2 if you cannot set negative animation speed.

I never tried to test it but I suppose it will work.
if you set the speed a little lower and the duration a bit higher, you will get the fading effect. That when you take damage, the health bar wil slowly move towards the new value.

What you need is to check every 0.03 seconds how much hp in percent has and compare that to the amount that is saved.
If those are different, then increase/decrease animation speed and set the new percentage as the value.
In that way, you can do it... I suppose.
But as I said I never tried it.
 
No I dont think you need 10k+ animations.

If I am right, the casting bar system uses one animation and sets the animation speed to ... to make the duration.
I think that you can set the animation to very much for 0.03 seconds and then back to 0.
If that is true, you can have your own health bar with one animation... 2 if you cannot set negative animation speed.

I never tried to test it but I suppose it will work.
if you set the speed a little lower and the duration a bit higher, you will get the fading effect. That when you take damage, the health bar wil slowly move towards the new value.

What you need is to check every 0.03 seconds how much hp in percent has and compare that to the amount that is saved.
If those are different, then increase/decrease animation speed and set the new percentage as the value.
In that way, you can do it... I suppose.
But as I said I never tried it.

It will, if you want the bar to return 100% of the value due to the fact that you will create your own health bar and mana bar that are both combined, which would require n^2 results where n is the amount of animations needed per bar. (ex. if the bars are 5 times less precise , it would have 20 animations per bar, and per animations there are 20 animations to match it. so 20^2 = 400 animations)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I think I understand wrong because I read it as "Yes that will work, but it will not work."
If there is one animation for increasing size and one for decreasing size, then I can make the health bars with 2 animations... per bar. One bar would be one unit.
This might be performance intensive but yea you can customize everything you want.
(I am still thinking of how to make those blocks.
In the preview you can see black lines that separate the health bar in different blocks.
One block being 100 hp.)

With this, you could also make a 3rd bar for stuff like shields... would be dynamic ofcourse :D
 
@Almia, that is something I'm looking for, tho I'm not in the need of the level part, but it is a neat addition.

If anyone has information how can I get my hands on something similar for my project, I'd be very grateful :)

Maybe you should contact Judash(he is the one who made the bars) or you could just contact a modeller who would do same thing
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Is there any way to remove the regular health bars?
I mean without locust or <=0 selection size.

EDIT: nvm I got it.

This looks promosing does it?
type "-inc" and "-dec" to increase and decrease.

I know that 100% is in 1 second full.
So 0.03 x 100% is +3% hp.
So if a unit is hit for 10% of his hp since the last 0.03 interval, I will set animation speed to -100 / (0.03 X 10) = -333.333% for 0.03 seconds and it will be updated properly.
However that will be made in the system.

I know that this method is very buggy because there might be a difference after you play for a while but it is only a concept yet.

(Known bug: units will not show their selection sircle.)
 

Attachments

  • HP-bars concept.w3x
    17.6 KB · Views: 268
Last edited:

LeP

LeP

Level 13
Joined
Feb 13, 2008
Messages
539
It will, if you want the bar to return 100% of the value due to the fact that you will create your own health bar and mana bar that are both combined, which would require n^2 results where n is the amount of animations needed per bar. (ex. if the bars are 5 times less precise , it would have 20 animations per bar, and per animations there are 20 animations to match it. so 20^2 = 400 animations)

You can just display two models above each other. No need to combine them into one model.
For example afaics IID uses two models with each atleast 100 animations.
 

LeP

LeP

Level 13
Joined
Feb 13, 2008
Messages
539
That purpose is to have a nicer look
Not that you don't specify what "looks nicer" means i'm very sure it wont look nicer. I mean you can more or less arrange models "pixelperfect" around any unit.
And just for fun here are the lines from iid0.88b which prove the usage of two models (or rather two units with probably the same model).
JASS:
call SetUnitAnimationByIndex(Ok[IZv],(R2I(((100*(GetWidgetLife(rk[IZv])/ GetUnitState(rk[IZv],UNIT_STATE_MAX_LIFE)))*1.0)+.55555)))
call SetUnitAnimationByIndex(Rk[IZv],(R2I(((100*(GetUnitState(rk[IZv],UNIT_STATE_MANA)/ GetUnitState(rk[IZv],UNIT_STATE_MAX_MANA)))*1.0)+.55555)))
I didn't even bother checking the models as the above should be pretty obvious.

There are also other alternatives to models, mainly texttags and lightnings.
You'd have to script the billboard effect for lightnings yourself though. Or just lock the camera. I guess lightnings have the advantage that one could easily implement that segmentation also mentionend in this thread.

External programs were already mentionend in this thread. There are a non-option imo. I'd like my map to be playable w/o external tools.
 
Status
Not open for further replies.
Top