Trouble adding a freighter to Korolov

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

Fri Nov 09, 2018 9:41 am

I've been trying to add a new freighter varient to Korolov. It's spawning in correctly, but isn't giving any credit for missions. If anyone's familiar with the mission framework, would they mind seeing if I've messed up in my ship code?

Code: Select all

	<ShipClass UNID="&scArmstrongTransportKorolov;"
			manufacturer=		"NAMI"
			class=				"Armstrong"
			type=				"transport"
			defaultSovereign=	"&svCommonwealth;"
			   
			attributes=			"commonwealth, freighter, genericClass, NAMI"
			
			size=				"58"
			mass=				"500"
			thrustRatio=		"2.0"
			maxSpeed=			"18"
			cargoSpace=			"500"
			maxCargoSpace=		"500"
			
			inherit=		"&scArmstrongTransport;"
			>

		<Names definiteArticle="true">
			transport Akers; transport Budarin; transport Crippen; transport Duke;
			transport Eisele; transport Fincke; transport Gagarin; transport Helms;
			transport Irwin; transport Jing; transport Kolodin; transport Liu;
			transport McDivitt; transport Noguchi; transport Ochoa; transport Payette;
			transport Resnik; transport Schmitt; transport Titov; transport Volk;
			transport Williams; transport Yegorov
		</Names>

		<!-- Configuration -->
		
		<Armor
			armorID=			"&itHardenedTitaniumArmor;"
			count=				"6"
			/>
		
		<Devices>
			<Device deviceID="&itBushidoLaserTurret;"	posAngle="0" posRadius="4" posZ="16"/>
			<Device deviceID="&itCyclotronDeflectorIII;"/>
		</Devices>



		<Items>
		</Items>
		
			<StaticData>
			<Data id="korolov.containerPrice">
				(
					; New pilot: 1500 - 4000 credits
					; 15,000 - 40,000 cargo value
					(multiply 100 (random 15 40))

					; Apprentices: 1500 - 4000 credits
					; 15,000 - 40,000 cargo value
					(multiply 100 (random 15 40))

					; Journeymen: 2500 - 5000 credits
					; 25,000 - 50,000 cargo value
					(multiply 100 (random 25 50))

					; Masters: 3000 - 5000 credits
					; 30,000 - 50,000 cargo value
					(multiply 100 (random 30 50))

					5000 ; legends don't escort, but add anyway
					)
			</Data>

			<korolovEscortRate>200</korolovEscortRate>

			<korolovMinLevel>0</korolovMinLevel>
		</StaticData>

		<Events>
			<OnDestroy>
				(korOnShipDestroyed)
			</OnDestroy>
		</Events>
		
		<Language>
			<Text id="korolov.shipDesc">
				A modern transport vessel, the Armstrong was designed to deliver anything and everything. Though the premier versions of the Armstrong are intended to compete with the EI200, Korolov operates a small fleet of basic models to replace older EI100 models.
			</Text>
		</Language>



		<!-- AI and Behavior -->
		
		<AISettings
			fireRateAdj=		"20"
			fireAccuracy=		"90"
			perception=			"4"
			
			combatStyle=		"standOff"
			/>

	</ShipClass>

Mischievous local moderator. She/Her pronouns.

User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2732
Joined: Mon Aug 17, 2009 4:27 am

Fri Nov 09, 2018 7:40 pm

Well, I found one problem: The game caches the data at start, so updating the code on the fly doesn't work. I'm now trying to get an up-to-date spawn of the ship to work.

The other oddity is that the freighter data tab is misreporting the maximum speed. It's listing it as 0.19c, not 0.18c. All normal (non-modded) korolov vessels are reporting the correct speed. The ship doesn't have armor speeds set up, so it can't be that.... I'm suspecting that the game code may not actually support modded vessels the way it's supposed to.
Mischievous local moderator. She/Her pronouns.

giantcabbage
Commonwealth Pilot
Commonwealth Pilot
Posts: 96
Joined: Thu Apr 07, 2011 9:05 pm

Fri Nov 09, 2018 8:56 pm

I've tested it and it's working fine for me (as long as I replace the armor and weapon with standard devices) so I don't think there is a problem with your ship or the Korolov mission. The reported speed does vary with the installed armor, I got 0.19 with ultra light armor and 0.18 with massive armor, so possibly the engine is assigning default armor limits somehow.

Maybe you could define the armor limits? Or inherit from scArmstrongTransport so you'll pick them up if/when George sets them.

User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2732
Joined: Mon Aug 17, 2009 4:27 am

Sat Nov 10, 2018 7:19 am

I managed to get the missions working. I'll see what's going on with the speed later.
Mischievous local moderator. She/Her pronouns.

Post Reply