Page 1 of 1

[I] area weapons with animated effects have no hitbox(1.08b)

Posted: Fri Jun 08, 2012 3:03 pm
by digdug
Area weapons that have an animated effect instead of a fixed shockwave are not working in 1.08b.
They were working fine in 1.01

This is the code if the weapon in question:

Code: Select all

<ItemType UNID="&itcirclebeam;"
		name=				"Circle beam"
		level=				"10"
			value=				"780000"
			mass=				"6000"
			frequency=			"rare"
			attributes=			"EnergyWeapon; MajorItem; DigdugWeapons; Ion; Military; Alien; NotForSale"
			unknownType=		"&itUnknownAlienDevice10;"
			description=		"This device is a modified shield generator that creates a circular ion beam around a starship. The lethal burst of ion is defensive and offensive at the same time."
			>
		<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
		
	<Weapon
			type=				"area"
			
			damage=				"ion:2d20"
			fireRate=			"15"
			expansionSpeed=		"40"
			missileSpeed=		"0"
			lifetime=			"20"
			powerUse=			"1"
			
			sound=				"&snLaserCannon;"

			>
			<Effect>
			<Image imageID="&rscirclebeam;" 
				imageX="0" 
				imageY="0" 
				imageWidth="142" 
				imageHeight="142"
				imageFrameCount="20"
				imageTicksPerFrame="1"/>

			</Effect>


		</Weapon>

	</ItemType>
I attached 2 screenshots,the image effect that the weapon is using and a simple extension that contains a ship and the weapon for quick testing.

Re: area weapons with animated effects have no hitbox (1.08b

Posted: Fri Jun 08, 2012 4:27 pm
by PM
EDIT: Nevermind - misunderstood post.

Re: area weapons with animated effects have no hitbox (1.08b

Posted: Mon Jul 16, 2012 8:03 pm
by digdug
I completely forgot about this ticket:
http://wiki.neurohack.com/transcendence/trac/ticket/473
Milestone changed from 0.0 Not Scheduled to 1.06

I've changed shockwave weapons to work as follows:

When the shockwave spawns, we pick a set of positions around the circumference of the shockwave to deal damage to targets. Let's call these positions, "damage nodes"

By default there are 32 of these damage nodes distributed around the edge of the shockwave. There is an attribute called areaDamageDensity that controls this. [E.g., areaDamageDensity="60" will use 60 damage nodes instead of 32.]

As the shockwave expands, we check to see if any of these damage nodes intersect with an object. If so, then the object takes damage.

When a damage node intersects with an object, we check the passthrough attribute. If passthrough="0" then the damage node will no longer cause damage as the shockwave expands (to any object). If passthrough="100" then the damage node continues to cause damage no matter how many objects it hits (and could cause damage to the same object multiple times). Any other value is the % chance that the damage node will survive to deal damage in the future.

If you omit the passthrough attribute (as all current shockwave weapons do) then passthrough defaults to 80%. [80% was chosen to not affect game-balance too much.]

I think this algorithm is much more predictable and also affords more possibilities for mods.

Re: area weapons with animated effects have no hitbox (1.08b

Posted: Tue Jul 17, 2012 4:11 pm
by sdw195
so, i guess this is invalid, closing...