EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 06-27-2006, 06:49 PM
Retsek Retsek is offline
A Young Mystail Rat
 
Join Date: Jul 2005
Server: Antonia Bayle
Posts: 5
Default Capturing a DynamicData Change?

One of the things troubling me most about our friendly UI interface is the Dynamic data issue. For example

the /Gamedata.self.experiencecurrent is updated whenever your XP changes however NONE of the onshow, onactivate, onenable etc... flags recognize that it changes.

Anyone have any ideas on how to know when a dynamic changes? I thought perhaps using the Actiontype="Experience" on a button or page would allow me to track it but no luck so far.

The usage I'm after is to get the XP value convert it properly to a number combine with the bubbleXP and make the correct number display. Otherwise if you just crop and past numbers you are always wrong when the number changes over a decade mark.
Reply With Quote
  #2  
Unread 06-28-2006, 04:59 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Sliderbars, for example, have OnChange events.

But I'm curious how you manage to crop numbers?
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #3  
Unread 06-28-2006, 09:11 AM
Retsek Retsek is offline
A Young Mystail Rat
 
Join Date: Jul 2005
Server: Antonia Bayle
Posts: 5
Default Cropping a number?

Cropping numbers ... like a picture doesn't change it at all you just adjust the "frame" in this case a page around it. A typical 3 digit number in Arial 14 would be 20,15 in size you right or left justify it depending on the end you want to cut off. Place it in a page of smaller size

<page name"example" size="15,15">
<text name="sample"
textalignment="right"
textverticalalignment="top">123</text>
</page>

This would in most cases cut off the trailing digit. Purely cosmetic but with overlapping you can create the illusion of the XP decilmal point XXX.X
Reply With Quote
  #4  
Unread 06-28-2006, 10:31 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Ok, that's the technique we are all using, that's just a visual crop (I had hoped you had found a way to crop the number itself). In that case you don't need events to copy the XP data to your text field, just make it use the dynamic data directly.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #5  
Unread 06-28-2006, 10:36 PM
Retsek Retsek is offline
A Young Mystail Rat
 
Join Date: Jul 2005
Server: Antonia Bayle
Posts: 5
Default Nope, still want to find an event or way to know of change =)

Different example. Your target changes simple your UI will show it NP since you are using dynamicdata. However let us assume that if you could KNOW when it changed IE through an onXXX event or filter of some kind then you could implement say a target lock.

target <> oldtarget then dammit better change it back hehe. Not code but it is the idea.

Or in the XP bar version if you KNEW when it changed you could run the text value through a comparison and actually substitue the correct text. Since the last digit of currentexperience should actually be the tens digit of the experiencebubble you either want to change the 103% XP 25% bubble into 10 and then change the bubble text to 2.5% etc... or change the 103% to '102.' and simply crop the tens place off the bubble xp.

Lots of handy uses in different places where dynamic data occurs if only there is a way to detect the change. For progress bars the text value won't convert to a number for math, nor can you assign it to a textbox - slider etc... and use their onchange events.

Any ideas?

Sorry I was unclear before. There is a bastardized form of regular expressions that works occasionally on normal data but won't touch dynamics for some reason so I'm stumped unless I can detect the change and trigger a button.
Reply With Quote
  #6  
Unread 06-28-2006, 11:17 PM
Magus Magus is offline
A Griffon
 
Join Date: Apr 2005
Server: Mistmoore
Posts: 541
Default

I don't think it's possible to run anything onchange of a dynamicdata.
Reply With Quote
  #7  
Unread 06-29-2006, 04:40 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Magus, other events work for objects updated by DynamicData (I know that I'm using at least OnSet, OnUnset on checkboxes). I'm not sure for OnChange, I don't think I ever tried.

Retsek, I think that your target lock would be easier to implement by making a "lock" checkbox that sets or removes the dynamic data field.

I now understand what you want to do with the XP, that's something I had been considering as well to work around the current XP rounding mess, but so far I'm hoping that SOE will fix it.

You are right that you can't apply the DD to a sliderbar, I forgot that it contains the "%". However, I would have thought that applying it to a progress bar you could read the progress value which should be a number only. Unfortunately you say that it doesn't work. Even if it was a number, you couldn't apply it to sliderbars because I think those accept only integer values, whereas progress bars use decimals (you could work around that particular problem with the solution below).

So if you can't do math at all you can still create a pre-populated datasource that contains all possible XP values and what you want to convert them to. Apply the datasource to a dropdown and then compare every item of the dropdown to your value until you find the correct one. Sounds like very ugly code, but all I can think of right now if you have to work with text only...
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #8  
Unread 06-29-2006, 07:58 PM
Magus Magus is offline
A Griffon
 
Join Date: Apr 2005
Server: Mistmoore
Posts: 541
Default

Quote:
Originally Posted by gm9
Magus, other events work for objects updated by DynamicData (I know that I'm using at least OnSet, OnUnset on checkboxes). I'm not sure for OnChange, I don't think I ever tried.
The reason I say I don't think it's possible is that people have wanted to do things like showing how much XP you got for the last kill, and the only way to do it has been to make a button that you'd have to click both before and after the kill, and it could show how much something changed.

If you could trigger something on a change event, they wouldn't have to require the button click before/after - the simple act of the XP bar changing would trigger it and make such a mod possible.
Reply With Quote
  #9  
Unread 06-29-2006, 08:32 PM
Retsek Retsek is offline
A Young Mystail Rat
 
Join Date: Jul 2005
Server: Antonia Bayle
Posts: 5
Default Manual capture all I can do apparently ....

Yeah aside from the checkbox type items there is no way to get the change other than a manual button push that I can find. I'm willing to admit defeat at this point since you can't trigger progress bar values.

I may have another way to work the target lock and if it works I"ll share it ... an idea hit me this morning haven't had a chance to code it yet.
Reply With Quote
  #10  
Unread 06-29-2006, 08:59 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

I agree, I had a quick look at the events for each object in UIbuilder and there really appears to be no way to get an event on a string change...
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #11  
Unread 06-29-2006, 09:58 PM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

You can track target changes with a 0,0 page.

Give the page dynamicdata "/GameData.Target.Window" it will now show whenever the target window is susposed to be shown.. If you hide it everytime it is shown then it will open every time the target window is opened (i.e. every time the target is changed)..

I dunno about the lock

Might be able to do something like this in the page.
OnActivate="activated=false target_previous"
OnShow="visible=false OnActivated=Parent.LockCheckbox.Checked"

Hope that helps a little

edit:
Capturing experience gain is harder but can be done with a few side-effects:
http://www.eq2interface.com/forums/s...ead.php?t=3929

But maybe the code I used there can be added to a experience window in another sub-page of the HUD and keep it functionality (e.g. inventory.experience). I never tried that.
__________________
Talyns

Last edited by Talyns : 06-29-2006 at 10:05 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 12:51 AM.


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