View Single Post
  #70  
Unread 02-27-2005, 10:56 AM
Kosmos's Avatar
Kosmos Kosmos is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Lucan DLere
Posts: 581
Default

Quote:
Originally Posted by ger
I haven't tried your script yet, the comments came from looking at the code itself. I've got this weird thing about my start button, I just really don't want to mod it and I can't explain why, which is why I haven't installed your mod…although I suppose I'll have to to test the parser once I finish it.

When I say command-line, I mean out-of-game. I'll be writing the parser in C++ (mostly because it's what I'm most comfortable with) so that it can be run from within the EQ2 game directory. As far as I know of there's no way to even parse the information in-game, let alone save it to a custom file, and I'm pretty sure any way to do it would in some way be a violation of the EULA. Besides, the XMLs are only polled on load, so altering the custom profile XML in-game wouldn't really do any good, you'd have to restart the game to get the changes to take.

As for splitting the custom button out to its own XML, basically you just cut that portion of the code out of the startbutton XML and replace it with
Code:
<Include>eq2ui_mainhud_custompreset.xml</Include>
then paste the cut code into eq2ui_mainhud_custompreset.xml or whatever you want to call it.

If I understand you correctly with the 'include' statement you provided.

I would have to put this in the eq2_mainhud_xml

which I do not want to modify.


What I can try is putting this line in the eq2_mainhud_startbutton.xml :

<Include>eq2_maindhud_startbutton_custompreset1.xml</Include>
<Include>eq2_maindhud_startbutton_custompreset2.xml</Include>
<Include>eq2_maindhud_startbutton_custompreset3.xml</Include>

Than creatw an XML documentss titled

eq2_mainhud_startbutton_custompreset1.xml
eq2_mainhud_startbutton_custompreset2.xml
eq2_mainhud_startbutton_custompreset3.xml



I woudld remove this portion of code and put it in its own XML file as posted below.
Each of these files would contain:




Code:
<?xml version="1.0" encoding="utf-8"?>
<Page Activated="true" alwaysonbottom="false" eq2usescomwndcontrols="true" Location="22,692" MaximumSize="1024,1024" Name="CustomPreset1" PackLocation="left,bottom" PackLocationProp="0022/0001,-076/0001" savessettings="true" ScrollExtent="58,56" Size="58,56" UserMovable="true">

<Checkbox BackgroundColor="#FFFFFF" BackgroundOpacity="1.000" LocalTooltip="Quality" Location="31,7" Name="quality" OnSet="Parent.parent.balanced.checked=false Parent.parent.performance.checked=false Parent.balanced.checked=false Parent.performance.checked=false r_performance=1.0 r_performance=1.0" ScrollExtent="20,5" Size="20,5" Style="QualityStyle" TextColor="#EBDEAA" Tooltip="Quality"></Checkbox>
<CheckboxStyle DisabledTextStyle="/Fonts.FontZapf15" MouseOverSound="ui_mouseover" Name="QualityStyle" NormalTextStyle="/Fonts.FontZapf15" RStyleActivated="QualityStyle.activated_rect" RStyleDefault="QualityStyle.default_rect" RStyleMouseOver="QualityStyle.default_mouseover_rect" RStyleMouseOverActivated="QualityStyle.activated_mouseover_rect" SetSound="ui_released" UnsetSound="ui_released"/>
<Namespace Name="QualityStyle">
<RectangleStyle Center="activated" CenterShrinkH="true" CenterShrinkV="true" Name="activated_rect"/>
<RectangleStyle Center="activated_mouseover" CenterShrinkH="true" CenterShrinkV="true" Name="activated_mouseover_rect"/>
<RectangleStyle Center="default" CenterShrinkH="true" CenterShrinkV="true" Name="default_rect"/>
<RectangleStyle Center="default_mouseover" CenterShrinkH="true" CenterShrinkV="true" Name="default_mouseover_rect"/>
<ImageStyle Filter="true" Name="default">
<ImageFrame Name="image" Source="images/window_elements_generic.dds" SourceRect="359,102,379,107"/>
</ImageStyle>
<ImageStyle Filter="true" Name="default_mouseover">
<ImageFrame Name="image" Source="images/window_elements_generic.dds" SourceRect="291,159,311,164"/>
</ImageStyle>
<ImageStyle Filter="true" Name="activated">
<ImageFrame Name="image" Source="images/window_elements_generic.dds" SourceRect="269,159,289,164"/>
</ImageStyle>
<ImageStyle Filter="true" Name="activated_mouseover">
<ImageFrame Name="image" Source="images/window_elements_generic.dds" SourceRect="291,159,311,164"/>
</ImageStyle>
</Namespace>
</Page>
I've changed the Page Name
and changed Parent.balanced.checked=false TO> Parent.parent.checked=false
AND Parent.balanced.checked=false TO > Parent.parent.performance.checked=false

Am I understanding correctly? This would cause make no change to the way the buttons loook or act?
But would seperate the code out for each button?

Please check and see if this is correct. If it is, I'll make these changes tonight.
Someone else had suggested this, but I didnt' really understand at the time.

Also.
As far as the .DDS. File.
If I create my own .dds file, and another person downloads another Mod for the start button.
It will still srew this one up correct? It would make the buttons images display wrong, because they are going to be linking to another .dds file regardless.
So to avoide conflics with other mods, my best bet is to create a seperate window page that must be started by the /show_window command by the user.
I can't see a way to create a window attached to another window that already shows, or causes my window to auto-show without having the issue of mods using the same file.
If I am correct in thinking. If my page is not included in the include statement of either the mainhud or the eq2ui.xml then it will not have accesss to the included styles.
So I would have to create my own styles for the window, and frame, as well as buttons, and images.
Perhaps Im' wrong about that though.
With the above method.
I think I could just make two modifications the eq2_mainhud_startbutton.xml
An include statement
and an Oh Hide=visible statement for a new page called eq2_mainhud_startbutton_performancepanel.xml
than I could put the include statements for the eq2_mainhud_startbutton_custompreset1.xml customprest2.xml and custompreset3.xml inside the eq2_mainhud_startbutton_PeformancePanel.xml

Whew. thats alot to say.
Does this look correct? Is this the direction I need to go with the modifications before release?
In this case, as someone else mentioned.
It would be easy for me to provide sperate files for the various Pre-Defined performance buttons. Rather than the end user modding his own file.

And eventually if we find a way to write get the client to output the current settings to an XML file it would be much easier of this structure was already set up.
So to re-cap
+eq2ui.xml
++ eq2ui_mainhud.xml
+++eq2ui_mainhud_startbutton.xml
++++eq2ui_maindhud_startbutton_performancepanel.xml
+++++eq2ui_custompreset1.xml
+++++eq2ui_custompreset2.xml
+++++ew2ui_custompreset3.xml
+++++eq2ui_mute.xml
+++++eq2ui_mutemusic.xml
Also create my own .dds file.

In this case the only problem of other mods interfearing would be if they changed the eq2ui_mainhud_startbutton.xml

Which if they did, the problem would be fixed with about 'two' lines of code?
The include line, and the line to force the window to show?
Reply With Quote