Weapon Modding-Targetting

Freeform discussion about anything related to modding Transcendence.
Post Reply
Tachyonfang
Commonwealth Pilot
Commonwealth Pilot
Posts: 63
Joined: Tue Feb 08, 2011 1:18 pm

I am trying to figure out how to edit a weapon to make it an auto-targetting weapon; Specifically, a missile; Do you mod the launcher or the missile ammo that is fired from the launcher?
--Tachyonfang
Front Desk Clerk and Head of Technical Support at The Alcazar Hotel, Freelance Genius (IQ 163), and Chief Orchestrator of Various Plots For Universal Domination
"I don't get it-why can't I just shoot them? I mean, after all, they ARE the evil dudes shooting at us!"
User avatar
WillyTheSquid
Militia Lieutenant
Militia Lieutenant
Posts: 195
Joined: Wed Jan 18, 2012 4:32 pm
Location: Rotterdam, The Netherlands

educated guess: the missile. The NAMI launcher has both dumbfire (non-tracking) as well as homing ammuni tion.
Image

“Normal people believe that if it ain't broke, don't fix it. (Modders) believe that if it ain't broke, it doesn't have enough features yet.” -Scott Adams

Resident mod-cobbler-together, freakspawn-fixer-upper & musical eclectro-ecumenologist.
If you love something, tweak it and twist it. Keep bending it until it breaks. Rip it apart, remix it, rebuild it. Kill your darlings and stitch them together again.

JOIN US ON IRC. IT KICKS ASS. JOIN THE HIVE MIND.
Place cursor on link. Click link. Never look back.
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

The NAMI missile launcher defines the missiles it fires. All you have to do is add autoAcquireTarget="True" to the missile you want to add and give it maneuverability="2" so that it can hone into the target. AutoAcquireTarget isn't mandatory though, but would allow the missile to hit an enemy even if one is not marked with the targeting computer. Check the &itKM500Missile; for maneuver. As for autoAcquireTarget, add it right after maneuver (or in the same block of code at least).

Code: Select all

<!-- NAMI Missile Launcher -->

	<ItemType UNID="&itNAMIMissileLauncher;"
			name=				"NAMI missile launcher"
			level=				"3"
			value=				"1000"
			mass=				"1000"
			frequency=			"common"
			attributes=			"MajorItem; NAMI"

			description=		"This launcher is compatible with a full range of popular missiles including the KM100 Longbows and the XM900 Lucifers."
			>

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

		<Weapon
				fireRate=			"30"
				powerUse=			"10"
				launcher=			"true"
				>

			<Missiles>
				<Missile ammoID="&itFragmentationMissile;"
						type=			"missile"
						lifetime=		"120"
						damage=			"blast:2d6+2; momentum2; WMD1"
						missileSpeed=	"45"
						hitPoints=		"10"

						sound=			"&snMissileLauncher;"
						vaporTrailLength="16"
						vaporTrailWidth="110"
						vaporTrailWidthInc="5"
						vaporTrailColor="0xd0, 0xd0, 0xd0"
						>

					<Effect>
						<Image imageID="&rsStdMissile1;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" rotationCount="40"/>
					</Effect>

					<HitEffect
							sound="&snArmorHit1;"
							>
						<Image imageID="&rsExplosionsAG48;"
								imageX="0"
								imageY="0"
								imageWidth="48"
								imageHeight="48"
								imageFrameCount="16"
								imageTicksPerFrame="2"/>
					</HitEffect>

					<Fragment
							count=			"5d6"
							type=			"missile"
							lifetime=		"5"
							damage=			"kinetic:1d6+2; WMD1"
							missileSpeed=	"32-48"
							>

						<Effect>
							<ImageAndTail 
									imageID=			"&rsMissiles4;" 
									imageX=				"0" 
									imageY=				"0" 
									imageWidth=			"16" 
									imageHeight=		"16"
									imageFrameCount=	"4"
									imageTicksPerFrame=	"1"

									length=				"32"
									width=				"1"
									primaryColor=		"0xff, 0xff, 0xff"
									secondaryColor=		"0xc0, 0xc2, 0x85"
									/>
						</Effect>
					</Fragment>

				</Missile>

				<Missile ammoID="&itKM100Missile;"
						type=			"missile"
						lifetime=		"120"
						damage=			"blast:4d6; momentum4; WMD5"
						missileSpeed=	"45"
						hitPoints=		"10"
						sound=			"&snMissileLauncher;"
						vaporTrailLength="16"
						vaporTrailWidth="110"
						vaporTrailWidthInc="5"
						vaporTrailColor="0xd0, 0xd0, 0xd0"
						>
						
					<Effect>
						<Image imageID="&rsStdMissile1;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" rotationCount="40"/>
					</Effect>

					<HitEffect
							sound="&snArmorHit1;"
							>
						<Image imageID="&rsExplosionsAG48;"
								imageX="0"
								imageY="0"
								imageWidth="48"
								imageHeight="48"
								imageFrameCount="16"
								imageTicksPerFrame="2"/>
					</HitEffect>
				</Missile>

				<Missile ammoID="&itKM120Missile;"
						type=			"missile"
						lifetime=		"120"
						damage=			"blast:10d6; momentum4; WMD6"
						missileSpeed=	"45"
						hitPoints=		"15"
						sound=			"&snMissileLauncher;"
						vaporTrailLength="16"
						vaporTrailWidth="110"
						vaporTrailWidthInc="5"
						vaporTrailColor="0xd0, 0xd0, 0xd0"
						>
						
					<Effect>
						<Image imageID="&rsStdMissile1;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" rotationCount="40"/>
					</Effect>

					<HitEffect
							sound="&snArmorHit1;"
							>
						<Image imageID="&rsMediumExplosions;" 
								imageX="0" 
								imageY="0" 
								imageWidth="64" 
								imageHeight="64"
								imageFrameCount="16"
								imageTicksPerFrame="2"/>
					</HitEffect>
				</Missile>

				<Missile ammoID="&itKM500Missile;"
						type=			"missile"
						lifetime=		"120"
						damage=			"blast:4d6; momentum4; WMD5"
						missileSpeed=	"40"
						hitPoints=		"10"
						maneuverability="2"
						sound=			"&snMissileLauncher;"
						vaporTrailLength="16"
						vaporTrailWidth="110"
						vaporTrailWidthInc="5"
						vaporTrailColor="0xd0, 0xd0, 0xd0"
						>
						
					<Effect>
						<Image imageID="&rsStdMissile1;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" rotationCount="40"/>
					</Effect>

					<HitEffect
							sound="&snArmorHit1;"
							>
						<Image imageID="&rsExplosionsAG48;"
								imageX="0"
								imageY="0"
								imageWidth="48"
								imageHeight="48"
								imageFrameCount="16"
								imageTicksPerFrame="2"/>
					</HitEffect>
				</Missile>

				<Missile ammoID="&itKM550Missile;"
						type=			"missile"
						lifetime=		"120"
						damage=			"blast:10d6; momentum4; WMD6"
						missileSpeed=	"40"
						hitPoints=		"15"
						maneuverability="2"
						sound=			"&snMissileLauncher;"
						vaporTrailLength="16"
						vaporTrailWidth="110"
						vaporTrailWidthInc="5"
						vaporTrailColor="0xd0, 0xd0, 0xd0"
						>
						
					<Effect>
						<Image imageID="&rsStdMissile1;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" rotationCount="40"/>
					</Effect>

					<HitEffect
							sound="&snArmorHit1;"
							>
						<Image imageID="&rsMediumExplosions;" 
								imageX="0" 
								imageY="0" 
								imageWidth="64" 
								imageHeight="64"
								imageFrameCount="16"
								imageTicksPerFrame="2"/>
					</HitEffect>
				</Missile>

				<Missile ammoID="&itXM300Missile;"
						type=			"missile"
						lifetime=		"120"
						damage=			"blast:5d6; radiation1; momentum4; WMD4"
						missileSpeed=	"45"
						hitPoints=		"10"
						sound=			"&snMissileLauncher;"
						vaporTrailLength="16"
						vaporTrailWidth="110"
						vaporTrailWidthInc="5"
						vaporTrailColor="0xd0, 0xd0, 0xd0"
						>

					<Effect>
						<Image imageID="&rsStdMissile1;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" rotationCount="40"/>
					</Effect>

					<HitEffect
							sound="&snArmorHit1;"
							>
						<Image imageID="&rsExplosion2AG128;"
								imageX="0"
								imageY="0"
								imageWidth="128"
								imageHeight="128"
								imageFrameCount="16"
								imageTicksPerFrame="2"/>
					</HitEffect>
				</Missile>

				<Missile ammoID="&itXM900Missile;"
						type=			"missile"

						damage=			"thermo:6d24; momentum6; WMD7"
						missileSpeed=	"40"
						hitPoints=		"20"
						lifetime=		"120"

						maneuverability="2"

						sound=			"&snMissileLauncher;"
						vaporTrailLength="16"
						vaporTrailWidth="110"
						vaporTrailWidthInc="5"
						vaporTrailColor="0xd0, 0xd0, 0xd0"
						>

					<Effect>
						<Image imageID="&rsStdMissile1;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" rotationCount="40"/>
					</Effect>						

					<HitEffect
							sound="&snArmorHit1;"
							>
						<Image imageID="&rsExplosionsAG128;"
								imageX="0"
								imageY="0"
								imageWidth="128"
								imageHeight="128"
								imageFrameCount="16"
								imageTicksPerFrame="2"/>
					</HitEffect>

					<Fragment 
							count=			"1"
							type=			"radius"

							damage=			"thermo:6d24; momentum6; WMD7"
							minRadius=		"1"
							maxRadius=		"4"
							missileSpeed=	"0"
							>

						<Effect>
							<Flare
									style=			"fadingBlast"
									radius=			"170"
									primaryColor=	"0xff, 0xff, 0xf0"
									lifetime=		"8"
									/>
						</Effect>
					</Fragment>

				</Missile>

			</Missiles>

		</Weapon>

	</ItemType>
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Tachyonfang
Commonwealth Pilot
Commonwealth Pilot
Posts: 63
Joined: Tue Feb 08, 2011 1:18 pm

Muchos Thankyou to Willy and RPC; I know I'm just an amateur when it comes to modding this stuff, but this game has more promise than any other of its kind I've seen in at least a few years and I hope to become a pro like the rest of you!
--Tachyonfang
Front Desk Clerk and Head of Technical Support at The Alcazar Hotel, Freelance Genius (IQ 163), and Chief Orchestrator of Various Plots For Universal Domination
"I don't get it-why can't I just shoot them? I mean, after all, they ARE the evil dudes shooting at us!"
Tachyonfang
Commonwealth Pilot
Commonwealth Pilot
Posts: 63
Joined: Tue Feb 08, 2011 1:18 pm

Continuing with this mod that I'm working on, when I try to run Transcendence with the extension, I get the following error:
Void Wolf-class Mecha (d1024061): Unknown design type: d1024064
The extension is a player-capable ship class; d1024061 is the ID for the actual ship itself; d1024064 is the ID for the 1st of 2 types of missiles for its launcher; But I cannot figure out what is wrong with either of the 2 parts of the extension. What does the "unknown design type" error mean?
--Tachyonfang
Front Desk Clerk and Head of Technical Support at The Alcazar Hotel, Freelance Genius (IQ 163), and Chief Orchestrator of Various Plots For Universal Domination
"I don't get it-why can't I just shoot them? I mean, after all, they ARE the evil dudes shooting at us!"
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

What does the "unknown design type" error mean?
it means that you have a missing type, in this case an item i suppose.

a missile launcher with 2 missiles requires 3 UNIDs and consequently 3 itemtypes.
Tachyonfang
Commonwealth Pilot
Commonwealth Pilot
Posts: 63
Joined: Tue Feb 08, 2011 1:18 pm

digdug-
First off, sry about the pm; I didn't mean that to be a private message!
So, here it is for the world to see:
You mentioned that I needed 3 UNIDs for a launcher and 2 missile types, and I honestly thought that was what I had done. I have included the weapon information from the extension-could you take a look and tell me where I have made the error?

<!-- Wolfpack Multimissile Launcher -->

<ItemType UNID="&itWolfpackLauncher;"
name= "Wolfpack Multimissile Launcher"
level= "6"
value= "20000"
mass= "5000"
frequency= "rare"
attributes= "MajorItem; Military"
description="Like the Hydra, by Drake Technologies, The Wolfpack Multimissile Launcher is a "missile massacre" system that fires eight rockets simultaneously. It requires either Wolfpack-Standard or Wolfpack-Heavy Missiles, and requires two weapon slots to install."
>

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

<!-- NOTE: Firing rate should be 25% of the Fang launcher.
It takes two slots because DPS is double the Fang launcher.

NOTE #2: Some rockets are very powerful for their level.
If the Hydra is too fast, firing rate can be at low as
20% of the Fang instead of 25%. For example, 80 instead of 64.
-->
<Weapon
fireRate= "64"
powerUse= "80"
launcher= "true"
deviceSlots= "2"
>

<!-- The last fire position is the first we want. It is
placed at the bottom due to the custom firing code.
-->
<Configuration aimTolerance="5">
<Shot posAngle="0" posRadius="0" angle="-22"/>
<Shot posAngle="0" posRadius="0" angle="68"/>
<Shot posAngle="0" posRadius="0" angle="-68"/>
<Shot posAngle="0" posRadius="0" angle="112"/>
<Shot posAngle="0" posRadius="0" angle="-112"/>
<Shot posAngle="0" posRadius="0" angle="158"/>
<Shot posAngle="0" posRadius="0" angle="-158"/>
<Shot posAngle="0" posRadius="0" angle="22"/>
</Configuration>

<!-- NOTE: 'multiTarget' does NOT prevent all homing missiles
launched directly by the player from tracking one target.
-->
<Missiles>
<ItemType UNID="&itWolfpackStandardMissile;"
type= "missile"
lifetime= "80"
damage= "blast:5d6; momentum2; WMD3"
missilespeed= "40"
hitPoints= "5"
maneuverability= "2"

autoAcquireTarget= "true"

directional= "true"
sound= "&snMissileLauncher;"

vaporTrailLength= "8"
vaporTrailWidth= "110"
vaporTrailWidthInc= "5"
vaporTrailColor= "0xd0, 0xd0, 0xd0"
>

<Effect>
<Image imageID="&rsMissiles4;" imageX="0" imageY="0" imageWidth="16" imageHeight="16" imageFrameCount="0" rotationCount="40" imageTicksPerFrame="0"/>
</Effect>
</ItemType>
<ItemType UNID="&itWolfpackHeavyMissile;"
type= "missile"
lifetime= "120"
damage= "thermo:1d12; momentum3; WMD7"
missileSpeed= "55"
hitPoints= "40"
maneuverability= "2"

autoAcquireTarget= "true"
directional= "true"
hitEffect= "&efFusionExplosion1;"
sound= "&snMissileLauncher;"
vaporTrailLength= "24"
vaporTrailWidth= "150"
vaporTrailWidthInc= "15"
vaporTrailColor= "0xd0, 0xd0, 0xd0"
>

<Effect>
<Image imageID="&rsWeapons9DB32;" imageX="0" imageY="0" imageWidth="32" imageHeight="32" />
</Effect>

<Fragment
count= "1"
type= "radius"
lifetime= "10"
damage= "thermo:15d24; momentum3; WMD7"
minRadius= "3"
maxRadius= "8"
missileSpeed= "0"

>

<Effect>
<Flare
style= "fadingBlast"
radius= "450"
primaryColor= "0xff, 0xff, 0xf0"
lifetime= "8"
/>
</Effect>
</Fragment>

<Fragment
count= "8d20"
type= "missile"

lifetime= "1d12+12"
damage= "blast:2d6; WMD1"
missileSpeed= "25-55"
>

<Effect>
<ImageAndTail
imageID= "&rsMissiles4;"
imageX= "0"
imageY= "0"
imageWidth= "16"
imageHeight= "16"
imageFrameCount= "4"
imageTicksPerFrame= "1"

length= "32"
width= "1"
primaryColor= "0xff, 0xff, 0xff"
secondaryColor= "0xc0, 0xc2, 0x85"
/>
</Effect>
</Fragment>
</Itemtype>
</Missiles>
</Weapon>
</ItemType>
--Tachyonfang
Front Desk Clerk and Head of Technical Support at The Alcazar Hotel, Freelance Genius (IQ 163), and Chief Orchestrator of Various Plots For Universal Domination
"I don't get it-why can't I just shoot them? I mean, after all, they ARE the evil dudes shooting at us!"
User avatar
Cygnus.X1
Militia Lieutenant
Militia Lieutenant
Posts: 245
Joined: Sun Feb 24, 2008 6:21 pm
Location: Elysium Fields... I mean System
Contact:

I think he means something like this at the beginning of the XML file

Code: Select all

<!DOCTYPE TranscendenceExtension
  [
  <!ENTITY unidExtension "0xEEEE1000">
  <!ENTITY itWolfpackLauncher "0xEEEE1010">
  <!ENTITY itWolfpackStandardMissile "0xEEEE1020">
  <!ENTITY itWolfpackHeavyMissile "0xEEEE1030">
]>
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

you have <itemtype> nested inside <Missiles>
there should be only <Missile> inside <Missiles>

check the NAMI launcher for an example.
Tachyonfang
Commonwealth Pilot
Commonwealth Pilot
Posts: 63
Joined: Tue Feb 08, 2011 1:18 pm

I have tried to change the nesting to mimic that of the NAMI launcher, like you recommended:

<!-- Wolfpack Multimissile Launcher -->
<ItemType UNID="&itWolfpackLauncher;"
<Weapon
<Missiles>
<Missile AmmoID="&itWolfpackStandardMissile;"
</Missile>
<Missile AmmoID="&itWolfpackHeavyMissile;"
</Missile>
</Missiles>
</Weapon>
</ItemType>

But I am still receiving the error: Void Wolf-class Mecha (d1024061): Unknown design type: d1024064

Is the "Missile AmmoID" the correct terminology or item ID statement? Should it say "Missile AmmoUNID" or something else?
Thanks everyone for all your help!
--Tachyonfang
Front Desk Clerk and Head of Technical Support at The Alcazar Hotel, Freelance Genius (IQ 163), and Chief Orchestrator of Various Plots For Universal Domination
"I don't get it-why can't I just shoot them? I mean, after all, they ARE the evil dudes shooting at us!"
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

Tachyonfang wrote:error: Void Wolf-class Mecha (d1024061): Unknown design type: d1024064
Wolf-class Mecha is a shipType... I don't think this error has anything to do with the launcher per say. Try running the mod without the launcher and see if this error persists.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
Tachyonfang
Commonwealth Pilot
Commonwealth Pilot
Posts: 63
Joined: Tue Feb 08, 2011 1:18 pm

TVR-
I tried what you said-I tried running the extension without the launcher and its missiles and it loaded and worked just fine. So I'm thinking the problem IS with the launcher/missiles, right?
Thanks again everyone for all your help thus far! Please believe me, I have a great mod in the works, I just have to get all the little parts of it working! I promise you all, I will make it public as soon as it is functional!
--Tachyonfang
Front Desk Clerk and Head of Technical Support at The Alcazar Hotel, Freelance Genius (IQ 163), and Chief Orchestrator of Various Plots For Universal Domination
"I don't get it-why can't I just shoot them? I mean, after all, they ARE the evil dudes shooting at us!"
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

I still suspect an inadvertent duplicate UNID and itemType overwrite. Try running Transcendence with the ONLY mod being that launcher, stripping everything else out in that mod for debug.

If the problem persists, I recommend posting the entire mod for review purposes - the best I can give are guesses without it.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
Tachyonfang
Commonwealth Pilot
Commonwealth Pilot
Posts: 63
Joined: Tue Feb 08, 2011 1:18 pm

TVR-
Here is the entire mod, as requested-I hope someone can tell me what I've got messed up here, because I'm completely at a loss to figure this out!
Again, thanks for your help!
Attachments
WolfMechaMod.zip
(4.75 KiB) Downloaded 205 times
--Tachyonfang
Front Desk Clerk and Head of Technical Support at The Alcazar Hotel, Freelance Genius (IQ 163), and Chief Orchestrator of Various Plots For Universal Domination
"I don't get it-why can't I just shoot them? I mean, after all, they ARE the evil dudes shooting at us!"
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

OK, a cursory inspection of the mod reveals that there is no ItemType for any of the missiles.

You'll need something like the following that describes the level, mass, cost, etc. of the missile ammo:

Code: Select all

<ItemType UNID="&itKM100Missile;"
			name=				"KM100 Longbow missile"
			level=				"2"
			value=				"15"
			mass=				"50"
			frequency=			"common"
			numberAppearing=	"2d12"
			attributes=			"BasicAmmo; Commonwealth; Consumable; Missile; NAMI; NAMILauncher"
			showReference=		"true"

			description=		"This is a standard hexagene high-explosive missile; cheap and light, they are the weapon of choice for modern patrol fleets."

			sortName=			"NAMI.40"
			>

		<Image imageID="&rsItemsNAMI2;" imageX="288" imageY="0" imageWidth="96" imageHeight="96"/>
	</ItemType>
One for each missile, and that's all there is to it. Note that these ItemTypes are defined in a separate entry from the weapon info.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
Post Reply