X2 Editor is program for editing files used by the game X²: The Threat.
The primal reason for creating of X2 Editor will be probably well known by X2 modders: doubleshadow wanted to be able to add a second gun to his Split Dragon.
Of course little was known about X2 modding back that time. Basic assumption was that something has to changed in TShips.txt in order to achieve this.
At that time ShadowTech posted first coherent explanation of the TShips structure on Egosoft forums . The structure seemed to be easy enough to be able to process it via a program of some kind and so doubleshadow was searching for such tool all over the various X2 related forums. To his surprise there was not such program. Although still convinced that there surely must be some program already done, he started to write the first version of what later will be known as X2 TXT Editor.
The very first version was done within a day but it was clear that the TShips structure is not as trivial as it seemed at the beginning. The reason was because records in TShips can have different length which makes them unique among all other T files.
By method of trial and error, doubleshadow was able to figure out how to properly read the record and to correctly identify the blocks inside TShips record.
Once the TShips were decoded, doubleshadow decided to also add support for other T files as they all had fixed record length and thus easy to add.
It is no longer clear whether the support for text resource files were present in the first public version or not. It is not clear which version really was the first publicly released. The oldest preserved version is 0.0.8 which is also the first mentioned version in the X2 Editor changelog file. But the changelog also states: (almost) first version released.
The first person to obtain the X2 TXT Editor was Commander Jamieson (CJ). Doubleshadow was wery timid back then, as it was his first program to be released on the Internet, and so he wanted someone to try it first. CJ was also running The Commander's Space Station  where doubleshadow hoped to release his program.
The program was finally released at The Commander's Space Station and X Scripting .
Later more and more functionality was added, resulting in renaming X2 TXT Editor to X2 Editor. Doubleshadow also started his own website http://www.doubleshadow.wz.cz. This was at least as tricky as designing the editor itself, as again doubleshadow didn't have any experience with web pages (although he was familiar with html).
Support for catalogs and packed files
One thing that was disturbing about using X2 Editor was the need to have all the files extracted from catalogs and unpacked to plain text format. This was especially problem for newbies to modding, as they didn't know how to do this.
It is no longer clear why exactly doubleshadow decided to try to add support for catalogs to his X2 Editor, but he contacted Laga Mahesa (aka Stone-D), who was the author of the X2Patch. He explained to Stone-D his intentions and asked him for help (read: source codes). He was very unsure about that, but to his surprise Stone-D responded positively and sent him fragments of his assembler source codes for extracting of catalogs and unpacking of packed files.
Along with further explanation provided in following e-mails, doubleshadow was able write X2 FileDriver - a library for transparent access to catalogs and packed files.
This was a huge step, as from that time, users were not required to unpack their game files in order to be able to use X2 Editor.
The original content of this article was imported from DeadlyDa and doubleshadow's X-Wiki.