Device slots and slot ID

Freeform discussion about anything related to modding Transcendence.
Post Reply
AdmiralZo
Militia Lieutenant
Militia Lieutenant
Posts: 228
Joined: Wed Feb 11, 2015 10:32 am
Location: Scouring Dantalion System for CSC Antarctica...

Device slots have come to haunt me once again. :evil:

On my Aquila playership, there are two turrets (a port turret and a starboard turret). I want the player to be able to choose where they install weapons - whether it be as a main weapon or on a particular turret. Here is the device slot code:

Code: Select all

<DeviceSlots>
			<DeviceSlot id="mainWeapon" criteria="w" 		maxCount="1"	posAngle="0" posRadius="48" posZ="0" minFireArc="345" maxFireArc="15"/>
			<DeviceSlot id="portTurret" criteria="p +property:singlePointOrigin;" 			linkedFire="whenInFireArc"	minFireArc="355" maxFireArc="175" posAngle="90" posRadius="24" posZ="8"/>
			<DeviceSlot id="starboardTurret" criteria="p +property:singlePointOrigin;" 		linkedFire="whenInFireArc"	minFireArc="160" maxFireArc="5" posAngle="-90" posRadius="24" posZ="8"/>
			<DeviceSlot criteria="l" 		posAngle="0" posRadius="48" posZ="0" omnidirectional="true"/>
		</DeviceSlots>		
	
		<Devices>
			<Device slotID="mainWeapon"	deviceID="&itLamplighter;" />
			<Device slotID="portTurret"		deviceID="&itStarCannon;" />
			<Device slotID="starboardTurret"	deviceID="&itStarCannon;" />
			<Device				deviceID="&itNAMIHeavyLauncher;"/>
			<Device 				deviceID="&itR9Deflector;"/>
			<Device 				deviceID="&it1GWReactor;"/>

			<Device deviceID="&vtDamageControlParty;"/>
		</Devices>
I've added an action in dock services which attempts to do this, but doesn't work well.

Question:

Is there a way to check if a device slotID (eg. "portTurret") has a weapon installed on it? If so, can we determine which weapon it is and choose to uninstall it? I've tried using something like (objCanInstallItem gPlayerShip (itmCreate &itLaserCannon; 1) "portTurret") to check. However it always returns 'replacementRequired even if no weapon is installed... help me please!

Thanks in advance! :D
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 I was running into a similar problem for my own playerships with secondary weapons. This is my Ministry ticket on how I was trying to go about getting the issue fixed if you want to add a comment to bump it back up into sight.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

AdmiralZo
Militia Lieutenant
Militia Lieutenant
Posts: 228
Joined: Wed Feb 11, 2015 10:32 am
Location: Scouring Dantalion System for CSC Antarctica...

Wow thanks guys. I think (scrGetListEntry) will work for me, but I agree being able to see empty slots will make life much easier. Hope it gets implemented.
Post Reply