Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Test Builds => Topic started by: Bobboau on March 08, 2004, 12:45:32 am
-
ok the old fighter beam code was basicly the uggliest hack in exsistance and only half worked, as a result they never worked quite right, so I give you my new and improved fighter beam code (http://freespace.volitionwatch.com/blackwater/fs2_open_Bobboau_3-14-04.zip), I actualy did things corectly this time and fighter beams work just as you would think, well type 2 and 4 (fighter and moljoner) the other ones still need a bit of work.
I'm not sure were this fits, it isn't a new feature and it fixes most of the nasty nasty problems fighter beams had, but it was a lot of new code, and I had origonaly planed on doing this after 3.6. fortunately it was a lot easier than I thought it was going to be.
I havn't included any tables, but keep in mind it now actualy looks at a lot of the values it used to ignor (like warmup/down and lifetime (targeting beam has a life of 0 so it will only blink on and off, you _will_ need to make your own))
-
*Downloads*
Can I ask, is the cel-shading code still in there? If so how do I activate it?
-
it's still there but it only works in non-htl mode
-
Downloading now. Is the sound bug fixed? I had sound loop problems when the energy is drained out.
-
yup, been totaly reworked
-
Great work Bobbau, now i can make something useful for my vasudan fighters :-)
-
have you committed this?
-
Originally posted by Bobboau
it's still there but it only works in non-htl mode
How do I do that? Is it in the launcher? *Is clueless*
-
-nohtl in the custom flags field, IIRC.
-
Okay, thanks. I'll try that. :)
-
I don't think it's been commited, but that's only becase CVS was down.
-
This is way cool, but can you also make a change in FRED to allow fighterbeams to be selectable as a primary weapon for fighters? Right now one has to manually change this in Notepad. I'm not sure if FS2 allows you to select them in the ship/weapon config screens either...
-
well given that you need to make entierly new weapons table entree(s) to get this to realy work. I don't even know exactly what you want, they should be selectable as any other weapon, but you have to make a new one.
-
Oh, my mistake, they are selectable in FRED. Just didn't have the right flags and they were in the wrong place in the TBL. :)
Has this been commited yet?
-
Some updates to the Wiki example for we lazy people? :-)
-
go ahead. im not stopping you
-
http://freespace.volitionwatch.com/blackwater/fs2_open_Bobboau_3-14-04.zip
new build, small number of minor bug fixes
-
Some small bugs using that build:
a) Beams power down mid-shot if there's not enough power to use them, but the energy keeps draining from the fighter's weapon energy (into minus figures) during the warmup and warmdown parts
b) Should beams supposed to be draining energy in the warmdown at all?
c) Player beams ignore fire wait, you can seem to fire another salvo after some fixed time, although the AI is fine with this
d) Beams don't obey the "cycle" tag, although funnily enough the particle effect only occurs around one of the model's gunpoints
-
they follow fire wait, they will fire a beam every time weather you have finished the previus shot or not, this enables you to make beams capable of a overload typ thing, fighter beams also have a diferent implementation of cycle, you need to give the beam shots (its a value in the beam info, look at a post I made recently on TBP forums for an example)
I had the beam draining power the entier time they were doing anything though I supose they shouldn't be draining during warm down, that probly explains the reason why AI don't seem to be useing them as much as they used to.
-
It doesn't, low values work (<5 seconds) but higher ones (10.0 for example) are ignored and you can fire 1 every second. Try it with your Nial beam.
Also the firepoints don't alternate, is this intentional?
-
...I think that's what he's talking about with the overload stuff... But then again, I have no idea.
Anyone want to post a tbl entry so us lazy buggers can try?
-
$Name: GB Cannon
+Title: XSTR("Neutron Gun", -1)
+Description:
XSTR(
"Fires a stream of neutrons.
Level 3 Hull Damage ", -1)
$end_multi_text
+Tech Title: XSTR("Neutron Gun", -1)
+Tech Anim: Tech_Subach_HL-7
+Tech Description:
XSTR(
"Minbari Neutron guns cause molecular decay on the targets hull plating. Using powerful gravimetrics to control the confinement of the beam, Minbari craft use this to great advantage and are able to bring significant firepower on their target.", -1)
$end_multi_text
$Model File: none
@Laser Bitmap:newglo6
@Laser Color:190, 150, 250
@Laser Length:10.0
@Laser Head Radius:0.90
@Laser Tail Radius:0.30
$Mass: 0.2
$Velocity: 1100
$Fire Wait: 10
$Damage: 20
$Armor Factor: 1.0
$Shield Factor: 0.7
$Subsystem Factor: 0.7
$Lifetime: 1.1
$Energy Consumed: 9;this is only getting fired by one point at a time
$Cargo Size: 0.0
$Homing: NO
$LaunchSnd: 84
$ImpactSnd: 85
+Weapon Range: 1800
$Flags: ( "beam" "in tech database" "player allowed" )
$Icon: iconSD4
$Anim: SD4
$Impact Explosion: ExpMissileHit1
$Impact Explosion Radius: 5.5
$BeamInfo:
+Type: 3
+Life: 0.15
+Warmup: 100
+Warmdown: 100
+Radius: 4.0
+PCount: 0
+PRadius: 0.0
+PAngle: 0.0
+PAni: particleexp01
+Miss Factor: 0.5 0.7 0.9 1.1 1.3
+BeamSound: 84
+WarmupSound: 151
+WarmdownSound: 157
+Muzzleglow: beamglow3
+Shots: 1
+ShrinkFactor: 0.0
+ShrinkPct: 0.0
$Section: ;; one section of the beam (you can have up to 5)
+Width: 0.25 ;; width of the section
+Texture: beam-red ;; texture for this section
+RGBA Inner: 255 255 255 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 150 150 150 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.0 ;; how much it flickers (0.0 to 1.0)
+Zadd: 4.0 ;; hehe
$Section: ;; one section of the beam
+Width: 0.5 ;; width of the section
+Texture: beam-green2 ;; texture for this section
+RGBA Inner: 160 160 0 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 60 60 0 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.45 ;; how much it flickers (0.0 to 1.0)
+Zadd: 3.0 ;; hehe
$Section: ;; one section of the beam (you can have up to 5)
+Width: 1 ;; width of the section
+Texture: beam-green ;; texture for this section
+RGBA Inner: 255 255 255 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 150 150 150 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.4 ;; how much it flickers (0.0 to 1.0)
+Zadd: 2.0 ;; hehe
$Section: ;; one section of the beam
+Width: 1.7 ;; width of the section
+Texture: beam-green3 ;; texture for this section
+RGBA Inner: 255 0 0 255 ;; rgba values (only for non-textured beam compiles)
+RGBA Outer: 60 0 0 10 ;; rgba values (only for non-textured beam compiles)
+Flicker: 0.5 ;; how much it flickers (0.0 to 1.0)
+Zadd: 0.0 ;; hehe
That was what I was using (Bob's Nial beam with some modifications to check if it worked with other values), see if it's just me that's got problems
-
Fired with a one to one and a half second interval. :nod:
-
Just an idea - maybe it gets problems if you tell it to fire from more points at once than are available? :confused:
-
I want to know why it doesn't use the ship's own gunpoints for these beams.
-
it doesn't?
-
Actually the fire wait thing isn't a problem with Bob's code, it happens with ALL primary weapons, as I've just tested the Aquila cannon from Inferno and it does the same thing =/ any value above 5 or so makes it default to the 1-2 second fire wait than Raa and me have experienced.
-
Originally posted by Bobboau
it doesn't?
Err.. . It may just be that one beam type I tested, but it fired from the top left of the cocpit. (On the top right from outside view)
with dual fire, it fired the two with a small space between them.
-
did you have a subsystem selected on your target?
-
I doubt it. I was targetting fighters.
-
Does this build have the same afterburner trail code from the 3-7-2004 build?
-
yeah
-
whenever a weapon cycles more than one point at a time (weather it be with a beam or a weapon with "cycle") it tends to ocassionally fire a shot from from the center of the ship.
this happens with my ancients fighter, it has a ring of 21 firing points and i want to fire 3 at a time. the points are setup so that it will fire in a rotating triangular pattern. the only problem is that the code creates an extra point and breaks the pattern. at first i though it was a point limit. but while messing with the new beam code i noticed that the bug exists there as well, i also noticed that it does it no matter haw many firing points a ship has.
it seems like a ****ing error in a loop (when a loop starts counting at 0 when the programmer thinks it will start a 1 or vice versa). its a mistake i made alot in computer science. i could imagine it looping around and trying to fire when it hant anything to fire from.
-
How do you get beams to cycle through firepoints anyway?
-
with $shots: in the beam section.
-
Ah it sort of works, in that 2 out of the 4 gunpoints on an Erinyes actually alternate. ^_^ Must be the same sort of problem as you're having, Nuke. I wondered what was going on as I was using a Ulysees with only 2 points per bank, and it was always firing from the first point only.
-
I found what waqs causeing the alternateing thing, but I don't have time to upload a build right now
-
cool
-
is it possible to make it so i the beam will continously fire while i have the trigger down, then stop when i let go, like it was before?
-
*deleted*
-
fire wait and life of 0 would probly do it, I supose I sould put in a diferent flag or something for that
-
Originally posted by Bobboau
fire wait and life of 0 would probably do it
nope. the beam just doesn't fire.
Originally posted by Bobboau
I suppose I should put in a different flag or something for that
I would appreciate it.
-
try a life of .0001
no that doesn't work either, I'll have to add that in later, but I'm not sure if it's going to get done before 3.6