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

Boss Status Bar System

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,601
Hello there.

Many of you remember me from The Chosen Ones campaign and because of that project I'm here to request a system from you.

I'm in a need of system "Boss Status Bar". Hit points of the bosses in this campaign are huge, at the first chapter only they start from 10,000 hit points and in the last chapters bosses will have millions of hit points. This creates a problem, because Warcraft III won't show hit points after they are higher than 20,000 or something.

So I'm here requesting a system that is based on leaderboard that shows boss' hit points, mana, name and an icon of it. The hit points and mana should be in a format of number, but also as a "bar". When it's a bar it's easier for player to see how much fight is left.

Every chapter will have a boss, elite boss and an epic boss fight. So I'll be only using this system three times per chapter. I have to remind you that campaigns cannot handle vJASS and I'm not familiar with JASS. However if you insist you can do this system with JASS but make sure you give good explanations how your system will work. A great surplus is that it can be easily copied to the campaign and perhaps someone else will need this system also.

Here's for example a boss fight from the campaign, chapter 1.



If you can do this, I'll give you credits as a helper and system maker. Also reputation points will be given. Thanks for your help, I really can't do everything coz' the project is so huge and I'm not the best coderer to make such a system...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Here it is. It's very simple to use.

You only need to set the boss unit to the variable in Init Boss Fight and Run Create Boss LB and turn on Boss Dies.

You can configure some of the things like the colour of the HP and mana bars. You can configure the character with which the bar will be filled, and from how many characters the bar consists of. Don't make it too long or else it won't fit the leaderboard.


  • Init Boss LB Settings
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- With what character the bars are created --------
      • Set Boss_String_Char = I
      • -------- How many character in a bar, how long it will be --------
      • Set Boss_String_Length = 50
      • Set Boss_LB_Title = BOSS STATS
      • Set Boss_HP_Colour = |c0080FF00
      • Set Boss_Mana_Colour = |c001100A6
      • Set Boss_Background_Colour = |c00000000
  • Init Boss Fight
    • Events
      • Unit - A unit comes within 1000.00 of Mountain King 0000 <gen>
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • -------- ----------------------------------------- --------
      • -------- Set the boss unit to variable --------
      • -------- ----------------------------------------- --------
      • Set Boss = Mountain King 0000 <gen>
      • -------- ----------------------------------------- --------
      • Trigger - Run Create Boss LB <gen> (ignoring conditions)
      • Trigger - Turn on Boss Dies <gen>
  • Create Boss LB
    • Events
    • Conditions
    • Actions
      • -------- ----------------------------------------- --------
      • -------- Sets the boss name to variable --------
      • -------- ----------------------------------------- --------
      • Set Boss_Name = (Proper name of Boss)
      • -------- ----------------------------------------- --------
      • -------- Sets the max life of the boss --------
      • -------- ----------------------------------------- --------
      • Set Boss_Max_Life = (Integer((Max life of Boss)))
      • -------- ----------------------------------------- --------
      • -------- Sets the max mana of the boss --------
      • -------- ----------------------------------------- --------
      • Set Boss_Max_Mana = (Integer((Max mana of Boss)))
      • -------- ----------------------------------------- --------
      • Set String1 = <Empty String>
      • -------- ----------------------------------------- --------
      • For each (Integer loopA) from 1 to Boss_String_Length, do (Actions)
        • Loop - Actions
          • Set String1 = (String1 + Boss_String_Char)
      • -------- ----------------------------------------- --------
      • Set String2 = (Boss_Mana_Colour + (String1 + |r))
      • Set String1 = (Boss_HP_Colour + (String1 + |r))
      • -------- ----------------------------------------- --------
      • -------- ----------------------------------------- --------
      • Leaderboard - Create a leaderboard for Player Group - Player 1 (Red) titled Boss_LB_Title
      • Set Boss_Leaderboard = (Last created leaderboard)
      • -------- ----------------------------------------- --------
      • Leaderboard - Add Player 1 (Red) to Boss_Leaderboard with label Boss_Name and value 0
      • Leaderboard - Add Player 2 (Blue) to Boss_Leaderboard with label String1 and value Boss_Max_Life
      • Leaderboard - Add Player 3 (Teal) to Boss_Leaderboard with label String2 and value Boss_Max_Mana
      • -------- ----------------------------------------- --------
      • Leaderboard - Change the display style for Player 1 (Red) in Boss_Leaderboard to Show the label, Hide the value, and Hide the icon
      • Leaderboard - Change the color of the value for Player 2 (Blue) in Boss_Leaderboard to (0.00%, 100.00%, 0.00%) with 0.00% transparency
      • Leaderboard - Change the color of the value for Player 3 (Teal) in Boss_Leaderboard to (0.00%, 0.00%, 100.00%) with 0.00% transparency
      • -------- ----------------------------------------- --------
      • Leaderboard - Show Boss_Leaderboard
      • -------- ----------------------------------------- --------
      • Trigger - Turn on Update Boss LB <gen>
  • Update Boss LB
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • -------- ----------------------------------------- --------
      • Set String1 = Boss_HP_Colour
      • Set i1 = (Integer((((Percentage life of Boss) x (Real(Boss_String_Length))) / 100.00)))
      • For each (Integer loopA) from 1 to i1, do (Actions)
        • Loop - Actions
          • Set String1 = (String1 + Boss_String_Char)
      • Set String1 = (String1 + (|r + Boss_Background_Colour))
      • For each (Integer loopB) from (i1 + 1) to Boss_String_Length, do (Actions)
        • Loop - Actions
          • Set String1 = (String1 + Boss_String_Char)
      • Set String1 = (String1 + |r)
      • -------- ----------------------------------------- --------
      • Set String2 = Boss_Mana_Colour
      • Set i1 = (Integer((((Percentage mana of Boss) x (Real(Boss_String_Length))) / 100.00)))
      • For each (Integer loopA) from 1 to i1, do (Actions)
        • Loop - Actions
          • Set String2 = (String2 + Boss_String_Char)
      • Set String2 = (String2 + (|r + Boss_Background_Colour))
      • For each (Integer loopB) from (i1 + 1) to Boss_String_Length, do (Actions)
        • Loop - Actions
          • Set String2 = (String2 + Boss_String_Char)
      • Set String2 = (String2 + |r)
      • -------- ----------------------------------------- --------
      • Leaderboard - Change the value for Player 2 (Blue) in Boss_Leaderboard to (Integer((Life of Boss)))
      • Leaderboard - Change the label for Player 2 (Blue) in Boss_Leaderboard to String1
      • Leaderboard - Change the value for Player 3 (Teal) in Boss_Leaderboard to (Integer((Mana of Boss)))
      • Leaderboard - Change the label for Player 3 (Teal) in Boss_Leaderboard to String2
  • Boss Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to Boss
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Update Boss LB <gen>
      • Leaderboard - Destroy Boss_Leaderboard


There might be some minor adjustments to how it creates the bars, but this is pretty much final version.
 

Attachments

  • Boss_Leaderboard.w3x
    21.4 KB · Views: 85
Level 37
Joined
Aug 14, 2006
Messages
7,601
Okay, I think I got a little bug. I don't know if it's really shown with slower battles with high amount of hit points but I can see it clearly when testing this map.

attachment.php


attachment.php


As you can seen from the picture above MK's hp are about 50%, but in the leaderboard it's like 75%. I don't think it's a "lag" or anything because it updates somewhat slowly. Also same happens in that Paladin picture. The numbers are updating correctly and fast enough but that bar is going a little bit slower.


I have attached the newest version of the map to this post. I made some little changes.

Otherwise the system is perfect and ready to be imported!
 

Attachments

  • Boss_Leaderboard 1.1.w3x
    22.4 KB · Views: 81
  • buggs1.jpg
    buggs1.jpg
    596.4 KB · Views: 310
  • buggs2.jpg
    buggs2.jpg
    435.1 KB · Views: 308
Level 37
Joined
Aug 14, 2006
Messages
7,601
I know I have nothing to do with these systems but it would be cooler if the hit point bar color would change from green to red when the boss loses hit points.

: |

Oh yea, that's an excellent idea! Maybe Maker could make this? Usually games have like this:

75%-100% Green
25%-50% Yellow
0%-25% Red

...But this is a system about boss. Does boss need such a colors?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
The "bug" isn't really a bug at all :)

Maker said:
You can configure the character with which the bar will be filled, and from how many characters the bar consists of. Don't make it too long or else it won't fit the leaderboard.

Look at my screenshot:

WC3_BossBar_Res.jpg

Quite creative boss names you have there ;)

The leaderboard is wider, due to the fact that I use 1920x1080 resolution. By default, the bar consists of 50 characters. Leaderboards have fixed width of total screen width I believe. Therefore if the resolution has less horizontal pixels, the whole bar won't fit the leaderboard. Part of it is cut out, which makes it look it's bugging.

The solution is:
  • Set BossBar_String_Length = 30
30 fits 1280x1024 at least.

75%-100% Green
25%-50% Yellow
0%-25% Red

And at 50%-75% it's ZOMG INVISABEL! (Green - yellow - orange - red)
 

Attachments

  • Boss_Leaderboard 1.1.w3x
    23.3 KB · Views: 71
Status
Not open for further replies.
Top