|
11-15-2005, 02:56 PM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
<include> txt files?
I'm trying to use <include> to insert text from text files, but how to do it is escaping me...
I have my XML file in my custom ui folder, and I would think I could just do:
<include>spells/main.txt</include>
But when I go and look in other mods that do it, it's something like:
<include>something/../something/main.txt</include>
So what's the deal? I'm a little confused
Last edited by Drumstix42 : 11-16-2005 at 12:27 AM.
|
11-16-2005, 11:05 AM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
Still having no luck here. Either I'm missing something easy, or there's some kind of trick to it.
|
11-16-2005, 11:15 AM
|
|
A Griffon
|
|
Join Date: Jul 2004
Server: The Bazaar
Posts: 338
|
|
been trying myself drum, no luck
|
11-16-2005, 08:32 PM
|
Slayer of clock cycles
|
|
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
|
|
from what I can figure you can't just include a text file. One it needs to be in UTF-8 format and if the script engin don't detect tags it ignores any info that isn't in a tag.
|
11-16-2005, 10:35 PM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
Wierd.
But other mods that I'm talking about, I mean such as the journal mods that have all those heritage and writ text files in them. As well as all the info stuff, like the cookbooks, ect.
I'm just wondering, trying to have my own spelllist window, but dont' feel like having a 100,000 line file if you get what I mean
|
11-16-2005, 11:12 PM
|
A Young Mystail Rat
|
|
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 4
|
|
Hi Drumstix42,
I use the following construction to put random text files in a window, is that what you need?
<Text ......><include>xyzzy/xyzzy</include></Text>
Paul
|
11-17-2005, 12:16 AM
|
|
A Griffon
|
|
Join Date: Dec 2004
Server: Antonia Bayle
Posts: 250
|
|
I ran into this when doing the little mail hack for somebody. absolute references ie. directory/file didn't work. I simply copied the format from the other mods that included text files.
.. is the parent directory
../ is the current directory
something/../ is also the current directory (any UNiX gurus that can explain why?)
something/../subdir is an explicit call to a relative subdirectory. it's goofy, but what about this setup makes total sense?
|
11-17-2005, 04:00 AM
|
A Mist Grinnin
|
|
Join Date: Dec 2004
Server: Antonia Bayle
Posts: 75
|
|
Having taken apart the Milquetowst and ultimately recreating, re-editing, and building from scratch windows which use includes I'd be happy to take a look at your code if you want to post what you have so far.
And just to add to this thread about includes... I tested it myself, nested includes don't seem to work. I tried to have the journal code nested so that the Others page was an include (<include>../journal/other.xml</include>) and within that .xml file it referenced the .txt files where appropriate (<include>../journal/other/sometext.txt</include>) and it spit out garbage at me (rather rudely I might add). So I'm not sure nested include work... then again I could have done something wrong <grin>.
|
11-17-2005, 10:56 AM
|
A Young Mystail Rat
|
|
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 4
|
|
If you think about it, nested includes must work because (unless I'm way off base) the client loads eq2ui.xml which includes all the top-level files, which then in turn include their sub-files. As I said in #6 above, the only way I have gotten text files to include correctly is with <Text...><include>xyzzy/xyzzy</include></Text>. And that is a relative directory reference, so I can verify that works too.
Paul
|
11-17-2005, 01:16 PM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
Ok, I guess my next question is does it work correctly in UIBuilder?
|
11-17-2005, 02:25 PM
|
A Mist Grinnin
|
|
Join Date: Dec 2004
Server: Antonia Bayle
Posts: 75
|
|
The inludes? Yes, when I use includes I see the text correctly in UIBuilder. I'll take another look at my nesteds... maybe I had bad pathing on the nested file.
|
11-17-2005, 02:38 PM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
I think my problem was that I was putting in line breaks in the <Text> tag and it wouldn't read the <include> correctly. Thanks for all your help, I believe I'm back on my feet now
*edit* Bah, saving in UIBuilder however will just copy the contents of the include /headsmack. Oh well, at least I can do what I need, and then just text the includes at the end
Last edited by Drumstix42 : 11-17-2005 at 02:52 PM.
|
11-17-2005, 02:40 PM
|
A Forest Scavenger
|
|
Join Date: Apr 2005
Server: Antonia Bayle
Posts: 15
|
|
Quote:
Originally Posted by Valdacil
The inludes? Yes, when I use includes I see the text correctly in UIBuilder. I'll take another look at my nesteds... maybe I had bad pathing on the nested file.
|
Nested includes do work. Perhaps the problem you are experiencing (I ran into this myself) is that the includes must use a path relative to the interface even if they're in a subdirectory.
For example, eq2ui_journals_quest.xml includes "/custom/quests.xml" and quests.xml includes "/custom/quest1.xml". It does NOT include "quest1.xml" as one might initially expect because, apparently, all include paths are relative to the interface and not the file containing the include.
|
11-17-2005, 09:16 PM
|
|
A Griffon
|
|
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
|
|
Word to the wise.
Watch your spelling It doesn't like including the wrong file name
|
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 04:16 PM.
|
|