Idea for a mod

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

Not sure if I can do this....since I have no abilities in XML, but it's something I'm interested in making.

An external gun-pod. Takes no slots, does not count towards max-guns installed.......rapid fire light blast weapon, and comes with ~300 rounds pre-installed.....can be installed and removed without a station. Cannot be reloaded....once you've used it, you've used it, and have to ditch it and buy another. Can only have one installed on a ship at a time.

Technically, it's on the port side, and has an ammunition segment on the starboard side to equalise mass....so the firing graphic, if possible, should be left of center.....and definately non-omni :P


Is this possible, and how difficult should it be? I'd like to try making this myself, to make mining-freighters slightly more viable.... but I'm not sure how to do *anything* in XML...and I'm not sure that having anything difficult as my first mod attempt. :P


Also, if anyone wants to do my "Ice Shield" idea, I'd be really keen to see it used by someone....I think it's in the Tinker suggestion thread in Bugs 'n' Brainstorms....
Mischievous local moderator. She/Her pronouns.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

this is fairly easy, you need to take something like the recoilless cannon as a base, then add :
external ="true" so that it's mounted externally
charges ="xxx" (the number of ammo you want)
slots ="0" so that it doesn't use up slots
To have stationless install and uninstall, copy and paste the code from the disposable launchers.

tweak the firerate and damage and voila' your cannon is ready.

To limit the number of installed external slotless devices it's probably more tricky, probably by using the new <OnInstall> you can control that.

A simple custom configuration can be used to fire a little on one side.
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

You should also add valueCharges, so an empty one is sold for less than a full one.

charges goes in two places, one in the weapon tag with true, and one in the item tag with the number of shots

if you use a <configuration> tag don't use the configuration= line. here's the configuration of the slicer cannon.

Code: Select all

			<Configuration aimTolerance="5" alternating="true">
				<Shot posAngle="90" posRadius="20" angle="-3"/>
				<Shot posAngle="270" posRadius="20" angle="3"/>
			</Configuration>
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2831
Joined: Mon Aug 17, 2009 4:27 am

Hmm. I'm fiddling with it, but I have no idea how to fix the bugs that are stopping me from using it....I'm making basic errors in the coding. But I'll mess with it until I think I have everything, then work out what I'm getting wrong....I think I'm missing a few lines at the beginning.

Edit: Ok, I THINK I have the mod worked out. But I can't test it, because I'm missing coding that lets Transcendence actually WORK when the mod is in the extensions folder......most irritating. Anyone want to have a look and point out the obvious mistakes I've undoubtedly made?
Mischievous local moderator. She/Her pronouns.
User avatar
Styro
Miner
Miner
Posts: 46
Joined: Mon Jan 18, 2010 4:55 pm
Location: Utah, USA

Here's how I would do it:

Code: Select all

<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
	<!ENTITY unidExternalGunPodMod		"0xDAD54001">
	<!ENTITY itExternalGunPod			"0xDAD54002">
]>

<TranscendenceExtension UNID="&unidExternalGunPodMod;" version="0.99c">

	<!-- External Gun Pod -->

	<ItemType UNID="&itExternalGunPod;"
			name=				"external gun pod"
			level=				"1"
			value=				"300"
			mass=				"2500"
			frequency=			"uncommon"
			modifiers=			"MajorItem"
			showReference=		"true"

			charges=			"300"
			valueCharges=		"true"

			description=		"This external recoilless gun pod comes loaded with 300 rounds of ammo. The weapon can be installed and uninstalled without the aid of a station"
			>

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

		<Weapon
				type=				"missile"

				damage=				"blast:1d3+1; momentum1"
				fireRate=			"10"
				missileSpeed=		"40"
				interaction=		"50"
				lifetime=			"40"
				powerUse=			"11"
				charges=			"true"

				sound=				"&snRecoillessCannon;"
				
				deviceSlots=	"0"
				external=		"true"
				>

			<Effect>
				<Bolt
						length=				"12"
						width=				"2"
						primaryColor=		"0xcd, 0xf3, 0xff"
						secondaryColor=		"0x8f, 0xa9, 0xb2"
						/>
			</Effect>

			<Configuration aimTolerance="5">
				<Shot posAngle="90" posRadius="10" angle="0"/>
			</Configuration>
		</Weapon>
		
		<Invoke>
			(block (deviceList notFound)
				; See if the ship already has one installed
				(setq deviceList (objGetItems gSource "dI"))
				(setq notFound True)
				(enumWhile deviceList notFound item
					(setq notFound (or (not (eq (itmGetUnid item) &itExternalGunPod;)) (eq item gItem)))
				)
				(if notFound
					(intAutoInstall gSource gItem)
					(objSendMessage gSource gSource (cat "You can only have one " (itmGetname gItem 1) " installed"))
				)
			)
		</Invoke>
	</ItemType>

</TranscendenceExtension>
I used script in the Invoke tag to make sure they only have one installed at a time.
Post Reply