• Guest, HEROCRAFT PUBLIC RELEASE IS HAPPENING AN HOUR EARLIER! TONIGHT @ 7PM CST GET READY FOR IT! play.hc.to
    Read up on the guides and new systems! Here.
    View the LIVE Map here @ hc.to/map
    Stuck or have a problem? use "/pe create" to to open a ticket with staff (There are some known issues and other hotfixes we will be pushing asap)
  • Guest, Make sure to use our LAUNCHER! Read more here!

Macro Mod: Dynamic stamina bar guide by, cheekyspartan. Step-by-step w/ Images!

Was this guide easy to follow?


  • Total voters
    5
Joined
Feb 24, 2011
Hello Herocrafters! I'm cheekyspartan, and if you play a class that uses stamina then you're in the right place. This Macro Mod guide will detail the step-by-step process on creating a dynamic stamina bar. You will not need previous training in computer programming to complete this guide. Check out the photo below for the finished product!
1f3c2d5ea3c08fbca295313035d87436.png




Prerequisites:

1: 20 to 30 minutes of free-time.
2:
Herocraft Modpack - hc.to/launcher.
3: In the in game chat, make sure your stamina displays upon spell use- To toggle stamina display in chat, type "/hero verbose stamina"
4: Go to the Herocraft Modpack
Options Menu>Controls Menu, scroll all the way to the bottom and in the 'Macro/ Keybind Mod' section take note of the keybinding for 'Settings key combo'. This will be useful for quickly switching from gameplay to the Macro Mod menu.

5:Lastly, set your chat to a NON-Global chat like /ch local or /ch shout. If you mess up it is possible to spam chat ALOT! To avoid this I recommend that you read the guide once quickly, and then go through steps in game.


Index:

Commands, buttons, textfields, menus, pop-ups, etc. will be shown in single quotes and colored Blue.
Data, Values, Input, etc. will be shown in green text.


Stamina Bar Guide:
To start off, open up the Macro Mod menu and in the bottom right corner click the 'GUI Editor' button- Looks like crisscrossed tools. Next, create a new screen with the button in the top left corner, as shown below.
c0c42fd4776d4b89ffa67c06fb3442fb.png



You will be asked to name the new screen, so next to 'Name' put in the name of your current class- Use the same name for the 'Display Name'. This will ensure for easy swapping when changing classes in the future.
2bf1e96bdcfd465d4f7ae403947ce87e.png



Now click 'OK', and the screen you've created will show up in the left hand bar under 'Available Screens'. Click and drag it in to the 'ingame' screen slot. In doing so, your screen will display during gameplay.
51bc098d5a49c3555da2de8d30349b28.png

Under 'Available Screens' double click the same screen that you dragged in to the 'ingame' screen slot. This will open up the editing window and allow you to edit what will display while playing.


In the bottom left corner, click '
Button Panel Commands'- Looks like a + symbol. In this menu, choose 'Adjust grid'.

b98523a8d1690240c620290591dfe198.png



Bring up the Number of Rows to 14 and Columns to 7 with the green '>' buttons. Do NOT click 'OK' yet. There is still more to do with grid settings.
4701cca140ae0abcbe3450b14c208ff7.png

*(If you have a lower resolution monitor you can skip this step, and just press 'OK' to confirm your grid settings)*

Click anywhere inside the middle column and the 'Column width' text area will become useable. It will change from gray to gold in color.
Change this value in this field to 200 . Now use the 'OK' button to confirm your Grid Settings.
a4caa4d3d40c6a568b4a7328a0407966.png



Add a label to your screen with the 'Button Panel Commands' button. Select 'Add Label'.
10037e4b62b4aab200add0392ee9330d.png



Place it in the middle column, near the bottom of your screen (sorry for the bad cropping, I placed mine in the fourth cell from the bottom).
75078323d0dc4cb8d9383ae3411a2449.png



When you place the Label, its 'Properties' window will pop up with a few different text fields and color choices. The values are as follows: 'Control Name' stamina, 'Label text' STAMINA: 1000, 'Binding' , 'Text Align' Middle Centre, 'Shadow' unchecked. Do NOT click 'OK' yet. Once you finish the color settings you can click 'OK' to confirm your Label properties. (See Next 2 steps for color settings).
85daf51ec3050c81529ad6ef80d627d8.png



'Foreground Color' Red 'Opacity' 255 *(The color can be changed to your liking. I chose red, but use whatever )*
a235fd0e9685dd187ea109036d630d18.png



'Background color' any, 'Opacity' 0
f17f7be35394877ce17fdc676686cb7b.png



Next, add a progress bar to your screen with the 'Button Panel Commands' button. Select 'Add Progress Bar'.
6f2cd8516bf54852cbf94b8df0849135.png



Place it in the middle column, just under your Label.
3c03355800eaf04226a3d83494694fad.png



Now the 'Properties' window will pop up for the Progress Bar. This has similar choices to the Label properties. The values are as follows: 'Control Name' @#stamina, 'Expr' @#stamina, 'Min value' 0, 'Max value' 1000, 'Expr' checked, 'Expr' checked, 'Bar Style' Horizontal. Do NOT click 'OK' yet. Once you finish the color settings you can click 'OK' to confirm your Progress Bar properties. (Refer to the same 2 steps for color settings as the color settings for the Label).
f90285911e283dce935d1209c6864380.png



Now press escape twice to return to the 'Macro Bindings' page. In the bottom left corner of the page, click the 'Text Editor' button- Looks like 3 periods followed by a typing cursor. In the text field at the top, type in StaminaBar and press 'create'.
8cbe2893a2b2dac5238cd22031c7405f.png



In this text file window, you can copy and paste the code below right into the file. Once you've copied it, check that it looks the same as the picture under this code.
Code:
IFMATCHES(%CHATCLEAN%, "Stamina: (.+?)/1000", &stam, 1);
     SET(@#stamina, %&stam%);
     SETLABEL(stamina, "STAMINA: %&stam% ");
     FILTER();
ENDIF;



Compare your text file to the image below. Once you've confirmed that they're identical, press save.
cb47664f719404884c1d87c653ae273a.png



You will now be back at the 'Macro Bindings' page. From here, use the '>' arrow button in the top left of the screen to open up the 'Bindings: Events' page. Click 'onChat'.
690cd50d8072ba1ae005d04c36fc7cf1.png


In the bottom text field of this macro page, copy and paste this code below.
Code:
$${$$<StaminaBar.txt>}$$

Make sure it matches this image, and then press 'Save' to confirm.
b5aed0407eeaf1c66af28b4575e87011.png



At this point you can escape out of the macro menus and should have a fully working stamina bar with a text label to display the exact value. They should both change simultaneously, and dynamically upon stamina use.


Thank you for reading! This guide has been brought to you by, cheekyspartan. This is my first Herocraft guide, so please post any and all suggestions and comments- positive and negative.
 
Last edited:
Top