EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   <include> txt files? (https://www.eq2interface.com/forums/showthread.php?t=4850)

Drumstix42 11-15-2005 02:56 PM

<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:

Drumstix42 11-16-2005 11:05 AM

Still having no luck here. Either I'm missing something easy, or there's some kind of trick to it.

Sir Taleisin The Seer 11-16-2005 11:15 AM

been trying myself drum, no luck

Landiin 11-16-2005 08:32 PM

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.

Drumstix42 11-16-2005 10:35 PM

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 ;)

PaulGHarrison 11-16-2005 11:12 PM

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

pooka 11-17-2005 12:16 AM

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?

Valdacil 11-17-2005 04:00 AM

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>.

PaulGHarrison 11-17-2005 10:56 AM

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

Drumstix42 11-17-2005 01:16 PM

Ok, I guess my next question is does it work correctly in UIBuilder? :)

Valdacil 11-17-2005 02:25 PM

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.

Drumstix42 11-17-2005 02:38 PM

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

tangent 11-17-2005 02:40 PM

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.

Drumstix42 11-17-2005 09:16 PM

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