Mod Problem

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Patupi
Militia Lieutenant
Militia Lieutenant
Posts: 123
Joined: Fri Apr 06, 2012 9:24 pm

OK, I've looked this thing upside and down. I'm pretty sure it's simple, a bracket missing or something. I'm using JEdit with the highlights for Transendence and still can't see where the problem is. It's saying the error is on line 227, ie the end of the file, so it's either < > or ( ) missing somewhere. Can someone see what I am missing here? Pretty please? With bells on? And maybe a whistle... I like whistles.

(EDIT: Clarification; Transcendence is saying the error is on line 227, not jedit.)

Code: Select all

<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
	<!ENTITY unidExtension			"0xDAF10200" >
	<!ENTITY itValenGaussCannon		"0xDAF10201" >
	<!ENTITY itValenGaussMG			"0xDAF10202" >
	<!ENTITY itOmniValenGaussCannon	"0xDAF10203" >
	<!ENTITY itOmniValenGaussMG		"0xDAF10204" >
]>
<TranscendenceExtension UNID="&unidExtension;" version="1.0" name="EI Variable Kinetic Weapons" credits="Patupi">

<!-- defining weapon switch routine -->

	<Globals>
		; Define the function for switching shields.  
		; This Global code based on Atarlost's help. Thanks!
	(setq WeaponMode
		(lambda (theweapon)
			(block (nil)			
				(if (eq (itmIsDamaged theitem) Nil)
					(block (status enhweapon theitem)
						(setq theitem gItem)
						(setq status (ItmIsEnhanced theitem))
						(setq enhweapon (itmSetEnhanced theweapon status))
						(objAddItem gSource enhweapon)


						; Install weapon
						(shpInstallDevice gSource enhweapon)


						; Remove previous weapon
						(shpRemoveDevice gSource (itmSetEnhanced theitem status))
						(objRemoveItem gSource (itmSetEnhanced (itmCreate (itmGetUNID theitem) 1) status) 1)
					)
					(objSendMessage gSource Nil "Weapon is too damaged to change fire modes")
				)
			)
		)
	)
	</Globals>


	<!-- Valen Gauss Cannon -->

	<ItemType UNID="&itValenGaussCannon;"
			name=				"Valen Gauss gun: Cannon mode"
			level=				"5"
			value=				"9500"
			mass=				"2500"
			frequency=			"common"
			attributes=			"MajorItem; EI; Specialty"

			description=		"The Valen is a Electromagnetic accelerator gun that can switch between a short range rapid fire machine gun and a long range slow fire cannon."
			>

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

		<Weapon
				type=				"missile"

				damage=				"kinetic:8d4; momentum2"
				fireRate=			"50"
				missileSpeed=		"65"
				interaction=		"80"
				lifetime=			"80"
				powerUse=			"300"

				sound=				"&snRecoillessCannon;"
				>

			<Effect>
				<Bolt
						length=				"20"
						width=				"4"
						primaryColor=		"0xff, 0xef, 0xef"
						secondaryColor=		"0x60, 0x15, 0x15"
						/>
			</Effect>
		</Weapon>
		<Invoke key="V" installedOnly="true">
			(block Nil
				(WeaponMode (itmCreate &itValenGaussMG; 1))
				(objSendMessage gSource Nil (cat "Valen Gauss Gun set to rapid fire mode"))
			)
		</Invoke>

	</ItemType>

	<!-- Valen Gauss Machine Gun -->

	<ItemType UNID="&itValenGaussMG;"
			name=				"Valen Gauss gun: Rapid Fire mode"
			level=				"5"
			value=				"9500"
			mass=				"2500"
			frequency=			"notrandom"
			attributes=			"MajorItem; EI; Specialty"

			description=		"The Valen is a Electromagnetic accelerator gun that can switch between a short range rapid fire machine gun and a long range slow fire cannon."
			>

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

		<Weapon
				type=				"missile"

				damage=				"kinetic:4d4; momentum1"
				fireRate=			"5"
				missileSpeed=		"65"
				interaction=		"80"
				lifetime=			"30"
				powerUse=			"300"

				sound=				"&snRecoillessCannon;"
				>

			<Effect>
				<Bolt
						length=				"20"
						width=				"4"
						primaryColor=		"0xff, 0xef, 0xef"
						secondaryColor=		"0x60, 0x15, 0x15"
						/>
			</Effect>
		</Weapon>
		<Invoke key="V" installedOnly="true">
			(block Nil
				(WeaponMode (itmCreate &itValenGaussCannon; 1))
				(objSendMessage gSource Nil (cat "Valen Gauss Gun set to Cannon mode"))
			)
		</Invoke>

	</ItemType>

	<!-- Omni Valen Gauss Cannon -->

	<ItemType UNID="&itOmniValenGaussCannon;"
			name=				"Omni Valen Gauss gun: Cannon mode"
			level=				"6"
			value=				"23000"
			mass=				"3500"
			frequency=			"common"
			attributes=			"MajorItem; EI; Specialty"

			description=		"The Valen is a Electromagnetic accelerator gun that can switch between a short range rapid fire machine gun and a long range slow fire cannon."
			>

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

		<Weapon
				type=				"missile"

				damage=				"kinetic:8d4; momentum2"
				fireRate=			"50"
				missileSpeed=		"65"
				interaction=		"80"
				lifetime=			"80"
				powerUse=			"300"

				sound=				"&snRecoillessCannon;"
				>

			<Effect>
				<Bolt
						length=				"20"
						width=				"4"
						primaryColor=		"0xff, 0xef, 0xef"
						secondaryColor=		"0x60, 0x15, 0x15"
						/>
			</Effect>
		</Weapon>
		<Invoke key="O" installedOnly="true">
			(block Nil
				(WeaponMode (itmCreate &itOmniValenGaussMG; 1))
				(objSendMessage gSource Nil (cat "Valen Gauss Gun set to rapid fire mode"))
			)
		</Invoke>

	</ItemType>

	<!-- Omni Valen Gauss Machine Gun -->

	<ItemType UNID="&itOmniValenGaussMG;"
			name=				"Omni Valen Gauss gun: Rapid Fire mode"
			level=				"6"
			value=				"23000"
			mass=				"3500"
			frequency=			"notrandom"
			attributes=			"MajorItem; EI; Specialty"

			description=		"The Valen is a Electromagnetic accelerator gun that can switch between a short range rapid fire machine gun and a long range slow fire cannon."
			>

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

		<Weapon
				type=				"missile"

				damage=				"kinetic:4d4; momentum1"
				fireRate=			"5"
				missileSpeed=		"65"
				interaction=		"80"
				lifetime=			"30"
				powerUse=			"300"

				sound=				"&snRecoillessCannon;"
				>

			<Effect>
				<Bolt
						length=				"20"
						width=				"4"
						primaryColor=		"0xff, 0xef, 0xef"
						secondaryColor=		"0x60, 0x15, 0x15"
						/>
			</Effect>
		</Weapon>
		<Invoke key="O" installedOnly="true">
			(block Nil
				(WeaponMode (itmCreate &itOmniValenGaussCannon; 1))
				(objSendMessage gSource Nil (cat "Valen Gauss Gun set to Cannon mode"))
			)
		</Invoke>

	</ItemType>
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2801
Joined: Mon Aug 17, 2009 4:27 am

It's even simpler than a missing bracket, and twice as annoying (I've done it before myself): You're missing the </TranscendenceExtension> tag that ends the mod. Chuck it on the end, see if it works.
Mischievous local moderator. She/Her pronouns.
User avatar
Patupi
Militia Lieutenant
Militia Lieutenant
Posts: 123
Joined: Fri Apr 06, 2012 9:24 pm

Oh, can I say a great big *DOOOOH!*

Thanks Shrike. That did it. Been a busy day, that's my only excuse :)
Post Reply