Errors 101: A Tutorial on Resolving Errors

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Post Reply
User avatar
Darth Saber
Militia Commander
Militia Commander
Posts: 290
Joined: Mon Aug 04, 2008 4:53 pm
Location: Korriban

Errors 101: A Tutorial on the Resolving of Errors by Darth Saber
It has been requested by Little Modder, that I create a tutorial on how to fix errors. Having received many errors in the course of my modding experiance, I shall endeavor to explain the errors which I have come across. I shall place my comments in {brackets}. For the purpose of this tutorial, I shall be using code from a solar cruiser mod. Let us begin:

Opening and Closing Tag Errors
Opening and closing tags begin and end a block of information, function, or code. It is therefore vital to the sucess of your mod, that these been entered properly. Here Are some examples from a real playership mod:

1.) Opening and closing tags, in the ENTITY block:

In the ENTITY block:
[ {This is an opening tag.}

<!ENTITY unidExtension "0xYOURUNID"> {The "<!ENTITY" is an opening tag. The "> found at the end is the closing tag.}
<!ENTITY scSolarcruiser "0xYOURUNID">
<!ENTITY rsSolarcruiserShields "0xYOURUNID">
<!ENTITY rsEI100XArmor "0x0000F00B">
]> {This is a closing tag.}

In the image blocks:
{ In the image blocks below, the "<" is an opening tag and the "/>" is the closing tag.}

<Image UNID="&scSolarcruiser;" bitmap="solarcruisership.jpg" bitmask="solarcruisermask.bmp" backColor="0x00000000"/>
<Image UNID="&rsSolarcruiserShields;" bitmap="solarcruisershield.bmp" backColor="0x00000000"/>

In the armor block:
"<Armor>" {This is an opening tag.}
<ArmorSection start="315" span="90" armorID="&itSolarArmor;" areaSet="0,2" />
{This is a opening tag.} <ArmorSection start="225" span="90" armorID="&itSolarArmor;" areaSet="3,4" /> {This is a closing tag.}
<ArmorSection start="135" span="90" armorID="&itSolarArmor;" areaSet="1,6" />
<ArmorSection start="45" span="90" armorID="&itSolarArmor;" areaSet="7,13" />
</Armor> {This is the closing tag.}

The following are also opening and closing tags:
<ShieldDisplay> </ShieldDisplay>
<Armor> </Armor>
<Items> </Items>
<PlayerSettings </PlayerSettings>
<ShipClass UNID= </ShipClass>

When you receive an "Opening tag does not match closing tag" or "Closing tag does not match opening tag" errors, carefully check the tags in you xml.

2.) Unable to add image to library: "0"
Check to make sure that the names if your image files in the xml are exactly the same names as the actual files in the "extensions" folder. Please note the just about the only types of image files which Transcendence accepts are: *.bmp, and *.jpg / jpeg. Bitmaps should be done in either *jpeg or *.bmp format, while the bitmask should be done in monocrome / grayscale, in the *.bmp format. In monocrome, the color "black" is truly black, but in 16, 24, or 32 bit color, several shades of color are used to make "black." Thus the problem which I had in seeing little black specs surrounding my ship whenever it flew over a planet, or near a sun. By rendering my bitmasks in monocrome, I no longer have that problem. Alos check to make sure that your image codes are in the correct layout. Looking at other mods and comparing their codes to yours can go a long way in making sure that your codes are accurate.

3. Content Expected
A. In transcendence xml codes, certain "elements" (devices and items) begin and end with " ". If you receive this error, carefully check to ensure that the " are where they are supposed to be, and that there are no spaces.

For example:
Correct: <Item count="77d20" item="&itHelium3FuelRod;"/> {This is correct - no spaces in the element: "&itHelium3FuelRod;"}
Incorrect <Item count="77d20" item=" &itHelium3FuelRod;"/> {notice the space between (item=") and (&itHelium3FuelRod;"/>)}
Incorrect <Item count="77d20" item="&itHelium3 FuelRod;"/> {see the space between (&itHelium3) and (FuelRod;"/>)}

4. Invalid UNID
In the Transcendence.xml file, found in the "Resource" folder, there is a section designed to help modders create UNIDS, among other things. I have included part of that instruction here:
UNID Namespace


D Domain. This can be one of the following:

0-9 Reserved for Transcendence
A-C Registered extensions (contact [email protected])
D Unregistered extensions (pick a random module ID)
E Unregistered extensions (pick a random module ID)
F Reserved (do not use)

MMM Module ID. Registered extensions are assigned a single
module ID to use for UNIDs. Unregistered extensions should
use a random module ID (it is up to the user to manage
unregistered extensions).

The following Transcendence modules for domain 0 are defined:

000 Core objects (star systems, basic items, sovereigns, etc.)
00F Debris
010 Commonwealth
014 Battle Arena
015 Corporate Hierarchy
016 Charon Pirates
017 Black Market
018 Sisters of Domina
019 Sung Slavers
01A Commonwealth Fleet
01B Ares Orthodoxy
01C Iocrym
01D Ringers
01E Elysium
01F Teratons
020 Domina
030 Oracus
801 Misc Fire Encounters
802 Misc Water Encounters
803 Misc Air Encounters
804 Misc Earth Encounters

T Type ID. Within a module, the division of the namespace is
undefined. Transcendence uses this value to represent the
type of object assigned an UNID:

0 star system description
1 sovereigns
2 station types
3 ship classes
4 item types
5 special item types (virtuals)

8 random tables (items, encounters)
9 effects, energy fields, space env, etc
A dock screens
B powers

F images and sound resources

III ID. This can be any value unique within the module and type ID.
This is generally a monotonically increasing number.


To create a player ship extension, the ship class can be given an UNID


D places this UNID in the unregistered extensions section.
1A1 is a random number chosen by the extension creator.
3 is for ship classes.
001 is the first ship class.
Now for my personal UNID, I chose: "0xD1024001"
This means:
D - Domain - {At the Time I chose this UNID, it was unregistered; now it is registered.}
102 - {My Transcendence Module (mod) number}
4 - {Item Type ID}
001 - {This is the unique value for this mod.}

When you receive an "Unvalid UNID" error, make sure that your UNID is exactly 10 character long. Transcendence will not accept UNIDs with 9 or 11; only those with 10 are acceptable player UNIDs.

5. Attribute Expected
In creating my "Ion Control" module, I received the following error:

"Error parsing Extensions\Ion Control: Unable to parse Ion Control.xml: Line(25): attribute value expected"

To fix this problem, I checked line 25, and found that I had left out a " in the line:

{Line 25} type= missile"

As you will notice, the " is missing in front of the word (missile"). To correct this error, I simply added the ". Now it looks like this:

type= "missile"

The attribute errors which I have had in the past were because I had felt out a " somewhere in the code. When you are faced with this problem, check the debug file, found in the main Transcendence folder, and use the "ctrl + End" keys together; this will send you to the bottom of the file. Once there, you should see the error message. Next open the mod file, and beginning at the topmost line, count down to the line specified in the error code. Check very carefully, and you should see where a " or two may have been left out of the code.
Well, these are the errors which I have discovered, and been able to resolve in my own mods. If you have any further questions, or problems, post on the official Transcendence forums, and someone will be sure to help you; mabey even I... This concludes my tutorial on errors and their correction. I hope that I have been able to help you, adn good luck modding. - Darth Saber ([email protected]).
User avatar
Fleet Admiral
Fleet Admiral
Posts: 2619
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

ohhh, nice !
can you rewrite it to make a list of known common errors ?
This is going to be useful.
User avatar
Darth Saber
Militia Commander
Militia Commander
Posts: 290
Joined: Mon Aug 04, 2008 4:53 pm
Location: Korriban

How do do want it digdug? I can list it like this, if you prefer:

Error -----------------------------Cause------------------------Remedy-----------

Attribute expected ~~~~~~~~ Missing " ~~~~~~Find the missing " & add it

User avatar
Fleet Admiral
Fleet Admiral
Posts: 2619
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

yeah, any formatting is good.
I just thought that it would be cool to have a list of common errors that modder can encounter. :D
User avatar
Darth Saber
Militia Commander
Militia Commander
Posts: 290
Joined: Mon Aug 04, 2008 4:53 pm
Location: Korriban

The information on the errors which I have found and posted in my Errors 101, was pretty much what I know about the common errors that any modder can run into. If you are sure that you want me to repeat myself, then I will compile a list as soon as I can; otherwise they could refer to my tutorial. I will need to know if you are certain though; and if you have run across any errors which I have not, and how you resolved them. 8)
User avatar
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

I think this is a very nice resource, and also well written.

I would suggest that this should go on the wiki, so it is easy to expand on certain errors, or come up with more precise information on what is causing a particular error. (at least i think we have a wiki ;) )

Again, well done...

Post Reply