Home Forum Downloads My Favorites Register FAQ

Go Back   EQInterface Forums > Developer Discussion > XML modification help.
User Name
Password

Reply
 
Thread Tools Display Modes
Old 08-26-2004, 03:19 AM   #46
Thong3320
A Snow Cougar
 
Join Date: Aug 2002
Posts: 45
Interface Author - Click to view interfaces
Default color change not working

Quote:
Originally Posted by Kailayla
The gauge shows normally for above 90%, which is my first changing spot. Lower than 90% however, shows an empty guage and a white block at 90%.


I'm adding player hp bar to my target bar and I'm having the same trouble.
It's coded correctly as a one-color bar (just like my target bar). When I make it a color-changing bar, if I disable the two overlays on the left (green and yellow), I'm left with a tri-color bar that works fine, it just shows all 3 colors at once.

When I set it up to work like it shold, like Kailayla, when it gets to 50% (my first change) the entire bar goes black...just showing the background.

I also had my background showing up in the bar two or three times in the left half of the bar (where the overalys are). I got it to look right by setting the x100 background to sample an area that was blacked out on the alpha channel

I was getting two or 3 versions of player name on the bar, but I set the text offset to X=-500 to get them off the screen.

help?
Thong3320 is offline   Reply With Quote
Old 08-27-2004, 04:52 AM   #47
Thong3320
A Snow Cougar
 
Join Date: Aug 2002
Posts: 45
Interface Author - Click to view interfaces
Default got it finally

Well, I got it to work....not exactly sure how, but I did!

The blackout problem was because the background I was using for the x100 overlay actually had graphics to it, so that's what I was seeing. made that a transparent background (changed coordinates in my .tga and blacked out that part in the mask) and I started seeing things. All I had to do was finetune the offset and I was running. Still have a problem with the overlay bar only coming in halfway then filling up as my hitpoints rise. Think it's because I'm using a gauge that's 250 wide.
Thong3320 is offline   Reply With Quote
Old 08-27-2004, 05:46 PM   #48
Vrath
A Gray Wolf
 
Join Date: Feb 2003
Server: Prexus
Posts: 4
Default

I had a color changing guage Enok made for me way back. After he sent it to me I spent literally months trying to figure it out. I read the post several times and looked over the code he sent and alot of it seemed to make sence and I thought ok I'll try this one more time.

Heres what I tried to make (same set up as Enok's guage he sent me but I wanted to change the size to fit another UI I now use)
<!-- 0 to 10 Flashing Red -->
<!-- 10 to 25 Red -->
<!-- 25 to 50 Orange -->
<!-- 50 to 75 Yellow -->
<!-- 75 to 100 Green -->

After 5 hours I ended up with what looks like 1 guage that is: 0 - 25% blank, 25% - 50% orange, 50% - 75% yellow and 75% to 100% green (Hehe at least they are at the 25% markers where I wanted them)

My guage is x = 128 y = 16

I feel like I am so close to understanding this, and any help you guys could give me would rock.


Vrath
Vrath is offline   Reply With Quote
Old 09-18-2004, 06:10 PM   #49
Kailayla
A Ghoul
 
Join Date: Oct 2002
Server: Saryrn
Posts: 18
Default somewhat working

I've managed to get this to work for the most part. I have 2 places where the bars change. One at 50%, and the other at 80%. So that the bar is green when full, orange when >50, but <80, and red at <50.

Now my problem occurs in the space where the guage is orange for the player. That space between 50 and 80%, even when full, shows orange. So i have a green bar with that orange section showing through over the green bar, but only at that section. Since nothing shows through the rest of the green bar, i assume its a problem with the last half of the orange, or maybe the last half of the orange and the first piece of the green combined.

Any ideas? BTW, here are my files atm if anyone can look at it and shed some light on this for me. Once i get this to work correctly i can make my own how-to guide since this seems to becoming much more popular lately.

Note with the files, my group window is where the texture and ui2danimations are, but the player hp bar in my player_window is where i am currently getting this to work.
Attached Files
File Type: zip EQUI_PlayerWindow.zip (4.1 KB, 7 views)
__________________
Kailayla of the Nexus
High Priestess of Rodcet Nife
Saryrn
Kailayla is offline   Reply With Quote
Old 09-23-2004, 03:39 AM   #50
Thong3320
A Snow Cougar
 
Join Date: Aug 2002
Posts: 45
Interface Author - Click to view interfaces
Default here's what I have so far

Kail,
I'll look at yours to see what's up. Here's the one I finally got to work pretty flawlessly.
Attached Files
File Type: zip TargetV3.zip (6.4 KB, 27 views)
Thong3320 is offline   Reply With Quote
Old 06-26-2008, 11:11 PM   #51
Halelen
Lord Doljonijiarnimorinar
 
Join Date: Jan 2003
Server: Povar
Posts: 1,047
Interface Author - Click to view interfaces
Default

If anyone has some skill in this I need some help. Very close but just a few tweaks shot of making it work.


Hal
Halelen is offline   Reply With Quote
Old 06-28-2008, 03:59 AM   #52
Haliken
Quintessence of EQUI XML
 
Haliken's Avatar
 
Join Date: Sep 2002
Posts: 773
Interface Author - Click to view interfaces
Default

I'm a little rusty on color-changing stuff, but I might be of some help. I saw your post about it elsewhere, but I think working in this thread would give a unified location for others to look at to get tips on the subject.

The main things are how wide is your gauge and how many colors do you want it to go through? You also say you almost have it working; where is there a problem (rather, what's not quite right)?

Enok
Haliken is offline   Reply With Quote
Old 06-28-2008, 10:44 AM   #53
Halelen
Lord Doljonijiarnimorinar
 
Join Date: Jan 2003
Server: Povar
Posts: 1,047
Interface Author - Click to view interfaces
Default Thanks for looking

ok I followed the advice in this thread(which is very good i might add). It didnt quite work completely so changed to 4 colors with same result. What I want is go from green change to orange at 75 yellow at 50 and red at 25.

I think this zip has 5 colors changing every 20% cause i thought maybe that was the problem. if i remove the 2 green bars it seems to work correctly but when i add them back in when it gets to 80 percent the graphics go goofy and no colors appear just a jumbled mess of gauge parts.Guage is 100 wide and really only want 4 colors changing every 25%.

thanks
Hal
Attached Files
File Type: zip Player.zip (42.4 KB, 4 views)
Halelen is offline   Reply With Quote
Old 06-29-2008, 01:51 AM   #54
Haliken
Quintessence of EQUI XML
 
Haliken's Avatar
 
Join Date: Sep 2002
Posts: 773
Interface Author - Click to view interfaces
Default

Well, one problem is the <GaugeOffsetX> values for all of your ''B'' gauges are wrong; they should be a negative value equal to the <Size><CX> value of their corresponding ''A'' gauge, while you've made them negative values of their own <Location><X> value.

The <Location><X> values all appear to be correct though, and the 10000 pixel wide gauges look correctly built.

Anyhow, I've attached something for you to work with. It's incomplete; you'll have to get things fully functional yourself.

I've commented out Player_HP, renamed A_GaugeFill1 to A_GaugeFill1_PW, added A_GaugeFill0_PW (it was just for consistency purposes when testing; if A_GaugeFill in YOUR Animations file is the same as A_GaugeFill0_PW then you can get rid of A_GaugeFill0_PW).

I also changed the <Location><X> value for both A_GaugeBackground_PW and A_GaugeBackground_PW_x100 which can likely be changed back.

I corrected the <GaugeOffsetX> values and for my testing, the color changing worked correctly every 20%.

Take a look at it and mess with it a little, then let me know if you need more help.

Enok
Attached Files
File Type: xml EQUI_PlayerWindow.xml (51.0 KB, 9 views)
Haliken is offline   Reply With Quote
Old 06-29-2008, 08:32 PM   #55
Halelen
Lord Doljonijiarnimorinar
 
Join Date: Jan 2003
Server: Povar
Posts: 1,047
Interface Author - Click to view interfaces
Default

Well it turns out the problem the whole time was the setting the guage to 10 once i put it back to 0 as you had it all is well thanks much for the help


Hal
Halelen is offline   Reply With Quote
Old 07-19-2008, 12:10 AM   #56
Dorvak
A Treant
 
Join Date: Jan 2003
Server: Prexus
Posts: 20
Interface Author - Click to view interfaces
Default

Help!!!

I'm trying to recreate this effect in a simpler fashion. My goal is to have the bar look the usual red down 'til 33% then turn hot pink. The top half is working fine and the bottom third is pink and empties out normally. But... instead of a red "cover" for that lower third that vanishes instantly upon reaching the 33% mark, I just get a weird red blob in the middle of the pink. Also, there's a strange gap in the gauge top frame at the 33% point that goes away once health drops below it.

I tried to follow along with the instructions posted here, but maybe I misextrapolated when converting from two color changes to just the one? I'm using the default images for the gauge pieces which are located at 110, 10 for background and 110, 20 for fill in the graphic and I think I adjusted my offsets properly to account for this. In any case, I would appreciate it if one of you gurus could take a look and point me in the right direction.
Attached Files
File Type: xml EQUI_PlayerWindow.xml (20.1 KB, 2 views)
Dorvak is offline   Reply With Quote
Old 07-19-2008, 07:27 PM   #57
Halelen
Lord Doljonijiarnimorinar
 
Join Date: Jan 2003
Server: Povar
Posts: 1,047
Interface Author - Click to view interfaces
Default

Try this and see i changed all your code out , I was having a hard time following it, but you can always write yours back in using the values


Hal
Attached Files
File Type: xml EQUI_PlayerWindow.xml (21.0 KB, 4 views)
Halelen is offline   Reply With Quote
Old 07-20-2008, 06:35 AM   #58
Dorvak
A Treant
 
Join Date: Jan 2003
Server: Prexus
Posts: 20
Interface Author - Click to view interfaces
Default

Thanks Hale, I'm so close now I can taste it, heh. After studying your work I was able to tweak my numbers and get this almost perfect. The only issue is that I would like the gauge fill to change to red immediately upon hitting 34%. Instead, it stays pink for a few moments and then blinks to red at about 34.5%. Maybe the large amount of HP in the game just makes it too sensitive? I tried twitching the default around to fix it, but if I go bigger negative the red fills up in sections and smaller negative leaves pink showing at the very bottom of the gauge. I also tried just adding a zero to the end of all my values to stretch everything, but then I get other TGA pieces from around the fill block showing in the gauge (like the title bar chunks to the left).

My player window is built from the default which explains the weird Y offsets and such. I didn't want to mess with what works so I just copied the original HP gauge code to make my two others and then modified their values.

Here are my "special" stretched background and fill :

<Ui2DAnimation item = "A_GaugeBackground_Long">
<Cycle>true</Cycle>
<Frames>
<Texture>window_pieces01.tga</Texture>
<Location>
<X>110</X>
<Y>0</Y>
</Location>
<Size>
<CX>10800</CX>
<CY>8</CY>
</Size>
<Hotspot>
<X>0</X>
<Y>0</Y>
</Hotspot>
<Duration>1000</Duration>
</Frames>
</Ui2DAnimation>

<Ui2DAnimation item = "A_GaugeFill_Long">
<Cycle>true</Cycle>
<Frames>
<Texture>window_pieces01.tga</Texture>
<Location>
<X>-3600</X>
<Y>20</Y>
</Location>
<Size>
<CX>10800</CX>
<CY>8</CY>
</Size>
<Hotspot>
<X>0</X>
<Y>0</Y>
</Hotspot>
<Duration>1000</Duration>
</Frames>
</Ui2DAnimation>

My in-game gauge is 108 long so as suggested I multiplied by 100 to get 10800. The fill location is then negatived by a third (-3600) also as suggested because one third is where I want the change to happen. Now to the gauges :

<Gauge item="Player_HP">
<ScreenID>PlayerHP</ScreenID>
<EQType>1</EQType>
<TextColor>
<R>255</R>
<G>255</G>
<B>255</B>
</TextColor>
<RelativePosition>true</RelativePosition>
<Location>
<X>2</X>
<Y>1</Y>
</Location>
<Size>
<CX>108</CX>
<CY>41</CY>
</Size>
<TextOffsetX>3</TextOffsetX>
<TextOffsetY>0</TextOffsetY>
<GaugeOffsetY>31</GaugeOffsetY>
<Style_VScroll>false</Style_VScroll>
<Style_HScroll>false</Style_HScroll>
<Style_Transparent>false</Style_Transparent>
<FillTint>
<R>255</R>
<G>0</G>
<B>255</B>
</FillTint>
<LinesFillTint>
<R>220</R>
<G>220</G>
<B>0</B>
</LinesFillTint>
<DrawLinesFill>false</DrawLinesFill>
<GaugeDrawTemplate>
<Background>A_GaugeBackground</Background>
<Fill>A_GaugeFill</Fill>
<Lines>A_GaugeLines</Lines>
<LinesFill>A_GaugeLinesFill</LinesFill>
<EndCapLeft>A_GaugeEndCapLeft</EndCapLeft>
<EndCapRight>A_GaugeEndCapRight</EndCapRight>
</GaugeDrawTemplate>
</Gauge>

This is the base gauge as it always was except the fill color has been changed to hot pink.

<Gauge item="Player_HP_Red1">
<ScreenID>PlayerHP</ScreenID>
<EQType>1</EQType>
<TextColor>
<R>255</R>
<G>255</G>
<B>255</B>
</TextColor>
<RelativePosition>true</RelativePosition>
<Location>
<X>7</X>
<Y>1</Y>
</Location>
<Size>
<CX>40</CX>
<CY>41</CY>
</Size>
<GaugeOffsetX>-3711</GaugeOffsetX>
<TextOffsetX>-300</TextOffsetX>
<TextOffsetY>0</TextOffsetY>
<GaugeOffsetY>33</GaugeOffsetY>
<Style_VScroll>false</Style_VScroll>
<Style_HScroll>false</Style_HScroll>
<Style_Transparent>false</Style_Transparent>
<FillTint>
<R>255</R>
<G>0</G>
<B>0</B>
</FillTint>
<LinesFillTint>
<R>220</R>
<G>220</G>
<B>0</B>
</LinesFillTint>
<DrawLinesFill>false</DrawLinesFill>
<GaugeDrawTemplate>
<Background>A_GaugeBackground_Long</Background>
<Fill>A_GaugeFill_Long</Fill>
<Lines>A_GaugeLines</Lines>
<LinesFill>A_GaugeLinesFill</LinesFill>
<EndCapLeft>A_GaugeEndCapLeft</EndCapLeft>
<EndCapRight>A_GaugeEndCapRight</EndCapRight>
</GaugeDrawTemplate>
</Gauge>

<Gauge item="Player_HP_Red2">
<ScreenID>PlayerHP</ScreenID>
<EQType>1</EQType>
<TextColor>
<R>255</R>
<G>255</G>
<B>255</B>
</TextColor>
<RelativePosition>true</RelativePosition>
<Location>
<X>39</X>
<Y>1</Y>
</Location>
<Size>
<CX>72</CX>
<CY>41</CY>
</Size>
<GaugeOffsetX>-37</GaugeOffsetX>
<TextOffsetX>-300</TextOffsetX>
<TextOffsetY>0</TextOffsetY>
<GaugeOffsetY>31</GaugeOffsetY>
<Style_VScroll>false</Style_VScroll>
<Style_HScroll>false</Style_HScroll>
<Style_Transparent>false</Style_Transparent>
<FillTint>
<R>255</R>
<G>0</G>
<B>0</B>
</FillTint>
<LinesFillTint>
<R>220</R>
<G>220</G>
<B>0</B>
</LinesFillTint>
<DrawLinesFill>false</DrawLinesFill>
<GaugeDrawTemplate>
<Background>A_GaugeBackground</Background>
<Fill>A_GaugeFill</Fill>
<Lines>A_GaugeLines</Lines>
<LinesFill>A_GaugeLinesFill</LinesFill>
<EndCapLeft>A_GaugeEndCapLeft</EndCapLeft>
<EndCapRight>A_GaugeEndCapRight</EndCapRight>
</GaugeDrawTemplate>
</Gauge>

Here are the two color change parts. The top one (Red1) is the "cover" that's supposed to only exist above 33%. The bottom one (Red2) is the fill above 33% and works perfectly. I have no idea why the offset numbers in the "cover" gauge work, I just set it to one third off and then tweaked bit by bit until something correct showed up. It is very close and I could live with it I suppose, but would like it to work perfectly if possible. That being an immediate change to red when the HP percentage reaches 34%. I have also attached the full window code for reference, just thought it might be easier to read if I pulled out the relevant parts. All advice and suggestions welcome and thanks a bunch.
Attached Files
File Type: xml EQUI_PlayerWindow.xml (20.1 KB, 1 views)
Dorvak is offline   Reply With Quote
Old 07-20-2008, 09:03 AM   #59
Halelen
Lord Doljonijiarnimorinar
 
Join Date: Jan 2003
Server: Povar
Posts: 1,047
Interface Author - Click to view interfaces
Default

the actual guage itself is only 100 they are accounting for the end caps that are 4 each you dont need the end caps on your color changing gauges because they are there on the original guage therefore that is why everything was changed to 100.

Hal
Halelen is offline   Reply With Quote
Old 07-26-2008, 11:13 AM   #60
Dorvak
A Treant
 
Join Date: Jan 2003
Server: Prexus
Posts: 20
Interface Author - Click to view interfaces
Default

Oh duh, I can't believe I didn't see that. Well, using that clarification and your "template" I was able to get it all squared away and working nicely. Thanks a bunch.
Dorvak is offline   Reply With Quote
Reply




Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -5. The time now is 12:40 AM.


vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI