WeaponTypes - Page 4

WeaponTypes

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Re: WeaponTypes

Post by SpikedHelmet »

Wouldn't it be possible to do that via a missile with a rather low speed, immense lifetime, and such? I seem to remember WD in OTA having these types of missiles which would chase my fucking planes all around the god damned map.
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Re: WeaponTypes

Post by Zpock »

I tried to do that long ago but the missile wouldn't get past it's range no matter how long it's life. You might be able to do it with an infinite range missile slaved to a limited range dummy weapon.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: WeaponTypes

Post by KDR_11k »

Have you tried SVN?
Ba-
Posts: 16
Joined: 09 Jan 2008, 23:16

Re: WeaponTypes

Post by Ba- »

quick question here... I know that beam weapons' damage decreases over distances. Is it possible to put this effect on, say, a ballistic weapon?
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Re: WeaponTypes

Post by tombom »

Ba- wrote:quick question here... I know that beam weapons' damage decreases over distances. Is it possible to put this effect on, say, a ballistic weapon?
There are dynamic damage tags for range but I'm not 100% on how to use them. The changelog says:
- Added float weapon TDF tag DynDamageExp: exponent of the damage formula, 0
(the default) disables dynamic damage. 1 means linear scaling.
- Added float weapon TDF tag DynDamageMin: minimum damage value. (default: 0)
- Added boolean weapon TDF tag DynDamageInverted: inverts the damage curve.
- Added float weapon TDF tag DynDamageRange: if set it will use this value instead of the range value from the weapon in the calculation.
Ba-
Posts: 16
Joined: 09 Jan 2008, 23:16

Re: WeaponTypes

Post by Ba- »

My understanding of these tags is:
1. you can have the damage ratio be exponential, rather than linear
2. minimum value so it does not decrease to 0
3. make it so it does more damage at range rather than less (inverted)
4. perhaps you can use this last tag to define the degree or amplitude of the curve (or line)? By making the dynamic damage range double what the actual range is, the weapon will only have decreased half-way by the time it hits its max range.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: WeaponTypes

Post by Pxtl »

Bug or feature, but should be known: beamlasers are stuck in sphere-land. No cylindertargetting... and I doubt they work with the heightmod stuff either, but haven't bothered to test.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: WeaponTypes

Post by imbaczek »

hm, that's interesting since I was testing cylindertargeting on beamlasers when I developed it. more details please?
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: WeaponTypes

Post by Pxtl »

imbaczek wrote:hm, that's interesting since I was testing cylindertargeting on beamlasers when I developed it. more details please?
I'm working on an OTA-purist mod, forked from Classic TA - as part of the mod, I'm using Beamlasers on Zeus because lighting fails to support collidefriendly.

Here's the weapon code from weapons.TDF

Code: Select all

[LIGHTNING]
	{
	ID=26;
	name=Lightning Gun;
	rendertype=0;
	lineofsight=1;
	turret=1;

	range=180;
	reloadtime=1.45;
	weaponvelocity=400;
	areaofeffect=8;
	duration=10;
	soundtrigger=1;

	soundstart=lghthvy1;
	soundhit=lashit;

	firestarter=50;

	beamweapon=1;
	color=208;	/* Yellow */
	color2=196;

	beamlaser=1;
	minIntensity=1;
	thickness=2;
	corethickness=0.5;
	laserflaresize=10;
	targetmoveerror=0.2;
	beamtime=0;
	beamttl=15;
	beamdecay =0.75;
	rgbcolor=0.75 0.25 1;

	explosiongaf=fx;
	explosionart=explode5;

	waterexplosiongaf=fx;
	waterexplosionart=h2oboom1;

	startsmoke=1;

	AvoidFriendly=0;
	CollideFriendly=0;

	[DAMAGE]
		{
		default=180;
		}
	CraterMult=0;
	CraterBoost=0;
	ImpulseFactor=0;
	ImpulseBoost=0;
	LeadLimit=0;
	CylinderTargetting=10;
	LeadBonus=2;
	HeightBoostFactor=0;
}
(yes, I know the lead attributes aren't necessary for a beamweapon - they were applied en-mass by batch-script)

And here's a screenshot, taken on castles (click thumb to examine):
Image

You can see the range circle failing to reach lower. When I turned off the beamlaser and made it into a pew-pew, it worked fine. Really, I probably do that anyways, since OTA lightnings weren't hitscan. But I thought you'd want to know.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: WeaponTypes

Post by KDR_11k »

Wait, shouldn't the Zeus use a regular LaserCannon because lightning wasn't instahit in OTA?
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: WeaponTypes

Post by Pxtl »

KDR_11k wrote:Wait, shouldn't the Zeus use a regular LaserCannon because lightning wasn't instahit in OTA?
Yeah, I realized that soon after I discovered the bug. The beamlaser hack was a quick fix for the lightning collidefriendly bug to play CTA with some friends. Now that I'm trying to clean up CTA further into my new mod and found the aforementioned cylindrical bug and remembered the Zeus wasn't instahit in OTA, so the bug is moot for me - but I thought other players might want to know.
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: WeaponTypes

Post by Evil4Zerggin »

tombom wrote:There are dynamic damage tags for range but I'm not 100% on how to use them. The changelog says:
- Added float weapon TDF tag DynDamageExp: exponent of the damage formula, 0
(the default) disables dynamic damage. 1 means linear scaling.
- Added float weapon TDF tag DynDamageMin: minimum damage value. (default: 0)
- Added boolean weapon TDF tag DynDamageInverted: inverts the damage curve.
- Added float weapon TDF tag DynDamageRange: if set it will use this value instead of the range value from the weapon in the calculation.
The damage of the weapon is multiplied by (1 - (distance/max range)^DynDamageExp), but not below DynDamageMin. If DynDamageRange is set it will use this value instead of the max range. DynDamageInverted subtracts the standard damage curve from the damage.

Diagram:

Image
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: WeaponTypes

Post by rattle »

Exactly. Much better diagrams than I made. There is a thread about it hidden in uh... some forum. Here.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: WeaponTypes

Post by Pxtl »

f33d th3 w1k1
GenStryker
Posts: 6
Joined: 17 Mar 2008, 07:35

Re: WeaponTypes

Post by GenStryker »

Are there plans for more weapontypes? Not really sure where this goes, though.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: WeaponTypes

Post by KDR_11k »

Not really, it'd be better if we had LESS because most weapontypes just annoy us by making some features only work in one type and others in another.
Fri13
Posts: 54
Joined: 03 Feb 2007, 13:15

Re: WeaponTypes

Post by Fri13 »

Guys, you really need to learn draw diagrams ;-)

Add X, Y and Z coordinates so it's easier to see right away what you are drawing, just for a tip ;-)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: WeaponTypes

Post by KDR_11k »

What? Those diagrams are perfectly clear. Do you lack the mental facilities to fill in the blanks?
twinfaith
Posts: 16
Joined: 31 May 2008, 00:27

Re: WeaponTypes

Post by twinfaith »

hahahahaha starburstbomber :P
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: WeaponTypes

Post by Tobi »

Changed lightingcannon->lightningcannon in the original post.
Post Reply

Return to “Game Development Tutorials & Resources”