<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 :confused: |
Still having no luck here. Either I'm missing something easy, or there's some kind of trick to it.
|
been trying myself drum, no luck
|
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.
|
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 ;) |
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 |
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? |
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>. |
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 |
Ok, I guess my next question is does it work correctly in UIBuilder? :)
|
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.
|
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 :rolleyes:
*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 |
Quote:
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. |
Word to the wise.
Watch your spelling ;) It doesn't like including the wrong file name :rolleyes: |
All times are GMT -5. The time now is 02:14 AM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI