Thread: Question
View Single Post
Old 07-28-2002, 12:49 AM   #14
Akephalos
A Ghoul
 
Join Date: Jul 2002
Posts: 16
Default

Ok, first off, this is great, being new to XML myself, Im trying to learn whats going on here, and find out precisely how to make my mods work as intended. If I sound condescending to anyone, its not intentional, its just the way I word things, so dont get too defensive and stuff.

First off, Geddine, I think you misunderstood. Im not trying to tell the UI to open the window for a pet when I am banking. Yes, that is hard coded. I am not trying to alter the code in such a manner that it does freaky stuff, like when I inspect my pet a bank window opens up. Im not trying to pop up a spell gem window when I right click my jboots, and Im not quite sure how my post could have been misconstrued as such.

Geddine, you are also incorrect in your assumption that the UI requires all files to exist, and to be loaded, or else you would get an error.

PsychoGears, You follow this too, because I dont think you understood properly what I was trying to do either, and Ill do my best to rectify that.

Open your EQUI.XML file, in here is a composite list of all the XML files that the UI will load when you load the game. Currently I have three of these file inclusions effectively deleted from this file, and the UI loads and works wonderfully. EDIT: These files listed in the EQUI.XML are what are called "Parent Files". This information will be more relavent a bit farther down in the post.

Dont believe me, copy the default folder, rename it to something else, find the EQUI.XML file, crack that baby open and delete the following lines in their entirety :
<Include>EQUI_CastingWindow.xml</Include>
<Include>EQUI_TargetWindow.xml</Include>
<Include>EQUI_BreathWindow.xml</Include>
Save it, and then load the skin. You will notice that it did not crash, it did not error out, and loaded perfectly fine. Try to cast. Go drown yourself, or try and target something, you will find that none of those windows exist, because they were NEVER LOADED by the UI.

Ok, so now you see that you can indeed cause windows to not be loaded by the UI, lets see if we can put this to use somehow. We now have three windows that are not being loaded, but we still would like the information displayed in them in some other window, yet, keeping this window effectively deactivated. So, we open up the three deactivated files and take a look. We then take the pertinent code from these files, copy it, and paste it into the file where we would like it displayed (Hotkey Window perhaps), carefully making sure all the syntax is correct, and save it. Reload the UI. This information is now displayed in the Hotkey Window, and the originating Parent Window remains deactivated.

Allrighty, now on to the tricky stuff. Not all of the windows are as simple as the breath, target, and casting window. Some of these windows, such as the EQUI_PlayerWindow.xml have what is deemed a "Child" element. This child element is typically defined within the parent. The following is a crude representation of how this hierarchy works.

<Parent>
<Child1>
</Child1>
<Child2>
</Child2>
</Parent>

Now, The parent opens, executes each and every element within it, then closes the parent. Sometimes these children reference other files, or, other files have exceptionary code within their xml, that cause the child to not be able to be moved, unless we update the exceptionary code or other file references to point to where this child has moved to. The following is a crude representation of that.

<Parent>
<Child1>
</Child1>
<Child2>
<LoadPetInfoFrom_PetInfoWindow.xml>
</Load>
</Child2>
</Parent>


In this instance, it is looking elsewhere for more information, and within this external source, if it has a <ReturnInformationTo_PetWindow>, and we moved all of the code from PetWindow to PlayerWindow, we would get an error, because the code is returning data to an invalid, and unused file or location.

Granted, this is a very watered down, and crude representation of how the code is, but, you should understand how it works. Currently, it is the "Child Element" so to speak that is causing me grief. It gives me the XML ERROR "Unable to load child pet_hp in EQUI_PlayerWindow.xml".

What this means to me, is that there is an xml file somewhere, that is making reference in some fashion, to the "Pet_HP" child element, and cannot find it, because I have moved it.

What I need to do is find which file is making that reference, and point it to the new residence of that child, and all will be well and good in the world of my UI mods.

And, the reason I do not believe it to be an issue that is hard coded, is 1. Theres no reason for this simple of a function to be hard coded, 2. XML is a parent/child language, and to get an error like what I got would not come from the external hard coding, and 3. Im getting an XML Error, not an illegal operation. If the hard code was looking for this file, the eq.exe file would crash, not the xml file.

Make sense now?
Akephalos is offline   Reply With Quote