UNID Override?

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
catfighter
Militia Commander
Militia Commander
Posts: 466
Joined: Fri Nov 08, 2013 5:17 am
Location: Laughing manically amidst the wreckage of the Iocrym fleet.

The Transcendence engine seems to be unable to tell the difference between UNIDs "0xD3100001" and "0xD3100009." Whenever I load both extensions, "0xD3100009" overrides "0xD3100001" and changes everything in saved games. It doesn't really do anything to the saved games, but initial classes from "0xD3100001" are replaced by initial classes from "0xD3100009."

This could be handy if I'm in a tight situation and I want to switch ships, but it gets pretty annoying if I want both ships in my game at the same time.

"0xD3100001" contains a warship, and "0xD3100009" contains a destroyer (both by Catfighter industries and each with their own special defenses and weapons). "0xD3100009" is a registered godmod, and "0xD3100001" is an unregistered part of larger mod.

Both xml files are below, though without gfx or sfx because of size/number limitations.

Code: Select all

<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
	<!ENTITY rsDoomsdayMachine			"0xD310D001">
	<!ENTITY rsDoomsdayMachineShields		"0xD310B608">
	<!ENTITY snStarDestroyer			"0xD310D001">
	<!ENTITY scDoomsdayMachine			"0xD310A003">
	<!ENTITY itDoomsdayRay				"0xD310B116">
	<!ENTITY itDarksteelSingularity			"0xD310B121">
	<!ENTITY itFelisCocoon				"0xD310B610">
	<!ENTITY it100MWReactor				"0x00004108">
	<!ENTITY itHexaCarbideArmor			"0x00004138">
	<!ENTITY itMilitaryID				"0x000040C7">
	<!ENTITY itXenotiteFuelRod			"0x0000417B">
]>

<TranscendenceExtension UNID="0xD3100009;" version="1.1">
<Image UNID="&rsDoomsdayMachine;" bitmap="redcruiser.jpg" bitmask="redcruisermask.bmp" backColor="0x00000000"/>
<Image UNID="&rsDoomsdayMachineShields;" bitmap="redcruisershield.bmp" backColor="0x00000000"/>
<Sound UNID="&snStarDestroyer;"	filename="stardestroyer.wav"/>

	<!-- Doomsday Ray -->

	<ItemType UNID="&itDoomsdayRay;"
			name=				"Doomsday Ray"
			level=				"12"
			value=				"500000"
			mass=				"10000"
			frequency=			"veryrare"
			attributes=			"EnergyWeapon; MajorItem"
			showReference=			"true"

			description=			"No ship can resist this fiendish ray of destruction for long."
			>

		<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>

		<Weapon
				type=				"beam"

				repeating=			"15"
				omnidirectional=	"true"
				damage=				"laser:100d10+1000"
				fireRate=			"30"
				lifetime=			"120"
				powerUse=			"200"

				sound=				"&snLaserCannon;"
				>
			<Effect>
				<Beam
						beamType=			"laser"
						primaryColor=		"0xff, 0x00, 0x00"
						secondaryColor=		"0xcc, 0x00, 0x00"
						/>
			</Effect>
		</Weapon>

	</ItemType>
	
	<!-- Darksteel Singularity Launcher -->

	<ItemType UNID="&itDarksteelSingularity;"
			name=				"Darksteel Singularity Launcher"
			level=				"12"
			value=				"5000000"
			mass=				"10000"
			frequency=			"notRandom"
			attributes=			"MajorItem"

			description=		"Catfighter Industries has harnessed the power of Domina to create a singularity out of Dark Steel."
			>

		<Image imageID="&rsItems1;" imageX="192" imageY="0" imageWidth="96" imageHeight="96"/>

		<Weapon
				type=				"missile"
				launcher=			"true"

				omnidirectional=	"true"
				damage=				"singularity:50d10; momentum5; WMD5"
				fireRate=			"60"
				missileSpeed=		"45"
				interaction=		"90"
				hitPoints=			"100"
				lifetime=			"67"
				powerUse=			"200"

				sound=				"&snStarDestroyer;"
				>

			<Effect>
				<Bolt
						length=				"48"
						width=				"8"
						primaryColor=		"0x99, 0x00, 0x00"
						secondaryColor=		"0x80, 0x00, 0x00"
						/>
			</Effect>
		</Weapon>

	</ItemType>

	<!-- Felis Cocoon -->

	<ItemType UNID="&itFelisCocoon;"
			name=				"Felis Cocoon"
			level=				"13"
			value=				"2000000"
			mass=				"10000"
			frequency=			"veryrare"
			attributes=			"MajorItem"

			description=		"The most powerful shields in existance will disapate all attacks."
			>

		<Image imageID="&rsItems1;" imageX="192" imageY="0" imageWidth="96" imageHeight="96"/>

		<Shields
				hitPoints=		"10000"
				regen=			"500"
				depletionDelay=	"240"
				powerUse=		"200"
				/>
	</ItemType>
	
		<!-- Doomsday Machine -->

	<ShipClass UNID="&scDoomsdayMachine;"
			manufacturer=		"Catfighter Industries"
			class=				"Doomsday Machine"
			type=				"dreadnought"
			score=				"1500"
			techOrder=			"mech"
			
			mass=				"50"
			maxReactorPower=	"500"
			maxReactorFuel=		"100000"
			cargoSpace=			"200"
			maxCargoSpace=		"200"
			thrust=				"150"
			maneuver=			"3"
			maxSpeed=			"20"
			maxArmor=			"500000"
			maxDevices=			"15"
			leavesWreck=		"100"
		>

	<Armor>
		<ArmorSection start="315" span="90" armorID="&itHexaCarbideArmor;" areaSet="0,2" />
		<ArmorSection start="225" span="90" armorID="&itHexaCarbideArmor;" areaSet="3,4" />
		<ArmorSection start="135" span="90" armorID="&itHexaCarbideArmor;" areaSet="1,6" />
		<ArmorSection start="45"  span="90" armorID="&itHexaCarbideArmor;" areaSet="7,13" />
	</Armor>

	<Devices>
		<Device deviceID="&itDoomsdayRay;" omnidirectional="true"/>
		<Device deviceID="&itDarksteelSingularity;" omnidirectional="true"/>
		<Device deviceID="&itFelisCocoon;"/>
		<Device deviceID="&it100MWReactor;"/>
	</Devices>

	<Items>
		<Item count="20d10" item="&itHeliumAssembly;"/>
		<Item count="20d10" item="&itXenotiteFuelRod;"/>
	</Items>

	<Image imageID="&rsDoomsdayMachine;" imageX="0" imageY="0" imageWidth="144" imageHeight="144" imageFrameCount="0" imageTicksPerFrame="0"/>

	<AISettings
		fireRateAdj=		"30"
		fireAccuracy=		"90"
		perception=			"4"
		/>

	<PlayerSettings
		desc=			"The Doomsday Machine shall destroy all."
		initialClass=		"true"
		startingCredits=	"5d100+2000"
		>

		<ArmorDisplay>		
			<ArmorSection name="forward"
					imageID="&rsWolfenArmor;" 
					imageX="0" imageY="0" imageWidth="52" imageHeight="15"
					destX="42" destY="19" hpX="55" hpY="18"
					nameY="8" nameBreakWidth="200" nameDestX="0" nameDestY="10" />

			<ArmorSection name="starboard"
					imageID="&rsWolfenArmor;" 
					imageX="75" imageY="0" imageWidth="23" imageHeight="69"
					destX="94" destY="34" hpX="97" hpY="60"
					nameY="30" nameBreakWidth="360" nameDestX="12" nameDestY="0" />

			<ArmorSection name="port"
					imageID="&rsWolfenArmor;" 
					imageX="52" imageY="0" imageWidth="23" imageHeight="69"
					destX="19" destY="34" hpX="13" hpY="60"
					nameY="52" nameBreakWidth="200" nameDestX="0" nameDestY="8" />

			<ArmorSection name="aft"
					imageID="&rsWolfenArmor;" 
					imageX="0" imageY="75" imageWidth="52" imageHeight="16"
					destX="42" destY="103" hpX="55" hpY="107"
					nameY="74" nameBreakWidth="360" nameDestX="12" nameDestY="0" />
		</ArmorDisplay>

		<ShieldDisplay>
			<Image imageID="&rsDoomsdayMachineShields;" imageX="0" imageY="0" imageWidth="136" imageHeight="136"/>
		</ShieldDisplay>

		<ReactorDisplay>
			<Image imageID="&rsZubrinReactor;" 
						imageX="0" imageY="0" imageWidth="256" imageHeight="60"/>

			<PowerLevelImage imageID="&rsZubrinReactor;"
						imageX="0" imageY="60" imageWidth="202" imageHeight="14"
						destX="54" destY="9"/>

			<FuelLevelImage imageID="&rsZubrinReactor;"
						imageX="0" imageY="74" imageWidth="194" imageHeight="14"
						destX="54" destY="37"/>

			<FuelLowLevelImage imageID="&rsZubrinReactor;"
						imageX="0" imageY="88" imageWidth="194" imageHeight="14"/>

			<ReactorText x="62" y="22" width="154" height="14"/>
			<PowerLevelText x="62" y="0" width="154" height="9"/>
			<FuelLevelText x="62" y="51" width="154" height="9"/>
		</ReactorDisplay>

	</PlayerSettings>

</ShipClass>
</TranscendenceExtension>

Code: Select all

<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
	<!ENTITY rsFelisDestroyer			"0xD310D001">
	<!ENTITY rsFelisDestroyerShields		"0xD310B608">
	<!ENTITY snStarDestroyer			"0xD310D001">
	<!ENTITY scFelisDestroyer			"0xD310A003">
	<!ENTITY itClawCannonIV				"0xD310B103">
	<!ENTITY itStarDestroyer			"0xD310B105">
	<!ENTITY itFelisVeil				"0xD310B609">
	<!ENTITY it100MWReactor				"0x00004108">
	<!ENTITY itHexaCarbideArmor			"0x00004138">
]>

<TranscendenceExtension UNID="0xD3100001;" version="1.1">
<Image UNID="&rsFelisDestroyer;" bitmap="felisdestroyer.jpg" bitmask="felisdestroyermask.bmp" backColor="0x00000000"/>
<Image UNID="&rsFelisDestroyerShields;" bitmap="felisdestroyershield.bmp" backColor="0x00000000"/>
<Sound UNID="&snStarDestroyer;"	filename="stardestroyer.wav"/>

	<!-- Claw Cannon Mark IV -->

	<ItemType UNID="&itClawCannonIV;"
			name=				"Claw Cannon Mark IV"
			level=				"4"
			value=				"1500"
			mass=				"4000"
			frequency=			"common"
			modifiers=			"EnergyWeapon; MajorItem"

			description=		"This Claw Cannon is a more powerful weapon that Catfighter Industries has manufactured to use a minimal amount of energy."

			sortName=			"Claw Cannon IV"
			>

		<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>

		<Weapon
				type=				"beam"

				damage=				"laser:5d8;"
				fireRate=			"15"
				lifetime=			"30"
				powerUse=			"40"

				beamType=			"HeavyBlaster"
				primaryColor=			"0x00, 0x80, 0xff"
				secondaryColor=			"0x80, 0xc0, 0xff"
				intensity=			"4"
				sound=				"&snLaserCannon;"
				>
			</Weapon>

		</ItemType>

	<!-- Star Destroyer -->

	<ItemType UNID="&itStarDestroyer;"
			name=				"Star Destroyer"
			level=				"5"
			value=				"5000"
			mass=				"6000"
			frequency=			"notRandom"
			attributes=			"MajorItem"

			description=		"The Star Destroyer is one of the most powerful mass drivers in existance; Catfighter Industries bids you to use it carefully and justly."
			>

		<Image imageID="&rsItems1;" imageX="192" imageY="0" imageWidth="96" imageHeight="96"/>

		<Weapon
				type=				"missile"
				launcher=			"true"

				damage=				"kinetic:15d8+10; momentum5; WMD5"
				fireRate=			"45"
				missileSpeed=			"45"
				interaction=			"90"
				hitPoints=			"10"
				lifetime=			"67"
				powerUse=			"160"

				sound=				"&snStarDestroyer;"
				>

			<Effect>
				<Bolt
						length=				"48"
						width=				"8"
						primaryColor=		"0xcd, 0xf3, 0xff"
						secondaryColor=		"0x8f, 0xa9, 0xb2"
						/>
			</Effect>
		</Weapon>

	</ItemType>

	<!-- Felis Veil -->

	<ItemType UNID="&itFelisVeil;"
			name=				"Felis Veil"
			level=				"6"
			value=				"200000"
			mass=				"10000"
			frequency=			"rare"
			attributes=			"MajorItem"

			description=		"This machine uses incredibly advance technology pirated from the Iocrym to stop all attacks."
			>

		<Image imageID="&rsItems1;" imageX="192" imageY="0" imageWidth="96" imageHeight="96"/>

		<Shields
				hitPoints=		"350"
				regen=			"50"
				depletionDelay=	"1500"
				powerUse=		"200"
				/>
	</ItemType>

	<!-- Felis Destroyer -->

	<ShipClass UNID="&scFelisDestroyer;"
			manufacturer=			"Catfighter Industries"
			class=				"Felis Destroyer"
			type=				"gunship"
			score=				"1500"
			techOrder=			"mech"
			
			mass=				"50"
			maxReactorPower=		"500"
			maxReactorFuel=			"100000"
			cargoSpace=			"200"
			maxCargoSpace=			"200"
			thrust=				"150"
			maneuver=			"3"
			maxSpeed=			"20"
			maxArmor=			"500000"
			maxDevices=			"11"
			leavesWreck=			"90"
		>

	<Armor>
		<ArmorSection start="315" span="90" armorID="&itHexaCarbideArmor;" areaSet="0,2" />
		<ArmorSection start="225" span="90" armorID="&itHexaCarbideArmor;" areaSet="3,4" />
		<ArmorSection start="135" span="90" armorID="&itHexaCarbideArmor;" areaSet="1,6" />
		<ArmorSection start="45"  span="90" armorID="&itHexaCarbideArmor;" areaSet="7,13" />
	</Armor>

	<Devices>
		<Device deviceID="&itClawCannonIV;" omnidirectional="true"/>
		<Device deviceID="&itStarDestroyer;"/>
		<Device deviceID="&itFelisVeil;"/>
		<Device deviceID="&it100MWReactor;"/>
	</Devices>

	<Items>
		<Item count="10d6" item="&itHelium3FuelRod;"/>
		<Item count="2d4" item="&itHeliumAssembly;"/>
	</Items>

	<Image imageID="&rsFelisDestroyer;" imageX="0" imageY="0" imageWidth="208" imageHeight="208" imageFrameCount="0" imageTicksPerFrame="0"/>

	<AISettings
		fireRateAdj=		"30"
		fireAccuracy=		"90"
		perception=			"4"
		/>

	<PlayerSettings
		desc=			"The Felis Destroyer is an immense warship with an astonishing arsenal and an enormous cargo hold."
		initialClass=		"true"
		startingCredits=	"5d100+2000"
		>

		<ArmorDisplay>		
			<ArmorSection name="forward"
					imageID="&rsWolfenArmor;" 
					imageX="0" imageY="0" imageWidth="52" imageHeight="15"
					destX="42" destY="19" hpX="55" hpY="18"
					nameY="8" nameBreakWidth="200" nameDestX="0" nameDestY="10" />

			<ArmorSection name="starboard"
					imageID="&rsWolfenArmor;" 
					imageX="75" imageY="0" imageWidth="23" imageHeight="69"
					destX="94" destY="34" hpX="97" hpY="60"
					nameY="30" nameBreakWidth="360" nameDestX="12" nameDestY="0" />

			<ArmorSection name="port"
					imageID="&rsWolfenArmor;" 
					imageX="52" imageY="0" imageWidth="23" imageHeight="69"
					destX="19" destY="34" hpX="13" hpY="60"
					nameY="52" nameBreakWidth="200" nameDestX="0" nameDestY="8" />

			<ArmorSection name="aft"
					imageID="&rsWolfenArmor;" 
					imageX="0" imageY="75" imageWidth="52" imageHeight="16"
					destX="42" destY="103" hpX="55" hpY="107"
					nameY="74" nameBreakWidth="360" nameDestX="12" nameDestY="0" />
		</ArmorDisplay>

		<ShieldDisplay>
			<Image imageID="&rsFelisDestroyerShields;" imageX="0" imageY="0" imageWidth="136" imageHeight="136"/>
		</ShieldDisplay>

		<ReactorDisplay>
			<Image imageID="&rsZubrinReactor;" 
						imageX="0" imageY="0" imageWidth="256" imageHeight="60"/>

			<PowerLevelImage imageID="&rsZubrinReactor;"
						imageX="0" imageY="60" imageWidth="202" imageHeight="14"
						destX="54" destY="9"/>

			<FuelLevelImage imageID="&rsZubrinReactor;"
						imageX="0" imageY="74" imageWidth="194" imageHeight="14"
						destX="54" destY="37"/>

			<FuelLowLevelImage imageID="&rsZubrinReactor;"
						imageX="0" imageY="88" imageWidth="194" imageHeight="14"/>

			<ReactorText x="62" y="22" width="154" height="14"/>
			<PowerLevelText x="62" y="0" width="154" height="9"/>
			<FuelLevelText x="62" y="51" width="154" height="9"/>
		</ReactorDisplay>

	</PlayerSettings>

</ShipClass>
</TranscendenceExtension>
Behold my avatar, one of the few ships to be drawn out pixel by pixel in the dreaded... Microsoft Paint!

Day 31: "I have successfully completed my time reversal experiment! Muahahaha!!!"
Day 30: "I might have run into a little problem here."
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

The problem is that each of them uses the same *numbers* assigned to the unid strings

Each unid has two parts in the <!ENTITY ... > element
The first is the string, the second is the number

BOTH the strings and the numbers must be unique:
If the numbers are the same, then it overwrites (two strings can point to the same pointer, it simply ends up treating all instances as the same number, pointing to whatever type of that number it loaded last)
If the strings are the same but the numbers are different, then it throws an error (one string cannot point to two pointers)
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
catfighter
Militia Commander
Militia Commander
Posts: 466
Joined: Fri Nov 08, 2013 5:17 am
Location: Laughing manically amidst the wreckage of the Iocrym fleet.

I think I figured out the error, if we're talking about the same thing. Do you mean that the ship gfx UNIDs in the two code blocks are the same?

If so, I caught the error after I posted it.
Behold my avatar, one of the few ships to be drawn out pixel by pixel in the dreaded... Microsoft Paint!

Day 31: "I have successfully completed my time reversal experiment! Muahahaha!!!"
Day 30: "I might have run into a little problem here."
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

yes the numbers of the UNIDs were the same
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
catfighter
Militia Commander
Militia Commander
Posts: 466
Joined: Fri Nov 08, 2013 5:17 am
Location: Laughing manically amidst the wreckage of the Iocrym fleet.

OK. I fixed the errors and I'll check them later to see if they work together now.
Behold my avatar, one of the few ships to be drawn out pixel by pixel in the dreaded... Microsoft Paint!

Day 31: "I have successfully completed my time reversal experiment! Muahahaha!!!"
Day 30: "I might have run into a little problem here."
Post Reply