Resourcetree XML file

Ideas and discussions on third party tools and utilities

Moderator: Forum Moderator

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Resourcetree XML file

Post by Zimoon » Fri Jul 11, 2008 10:02 am

.



SWG Resource Classes




The work on the file resourcetree2.xml (http://sites.google.com/site/simongronl ... etree2.xml was started years ago at the old SWGCraft. The reason behind this file was to provide the data for any third party application, details for how resource classes relate to each other, caps, and other stuff.

It was natural to choose XML because that file format can contain the kind of data we were looking at, it is flexible and can be augmented with further information without breaking hard coded applications, and XML naturally presents the tree-like structure that resource classes form.

It was also a natural choice to make the file public, always at a well known location. The file must not be administered by myself, any one on-line location is fine, and anybody can claim editorship of the file. I have used my research and merged it with input from several players but I claim no ownership.



Feel free to report errors or updates you find

However:
In the file some resource classes names are different from the names read in inventory or in schematics; the names in the file are the names as they are used in the reports from Interplanetary Survey Droid. This decision is based on the fact that the file is used by computer applications which also supports ISDroid reports.

Remember that all creature resource classes always "spawn" in the databases at SWG/SOE, but not all classes are possible to harvest off of carcasses in the worlds.

/Zimoon

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Resourcetree XML file

Post by Zimoon » Fri Jul 11, 2008 10:09 am

Feel free to use the resourcetree XML file, however
  • Do not include the file in your application as a file. The file's data may change without further notice and then a "static" file is outdated.
    • Rather, download the file
    • Regularly check for updates to it, its update date is read in one of its first lines
  • Do not publish the file at any other location until we together have decided to change its location.
    We do not need several versions and nobody knows which is up-to-date.
  • Do not hard code the parser but use standard XML support to read it.
  • Do not hard code the URL but plan for it to change.

Tharek Tolemac
Intermediate Crafter
Posts: 139
Joined: Sun Jun 03, 2007 8:48 am

Re: Resourcetree XML file

Post by Tharek Tolemac » Fri Jul 11, 2008 3:11 pm

As long as SWGAide dont offer Resource storage, I use Myres.

Question is:
When I download the xml file, place it in the Myres folder and select "update from XML file", then it loads it, but not the resource class names, but only the numbers.

For example:
Energy is Class "1"
Inorganic is Class "2"

How do I avoid that?

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Resourcetree XML file

Post by Zimoon » Fri Jul 11, 2008 5:39 pm

Honestly I don't know. Sometime between half a year and one year after Wendano (MyRes sole developer) left SWG with NGE something was added to or otherwise changed in the XML file which broke MyRes. I had a low-playing period at the time, especially with crafting as I guess most traders had after NGE, and didn't realize until too late do unwind.

There is some hard-coded stuff in MyRes that made it choke on the changes.

As far as I know we never did anything complex, just added some attributes which should never break a well written, not hard-coded application. We sorted some resource classes and corrected some class relations (took away Animal Bone for one). The recentmost backup I have is from 2007 (a few harddisks later), long after MyRes was broken.

Had I used MyRes more I would have tracked down the cause, but my time is limited ...

I am 99% sure the structure is OK. It is one or more of the attributes that causes it to fail. My suggestions is to temporary remove all attributes but description and caps for a few resources that seems wrong and see what happens, add them back one by one and see which breaks MyRes. Possibly they can just be added to the element but at the end rather than to the beginning of each line. I believe quite a few would be happy to know your results from your trial and error adventure :)

/Zimoon

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Resourcetree XML file

Post by Zimoon » Fri Jul 11, 2008 5:46 pm

Uhoh, did I post and then go to the MyRes flder and loo and behold, what did I see but a backup folder containing this item from 2005-08-30 :D

A chance to diff the two. Notice that Rommel sorted them in the same order as they occur in the 30k vet crate.

It also struck me that it is possible that the hard coding is that MyRes takes the element and expects them to always come in a certain order and it does not pick them out by attribute name, as it of course should do. Then you try to find which order is correct and most possibly you can figure out which attributes are new and move them to come after the caps, since I believe MyRes stops reading after the last cap.

/Zimoon
Attachments
resourcetree2.zip
(13.43 KiB) Downloaded 484 times

User avatar
panino76
Intermediate Crafter
Posts: 184
Joined: Mon May 19, 2008 1:26 pm
Location: Italy

Re: Resourcetree XML file

Post by panino76 » Sun Jul 13, 2008 10:01 pm

Bilal gas Inert gas: why this resource is listed in this way? I'm pretty sure I've some gas in my storage, and I'm pretty sure it's listed "bilal inert gas" only. This is causing my tool to crash...

Artax Wavingwalker
__________________________________________
The NEW Jenner and Fooman Tool

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Resourcetree XML file

Post by Zimoon » Mon Jul 14, 2008 7:19 am

panino76 wrote:Bilal gas Inert gas: why this resource is listed in this way? I'm pretty sure I've some gas in my storage, and I'm pretty sure it's listed "bilal inert gas" only. This is causing my tool to crash...
Read the first post in this thread once again, second last paragraph, starting: "In the file some resource classes names ..." ;)

Remember that quite a few resource classes exist with different names at different locations in SWG, an inconsistency or anomaly, yes.

Also, read the bottommost comment in the XML file itself.

/Zimoon

User avatar
panino76
Intermediate Crafter
Posts: 184
Joined: Mon May 19, 2008 1:26 pm
Location: Italy

Re: Resourcetree XML file

Post by panino76 » Mon Jul 14, 2008 10:22 am

Zimoon wrote:
panino76 wrote:Bilal gas Inert gas: why this resource is listed in this way? I'm pretty sure I've some gas in my storage, and I'm pretty sure it's listed "bilal inert gas" only. This is causing my tool to crash...
Read the first post in this thread once again, second last paragraph, starting: "Some resource classes may have funny names in the file, if so ..." ;)

Remember that quite a few resource classes exist with different names at different locations in SWG, an inconsistency or anomaly, yes.

Also, read the bottommost comment in the XML file itself.

/Zimoon
Ok, got it. Now my question is: if I download the current resource file from this site, if there's a bilal gas in spawn (or any other resource with funny name) will this be reported in the csv file with the same name I get from resourcetree2.xml?

Thanks for your time Zim.

Artax Wavingwalker
__________________________________________
The NEW Jenner and Fooman Tool

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Resourcetree XML file

Post by Zimoon » Mon Jul 14, 2008 1:24 pm

I am not sure actually but I always use the SWGCraft type ID.

/Zimoon

User avatar
panino76
Intermediate Crafter
Posts: 184
Joined: Mon May 19, 2008 1:26 pm
Location: Italy

Re: Resourcetree XML file

Post by panino76 » Mon Jul 14, 2008 2:22 pm

Zimoon wrote:I am not sure actually but I always use the SWGCraft type ID.

/Zimoon
Uhm...have to ask to sabuno....changing they way the tool works now would be a deep change.

Artax Wavingwalker
__________________________________________
The NEW Jenner and Fooman Tool

User avatar
Sobuno
Developer
Posts: 2589
Joined: Sun Mar 25, 2007 2:17 am
Contact:

Re: Resourcetree XML file

Post by Sobuno » Sat Jul 26, 2008 12:51 pm

We're trying to stay consistent with the resourcetree2.xml file to allow for parsing of ISD mails. So yes, they should have the same name. It would still be better to rely on ID numbers/names as they (should) never change.

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Resourcetree XML file

Post by Zimoon » Sat Sep 27, 2008 4:22 pm

I have just added the optional attribute JTL="yes" to JTL resources in the file resourcetree2.XML.

Will be useful in applications, such as SWGAide, that have features to differ between resource types ;)

/Zimoon

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Resourcetree XML file

Post by Zimoon » Sun Oct 26, 2008 9:19 am

A few days ago I added the optional attribute

spawnable="yes"

to each resource that actually can spawn in the worlds. For creature resources that means, 'spawn naturally' since even though they cannot "spawn" they can be read and claimed by the 30k resource deed.

Since the attribute is optional there is no opposite, spawnable="no", since it is understood from its absence.

Should you find any errors, please report them.

/Zimoon

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Resourcetree XML file

Post by Zimoon » Fri Nov 28, 2008 7:25 pm

Zimoon wrote:A few days ago I added the optional attribute

spawnable="yes"

to each resource that actually can spawn in the worlds. For creature resources that means, 'spawn naturally' since even though they cannot "spawn" they can be read and claimed by the 30k resource deed.

Since the attribute is optional there is no opposite, spawnable="no", since it is understood from its absence.

Should you find any errors, please report them.

/Zimoon
This attribute is removed. Everything that is a "leaf" in the tree of resource can spawn in the worlds, except that some creature resources is not possible to be harvested naturally. Hence, any application using this file should treat "leafs" as spawnable, except if harvested="no".

/Zimoon

User avatar
Zimoon
Forum Moderator
Posts: 4817
Joined: Mon May 14, 2007 6:55 am
Location: Stockholm, SE
Contact:

Re: Resourcetree XML file

Post by Zimoon » Fri Nov 28, 2008 7:27 pm

In another report Belisama says that there is no Egg at Mustafar nor Kashyyyk. If that is so I will instantly edit the resourcetree.xml.

I also wonder if it is possible to harvest any kind of Seafood at Mustafar, is it? Fisk by fishing with a pole, mollusk/Crustacean with the device?

Please, if you feel for it, verify that the harvested="yes/no" is correct for the creature resources in the XML file.

/Zimoon

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests