HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

TTBars

12-13-2008, 01:48 PM#1
Deaod
This script was designed to ease access to custom bars out of texttags.

This library uses ARGB and TimerUtils by Vexorian.

Changelog

12/13/08 - Version 1.0
- initial release

02/22/09 - Version 1.0.1
- removed TTBase
- cleaned up the API (removed RemoveGradient and added better encapsulation)
- fixed a bug, where you couldnt add MAX_GRADIENTS gradients
- a few other minor improvements

03/16/2009 - Version 1.1.0
- heavy API changes, mainly in relation to background coloring (uses ARGB now)
- Bars are now initialized to be displayed to all players by default
- Adding no gradients or insufficient gradients is now handled gracefully
- each bar can now have distinct primitive strings ("|" gets converted to "||" automatically to avoid some problems)
- some speed improvements
- documented what i left out initially

03/17/2009 - Version 1.2.0
- more API changes, this time in relation to coloring the Bar.
- Added the SetForeground method and a default gradient parameter to the create method. You can now select a default gradient on a per-bar basis.
- separated the Gradients from the initial TTBar struct. The new struct is called TTGradBar and inherits all members and methods TTBar has.

03/17/2009 - Version 1.3.0
- unified API to use ARGB
- removed parameter of the create method for defining a default gradient. Added a global to fill in that parameter.
- corrected the way SetForeground behaves (in TTGradBar structs). Gradients now take precedence over the color specified by this method.

03/18/2009 - Version 1.3.1
- reordered some methods as to improve efficiency a bit.

07/02/2009 - Version 1.4.0
- some optimization behind the scenes (complexity for creating the text of the bar changed to O(1))
- added interface for using strings to color the foreground of a bar (AddGradientString, SetForegroundString)
- made the primitive char the bar consists of and the number of primitive chars the bar consists of changeable after creating the bar.

07/29/2009 - Version 1.4.1
- a few bugfixes. Thanks to map-maker for reporting them.

09/10/2009 - Version 1.5.0
- Added the ability to fade out bars (which is another way of destroying it).
- Added an additional demonstration for TTBars based on zwiebelchen's recent submission (credits for it go to him)



Expand TTBARS+Credits:

I also attached a testmap.
Type in "-test" to display credits and start testing.

I hope someone needs this.

Deaod
Attached Files
File type: w3xTTBARS_1.5.0.w3x (44.5 KB)
12-13-2008, 04:23 PM#2
DioD
if Used<99 then

as i know, there is 99 tt started from 0, soo this value must be set to 98

fix.

I tested native tags allocation.

allocation started from 99 and run to 1, after limit hit CreateTextTag returns nulls.
12-13-2008, 07:16 PM#3
Deaod
so, first ID a texttag gets is 99 and last one is 1? If yes, then this already works.
12-13-2008, 09:03 PM#4
akolyt0r
is this system able to block the original wc3 health bars, yet ?
if not, i know there is a way, but i dont remember it atm, was something with an ability ...dunno
12-13-2008, 09:08 PM#5
Ammorth
I wouldn't use this system for health bars, but for some sort of stamina or caster bar (mana maybe?). Cause I think the latest patch has an option to enable health bars (so they are always visible).
12-13-2008, 09:13 PM#6
Deaod
erm, if you add a locust ability to a unit and then remove it again, no healthbar is displayed.
You could also try to overlay standard healthbars with this, but i dont recommend doing that. Its just too much work.
12-13-2008, 10:13 PM#7
Av3n
or maybe place it at the feet of the units instead or above the health bar (the height might vary due to different model sizes i think)

-Av3n
12-13-2008, 10:49 PM#8
Troll-Brain
When i test i don't see any bar, i tried to change the war3 graphic options, but it's still the same, i can see the knight be surrounded with footmen and that's all.
12-13-2008, 11:40 PM#9
Deaod
wait, what resolution do you use?
12-14-2008, 10:25 AM#10
Troll-Brain
Quote:
Originally Posted by Deaod
wait, what resolution do you use?
I used 800*600*32 and i also tried 1024*768*32

Could it be like that because i don't use an english warcraft ?
12-14-2008, 12:06 PM#11
Deaod
1024*768 is the resolution i use...maybe change the size of the text to 6, i remember that a size of 4 hid them completely (for me).
12-14-2008, 12:13 PM#12
Flame_Phoenix
I don't want to be the bad guy here but, why do we need these if wc3 engine already provides us with health bars as well ? Besides, this is horrible for the 100 TextTag limit wc3 has (or so I heard).
12-14-2008, 12:33 PM#13
DioD
wc3 have 99 tags not 100
12-14-2008, 01:19 PM#14
Troll-Brain
Quote:
Originally Posted by Deaod
1024*768 is the resolution i use...maybe change the size of the text to 6, i remember that a size of 4 hid them completely (for me).

Yes it depends the resolution, for the highest resolution, if i use a size under 8.8 (didn't try more accurate value), i don't see anything.
12-14-2008, 04:21 PM#15
Flame_Phoenix
Quote:
wc3 have 99 tags not 100
That is irrelevant, it just proofs my point =P

Btw, Diod or Deod !? Blasphemy ! THIS IS WC3C !!!!

=p