Erm, a moddoing question. Particularly about weapon effects.

Freeform discussion about anything related to modding Transcendence.
Post Reply
BienM
Miner
Miner
Posts: 31
Joined: Thu Mar 06, 2008 1:19 pm

Code: Select all

	<ItemType UNID="&itDualStrikeLaser;"
			name=				"ARCHON Class Positron-WMD Prototype"
			level=				"9"
			value=				"8500"
			mass=				"10"
			frequency=			"veryrare"
			numberAppearing=	"1"
			modifiers=			"EnergyWeapon; MajorItem; NotForSale;"

			description=		"The Shirke Class Ion-WMD can destroy almost anything in one hit."
			>

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

		<Weapon
				type=				"missile"

				configuration=		"alternating"
				damage=				"dark fire:90d90; WMD7;"
				maneuverability=		"1.5"
				fireRate=			"60"
				lifetime=			"600"
				stealth=			"100"
				powerUse=			"0"

				directional=		"true"
				missileSpeed=		"30-50"
				failsafe=			"100"

				vaporTrailLength=	"20"
				vaporTrailWidth=	"110"
				vaporTrailWidthInc=	"1"
				vaporTrailColor=	"0xd0, 0xd0, 0xd0"

				hitEffect=		"&efFragmentationExplosion;"
				sound=				"&snMissileLauncher;"
				>

					<Effect>
					<MoltenBolt
					width=				"3"
					length=				"30"
					growth=				"3"
					primaryColor=		"0xff, 0xfd, 0xad"
					secondaryColor=		"0xd0, 0xd0, 0xd0"
					/>
					</Effect>

				<Fragment 
				count=			"50"
				type=			"radius"

				damage=			"singularity:90d90; WMD7;"
				minRadius=		"100"
				maxRadius=		"410"
				missileSpeed=	"10-15"
				lifetime=		"10"
				>

					<Effect>
					<Flare
					style=				"&vtThermoExplosion2;"
					radius=				"410"
					primaryColor=		"0x92, 0x92, 0x92"
					lifetime=		"15"
					/>

					</Effect>

			</Fragment>

		</Weapon>

	</ItemType>
Okay, so it is very overpowered. But that's not the point. I just need to make it so that when it hits something, it does a Thermo Explosion II. That is all.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

in 0.99 you can put virtual type explosions in the <Flare> tag ?:shock:
wow i'm going to enjoy the new flexibility in weapons code... :D

thermo explosion II on when the main missile hit, or when the one of the fifty fragments hit ? Why don't you try to use the <HitEffect> tag ?

then your radius type fragment is not canon: it should have count=1 and missilespeed=0

like this :

Code: Select all

<Fragment 
							count=			"1"
							type=			"radius"
							damage=			"thermo:6d24; momentum6; WMD7"
							minRadius=		"1"
							maxRadius=		"4"
							missileSpeed=	"0"
							lifetime=		"8"
							>
						<Effect>
							<Flare
									style=				"fadingBlast"
									radius=				"200"
									primaryColor=		"0xff, 0xff, 0x00"
								/>
						</Effect>
					</Fragment>
BienM
Miner
Miner
Posts: 31
Joined: Thu Mar 06, 2008 1:19 pm

Thermo II when the missile hits. And I want to keep the fragments.d
BienM
Miner
Miner
Posts: 31
Joined: Thu Mar 06, 2008 1:19 pm

And I get an 'Invalid Type 1050' or something error when I use Thermo II as the hit effect.
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Effects are different from weapons.

A weapon definition is what defines the configuration of the shots, the damage that each shot does, and the effect used to paint each shot. A weapon definition looks like:

Code: Select all

<ItemType UNID="&vtSomeWeapon;" ...>
   <Weapon ...>
      ...
   </Weapon>
</ItemType>
An effect is (mostly) a way to paint something on the screen. A stand-alone effect looks like this:

Code: Select all

<Effect UNID="&efSomeEffect;" ...>
...
</Effect>
A weapon uses three different kinds of effects:

The FireEffect is painted just as the weapon fires. This is used to paint a muzzle flash from (e.g.,) a howitzer.

The Effect is how we paint the actual shot that the weapon fire.

The HitEffect is painted when the shot hits something.

If you want a weapon to use a particular effect, you can refer to an effect by UNID. For example:

Code: Select all

<ItemType UNID="&vtSomeWeapon;" ...>
   <Weapon ...
      fireEffect="&efSomeEffect;"
      >
   </Weapon>
</ItemType>
You can use effect=, fireEffect=, and/or hitEffect= to define the effects for a weapon. These attributes must point to the UNID for an effect; they cannot point to the UNID for another weapon.

The method above works best for the cases where multiple weapons share the same effect. Then you can define the effect once (give it an UNID) and refer to the same effect from multiple weapons.

But sometimes you want to define an effect that works just for a single weapon--you may not need to share the effect. In that case, you can define the effect inline:

Code: Select all

<ItemType UNID="&vtSomeWeapon;" ...>
   <Weapon>
   ...
      <FireEffect ...>
      </FireEffect>
   </Weapon>
</ItemType>
Hope that helps!
Post Reply