Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Solatar on October 12, 2003, 02:21:45 pm

Title: Help with fighters-beams (no, not a stupid question)
Post by: Solatar on October 12, 2003, 02:21:45 pm
Inspired by a thread somewhere around here, I decided to make the ML-16 and Vasudan Light Laser (VLL-9 from the Port) into real lasers. I've got them working nicely except for one little problem: When you get hit, you fly all over the place. Needless to say this is frustrating for the player.

I've tried setting the weapon's mass to 0.0, but it doesn't seem to help. Anybody know of a table hack I can use so the beam doesn't flail things?

EDIT: Also, does anybody know how I can make it so when you get hit, you aren't paralyzed?
Title: Help with fighters-beams (no, not a stupid question)
Post by: Kazan on October 12, 2003, 02:50:59 pm
i think there is a no-whack flag... search for it
Title: Help with fighters-beams (no, not a stupid question)
Post by: Flaser on October 12, 2003, 03:01:39 pm
:D ;) :D

This is cool Solatar!

The only problem would be as I've said it so far is the new "uber-hit-ratio" one could achieve with weapons like that.

IMHO the ML-16 would have to fire in rapid succession...

Maybe we should make a mandatory cone of fire along with some tracking abitlity.

What I think of it that we assign the weapon a cone of fire - but it would be lessed as the computer devises a better targeting solution.

You'd have to keep the target as close to the reticle as possible, it could be shown by a circle around the target, and you'd have to keep the reticle inside the circle to have a better firing solution - but with time the circle would grow smaller - and the cone of fire would lessen as well.

If the enemy fighter goes out of the circle the computer starts to slowly increase the circle.

Having a pinpoint targeting solution shouldn't be beneficial - targets should be more jumpy and keen manuvere - so the AI level should be raised to medium as a start - and the shots would have to be more needle like in their diameter.
Title: Help with fighters-beams (no, not a stupid question)
Post by: Solatar on October 12, 2003, 03:14:35 pm
The way I'm trying to balance it, it's just like a regular pulse cannon (bar the instant hit). It slowly fades away, and after 900 metres, you can't hit anything with it. The thing that keeps you from holding down the trigger and swinging it like a lightsaber is the high energy consumption.

EDIT: heh, wait'll I have a go at the Banshee...EMP.:D
Title: Help with fighters-beams (no, not a stupid question)
Post by: Taristin on October 12, 2003, 06:24:08 pm
Does the ML-16 still do no damage to the shields?
Title: Help with fighters-beams (no, not a stupid question)
Post by: Solatar on October 12, 2003, 06:46:22 pm
It does very little, as the original did.
Title: Help with fighters-beams (no, not a stupid question)
Post by: Taristin on October 12, 2003, 06:48:03 pm
Coolness™
Title: Help with fighters-beams (no, not a stupid question)
Post by: Solatar on October 12, 2003, 07:08:45 pm
Here's my version of the ML-16. It still need some tweaking, but you can get a feel for it. The Prometheus will be similiar (green, different damage, probably more energy consumption to balance things).
 NOTE: I'm using fs2_open3.5.5

Code: [Select]
$Name: @ML-16 Laser
+Title: XSTR("GTW ML-16 Laser", 3246)
+Description:
XSTR(
"Standard issue
Level 3 Hull Damage
Minimal Shield Damage", 3247)
$end_multi_text
+Tech Title: XSTR("ML-16 Laser", 3248)
+Tech Anim: cb_ml16
+Tech Description:
XSTR(
"Argon laser weapon - uses transparent ceramic technology in order to create an optical system that is extremely durable and stable under battle conditions - provides adequate destructive damage to the hull of enemy ships by vaporizing molecular bonds at the target area and destabilizing molecular bonds across the grain of the hull material. The GTA issues ML-16 Lasers to every fighter and bomber in service.", 3249)
$end_multi_text
$Model File: none
@Laser Bitmap: laserglow06
@Laser Glow: 2_laserglow03
@Laser Color: 190, 150, 250
@Laser Color2: 190, 150, 250
@Laser Length: 7.0
@Laser Head Radius: 0.90
@Laser Tail Radius: 0.30
$Mass: 0.0
$Velocity: 450.0
$Fire Wait: 0.2
$Damage: 0.5
$Armor Factor: 0.1
$Shield Factor: 0.01
$Subsystem Factor: 0.3
$Lifetime: 2.0
$Energy Consumed: 10.0
$Cargo Size: 0.0
$Homing: NO
$LaunchSnd: 115
$ImpactSnd: 85
+Weapon Range: 100000
$Flags: ("player allowed" "beam" "no Pierce shields")
$Icon: icon_ml16
$Anim: ml16
$Impact Explosion: none  
$BeamInfo:
+Type: 2
+Life: 0.0
+Warmup: 0
+Warmdown: 0
+Radius: 1.0
+PCount: 0
+PRadius: 0
+PAngle: 0.0
+PAni: particleexp01
+Miss Factor: 0.0 0.0 0.0 0.0 0.0
+BeamSound: 115
+WarmupSound: 0
+WarmdownSound: 0
+Muzzleglow: beamglow5
+Shots: 0
+ShrinkFactor: 0.0
+ShrinkPct: 0.0
+Range: 900 ; Maximum range of a beam
+Attenuation: 0.5 ;From 0.0 to 1.0 indicates the point at wich the beam's damage will start to degrade
$Section:
+Width: 0.5
+Texture: beam-white
+RGBA Inner: 255 255 255 255
+RGBA Outer: 150 150 150 10
+Flicker: 1.0
+Zadd: 2.0
$Section:
+Width: 0.75
+Texture: beam-purple2
+RGBA Inner: 160 160 0 255
+RGBA Outer: 60 60 0 10
+Flicker: 1.0
+Zadd: 1.0
$Section:
+Width: 1.0
+Texture: beam-purple
+RGBA Inner: 255 0 0 255
+RGBA Outer: 60 0 0 10
+Flicker: 1.0
+Zadd: 0.0      
Title: Help with fighters-beams (no, not a stupid question)
Post by: Taristin on October 12, 2003, 07:11:22 pm
*adds to weapons.tbl*
Title: Help with fighters-beams (no, not a stupid question)
Post by: Bobboau on October 12, 2003, 07:11:46 pm
I would sugest changeing +Weapon Range: to something like 800
Title: Help with fighters-beams (no, not a stupid question)
Post by: Taristin on October 12, 2003, 07:11:54 pm
BTW, did you get my PM with my email addy?
Title: Help with fighters-beams (no, not a stupid question)
Post by: Solatar on October 12, 2003, 08:09:34 pm
Quote
Originally posted by Bobboau
I would sugest changeing +Weapon Range: to something like 800


I'ts 900, which is the range of the original weapons.

Looking at the Avenger, I've kept it how it originally was, but made it ballistic (right now, all ships carry 1600 rounds, may have bombers carry more). I'll mess with the 4500 rounds per minute thing later...

EDIT: I see what you mean Bob, as of right now, you can't hit anything more than 900 metres away. I'll change +weaponrange: to 900 for consistancy.
Title: Help with fighters-beams (no, not a stupid question)
Post by: Trivial Psychic on October 12, 2003, 11:03:11 pm
I haven't had a chance to see this thing in action, but I know what I'd like it to behave like.  If any of you have ever watched Star Trek: Deep Space Nine, during season 2 there was a 2-parter called "The Maquis".  At the end of the 2nd part, there is an engagement between 3 Runabouts from DS9 and 2 armed Peraguine raiders from the Maquis.  At one point, one of the raiders fires a pair of phaser cannons mounted just inboard of the wings.  While they move instantaneously from a to b, they have a fire rate.  I assume your laser design follows this pattern instead of just streaming along, like a light-sabre as you pointed out.  Making it a pulse laser with a fire rate would get around the high energy consumption problem, since the original ML-16 was so weak on its power draw that you could pull almost all ships power away and it'll still fire continuously.

Later!
Title: Help with fighters-beams (no, not a stupid question)
Post by: Kazan on October 12, 2003, 11:29:38 pm
Quote
Originally posted by Flaser
:D ;) :D

This is cool Solatar!

The only problem would be as I've said it so far is the new "uber-hit-ratio" one could achieve with weapons like that.

IMHO the ML-16 would have to fire in rapid succession...

Maybe we should make a mandatory cone of fire along with some tracking abitlity.

What I think of it that we assign the weapon a cone of fire - but it would be lessed as the computer devises a better targeting solution.

You'd have to keep the target as close to the reticle as possible, it could be shown by a circle around the target, and you'd have to keep the reticle inside the circle to have a better firing solution - but with time the circle would grow smaller - and the cone of fire would lessen as well.

If the enemy fighter goes out of the circle the computer starts to slowly increase the circle.

Having a pinpoint targeting solution shouldn't be beneficial - targets should be more jumpy and keen manuvere - so the AI level should be raised to medium as a start - and the shots would have to be more needle like in their diameter.


figter beams fire straight forward - they do not track
Title: Help with fighters-beams (no, not a stupid question)
Post by: Kazan on October 12, 2003, 11:49:26 pm
OMFG! V-hackage

beam whacking is damage-linked not mass-linked

i just added a new flag for the next version of fs2 open

in the weapon flags add "beam no whack" and it will not whack, ever!
Title: Help with fighters-beams (no, not a stupid question)
Post by: terren on October 13, 2003, 12:02:53 am
sweet, anyone know if "no dumbfire" works on beams?  I know it does nothing on primarys but I can allways hope...
and while your at it, what about using '$fof:' for the ML-16
Title: Help with fighters-beams (no, not a stupid question)
Post by: Bobboau on October 13, 2003, 12:18:12 am
I must remember to re-implement fof, somehow it disapeared
Title: Help with fighters-beams (no, not a stupid question)
Post by: Kazan on October 13, 2003, 01:07:08 am
"no dumbfire" doesn't apply to primaries - especially since we don't have locking primaries....

fighter beams fire straight ahead, just like any other primary

on a good note - i've commited the "beam no whack" code - I also commented out some trashy *_printf()'s about this that and the other thing we don't carea about and it actually increased stability [and execution speed on debug builds!] I smell some vicious V-hack in there
Title: Help with fighters-beams (no, not a stupid question)
Post by: Solatar on October 13, 2003, 05:24:29 am
Nice Kazan.:)

The Avenger I'm working with currently carries 1316 rounds of ammunition per bank. This is enough to last a while, but not enough to last a long engagement without rearming; and if you waste it, you're in trouble.
Title: Help with fighters-beams (no, not a stupid question)
Post by: Taristin on October 13, 2003, 07:12:17 am
...so you didn't get that PM, eh?  Nads...
Title: Help with fighters-beams (no, not a stupid question)
Post by: Flaser on October 13, 2003, 11:15:07 am
Your implementation is a lot nicer than what I thought of.

It reminds me of the Mechwarrior 3 pulse lasers.

If we could make the beam flicker - so it would grow dimer and weaker with time, meanwhile it would flicker around 5-15Hz it could simulate the old ML-16 quite well.

The flickering frequency would have to match the old firing speed and everything would seem to be the same in terms of weapon parameters.
Title: Help with fighters-beams (no, not a stupid question)
Post by: Hippo on October 13, 2003, 12:20:52 pm
if the ship being hit has density, it flys all over the place whenever its hit by lasers...
Title: Help with fighters-beams (no, not a stupid question)
Post by: Solatar on October 13, 2003, 02:10:15 pm
Think I'm going to do something funky with the leech: make it a beam, but I think I can use the SCP stuff to make the beam look like it's firing towards the player (so it looks like it's drawing power from the target).

As for the Banshee, thinking .ani? And the shield breaker...I dunno..


EDIT: and my excuse for lasers making cool sounds is some sort of advanced firing chamber that makes sound.:D
Title: Help with fighters-beams (no, not a stupid question)
Post by: Solatar on October 13, 2003, 04:16:44 pm
Quote
Originally posted by Kazan


in the weapon flags add "beam no whack" and it will not whack, ever!



woohoo, no more spinning the Taranis when hitting it with an
ML-16 (goes like a top)
Title: Help with fighters-beams (no, not a stupid question)
Post by: Trivial Psychic on October 14, 2003, 01:42:26 am
Wanna have some fun?  Dock an Isis to a Sathanas underbelly, then shoot at the Isis... the Sath will bounce around like you've just hit it with a Supernova-powered Flail cannon... or has SCP fixed this problem of equalizing mass on docked objects?

Later!
Title: Help with fighters-beams (no, not a stupid question)
Post by: Solatar on October 14, 2003, 05:38:34 am
Quote
Originally posted by Trivial Psychic
Wanna have some fun?  Dock an Isis to a Sathanas underbelly, then shoot at the Isis... the Sath will bounce around like you've just hit it with a Supernova-powered Flail cannon... or has SCP fixed this problem of equalizing mass on docked objects?

Later!


Not sure, in the third mission of the port, I was attacking a friendly Elysium with my ML-16, and it bounced around like crazy. After it docked with some cargo, I couldn't budge it.

I've finally gotten the Avenger to fire somewhere close to 4500 rounds a minute. It's not more powerful either (maybe slightly, but I dunno)
Title: Help with fighters-beams (no, not a stupid question)
Post by: Kazan on October 14, 2003, 08:42:31 am
beams abort the whacking call if dockedness is detected