XML Nit-pick

Post ideas & suggestions you have pertaining to the game here.
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Posted on UTF first :?

I've coded up a little Java app to import the XML from the main file and all the modules. In the end, I hope I can auto-generate all the shield, weapon, item and ship tables for the library link. That said, Java is very picky about its XML. However, only two of the XML files crashed the parser, PointJuno.xml for a case-senstive error (<orbitals> ... </Orbitals>) and CommonwealthFleet.xml for an ampersand error (&#0x96 should be &#x96).

Any chance we can get those tweaked for the next release?
User avatar
bimbel
Militia Lieutenant
Militia Lieutenant
Posts: 181
Joined: Wed Jul 05, 2006 8:22 am
Location: Germany
Contact:

I would like to have a copy of the data and maybe also a look at the java-source(never came to learn Java yet) and please everything mysql conform ;)

For the errors simply change them and save the xml! And then parse them again ;)
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Never worked with mySQL, but I will look into it. That is the good part about Java, if the data goes in correctly, you can get it back out in any format you need.

So far I have only imported the data from the main xml and all of the modules, and then merged it into one master Document object for easy handling. I haven't decided on how to print the results yet.

I was asking for the changes because if I did provide the source, those two errors would cause headaches to anyone trying to use it.
User avatar
bimbel
Militia Lieutenant
Militia Lieutenant
Posts: 181
Joined: Wed Jul 05, 2006 8:22 am
Location: Germany
Contact:

If you publish it it's right that the errors should be fixed.
For mysql I just need the data in a .txt in any format

eg.

Code: Select all

name1#description1#type1#cost1
name2#description2#type2#cost2
Each line is one item and the item-data is divided by #'s (or other special characters which aren't used in the xml-data)

I already have a basic data but I used TransData which does not give all the wished data back!
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Here's a sample. Any particular fields that you want? Weapons and ammo will be a little tricky though. Mind the line breaks...

Code: Select all

UNID#name#level#value#mass#frequency
itAblativeArmorCoating#barrel of ablative armor coating#1#40#1000#uncommon
itAmmoBoxAkan30#Akan 30 ammunition box#4#1000#2500#uncommon
itAmmoBoxStrelka1#White Strelka ammunition box#5#2000#2500#common
itAmmoBoxMAG#Cluster MAG ammunition box#6#1250#2500#common
itAmmoBoxThermo#thermo cannon ammunition box#7#1250#2500#uncommon
itAmmoBoxStrelka2#Red Strelka ammunition box#8#4000#2500#uncommon
itAmmoBoxContraband#Contraband ammunition box#6#3000#2500#uncommon
itAmmoBoxRadioactive#contaminated ammunition box#5#0#2500#uncommon
itAmmoBoxParalysis#booby-trapped ammunition box#7#0#2500#uncommon
itLargeArmorPatch#large armor patch#3#75#3000#common
itSmallArmorPatch#small armor patch#1#25#1000#common
itSiliconArmorPatch#barrel of armor repair paste#1#50#1000#common
itAutoSentinel#AutoSentinel®#3#490#1000#common
it300DDefenderAuton#300D defender auton#4#2000#1000#rare
it310AAegisAuton#310A aegis auton#4#2500#1000#rare
itMuleAuton#330M mule auton#4#2500#5000#rare
User avatar
bimbel
Militia Lieutenant
Militia Lieutenant
Posts: 181
Joined: Wed Jul 05, 2006 8:22 am
Location: Germany
Contact:

Hmmm nice :) I think that I would need different tables with different fields!

for misc items (such as ammo boxes, autons, barrels, roms,...)
UNID, name, level, value, mass, frequency, modifiers, description

for weapons, armor and shields I would need the same and additional info from that three tags

<shield/>
hitPoints, absorbAdj, damageAdj, regenTime, regenHP, depletionDelay, powerUse,

<armor/>
hitPoints, damageAdj, repairTech, repairCost, installCost, composition

<weapon/>
type, omnidirectional, damage, fireRate, lifetime, powerUse, beamType,

so 4 tables at all
but I'm not sure if that fields are all existing/important ones (if some field eg omni is empty it can be clear eg. '1250##common')
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Okay, all set.

You can find the processed files:

Here

Let me know if you have any problems. The weapon file is still a little sparse as I haven't burrowed into the lower tags for ammo and fragments.
User avatar
bimbel
Militia Lieutenant
Militia Lieutenant
Posts: 181
Joined: Wed Jul 05, 2006 8:22 am
Location: Germany
Contact:

yay :) that's what I've been waiting for. I will get this data in a manageable form soon :)
Thanks!
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

No problem.

Anyone have any other requests while I am still working on it?

Currently, I am trying to generate a list of all the places an item could be found, i.e. a targeting rom can be found at a CW station, anarchists gathering, etc.
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Alright, I have a listing of every location, every item can turn up, along with who and what equips it. for example:
itLightPlasteelPlate: segment of light plasteel armor
Stations
stAbbasidOutpost
stAbbasidOutpost
stAnarchistCell
stAnarchistGathering
stAnarchistGatheringSat
stAnarchistSettlement
stCentauriStronghold
stHeliotropeColony
stHeliotropeOutpost
stHimalRefuge
stHimalRefuge
stOutlawConvoyEncounter
stOutlawBase
stOutlawBase2
stOutlawHaven
stSalvagerEncounter
stShipwreck1
stShipwreck2
stShipwreck3
stRadioactiveShipwreck
stTerroristCamp
stTerroristCompound
stTinkerGathering
stCharonPirateFortress
stCharonPirateOutpost
stCharonPirateOutpost2
stCharonPirateOutpost2a
stCharonPirateOutpost3
stAgriculturalStation
stCommonwealthColony
stCommonwealthStation
stStartonEridani
stArmorDealer
stDwargColony
stDwargGathering
stDwargGatheringSat
stAsteroidMineTitanium
stAsteroidMinePalladium
stAsteroidMineCeralloy
stAsteroidMineDuralloy
stSistersOfDomina
stSungSlaveCamp
stSungFortress
stUrakOutpost
stUrakMine
stUrakFortress
Ships
scCentauriCommandShip
scHeliotropeGunship
scMarauderRaidPlatform
scWolfen
scWolfenPlayer
scUrakDestroyer
itPolymeshArmor: segment of polymesh armor
Stations
stAbbasidOutpost
stAnarchistCell
stAnarchistGathering
stAnarchistGatheringSat
stAnarchistSettlement
stCentauriStronghold
stHeliotropeColony
stHeliotropeOutpost
stHimalRefuge
stOutlawConvoyEncounter
stOutlawBase
stOutlawBase2
stOutlawHaven
stSalvagerEncounter
stShipwreck1
stShipwreck2
stShipwreck3
stRadioactiveShipwreck
stTerroristCamp
stTerroristCompound
stTinkerGathering
stCharonPirateFortress
stCharonPirateOutpost
stCharonPirateOutpost2
stCharonPirateOutpost2a
stCharonPirateOutpost3
stArmorDealer
stDwargColony
stDwargGathering
stDwargGatheringSat
stAsteroidMineTitanium
stAsteroidMinePalladium
stAsteroidMineCeralloy
stAsteroidMineDuralloy
stSistersOfDomina
stSungSlaveCamp
stSungFortress
stUrakOutpost
stUrakMine
stUrakFortress
Ships
scMarauderRaidPlatform
scUrakDestroyer
Any want a copy? It comes in any format you can explain in 30 words or less :wink:
Ralen
Anarchist
Anarchist
Posts: 8
Joined: Tue Aug 15, 2006 11:44 pm

how about an item description?
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

a cool tool to have is something that would calculate how many shots it would take to take a given shield down with a given weapon. (factoring in regen, and randomness of weapon attacks)
Crying is not a proper retort!
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Betelgeuse wrote:a cool tool to have is something that would calculate how many shots it would take to take a given shield down with a given weapon. (factoring in regen, and randomness of weapon attacks)
Easy enough I guess. HERE is a listing of all of the shields tested against all of the games weapons with the average, standard deviation, max and min times the sides took to fall. Each test done 300 times and the shield "held" if it lasted for 1000 ticks (16 2/3 seconds). I used the basic weapon, 25% enhanced and 100% enhanced for the tests. The formatting is a little rough, but you can eiither replace all "#" with " " in the text file or copy to excel and use "text to columns" to read it easier.
User avatar
Karl
Militia Lieutenant
Militia Lieutenant
Posts: 219
Joined: Fri Jul 14, 2006 11:47 pm

Sorry to nit-pick your nit-pick, but making your parser ignore cases on incoming data like XML tags is very easy and your parser shouldn't be crashing due to it.

That being said, what your doing is very cool and important. An item data extractor makes making strategy guides tremendously easier.
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Actually, the XML standard calls that tags should match, and I am just using one of JAVA's built in parsers. No reason not to use best practices, right?
Post Reply