Custom Ship Shield Error

Freeform discussion about anything related to modding Transcendence.
Post Reply
ShaunWilkinson
Anarchist
Anarchist
Posts: 24
Joined: Sat Dec 24, 2011 7:11 pm
Location: Heretic System
Contact:

Basically I am trying to learn how to create mods for Transcendence, and thought I would start basic by creating my own ship using the player ships in the Transcendence file as a template, and put a enemy ship in it's place.

I have got everything to work pretty well except the shield image at the bottom right when playing.

Code: Select all

<?xml version="1.0" ?> 
<!DOCTYPE TranscendenceExtension 
[ 
	<!ENTITY unidExtension	 			"0xD1024060">
	<!ENTITY scAresDestroyer		 	"0xD1024061">
	<!ENTITY itHeavyTharsisPlate		"0x001B400C">
	<!ENTITY rsZubrinShields			"0x0000F004">
	<!ENTITY rsWolfenShields			"0x0000F00D">
	
]> 

<TranscendenceExtension UNID="0xD1024060" version="0.99c"> 

<ShipClass UNID="&scAresDestroyer;" 
	manufacturer=	 "Ares Sect" 
	class=	 "Deimos" 
	type=	 "Destroyer" 
	score=	 "320"

	mass=				"800"
	reactorPower= 		"5000"
	fuelCapacity=		"60000"
	cargoSpace=			"125"
	thrust=				"650"
	rotationCount=		"20"
	maneuver=			"10"
	maxSpeed=			"30"

	maxArmor=			"20000"	
	maxCargoSpace=		"225"
	maxDevices=			"12"
	maxWeapons=			"4"

	leavesWreck=	 	"35" 
	
	attributes=			""
> 

		<Armor>
			<ArmorSection start="315" span="90" armorID="&itHeavyTharsisPlate;" />
			<ArmorSection start="225" span="90" armorID="&itHeavyTharsisPlate;" />
			<ArmorSection start="135" span="90" armorID="&itHeavyTharsisPlate;" />
			<ArmorSection start="45" span="90" armorID="&itHeavyTharsisPlate;" />
		</Armor>
		
		<Devices>
			<Device deviceID="&itHecatesCannon;" posAngle="0" posRadius="50" minFireArc="345" maxFireArc="15" />
			<Device deviceID="&itLightningTurret;"/>
			<Device deviceID="&itCydonianHeavyShields;"/>
			<Device deviceID="&it250MWReactor;"/>
		</Devices>

		<Items>
			<Item count="2d12"	item="&itPteracniumFuelRod;"/>
			<Item count="1" item="&itTargetingComputerROM;"/> 
			<Item count="1" item="&itWeaponSpeedROM;"/> 
			<Item count="1" item="&itEnhanceSRSROM;"/> 
			<Item count="10" item="&itDeconGel;"/>
		</Items>

		<Image imageID="&rsMediumShips4;" imageX="1024" imageY="0" imageWidth="128" imageHeight="128" imageFrameCount="0" imageTicksPerFrame="0"/>


		<AISettings
			fireRateAdj=		"10"
			fireAccuracy=		"90"
			ignoreShieldsDown=	"true"
			
			perception=			"6"
			/>

		<PlayerSettings 
			desc=	"The Ares Destroyer!" 
			startingCredits=	"3000000"
			initialClass=	"true"> 

		<ArmorDisplay>
				<ArmorSection name="forward"
						imageID="&rsZubrinShields;" 
						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="&rsZubrinShields;" 
						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="&rsZubrinShields;" 
						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="&rsZubrinShields;" 
						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="&rsZubrinShields;" 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> 
If anyone could quickly check it and tell me what I've done wrong I would appreciate it, as I've been trying to fix the shield for quite a while


EDIT:
Sorry about all the posts everywhere, been looking at the forums for quite a while now and had a few things to say
I am the One and Only
Amilir
Militia Lieutenant
Militia Lieutenant
Posts: 151
Joined: Fri Feb 12, 2010 4:56 pm
Location: With the stRong.

Righty. First, you redefined the UNIDs of heavy tharsis, wolfen shields, and zubrin shields. While that shouldn't cause any errors AFAIK, it's redundant.

Second, you're using a shield image for armor.
imageID="&rsZubrinShields;"
should be
imageID="&rsZubrinArmor;"
for all four armor segments.

Thirdly, you don't want to use zubrin armor/shield images. Your image positions are copied from the wolfen. Use &rsWolfenShields and &rsWolfenArmor instead. If you do want to use the sapphire shield/armor images for whatever reason, copy/paste that segment from the sapphire. You can't use a different set of images without different image positions, or it'll look like crap.

Last, no amount of xml work will make the shields image show a Deimos. You'll need to make a new image for that. Look at "ShieldsHUD" in the resources of the source.

Oh, you do have the tbd source? If you don't, look up transdata.
Amilir
Militia Lieutenant
Militia Lieutenant
Posts: 151
Joined: Fri Feb 12, 2010 4:56 pm
Location: With the stRong.

Aahh, almost forgot: The modified code:

Code: Select all

<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
   <!ENTITY unidExtension             "0xD1024060">
   <!ENTITY scAresDestroyer          "0xD1024061">
   
]> 

    <TranscendenceExtension UNID="0xD1024060" version="0.99c">

    <ShipClass UNID="&scAresDestroyer;"
       manufacturer=    "Ares Sect"
       class=    "Deimos"
       type=    "Destroyer"
       score=    "320"

       mass=            "800"
       reactorPower=       "5000"
       fuelCapacity=      "60000"
       cargoSpace=         "125"
       thrust=            "650"
       rotationCount=      "20"
       maneuver=         "10"
       maxSpeed=         "30"

       maxArmor=         "20000"   
       maxCargoSpace=      "225"
       maxDevices=         "12"
       maxWeapons=         "4"

       leavesWreck=       "35"
       
       attributes=         ""
    >

          <Armor>
             <ArmorSection start="315" span="90" armorID="&itHeavyTharsisPlate;" />
             <ArmorSection start="225" span="90" armorID="&itHeavyTharsisPlate;" />
             <ArmorSection start="135" span="90" armorID="&itHeavyTharsisPlate;" />
             <ArmorSection start="45" span="90" armorID="&itHeavyTharsisPlate;" />
          </Armor>
          
          <Devices>
             <Device deviceID="&itHecatesCannon;" posAngle="0" posRadius="50" minFireArc="345" maxFireArc="15" />
             <Device deviceID="&itLightningTurret;"/>
             <Device deviceID="&itCydonianHeavyShields;"/>
             <Device deviceID="&it250MWReactor;"/>
          </Devices>

          <Items>
             <Item count="2d12"   item="&itPteracniumFuelRod;"/>
             <Item count="1" item="&itTargetingComputerROM;"/>
             <Item count="1" item="&itWeaponSpeedROM;"/>
             <Item count="1" item="&itEnhanceSRSROM;"/>
             <Item count="10" item="&itDeconGel;"/>
          </Items>

          <Image imageID="&rsMediumShips4;" imageX="1024" imageY="0" imageWidth="128" imageHeight="128" imageFrameCount="0" imageTicksPerFrame="0"/>


          <AISettings
             fireRateAdj=      "10"
             fireAccuracy=      "90"
             ignoreShieldsDown=   "true"
             
             perception=         "6"
             />

          <PlayerSettings
             desc=   "The Ares Destroyer!"
             startingCredits=   "3000000"
             initialClass=   "true">

          <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="&rsWolfenShields;" 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> 
ShaunWilkinson
Anarchist
Anarchist
Posts: 24
Joined: Sat Dec 24, 2011 7:11 pm
Location: Heretic System
Contact:

Thank you Amilir I'll remember that in future, and that's the next plan. I hope to make a fully playable Deimos ship, preferably with it's own HUDs
I am the One and Only
Post Reply