TransCompiler Usage

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Post Reply
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 Multiverse is now an option for uploading mods, but there’s a catch: They have to be in TDB format. Fortunately, there’s a utility provided by George to create TDB files, called TransCompiler, which is included with the TransData utility. The ZIP archive for TransData can be found here. Once you have that, you’ve got what you need to make a TDB version of your mod.

 TransCompiler can be a bit of a finicky beast, much like Transcendence itself. The setup is the hardest part, but fortunately it only needs done once.

 Obviously, you’ll need to unzip the TransData.zip archive, but my suggestion is to not unzip the archive into the Transcendence folder. I’ll get into why momentarily. Unzip it into Downloads, Documents, your home folder, or somewhere like that; I recommend just using your home folder, and it’s what I’ll be using for this tutorial. It should decompress into a folder named TransData containing TransData.exe, TransCompiler.exe, and a README file. The next thing you should do is copy the Transcendence.tdb file from the Transcendence folder into the TransData folder. (I’ve had weird results with having multiple copies of Transcendence.tdb in the Transcendence folder, even when tucked into subfolders, which is why I suggested keeping the TransData folder elsewhere.) With that done, you’ve got the basic setup done.

 When you’re ready to make your mod into a Multiverse-ready TDB file, copy it and any files it needs into the TransData folder. This includes graphics, sounds, XML files, and the like. If any of the files used by the mod are in a folder, copy the folder over. Basically, you want to put a copy of the mod into the TransData folder in the same configuration as it would be in the Extensions folder.

 Open a command prompt window and type the following:

Code: Select all

cd Transdata
 You should see something like this:

Code: Select all

C:\Users\YOURNAME\TransData>_
 To create the TDB file, type:

Code: Select all

TransCompiler.exe /input:ModFilename.xml /output:ModFilename.tdb
 Everything should compile and give you a TDB version of your mod.
Troubleshooting

Code: Select all

error: Unable to open 'Transcendence.tdb': Unable to open file: Transcendence.tdb..
 This means you either did not make a copy of Transcendence.tdb in the TransData folder or you did not cd to the TransData folder before trying to run TransCompiler.

Code: Select all

ModFile.xml
   Graphic1.jpg
   Graphic1Mask.bmp
error : Unable to open 'Graphic2.jpg'.
   Sound1.wav

C:\Users\YOURNAME\TransData\ModFile.tdb - 1 error
 This means that a file used by your mod did not get copied into the TransData folder with the rest of your mod, or that it was not where TransCompiler expected it to be (possibly because it was in a different folder inside the Extensions folder). The TDB file compiled without it, but it will cause an error trying to use the mod in the game.

Code: Select all

error : Line(56): Invalid entity: unidName
 This will happen if your mod uses UNIDs not defined either in Transcendence.tdb or your mod. It means there’s either a typo in the mod or the mod relies on a UNID defined elsewhere (which, to be fair, I didn’t cover earlier). Try adding a copy of the file that defines those UNIDs to the TransData folder and adding “/entities:OtherFileName.xml” or “/entities:OtherFileName.tdb” to the TransCompiler command.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Thank you.
Stupid code. Do what I want, not what I typed in!
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Does it matter which version of Transcompiler.exe you use?

I tried the 1.7 and the 1.8a2 Transdata version and both worked on a mod for Version 1.7. Does Transcompiler.exe change over time like Transdata.exe or is it the same for every version? The file size varies.
Stupid code. Do what I want, not what I typed in!
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 I’ve wondered about that, myself, but never tried testing it. Just to be safe, I’d advise using whichever version of TransCompiler comes with the most recent version of TransData.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

i have tried this, my computer will not co-operate.
&& for such things as Living Minutes, there are multiple .xml involved.

We have a .bat file code that decompiles .tdb

Is there a way to have one that can compile?
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Hey, AP. I assume we can compile in Linux. What is the code for that? TIA.
Stupid code. Do what I want, not what I typed in!
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 Almost exactly the same, actually. The only real difference is on the third code block above:

Code: Select all

wine TransCompiler.exe /input:ModFilename.xml /output:ModFilename.tdb
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Success! Thank you.
Stupid code. Do what I want, not what I typed in!
Post Reply