EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 11-15-2005, 02:56 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default <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
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 11-16-2005 at 12:27 AM.
Reply With Quote
  #2  
Unread 11-16-2005, 11:05 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Still having no luck here. Either I'm missing something easy, or there's some kind of trick to it.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #3  
Unread 11-16-2005, 11:15 AM
Sir Taleisin The Seer's Avatar
Sir Taleisin The Seer Sir Taleisin The Seer is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: The Bazaar
Posts: 338
Default

been trying myself drum, no luck
__________________
DawnTide
Reply With Quote
  #4  
Unread 11-16-2005, 08:32 PM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

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.
__________________
Landiin's EQ2MAP Updater Discussion Download
Reply With Quote
  #5  
Unread 11-16-2005, 10:35 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

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
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #6  
Unread 11-16-2005, 11:12 PM
PaulGHarrison PaulGHarrison is offline
A Young Mystail Rat
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 4
Default

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
Reply With Quote
  #7  
Unread 11-17-2005, 12:16 AM
pooka's Avatar
pooka pooka is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Antonia Bayle
Posts: 250
Default

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?
Reply With Quote
  #8  
Unread 11-17-2005, 04:00 AM
Valdacil Valdacil is offline
A Mist Grinnin
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Antonia Bayle
Posts: 75
Default

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>.
Reply With Quote
  #9  
Unread 11-17-2005, 10:56 AM
PaulGHarrison PaulGHarrison is offline
A Young Mystail Rat
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 4
Default

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
Reply With Quote
  #10  
Unread 11-17-2005, 01:16 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Ok, I guess my next question is does it work correctly in UIBuilder?
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #11  
Unread 11-17-2005, 02:25 PM
Valdacil Valdacil is offline
A Mist Grinnin
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Antonia Bayle
Posts: 75
Default

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.
Reply With Quote
  #12  
Unread 11-17-2005, 02:38 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

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
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 11-17-2005 at 02:52 PM.
Reply With Quote
  #13  
Unread 11-17-2005, 02:40 PM
tangent tangent is offline
A Forest Scavenger
Interface Author - Click to view interfaces
 
Join Date: Apr 2005
Server: Antonia Bayle
Posts: 15
Default

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.
Reply With Quote
  #14  
Unread 11-17-2005, 09:16 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Word to the wise.

Watch your spelling It doesn't like including the wrong file name
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:54 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI