EQ2Interface.com
Search Downloads


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

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 03-07-2010, 09:56 AM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default Request for help

Hello,

I have been going through the forums but I'm not actually sure what I am looking for so I was wondering if someone could point me in the right directions.

I am very new to making modifications and have started out with a little mod based on the pooka druid rings file. It's all working great so I have started to play with it a bit more. I would like to add an image to the background and maybe change the style of the buttons.

This seems to be where I am getting completely lost. I understand that the mod is looking at an image .dds file I have looked at these images and even had the UIbuilder open after reading a tutorial by Phipps trying to make some sense of it but I think this confused me more.

This is the part of the code that I believe I need to change but I am completely unsure of how to start going about it. I started changing the /WindowElements... more in the blind hope I could get it to do something and figure it out from there but nothing I do seems to change anything.

Code:
<Page Name="WindowFrame" PackSize="absolute,absolute" ScrollExtent="329,137" Size="329,137">
                <Page AbsorbsInput="false" BackgroundOpacity="1.000" Name="Frame" PackLocation="left,top" PackSize="absolute,absolute" RStyleDefault="/WindowElements.DesktopWindowFrame.data.frame.rect" ScrollExtent="329,137" Size="329,137" />
        <Page AbsorbsInput="false" BackgroundOpacity="1.000" Name="Bkg" PackLocation="left,top" PackSize="absolute,absolute" RStyleDefault="/WindowElements.DesktopWindowFrame.data.bkg.rect" ScrollExtent="329,137" Size="329,137" />
I have seen others use custom backgrounds on things so I know it's possible. Any help that can be put my way would be sincerely appreciated as I would like to understand this better.

Many thanks

Mistal

Last edited by Mistal : 03-07-2010 at 10:00 AM.
Reply With Quote
  #2  
Unread 03-07-2010, 04:11 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

I'll use your third line as an example.
RStyleDefault="/WindowElements.DesktopWindowFrame.data.bkg.rect"
This is defined in Default\eq2ui_windowelements.xml (Line 68)
Code:
<RectangleStyle Center="center" CenterShrinkH="true" CenterShrinkV="true" East="e" EastShrink="true" Name="rect" North="n" NorthEast="ne" NorthShrink="true" NorthWest="nw" South="s" SouthEast="se" SouthShrink="true" SouthWest="sw" West="w" WestShrink="true" />
Each of the attributes points to an ImageStyle... such as "center". (Line 65-67)
Code:
<ImageStyle Filter="true" Name="center">
    <ImageFrame Name="image" Source="images/windowelements.dds" SourceRect="176,191,254,269" />
</ImageStyle>
You can define these styles directly in your own XML file and then change the RStyleDefault attribute of your background element to match.

So RStyleDefault is the default RectangleStyle that the element will use. A RectangleStyle can consist of one or more ImageStyles. You'll at least want to include a center ImageStyle for your RectangleStyle. Defining each of the eight outer edges to something different is up to you. An ImageStyle has an ImageFrame child element which defines the image to use and the part of the image to use. (Source and SourceRect)

A custom RectangleStyle can be within your root Page element and the ImageStyles should be peer elements.
Reply With Quote
  #3  
Unread 03-07-2010, 07:06 PM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default

Thank you for taking the time to reply That is starting to make a little more sense now although i think it is going to take me a little while to completely get the hang of it, I have only been trying to make mods for a few days so I'm still very green.

All help advice and pointers are most welcome.

Thank you again

Mistal
Reply With Quote
  #4  
Unread 03-08-2010, 12:51 AM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default One further question..

I am having a lot of fun with this .. it is extremely challenging for me and I think I currently have the most messed up UI (colour wise) in game lol

I have made some great progress since one realisation hit me and have managed to get the mod to have different buttons and background. However the problem is that to change them i have to change the /commonelements and /windowelements file .. which obviously changes everything else in the UI also .. I have renamed the .dds file to MistalButtons then changed the filepath from Style="/CommonElements.PushButton.data.style" to Style="/MistalButtons.PushButton.data.style" but this doesn't change them.

Is there something i am forgetting to add or change?

Many thanks for all your kind help

Mistal

Last edited by Mistal : 03-08-2010 at 02:43 AM.
Reply With Quote
  #5  
Unread 03-08-2010, 09:23 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

First off, if a style has a forward slash at the start of it, that means that it's a rooted reference. Meaning it starts from the eq2ui.xml file and navigates outwards. (This is why you have to open that file with UIBuilder or all rooted references to the default UI break)

If you make a new RectangleStyle, just put it in your custom XML file. Don't overwrite the default files or you know what will happen. In my previous post, I said to put this new style in the root Page element of your XML file. Afterwards you just reference the RectangleStyle by name. You can reference the style from anywhere within that window, not just elements that are peers of it.

Code:
<Page Name="MyCustomWindow" ... >
    <RectangleStyle Name="MyRectStyle" Center="MyCenterTexture" ... />
    <ImageStyle Name="MyCenterTexture" ... >
        <ImageFrame Name="image" Source="some.dds" SourceRect="0,0,100,100" ... />
    </ImageStyle>

    <Page Name="Background" Size="100,100" RStyleDefault="MyRectStyle" ... />
</Page>
Pretend that "some.dds" is a file in the same folder as your window file.
Reply With Quote
  #6  
Unread 03-08-2010, 06:26 PM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default Technical Help

Thank you so much for your reply, it's a slow learning process for me but I am making progress each time

I have a technical question... I have searched for forum but either there isn't anything posted on the topic or I am not searching in the right way. but I would like to know if it is possible to add a delay / pause to something.

One of the buttons on my mod equips then uses an item, I would like to put the original item back once it has finished casting. but the cast takes 5 seconds. If you equip another item before it finishes casting then the cast get inturupted and cancels.

Is it possible to add code which will add a time delay of say 10 seconds then equip another item back into that slot? or /equip previous in slot 20 ... or something.

ONce again many thanks for your kind help with my little project

Mistal
Reply With Quote
  #7  
Unread 03-08-2010, 06:34 PM
lordebon lordebon is offline
Fetish Core author
This person is a EQ2Map developer.
Featured
 
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
Default

There is no official way of putting a delay into things. There are... ways... but SOE does not approve of adding pauses to things.
__________________
Reply With Quote
  #8  
Unread 03-08-2010, 07:17 PM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default Oops..

oops.. /scraps that idea then lol

Thanks for letting me know
Reply With Quote
  #9  
Unread 03-08-2010, 07:51 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

I've put delay coding in a few of my UI mods... but it's not simple in the least. In fact it's a quick path to crashing the EQ2 client with either intermittent or perfect success. It's not a fun learning process at any rate.

It's more of the intent of the mod that is in question, not what is inside of it. As proof of such, I have these mods available on this site and Rothgar's opinion that they didn't look to be against the spirit of the EULA.

It might be too early for you to jump into UI scripting though. It's far more complicated than just using EQ2 commands.
Reply With Quote
  #10  
Unread 03-09-2010, 12:52 AM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default

/definately throws that idea out .. far too complicated for me atm I'm just having fun with my little beginner mod

I am starting to get the jist of what you are saying about the image files and i'm going to have another go at it with a fresh brain tomorrow.

I do have another question tho ... I would like one of my buttons to pop up another window.. I have tried a couple of commands and had a look at a few mods that have tabs and such on them but I think it made it worse. I have the 2nd window with the buttons on it all ready and saved in the profitUI folder I added the /includes line to the profitCustom file and put a command on the button OnPress= /show_window Custom.Mistals_Testfile, but nothing happened. Is the command wrong?

Thanks again
Mist
Reply With Quote
  #11  
Unread 03-09-2010, 08:24 AM
lordebon lordebon is offline
Fetish Core author
This person is a EQ2Map developer.
Featured
 
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
Default

Quote:
Originally Posted by Mistal View Post
/definately throws that idea out .. far too complicated for me atm I'm just having fun with my little beginner mod

I am starting to get the jist of what you are saying about the image files and i'm going to have another go at it with a fresh brain tomorrow.

I do have another question tho ... I would like one of my buttons to pop up another window.. I have tried a couple of commands and had a look at a few mods that have tabs and such on them but I think it made it worse. I have the 2nd window with the buttons on it all ready and saved in the profitUI folder I added the /includes line to the profitCustom file and put a command on the button OnPress= /show_window Custom.Mistals_Testfile, but nothing happened. Is the command wrong?

Thanks again
Mist
May be just a transcription error, but there is no "/" when calling a command from a UI handler like OnPress. So you'd want OnPress="show_window WindowPath.WindowName"
__________________
Reply With Quote
  #12  
Unread 03-09-2010, 08:00 PM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default

Yes sorry that was my bad I typed that into my last post rather than pasting it

here is what i have

Code:
<Button Location="3,132" Name="BtnPort14"  OnPress="show_window Custom.Mistals_Testfile2.xml
                parent.Visible=Parent.CloseAfterCast.Checked" ScrollExtent="108,32" Size="108,32" Style="/CommonElements.PushButton.data.style">TESTFILE</Button>
Reply With Quote
  #13  
Unread 03-09-2010, 08:13 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

The command template is:
show_window TreeLocation.ElementName

TreeLocation would be Custom since you're probably including your XML file in that file (or you should be).
ElementaName is the name of the top-most element in your file. The name of the file itself is irrelevant to the command. So whatever your page is called for your custom window is what you need as your "ElementName".
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #14  
Unread 03-10-2010, 12:28 AM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default

Thank you I have that working perfectly now

Still having real problems with changing the background on this little box tho, everything I do either doesn't work or breaks the UI .. gonna keep trying tho
Reply With Quote
  #15  
Unread 03-10-2010, 06:02 PM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default A little bit more...

hello again..

Firstly thank you for all your help.. it is really turning my idea into an actual project .. but better than that one that actually works! lol

Currently my little mod is a box of buttons.. but I would like to to put a title at the top above the buttons something that says Mistal's Box for example.

I have tried various lines but all I seem to do is break my Ui .. is there some info that I can find out what I need to write here to make my text appear?

Thank you again

Mist
Reply With Quote
  #16  
Unread 03-10-2010, 06:17 PM
chriswebstar chriswebstar is offline
A Griffawn
 
Join Date: Oct 2008
Server: Runnyeye
Posts: 74
Default

Look at some text in any other window. In a nutshell, you add a text object, give it a name, assign it a font style, and set the LocalText property.
Reply With Quote
  #17  
Unread 03-10-2010, 07:39 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

If you use UIBuilder, yeah. Just fill in the Text field on the Text Object. LocalText gets filled in automatically.
All text needs a Style (font) to display. Most code doesn't make any guesses, and you need to define everything properly Though most applications do have "default" settings in various areas.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #18  
Unread 03-10-2010, 07:46 PM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default

Oh thats brilliant.. it works great now .. it really helped to know what I was looking for in another piece of code. Found exactly what I needed. Thank you so much
Reply With Quote
  #19  
Unread 03-11-2010, 02:32 AM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Send a message via ICQ to Landiin Send a message via AIM to Landiin Send a message via MSN to Landiin Send a message via Yahoo to Landiin
Default

You can change and add default properties for the UI builder if you so desire. the file is called defaults.cfg and is in the same directory as the uibuilder. I have all fonts and styles preset for each object so I don't have to fill them in when I add them.
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
  #20  
Unread 03-11-2010, 04:49 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

Quote:
Originally Posted by Landiin View Post
You can change and add default properties for the UI builder if you so desire. the file is called defaults.cfg and is in the same directory as the uibuilder. I have all fonts and styles preset for each object so I don't have to fill them in when I add them.


You suck! Thanks for the info though. That's extremely useful.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #21  
Unread 03-11-2010, 05:39 AM
chriswebstar chriswebstar is offline
A Griffawn
 
Join Date: Oct 2008
Server: Runnyeye
Posts: 74
Default

I can't see where you uploaded that file, though. Oh wait, you said you'd share it, did you?
Reply With Quote
  #22  
Unread 03-11-2010, 07:27 AM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default

Thank you for your replies guys, I sincerely appreciate all the pointers and help... I understood the you suck part.. and i'm pretty sure that wasn't at me lol but I am trying to learn ... mostly through trial and error .. with more errors than not .. but it's getting there

I still have a few things to work out.. particularly the images thing which is still causing me insane problems.. but I am sure I will get it eventually .. all that remains to be seen is how much hair I have left once I do.

Again thanks for everything, i'm sure I will have more questions coming

Mistal
Reply With Quote
  #23  
Unread 03-11-2010, 12:00 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Send a message via AIM to Drumstix42 Send a message via MSN to Drumstix42 Send a message via Yahoo to Drumstix42
Default

Was DEFINITELY NOT aimed at you!! I was just saying Landiin sucks because I wish I had knew about the defaults file... mmm 4 years ago? (if it existed that long ago) hehe
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #24  
Unread 03-12-2010, 02:59 AM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default

LoL thats what I thought but I am aware of the fact that I am extremely new to all this ... that said although Im finding a couple of things quite challenging and one thing completely confusing ... I am enjoying the learning process
Reply With Quote
  #25  
Unread 03-12-2010, 08:47 AM
Mistal Mistal is offline
Premium Member
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Sep 2007
Server: Everfrost
Posts: 59
Send a message via MSN to Mistal
Default Whats causing this?

Hi,

I found something interesting when I started adding Text to my Mod Window. The mod window is no longer dragable around the screen. Any ideas what I missed out or what i need to add in.

This is what I put for the text line at the bottom of the page.

Code:
<Text Font="/TextStyles.Normal.NormalStyle" Location="10,132" Name="Body" ScrollExtent="374,298" Size="329,242" TextColor="#E5E5E5">Test Text</Text>
Many thanks
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 05:32 PM.


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