• 🏆 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!

Floating text finds (maybe)

Status
Not open for further replies.
Level 10
Joined
Apr 9, 2004
Messages
502
Hey all,

These might be things that people have found out but I haven't seen any threads on this so I'm posting it here.

This is all about floating texts and 2 annoyances that I've noticed.

1. Each FT creates a shadow of the ft which can be sort of annoying for some effects like custom textbars or other things. The fix however is easy. Essentially we have to disable permanence, cause the text to go 100% faded and then re-enable permanence. What this does is create a floating text without a "shadow".

2. Weird quirk with spacing using the "|" symbol.

I am not sure why this worked the way it did but for some reason when I created this operator "l" (done by using alt+108) it changes the spacing and from that point the "|" will space differently in the string editor, such that it becomes tighly packed, even moreso than multiple "l" symbols. Why is this important? Because this creates truely seemless "bar" effects that can be adjusted to show a much more realstic bar effect using floating texts.

I have a quick testmap that shows what I'm talking about. You can look at the code and simply try repeating the effect of number (2) without the trick i suggested and you will see the difference, as in the "|" will show like this in the editor "||||||" for multiple instances instead of lllllllllllllllllllllllllll.

I've attached a testmap to showcase this, although I've noticed that this tends to bug out when you have an odd amount of the "|" symbol as this is used for manual text colloration. For some reason odd counts of the symbol do not require the "|r" at the end of the coloration whereas even counts do. I added a quick fix to only count in evens and adjust the count accordingly (usually you have more than 100 of these symbols so the accuracy is still quite high, within 0.5% or so)

In any case, let me know what you think.

Also, an aside but adjusting the text refreshes it and you regain the shadow. I currently haven't found a way around this yet.

Could be useful if you want to have temporary effects show above your hero. Note that there is a cap on floating texts so be weary of that. My recommendation would be something like either a custom cooldown indicator or charging or channeling time indicator for spells with delayed effects. Could be useful to make more realistic bars.
 

Attachments

  • Hero Map beta v1.0.w3x
    53.3 KB · Views: 53
Level 24
Joined
Aug 1, 2013
Messages
4,657
| is an escape character in WC3.
So a single | is not going to work.
An escape character followed by an escape character would give that character in the string that you see.
This character is used for colors |c, |r, for newlines |n and maybe for more things but I can only remember these two.
 
Level 10
Joined
Apr 9, 2004
Messages
502
that is true, something I realized later. But if you first try using the "|" symbol in a text or floating text, it has a really large spacing. Once you use lllll side by side and then add the "|" figure, it all of a sudden, and irreversibly gets rid of the large spacing, apparently forever.

BTW the new testmap on the other tread actually use the ' symbol instead, which stacks well at low size to make slightly thinner bars. My only gripe is the shadow makes it look a little weird.

Still, with the |n command you can run quite a few stacks of bars of this to track all sorts of timed events all as 1 floating text, which has it's advantages over the custom unit bars people were using.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
The main problem is that the bars are resolution dependant. In theory if you have an infinite resolution display there will always be space between the floating text characters. Best seen in the skibi tower defense map where at some resolutions the floating text power bars appear smooth where as at others they appear with spaces.
 
Level 10
Joined
Apr 9, 2004
Messages
502
I have a 1080p resolution monitor and it shows really nicely. I dunno, What's better, a single FT that can control multiple bar structures all at once and maybe would look back at 4k resolution or using dummy units for timer bars?
 
Status
Not open for further replies.
Top