EQ2Interface.com
Search Downloads


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

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 12-30-2011, 02:50 PM
Alderway Alderway is offline
A Young Mystail Rat
 
Join Date: Dec 2011
Posts: 4
Default XP-Bar modifications with problems (newbie)

Hi,

I'm new to EQ2 and wanted to get deeper into the interface by changing and perhaps even a bit of understanding. I know, it will not be easy. So I parsed several XP-bar mods and tried to create my own.

But I have still problems which I can't solve, because I don't understand some of the things behind.

1st: What is the precise difference between Packsize absolut and prop?

2nd: How does this thing with layers work? First declared is most top or the
other way around? How does it work with Page within page-object?
One of my current problems is, that the tooltip for the XP-bar doesn't
work but for the AA and Tradeskill bars.
3rd: The values of objects like .Left and .Width seems not to correspond
with the values needed on the screen. With wich values I can deal or do
I have to usae special commands? The reason: I put a calculation in the
OnShow and OnSize part of the XP-Bar. The Result was not what I
expected. It was more or less the same like now without
event-calculation.
4th: When does the OnShow event fire? Also after loading? Does a OnLoad
event exist? The calc above worked only after resizing.

So, that should be enough for the first posting. Wish you a good stumble into the NEW YEAR.
Attached Thumbnails
Click image for larger version

Name:	XP-Bar Standard Size.jpg
Views:	452
Size:	41.6 KB
ID:	7807  Click image for larger version

Name:	XP-Bar Full Size.jpg
Views:	424
Size:	57.2 KB
ID:	7808  
Reply With Quote
  #2  
Unread 12-30-2011, 03:07 PM
TalTal TalTal is offline
A Griffon
Featured
 
Join Date: Nov 2005
Server: Nagafen
Posts: 1,095
Send a message via Yahoo to TalTal
Default

In the uibuilder folder in your eq2 directory there is a file labeled EQ2_UI_Customization that will give you some explanation though it is a little outdated.

OR

look at the different stickies here:

http://www.eq2interface.com/forums/f...splay.php?f=22

Silat
Reply With Quote
  #3  
Unread 12-31-2011, 12:58 AM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

Instead of seeing myself if the old UI docs mention any of this stuff, I'll at least answer some things off the top of my head.

As I recall, the first XML node is the bottom-most. The last peer will be above its other peers.

XML files should have only one root level node, which is usually a Page in UI mods. Each child uses their parent's bounds as their local coordinates. So if the first Page is at 10,10 on the screen and the first child is at 10,10 for its local coordinates, it will appear at 20,20 on the screen. The entire UI is comprised of a parent/child relationship. Not just your UI file. The experience window is a child of the main hud... as can be seen in the filename.

To be honest, setting size and location programmatically isn't really what you should be doing to get resizing to work. The proper way is with the things in your first question. PackLocation and PackSize. You use these to describe to EQ2 how it should reposition or resize a child element when its parent resizes. For that you should really check the afore-mentioned manual as it has pictures and stuff.

OnShow happens when the element is shown but only if it was not shown previously. This could be while your character is still loading or any time... it's not when you're given control of your character. Or it could be never because the game considers the element always visible. Setting an element from Visible=true to Visible=true will not trigger the OnShow event.


Quote:
1st: What is the precise difference between Packsize absolut and prop?
Took me a few reads to understand this question due to the shortenings... absolute resizing means the element's size will always be the same numerical difference compared to the parent. Proportional means that an elements size will always be the same percentage in size compared to the parent. IE, the child is always 10px shorter than the parent, or the child is always 75% in size of the parent.

Last edited by EQAditu : 12-31-2011 at 01:05 AM.
Reply With Quote
  #4  
Unread 01-02-2012, 10:12 AM
Alderway Alderway is offline
A Young Mystail Rat
 
Join Date: Dec 2011
Posts: 4
Default

Happy New Year!

Many thanks to EQAditu. The few tips you gave me were very useful.

Finally I produced a working XP-Bar.



I did find easily the settings for width of the 3 XP-bars by calulation, but
the values for location and packlocation in combination with the size-values
of the parent page of the bar are still a secret for me. I solved with try, log in and
adjust the values.

A few words to TalTa: Your post was not helpful in any way. The English language
is still a challenge. I am a German. The stickys were not helpful
too for the problems I had to understand what I am doing. The word file
presented is a good introduction, but not for learning XML or interface-code.

I read both and so I was in the position to ask my question. And I did poke
already in the code of other interface made by modder, but with not knowing
what to do you will not recognize precisly what I changed or the effects there of.

But to come to the end: Your work you are presenting is great and I raise my hat.
Attached Thumbnails
Click image for larger version

Name:	XP-Bar Full Size working.jpg
Views:	434
Size:	64.0 KB
ID:	7809  
Reply With Quote
  #5  
Unread 01-02-2012, 02:03 PM
TalTal TalTal is offline
A Griffon
Featured
 
Join Date: Nov 2005
Server: Nagafen
Posts: 1,095
Send a message via Yahoo to TalTal
Default

Nevermind.

Silat

Last edited by TalTal : 01-02-2012 at 02:09 PM.
Reply With Quote
  #6  
Unread 01-02-2012, 02:43 PM
Alderway Alderway is offline
A Young Mystail Rat
 
Join Date: Dec 2011
Posts: 4
Default

Thanks for your (prior edited) words TalTal.

I didn't want to attack you, neither personally nor general.

My problem is, most of time I think to much and I seek sometimes
problems where no are. On the other hand answers produces questions.
Also I really miss LUA and its advantages to refer to objects with scripting.

I did read the documentation, espacially the chapter packsize and packlocation.
So I have still questions.

For example:

packlocation="cfc,top

To center the widget it should result to location="0,0". But it doesn't!
My AA-bar were not centered at all. Why do I have to specify a location for that? The answer is most likely: because it is.

Or:

Is there a command to print some values ingame into the chat like
/say object.Width and getting the value instead of the second command?


So I try to learn modding with small but continuous steps. Some ideas flying
in my head about things to change.

Greetings
Reply With Quote
  #7  
Unread 01-02-2012, 05:12 PM
TalTal TalTal is offline
A Griffon
Featured
 
Join Date: Nov 2005
Server: Nagafen
Posts: 1,095
Send a message via Yahoo to TalTal
Default

This is my understanding:

cfc is center of object fixed to center of container.

So if your container is 250 wide and your object is 120 wide and your location is 0,0 you are telling it that you want pixel 60 of your object to stay fixed in relation to the center of the container (container center is 125, Object center is 60, so fixed distance is 125-60, or 65). If you were to resize the container to 300 wide it would move your object from 0,0 to 25,0(container center is now 150, 150-65 = 85, half object size is 60 so to make its center be at 85 the object has to reposition to 25).

To center the object via cfc You would want the object above to have a start location of 65,0. This would put the center of the object at the center of the container. When you resized it would still be at the center.

The way I echo stuff in game is by including a button that updates text via onpress. Or through the interface that gm9 so kindly built into the profit controlcenter.
Something like

Onpress="Parent.Displaytext.Text=Parent.Object.Width"

where Displaytext is a field I have somewhere set up for that purpose.

Silat
Reply With Quote
  #8  
Unread 01-03-2012, 09:08 AM
Alderway Alderway is offline
A Young Mystail Rat
 
Join Date: Dec 2011
Posts: 4
Default

Quote:
Originally Posted by TalTal View Post
cfc is center of object fixed to center of container.

So if your container is 250 wide and your object is 120 wide and your location is 0,0 you are telling it that you want pixel 60 of your object to stay fixed in relation to the center of the container (container center is 125, Object center is 60, so fixed distance is 125-60, or 65). If you were to resize the container to 300 wide it would move your object from 0,0 to 25,0(container center is now 150, 150-65 = 85, half object size is 60 so to make its center be at 85 the object has to reposition to 25).

To center the object via cfc You would want the object above to have a start location of 65,0. This would put the center of the object at the center of the container. When you resized it would still be at the center.
That means, regardless of relation, the location refers always to the left/top corner of the widget.

Other question: Does the widget has to be always within the parent location/ sizes to be displayed or is it possible to show a widget outside of predefined dimensions (to show development datas without desturbing the layout of object in work)?

Alderway
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:13 AM.


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