Jump to content

Customizing the HP Bar


Recommended Posts

Ok, so at this point we're all familiar with the HP bar and how to enable it. 

 

What I would like to do is make it a bit smaller, and only have the name of the entity with no number stats.

 

I can see what it is I want to change, but I'm having some trouble working out exactly how to line that up in Xpath.

 

My first attempt was the following, but the last four lines don't get applied.

    <set xpath="/windows/window[@name='windowTargetBar']/@visibility">always</set>
	<set xpath="/windows/rect[@visible='{isnotboss}']/@height">28</set>
	<set xpath="/windows/label[@name='TextContent']/@font_size">24</set>
	<set xpath="/windows/label[@name='TextContent']/@justify">center</set>
	<set xpath="/windows/label[@name='TextContent']/@text">{name}</set>

 

I figure it's because I'm misunderstanding the way to apply the values. 

 

I'm trying to get the window to be a bit shorter, and center the name of the zed, so basically I want to take this...

	<window name="windowTargetBar" controller="TargetBar" visibility="godmode"> <!-- never,godmode,always -->
		<rect pos="-200,-85" width="400" height="36" visible="{isnotboss}" >
			<sprite depth="1" name="border" color="0,0,0,100" type="sliced" width="400" globalopacity="false"/>
			<filledsprite depth="2" name="BarContent" type="filled" color="200,0,0,180" width="400" fill="{fill}" globalopacity="false"/>
			<label depth="3" name="TextContent" pos="9,-4" font_size="28" color="[white]" justify="left" pivot="topleft" text="{name}:{currentwithmax}" height="30"/>
		</rect>

 

And probably have it come out similar to this....

	<window name="windowTargetBar" controller="TargetBar" visibility="godmode"> <!-- never,godmode,always -->
		<rect pos="-200,-85" width="400" height="28" visible="{isnotboss}" >
			<sprite depth="1" name="border" color="0,0,0,100" type="sliced" width="400" globalopacity="false"/>
			<filledsprite depth="2" name="BarContent" type="filled" color="200,0,0,180" width="400" fill="{fill}" globalopacity="false"/>
			<label depth="3" name="TextContent" pos="9,-4" font_size="28" color="[white]" justify="center" pivot="topleft" text="{name}" height="24"/>
		</rect>

 

Again, I'm almost certain it's something stupid simple I'm overlooking, like somehow I need to target the rect inside the window name windowTargetBar. 

 

 

Link to comment
Share on other sites

This is what I made for A20, displays names in green text but can be removed or changed

<?xml version="1.0"?>

<configs>

<set xpath="/windows/window[@name='windowTargetBar']/@visibility">always</set>

<set xpath="/windows/window[@name='windowTargetBar']/rect[1]/@height">0</set>

<set xpath="/windows/window[@name='windowTargetBar']/rect[1]/sprite[@depth='1']/@width">0</set>

<set xpath="/windows/window[@name='windowTargetBar']/rect[1]/filledsprite[@depth='2']/@width">0</set>

<set xpath="/windows/window[@name='windowTargetBar']/rect[1]/label[@depth='3']/@font_size">36</set>

<set xpath="/windows/window[@name='windowTargetBar']/rect[1]/label[@depth='3']/@color">[green]</set>

<set xpath="/windows/window[@name='windowTargetBar']/rect[1]/label[@depth='3']/@justify">center</set>

<set xpath="/windows/window[@name='windowTargetBar']/rect[1]/label[@depth='3']/@text">{name}</set>

</configs>

Edited by FranticDan (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...