EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 09-01-2005, 01:03 PM
chylder chylder is offline
A Young Mystail Rat
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 7
Default progress bar question

having issues creating a progress bar of a data type that isn't rounded off to even numbers, or at least, that's the only difference i can figure.. most percentile variables in the game are round, ie: 0-100 percent.. however, there's at least 2 that carry a tenths place.. ie: 0.0-100.0 percent.. and that seems to make a difference in that i can't seem to get the bar to update, anyone have any clues on how to get /GameData.Stats.Defense_MitigationPercent to update correctly in a bar?

Edit: anyone know if there's a data filter that would round off the decimal? basically making the result into an integer?

Last edited by chylder : 09-01-2005 at 02:11 PM.
Reply With Quote
  #2  
Unread 09-01-2005, 02:59 PM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

The displayed text % (45.6%) and the Progress value used by the bars (0.456) are actually seperate data filters. Text is 0x0002, Progress is 0x0040.

My guess is that Progress isn't sent for Defense_MitigationPercent, which is why you can't get a progress bar working for it. If that is the case, there's nothing we can do. We can't use a script to convert from Text to Progress if the text already has a % sign, and even if we could, you'd have use an OnEvent like hovering over the bar to get it to update.
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #3  
Unread 09-01-2005, 03:17 PM
chylder chylder is offline
A Young Mystail Rat
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 7
Default

the text doesn't carry a %, but how would you go about scripting a change like that, even with an OnEvent?
Reply With Quote
  #4  
Unread 09-01-2005, 03:30 PM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

If it even would work, you would have do somthing like this.

<Text Name='ValueHolder'... DynamicDatat='what erver dada u want'>.456</Text>
<What_ever OnHoverIn='(line 1 convert math) Progress_bar.Position=ValueHolder.LocalText' />

Somthing along those lines is what your looking for but as Deathbane said it's porb not going to fly.
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
  #5  
Unread 09-01-2005, 03:45 PM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

Text doesn't carry a %? Excellent.

Here's the script you'll want for the bar:

OnHoverIn="Progress=((Parent.DefenseMitigationTextObject.Localtext)/100)"
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #6  
Unread 09-01-2005, 03:54 PM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

Hmm in that case, I would add the dynamic data to a slidbar and use the onchange event to update the progressbar, no hover event needed then. That is if the slidebar will take that sort of data.
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
  #7  
Unread 09-01-2005, 04:16 PM
chylder chylder is offline
A Young Mystail Rat
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 7
Default

ok, making some progress.. i got the bar to update with onhover, it just doesn't seem to be reading anything from Parent.DefenseMitigationTextObject.Localtext
in other words, it's emptying on hover.. i like the idea of an onchange, (as in this case, it's not like mitigation is going to be changing all that often anyway) but i'm still a little fuzzy on exactly how one goes about this. any chance of getting that from you guys a lil slower? i don't normally do a whole lot of UI modding, and it's been almost 15 years since i've been employed for my programming skills

and in any case, thanks abunch for the speedy responses so far
Reply With Quote
  #8  
Unread 09-01-2005, 04:23 PM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

Quote:
Originally Posted by Landiin
Hmm in that case, I would add the dynamic data to a slidbar and use the onchange event to update the progressbar, no hover event needed then. That is if the slidebar will take that sort of data.
Nope, there's no DynamicData for the Value and FloatValue data that sliders use, and OnChange doesn't trigger when DynamicData updates. Requires player input. :/ Tried that already.

The final thing should look something like...

<Text Name="DefenseMitigationTextObject" DynamicData="/GameData.Stats.Defense_MitigationPercent" ...>
<Progressbar OnHoverIn="Progress=((Parent.DefenseMitigationTextObject.Localtext)/100)" ...>

The "..." parts will need to have location, style info, etc.
__________________
If it ain't broke, it needs more features!

Last edited by Deathbane27 : 09-01-2005 at 04:26 PM.
Reply With Quote
  #9  
Unread 09-01-2005, 04:48 PM
chylder chylder is offline
A Young Mystail Rat
 
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 7
Default

is there anything special that needs to be involved with the text object? I mean.. is the style, location, whatnot.. actually important for it, or is it just the placeholder that i think it is?

currently still empty, double checking to make sure i didn't break something silly while i was trying to figure it out earlier..

Edit:
/sigh.. nm that.. i was mistaken. since i hadn't expected the extra area of the decimal and tenths place, the size i'd allocated for the Defense_MitigationPercent wasn't quite big enough.. and there is a % included with it, which is why it's not returning anything when it's /100.. since that text object was inside another page, i didn't notice the sizing was cut so close, and i'd already placed a '%' text object next to it.. so when i'd log in.. i'd see the buffed mitigation number in green, with the % (which was actually below the other text object) staying white.. so i figured it wasn't included.. i never even thought about the fact that i hadn't taken into account for the extra size..

So, unless there's a handy way to truncate off the last character of a string and turn the remainder into a number.. i guess that sinks that idea
but, it's definitely been a learning experience, thanks again for the help

Last edited by chylder : 09-01-2005 at 05:06 PM.
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
Forum Jump


All times are GMT -5. The time now is 08:55 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI