|
03-07-2010, 09:56 AM
|
Premium Member
|
|
Join Date: Sep 2007
Server: Everfrost
Posts: 59
|
|
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.
|
03-07-2010, 04:11 PM
|
|
A Griffon
|
|
Join Date: Mar 2005
Server: Permafrost
Posts: 256
|
|
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.
|
03-07-2010, 07:06 PM
|
Premium Member
|
|
Join Date: Sep 2007
Server: Everfrost
Posts: 59
|
|
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
|
03-08-2010, 12:51 AM
|
Premium Member
|
|
Join Date: Sep 2007
Server: Everfrost
Posts: 59
|
|
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.
|
03-08-2010, 09:23 AM
|
|
A Griffon
|
|
Join Date: Mar 2005
Server: Permafrost
Posts: 256
|
|
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.
|
03-08-2010, 06:26 PM
|
Premium Member
|
|
Join Date: Sep 2007
Server: Everfrost
Posts: 59
|
|
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
|
03-08-2010, 06:34 PM
|
Fetish Core author
|
|
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
|
|
There is no official way of putting a delay into things. There are... ways... but SOE does not approve of adding pauses to things.
__________________
|
03-12-2010, 08:47 AM
|
Premium Member
|
|
Join Date: Sep 2007
Server: Everfrost
Posts: 59
|
|
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
|
03-12-2010, 02:39 PM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
It looks like the size of your text element is pretty big. It could be taking up the whole window.
Some elements do not allow the mouse click to go through. To get around this add a property called: AbsorbsInput
And set it to: false
|
03-13-2010, 02:19 AM
|
Premium Member
|
|
Join Date: Sep 2007
Server: Everfrost
Posts: 59
|
|
sorted ...
Yup that did it Ty very much!
|
03-13-2010, 09:24 AM
|
Premium Member
|
|
Join Date: Sep 2007
Server: Everfrost
Posts: 59
|
|
My first Mod
I finished my first mod
It works great, and I am so pleased with it ... a couple of my friends have it too!
I would still like to change the background picture and seem to be having hells work with it. Is there a step by step on how to set up an image file and use it for a background? I have tried what has been suggested in this thread but I fear I just simply don't get it as nothing I have done seems to work . Any direction / info you could point me at here would be very much appreciated!
Thanks for all your help, I am now in the process of making my 2nd mod
Mistal
|
03-13-2010, 01:11 PM
|
|
A Griffon
|
|
Join Date: Mar 2005
Server: Permafrost
Posts: 256
|
|
Maybe if you posted the files you want modified as an attachment someone would be willing to modify them correctly so you can see. I'm not sure what to add to my previous explanations. Maybe a photoshop mockup too since it can open DDS files with a plugin.
|
03-13-2010, 05:02 PM
|
Premium Member
|
|
Join Date: Sep 2007
Server: Everfrost
Posts: 59
|
|
Ok I'll post one box with the image and button I would like to use, if someone would be so kind as to edit it for me I would be eternally grateful. I by no means expect anyone to do this for me, I really want to learn how to do it myself. but this will probably give me the references I need to be able to edit all my other boxes myself
I'll make the background image for one of the boxes .. I am assuming I should make the image the same size as the box and have it as a dds file .. correct? Same with the buttons?
Thanks again for all your help
Mistal
|
03-13-2010, 05:29 PM
|
|
A Griffon
|
|
Join Date: Mar 2005
Server: Permafrost
Posts: 256
|
|
It depends on if you want the background resizable and how. Buttons will typically be different sizes, so this is more important.
You can think of a RectangleStyle as having nine sections.
123 1 is NorthWest
456 5 is Center
789 8 is South
The most simple way to create a RectangleStyle is to define section 5 and tell it to expand/shrink the entire ImageStyle.
The most complex way would be to define all nine sections with separate ImageStyles. Each ImageStyle can have the same Source DDS but different SourceRects.
Say you had a 12x9 image depicting a button. The button's image had a 1px border around the perimeter.
If you only defined section 5(Center) and you applied the RectangleStyle to a 120x90 button, the 1px border would be stretched to a 10px border. This would look pretty bad.
If you define all nine sections, you can say the SourceRect of #1 is "0,0,1,1", #2 is "1,0,11,1", #3 is "11,0,12,1". This will cause the two corners to always be a 1x1px image. The top edge(2/North) will always be 1px high but expand to be 118px if needed(and NorthStretch is set to true).
I might be rusty on creating SourceRects... so the above examples might be slightly off.
Last edited by EQAditu : 03-13-2010 at 05:33 PM.
|
03-14-2010, 12:23 AM
|
Premium Member
|
|
Join Date: Sep 2007
Server: Everfrost
Posts: 59
|
|
Ok cool .. I am gonna give it a few more goes before I post anything here, because I really would like to figure it out .. I understand about the rect pointing at a particular location / area on the dds file this doesn't seem to be the problem I have various graphics programs that tell me what the sourcerect is on the image.. the problem I am having is on the mod itself .. it doesn't seem to want to look at anything except the default I have even tried just making a completely red layer over the top of the image template so the whole thing was red everywhere and had it point to that file .. but again it doesn't work
It seems everytime I point it away from the default it either breaks or does nothing. It's oddly ironic that this is the problem I am having as usually graphically I am quite good .. but with this the graphics are causing me the technical problem not the code LOL
I am going to play with it a little more .. i still have some hair left
Thanks for all your advice and help
Mistal
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:54 AM.
|
|