oDrop XMLGEN (generates item-related structure class etc.)
Posted: Mon Nov 14, 2011 9:58 pm
Hi there,
I'm working on some item management system and during this I had come across a lot of trouble.
While analyzing the structure of recipes was easy (due to the awesome XSD - big thanks!), analyzing skills was tougher. But it was the most difficult to analyze item-related XMLs (since my application is supposed to read all skills, items and recipes XML files to be able to query data from it).
oDrop XMLGen can do the following:
- create a XML file with item-related additional information (additionalItemInformation.xml), which contains data read from client data files
- create ItemDTO, ArmorItemDTO, WeaponItemDTO and EtcItemDTO classes with every attribute those have throughout all the XML-files (ItemDTO contains the attributes that are common to Armor, Weapon and EtcItem)
- find a certain attribute and/or its value within the item-related XML-files
If you want to know what Armor had the attribute "soulshots", you could find it using:
'java -jar xmlgen.jar -g:"X:\ITEMSFOLDER" -i -attr:soulshots -type:Armor'
Btw. I think it's an accident that a Dark Crystal Helmet - Heavy Armor has this attribute...
Or if you would like to find a weapon which has a particular item-skill, you'd write something like this:
'java -jar xmlgen.jar -g:"X:\ITEMSFOLDER" -i -attr:item-skill -attrVal:3559-2 -type:Armor'
I didn't really document the tool much since I didn't think of publishing it. However: I found it very useful when working with item-XMLs and maybe you find it useful as well. I'll publish the source code as soon as I've polished it a little.
It makes use of JDOM for dealing with XML files.
For generating that additional information, make sure the decrypted txt files are in the folder you specify.
'java -jar xmlgen.jar -g:"X:\FOLDER" -t:"F:\temp\additionalItemInformation.xml"'
FOLDER has to have certain item-related files that you normally have in your client.
This additional information will be used by my application in order to show various descriptions and other stuff that is not present in the server item-related XML-files.
Anyway. I hope you'll find this tool useful. If you have questions, feel free to post them here.
Cheers!
EDIT: I added some java-docs and comments here and there and now the source code is available as well. Feel free to modify it as you see fit. I'd be happy to see the changes though if you make any.
I'm working on some item management system and during this I had come across a lot of trouble.
While analyzing the structure of recipes was easy (due to the awesome XSD - big thanks!), analyzing skills was tougher. But it was the most difficult to analyze item-related XMLs (since my application is supposed to read all skills, items and recipes XML files to be able to query data from it).
oDrop XMLGen can do the following:
- create a XML file with item-related additional information (additionalItemInformation.xml), which contains data read from client data files
- create ItemDTO, ArmorItemDTO, WeaponItemDTO and EtcItemDTO classes with every attribute those have throughout all the XML-files (ItemDTO contains the attributes that are common to Armor, Weapon and EtcItem)
- find a certain attribute and/or its value within the item-related XML-files
If you want to know what Armor had the attribute "soulshots", you could find it using:
'java -jar xmlgen.jar -g:"X:\ITEMSFOLDER" -i -attr:soulshots -type:Armor'
Btw. I think it's an accident that a Dark Crystal Helmet - Heavy Armor has this attribute...
Or if you would like to find a weapon which has a particular item-skill, you'd write something like this:
'java -jar xmlgen.jar -g:"X:\ITEMSFOLDER" -i -attr:item-skill -attrVal:3559-2 -type:Armor'
I didn't really document the tool much since I didn't think of publishing it. However: I found it very useful when working with item-XMLs and maybe you find it useful as well. I'll publish the source code as soon as I've polished it a little.
It makes use of JDOM for dealing with XML files.
For generating that additional information, make sure the decrypted txt files are in the folder you specify.
'java -jar xmlgen.jar -g:"X:\FOLDER" -t:"F:\temp\additionalItemInformation.xml"'
FOLDER has to have certain item-related files that you normally have in your client.
This additional information will be used by my application in order to show various descriptions and other stuff that is not present in the server item-related XML-files.
Anyway. I hope you'll find this tool useful. If you have questions, feel free to post them here.
Cheers!
EDIT: I added some java-docs and comments here and there and now the source code is available as well. Feel free to modify it as you see fit. I'd be happy to see the changes though if you make any.