View unanswered posts | View active topics It is currently Mon Apr 20, 2026 12:03 am



Reply to topic  [ 5 posts ] 
 RFC Changes to the "unofficial" TWX v2 xml protocol 
Author Message
Lieutenant J.G.
User avatar

Joined: Sun Mar 13, 2005 3:00 am
Posts: 387
Location: USA
Unread post RFC Changes to the "unofficial" TWX v2 xml protocol
Attached find a fragment that I extracted from the "unofficial"* TWX V2 XML spec that I have been working on.

I am requesting comments for additions and exclusions to this format

Some of the changes I have made are
Changed the Sector.nr, Sector.Warps, Sector.Updated Fields and replaced it with the Index,Warps,Updated attributes
Changed the Port Class and Port Updated to also be attributes.

Here is a snippet of an XML file dump of a sector using the bits and pieces I grabbed from the XML spec.

<SectorData version="1.0">
<Sector Index="6415" Warps="1" Updated="12/18/2009 10:15:17 AM">
<Space>uncharted space.</Space>
<Beacon>A Gang of Hermits</Beacon>
<NavHaz>0</NavHaz>
<Anomaly>false</Anomaly>
<Explored>Holographic</Explored>
<Density>16801214</Density>
<Warps>
<Warp>13181</Warp>
</Warps>
<Port Updated="12/17/2009 9:57:52 AM" Class="2">
<Name>Jundland Annex</Name>
<UnderConstruction Finished="0"/>
<FuelOre>
<Buyer>true</Buyer>
<Amount>25010</Amount>
<Percentage>100</Percentage>
</FuelOre>
<Organics>
<Buyer>false</Buyer>
<Amount>4860</Amount>
<Percentage>100</Percentage>
</Organics>
<Equipment>
<Buyer>true</Buyer>
<Amount>4750</Amount>
<Percentage>7</Percentage>
</Equipment>
</Port>
<ArmidMines>
<Amount>150</Amount>
<Owner Corp="True"/>
</ArmidMines>
<LimpetMines>
<Amount>150</Amount>
<Owner Corp="True"/>
</LimpetMines>
<Fighters>
<Amount>3360000</Amount>
<Owner Corp="True"/>
<Type>Defensive</Type>
</Fighters>
<Planets>
<Planet1>&lt;&lt;&lt;&lt; (E) Ascian Wanderer Homeworld &gt;&gt;&gt;&gt; </Planet1>
<Planet2>&lt;&lt;&lt;&lt; (E) Ferrengal &gt;&gt;&gt;&gt; (Shielded)</Planet2>
<Planet3>&lt;&lt;&lt;&lt; (E) . &gt;&gt;&gt;&gt; (Shielded)</Planet3>
</Planets>
<Traders>
<Trader1>
<Name>Private Maniac</Name>
<ShipName>.</ShipName>
<ShipType>Animoso Standard Issue</ShipType>
<Figs>8000</Figs>
</Trader1>
</Traders>
<Ships>
<Ship1>
<ShipName>.</ShipName>
<ShipType>Unknown Ascian Boat of Humility</ShipType>
<Owner>Scott</Owner>
<Figs>279999</Figs>
</Ship1>
<Ship2>
<ShipName>Iheex Chajocith</ShipName>
<ShipType>Unknown Subterfuge Mantis</ShipType>
<Owner>Scott</Owner>
<Figs>210000</Figs>
</Ship2>
<Ship3>
<ShipName>Uziel Xathiqum</ShipName>
<ShipType>Unknown Subterfuge Enterra</ShipType>
<Owner>Scott</Owner>
<Figs>139985</Figs>
</Ship3>
</Ships>
</Sector>
</SectorData>

* I say unofficial because the co-authors Earth,Stein & Macahan are AWOL. I would be glad to discuss this with them if they ever decide
to resume development.

After 2 days posted and no response I am going to commit my code in the Maniac branch

At this point I really don't give a rats Butt whether this is compatable with anything else. Heh the source is open UNLIKE anything else on the market right now that might need access to the twx proxy database.

As far as using this for saving and restoring databases it is gonna need some improvements as it takes forever to save 20K sectors.
Part of this is because XML is more verbose than we need... who needs opening and closing braces/ <Start of Data> ....</Start of Data>.


Couple ideas to add to this lame thread.

Setting a bunch of attributes attached to the Sector could save a whole bunch of chars.
We have some duplicated information that we could consolidate into attributes

12/28/09 Update 20K sector save takes roughly 7 minutes and make a file about 8-9MB in size
Swath's version 2 twx save takes about 3 minutes and is about same amount in size.
Memory footprint from olderversion was about 1G in size this version around 700MB
IMHO still too large.


Attachments:
File comment: Fragment of the XML spec for TWXProxy
TWX-XML.rar [780 Bytes]
Downloaded 413 times

_________________
Find out just what any people will quietly submit to and you have the exact measure of the injustice and wrong which will be imposed on them. Frederick Douglas


Last edited by Maniac on Fri Jan 08, 2010 8:04 pm, edited 1 time in total.

Tue Dec 22, 2009 3:28 pm
Profile ICQ
Ambassador
User avatar

Joined: Fri Feb 23, 2001 3:00 am
Posts: 331
Location: USA
Unread post Re: RFC Changes to the "unofficial" TWX v2 xml protocol
never change a existing format without buy in from all authors. just make version 3 that you plan on supporting.
earth.

_________________
ATTAC TCP/IP Helper
http://www.tw-attac.com

TWXSync Server (realtime data synchronization)
http://www.tw-attac.com/twxsync.html


Fri Jan 08, 2010 12:41 am
Profile ICQ WWW
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post Re: RFC Changes to the "unofficial" TWX v2 xml protocol
Thanks E.
I am sure Maniac (an actual contributing member of the community) will say "how high" when you say jump.

_________________
Coconut Telegraph (ICQ)#586137616
Team Speak3@ 220.244.125.70:9987
Founding Member -=[Team Kraaken]=- Winner of Gridwars 2010 - Ka Pla
Image
Jesus wounldn't Subspace Crawl


Fri Jan 08, 2010 7:15 pm
Profile ICQ YIM
Lieutenant J.G.
User avatar

Joined: Sun Mar 13, 2005 3:00 am
Posts: 387
Location: USA
Unread post Re: RFC Changes to the "unofficial" TWX v2 xml protocol
Thanks for the feedback folks.

I see that there is exactly 1 person that has a problem with me trying to implement an XML representation of the
TWX Database.

Earth I do appreciate you and the Swath team's effort in trying to establish a "standard" TWX protocol.

The original purpose of this post was a request for comments (I.E. the meaning of RFC) that some changes be made.

You are on record that I should keep the original version which I will. But unless I get some feedback on which way the community (not just earth) wants to go then I will do as you say.
I will implement a Version 3 of the TWX protocol instead of trying to expand the V2 protocol (Which I might add is NOT a protocol that TWXProxy currently or has ever supported)

As TWXProxy is Open source and free as in beer and SWATH and Attac are not I will use what ever protocol I want to
and I will document what changes I am considering and I will publicly open up my code to review for any comments, flames,
bugs that maybe some one else that hasn't gotten "tunnel" vision can see that the programmer can't.

I would like to make the implementation compatable with swath and attac but with them being closed source I don't see any way that I could make it work.

Part of the problems are going to be Version 2 of the protocol
saves information from the CLV screen which is not saved in the TWXProxy Database
Also saves information from the planet (shields, collies,product,figs and more) which TWXProxy currently does not implement.

It is hard not being the original author of TWXProxy and understanding why Xide/Elder/Whoever went that direction and why they chose to use that particular function or why they implemented this thing or that thing.

I was only trying to XML'ize the data in the database not all data in the game.
For a "scripting host and a database" (which IMHO is all TWXProxy is and without some major overhauling of the code it is not going to progress much farther)
I am not a professional programmer nor would I like to be one in real life but I can read and understand what the code is doing, Understanding why the programmer chose that particular algorithm or that data structure is what I struggle with.
I am doing what I can and if by chance I make someone's experience a little easier and or enjoyable then I guess what I am doing is a success.

I still have one more day of slaving ^H^H^H^H^H working this week so I will try and get some more documentation committed and start working on a new idea for multi-threading my XML generation functions early next week.

Thanks for listening to the rants of a senile old fart.

_________________
Find out just what any people will quietly submit to and you have the exact measure of the injustice and wrong which will be imposed on them. Frederick Douglas


Fri Jan 08, 2010 9:11 pm
Profile ICQ
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: RFC Changes to the "unofficial" TWX v2 xml protocol
Maniac wrote:
I will implement a Version 3 of the TWX protocol instead of trying to expand the V2 protocol (Which I might add is NOT a protocol that TWXProxy currently or has ever supported)


Not considering the community-think approach, thinking about this tho I can see where it'd be confusing. I mean ppl might see "oh, it's version 2 here,
and version 2 there... so uhm... they should work right? Oh there's an expanded version of version 2... and uhm..."

Might make it confusing for ppl. So maybe just calling to version 3 is a better approach.

Maniac wrote:
Also saves information from the planet (shields, collies,product,figs and more) which TWXProxy currently does not implement.


You could just return 0 or null for information not contained. Easy to check for that in a routine.

Maniac wrote:
I was only trying to XML'ize the data in the database not all data in the game.


Then just fork the concept and implement that instead. Screw "version 2" or "version 3" ... Just call it "TWXProxy XML format v1.0"

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Fri Jan 08, 2010 9:20 pm
Profile ICQ WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.