EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Request for help (https://www.eq2interface.com/forums/showthread.php?t=13953)

Mistal 03-07-2010 09:56 AM

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

EQAditu 03-07-2010 04:11 PM

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.

Mistal 03-07-2010 07:06 PM

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

Mistal 03-08-2010 12:51 AM

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

EQAditu 03-08-2010 09:23 AM

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.

Mistal 03-08-2010 06:26 PM

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

lordebon 03-08-2010 06:34 PM

There is no official way of putting a delay into things. There are... ways... but SOE does not approve of adding pauses to things.

Mistal 03-08-2010 07:17 PM

Oops..
 
oops.. /scraps that idea then lol

Thanks for letting me know

EQAditu 03-08-2010 07:51 PM

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.

Mistal 03-09-2010 12:52 AM

/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

lordebon 03-09-2010 08:24 AM

Quote:

Originally Posted by Mistal (Post 89165)
/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"

Mistal 03-09-2010 08:00 PM

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>


Drumstix42 03-09-2010 08:13 PM

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".

Mistal 03-10-2010 12:28 AM

Thank you I have that working perfectly now :D

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 :)

Mistal 03-10-2010 06:02 PM

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

chriswebstar 03-10-2010 06:17 PM

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.

Drumstix42 03-10-2010 07:39 PM

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.

Mistal 03-10-2010 07:46 PM

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

Landiin 03-11-2010 02:32 AM

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.

Drumstix42 03-11-2010 04:49 AM

Quote:

Originally Posted by Landiin (Post 89244)
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.

:eek::eek:

You suck! :rolleyes: Thanks for the info though. That's extremely useful.

chriswebstar 03-11-2010 05:39 AM

I can't see where you uploaded that file, though. Oh wait, you said you'd share it, did you?

Mistal 03-11-2010 07:27 AM

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

Drumstix42 03-11-2010 12:00 PM

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? :D (if it existed that long ago) hehe

Mistal 03-12-2010 02:59 AM

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 :)

Mistal 03-12-2010 08:47 AM

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


All times are GMT -5. The time now is 07:14 AM.

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