Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Legate Damar on April 13, 2012, 02:25:45 am

Title: Gliding and weapons range
Post by: Legate Damar on April 13, 2012, 02:25:45 am
I made a normal primary weapon with a range of 3600m, when I am flying towards an enemy ship and firing it it works and does damage at that range, but when I use glide and fly away from the enemy ship while facing it, the weapon stops doing damage at a range slightly over 1000m. Is this supposed to happen?
Title: Re: Gliding and weapons range
Post by: Dragon on April 13, 2012, 02:47:36 am
Do you use additive weapon velocity? If you do, then yes. The weapon's velocity will, in that case, be muzzle velocity (which you set in weapons.tbl)+ship's velocity.
If you're not using this flag though, then I have no idea why is this happening.
Title: Re: Gliding and weapons range
Post by: Legate Damar on April 13, 2012, 04:06:17 am
The only flags the weapon has are player allowed and shudder.

Also I made a cool missile that looks really really awesome when it explodes.
Title: Re: Gliding and weapons range
Post by: yomi on April 13, 2012, 04:50:24 am
wait a sec, weapon disappears at range of 1000m? or just don't deal damage?
also
$use additive weapon velocity: is not flag in weapons.tbl
but in ai_profiles
so if u use ai_profiles from other mod u may have this turned on
Title: Re: Gliding and weapons range
Post by: General Battuta on April 13, 2012, 07:20:33 am
Remember that a weapon's range isn't actually determined by the $Range field - that's just for the AI. You need to look at lifetime and velocity instead.
Title: Re: Gliding and weapons range
Post by: Legate Damar on April 13, 2012, 07:46:24 am
It's probably the ai profiles. I didn't know that the player ship used ai though except for turrets and stuff. Would changing the ai class of the ship in FRED do anything?
Title: Re: Gliding and weapons range
Post by: General Battuta on April 13, 2012, 07:49:21 am
Nope
Title: Re: Gliding and weapons range
Post by: Dragon on April 13, 2012, 08:09:34 am
It's probably the ai profiles. I didn't know that the player ship used ai though except for turrets and stuff. Would changing the ai class of the ship in FRED do anything?
"AI Profiles" is a misleading name. They affect a lot more stuff than just AI.
Title: Re: Gliding and weapons range
Post by: redsniper on April 13, 2012, 09:51:25 am
Hmmm, so if I glide backwards at the same speed as my primary shots, I could have "laser" bolts hanging still in space?
Title: Re: Gliding and weapons range
Post by: Dragon on April 13, 2012, 10:14:34 am
This is rarely possible due to how fast primaries go, but if you can go that fast, then yes, that's exactly what would happen. I remember seeing this in The Minbari Project, looked quite funny.
Title: Re: Gliding and weapons range
Post by: Legate Damar on April 13, 2012, 06:01:05 pm
I guess I'll fix this when I write a new ai profile for my mod
Title: Re: Gliding and weapons range
Post by: Nuke on April 14, 2012, 06:33:31 pm
primaries dont really go that fast, at least stock primaries dont. if your ship can go 350 you gan glide at full speed turn around and fire you prometheus, and to the stationary observer the shot would just float in space with very little movement.
Title: Re: Gliding and weapons range
Post by: Dragon on April 14, 2012, 06:47:42 pm
If you ship can go 350 that is. The Horus makes 170 on burners, and it's the fastest ship in game. Prom-R (the S version is much faster) goes 450m/s. Not enough to stop the shots, but this will cull it's range by a significant margin. The only primary weapon that goes slow enough to actually seem stopped is the training laser, at 200m/s (and still, it won't stop completely).
Title: Re: Gliding and weapons range
Post by: Nuke on April 14, 2012, 10:34:16 pm
you forgot to point out stock ships dont have glide :D
Title: Re: Gliding and weapons range
Post by: Legate Damar on April 14, 2012, 11:46:17 pm
I have another problem, I was editing a Vindhyachal and I put it in the game and flew it, and the other Vindhyachals that were my allies were working fine and firing their beam turrets, but my ship wouldn't fire its beam turret (it would fire its other turrets just fine but not the sbeamtiny)
Title: Re: Gliding and weapons range
Post by: yomi on April 15, 2012, 03:21:02 am
could u provide table of your SbeamTiny1 and Vindhyachal?
Title: Re: Gliding and weapons range
Post by: Legate Damar on April 15, 2012, 04:39:16 am
Here it is (note the custom weapons):

$Name: SB Vindhyachal
$Short name: Shibom
$Species: Shivan
+Tech Description:
XSTR("Our best bomber. Try not to lose them", -1)
$end_multi_text
$POF file: Vindhyachal.pof
$Detail distance: (0, 250, 1000, 2000)
$ND: 255 0 0 ;;these make the
$ND: 255 13 0 ;;colour with the
$ND: 252 2 2 ;;corresponding
$ND: 246 2 2 ;;RGB value, always
$ND: 242 2 2 ;;bright ie they glow
$ND: 250 130 2
$ND: 250 0 0
$ND: 230 0 0
$ND: 252 46 1
$ND: 218 0 0
$Show damage: YES
$Density: 2
$Damp: 0.2
$Rotdamp: 0.5
$Max Velocity: 20.0, 20.0, 80.0
$Rotation time: 5.0, 5.0, 5.0
$Rear Velocity: 30.0
$Forward accel: 2.0
$Forward decel: 2.0
$Slide accel: 2.0
$Slide decel: 2.0
$Glide:         YES
$Expl inner rad: 75.0
$Expl outer rad: 250.0
$Expl damage: 75.0
$Expl blast: 2500.0
$Expl Propagates: YES
$Shockwave Speed: 300.0
$Allowed PBanks:      ( "ZX-29" "Shivan Lightning Laser" )
$Allowed Dogfight PBanks:         (  )                                               ;; speed shockwave expands at, 0 means no shockwave
$Default PBanks:        ( "ZX-29" )
$Pbank Capacity:            ( 200 )
$Allowed SBanks:        ( "Shivan Fast Bomb" "Annihilator" )
$Allowed Dogfight SBanks:            (  )
$Default SBanks:        ( "Shivan Fast Bomb" "Annihilator" )
$SBank Capacity:        ( 400, 400 )
$Shields: 7500
$Shield Color: 255 92 92
$Power Output: 7.5
$Max Oclk Speed: 100.0
$Max Weapon Eng: 100.0
$Hitpoints: 1750
$Armor Type: Shivan
$Flags: ( "player_ship" "bomber" )
$AI Class: General
$Afterburner: YES
 +Aburn Max Vel: 0.0, 0.0, 120.0
 +Aburn For accel: 0.4
 +Aburn Fuel: 400.0
 +Aburn Burn Rate: 50.0
 +Aburn Rec Rate: 35.0
$Countermeasures: 100
$Scan time: 2000
$EngineSnd: 133
$Closeup_pos: 0.0, 0.0, -105
$Closeup_zoom: 0.7
$Shield_icon: shieldVindhyachal
$Score: 35
$Trail:
 +Offset: 14.5 0 -30.4
 +Start Width: 0.25
 +End Width: 0.05
 +Start Alpha: 1.0
 +End Alpha: 0.0
 +Max Life: 1.0
 +Spew Time: 120
 +Bitmap: Contrail01
$Trail:
 +Offset: -14.5 0 -30.4
 +Start Width: 0.25
 +End Width: 0.05
 +Start Alpha: 1.0
 +End Alpha: 0.0
 +Max Life: 1.0
 +Spew Time: 120
 +Bitmap: Contrail01
$Trail:
 +Offset: 3.74 -8.5 -8
 +Start Width: 0.25
 +End Width: 0.05
 +Start Alpha: 1.0
 +End Alpha: 0.0
 +Max Life: 1.0
 +Spew Time: 120
 +Bitmap: Contrail01
$Trail:
 +Offset: -3.74 -8.5 -8
 +Start Width: 0.25
 +End Width: 0.05
 +Start Alpha: 1.0
 +End Alpha: 0.0
 +Max Life: 1.0
 +Spew Time: 120
 +Bitmap: Contrail01
$Subsystem: turret01,10,1.0
 $Default PBanks: ( "SBeamTiny" )
$Subsystem: turret02,5,1.0
 $Default PBanks: ( "ShivPulse" )
$Subsystem: turret03,5,1.0
 $Default PBanks: ( "ShivPulse" )
$Subsystem: turret04,5,1.0
 $Default PBanks: ( "ShivPulse" )
$Subsystem: sensors, 10,0.0
$Subsystem: communication, 10,0.0
$Subsystem: engine, 35,0.0
$Subsystem: weapons, 15,0.0
$Subsystem: navigation, 15,0.0

(Also I know some of these fields are obsolete but I based my entry on the one from Inferno and I figured I would just leave them as they don't seem to mess anything up)
Title: Re: Gliding and weapons range
Post by: Legate Damar on April 15, 2012, 04:41:33 am
Here is the beam:

$Name: SBeamTiny
$Model File: none
@Laser Bitmap: laserglow01
@Laser Color: 250, 30, 30
@Laser Length: 0.0
@Laser Head Radius: 0.30
@Laser Tail Radius: 0.30
$Mass: 100.0
$Velocity: 50000.0
$Fire Wait: 5.0
$Damage: 600
$Damage Type: Energy
$Armor Factor: 1.0
$Shield Factor: 1.0
$Subsystem Factor: 1.0
$Lifetime: 2.0
$Energy Consumed: 0.30
$Cargo Size: 0.0
$Homing: NO
$LaunchSnd: 124
$ImpactSnd: 88
+Weapon Range: 4000
$Flags: ("huge" "supercap" "beam")
$Icon: icongun05
$Anim: LoadGun07
$Impact Explosion: ExpMissileHit1
$Impact Explosion Radius: 20.0
$BeamInfo:
+Type: 0
+Life: 2.0
+Warmup: 2000
+Warmdown: 2000
+Radius: 30.0
+PCount: 12
+PRadius: 1.9
+PAngle: 65.0
+PAni: particleexp01
+Miss Factor: 0.5 0.85 1.25 1.85 2.5
+BeamSound: 177
+WarmupSound: 182
+WarmdownSound: 189
+Muzzleglow: beamglow4
+Shots: 0
+ShrinkFactor: 0.1
+ShrinkPct: 1.8
$Section:
+Width: 6.0
+Texture: beam-white
+RGBA Inner: 0 0 0 0
+RGBA Outer: 0 0 0 0
+Flicker: 0.1
+Zadd: 2.0
$Section:
+Width: 15.0
+Texture: beam-red2
+RGBA Inner: 0 0 0 0
+RGBA Outer: 0 0 0 0
+Flicker: 0.1
+Zadd: 1.0
$Section:
+Width: 20.0
+Texture: beam-red
+RGBA Inner: 0 0 0 0
+RGBA Outer: 0 0 0 0
+Flicker: 0.1
+Zadd: 0.0
Title: Re: Gliding and weapons range
Post by: yomi on April 15, 2012, 05:08:42 am
 beam works correctly for me using your tables, so problem appears to be in somewhere else,
did u test that beam on same target? beam have "huge" flag so it won't fire on fighters etc, also u could forgot to put "all ships beam-freed". I can't really find any other reason why it wouldn't work for you
Title: Re: Gliding and weapons range
Post by: Legate Damar on April 15, 2012, 05:19:03 am
I had all ships beam freed by default, the other allied Vindhyachals were firing their beams just fine on the target but even when I went within range and really close to it my beam wouldn't fire.
Title: Re: Gliding and weapons range
Post by: headdie on April 15, 2012, 09:23:19 am
is it a player primary weapon rather than a turret? if so I think the beam has to be something like type 4, not 100% on that as only messed about with player beams a few times but i am sure i have hit that one
Title: Re: Gliding and weapons range
Post by: PeterX on April 15, 2012, 12:22:16 pm
It´s for turrets as i see in the ship entry.
for a player ship this entry has to show up with that text on the $flag line:$Flags: ("player_allowed" "huge" "beam")(for SB Yali in Tides of Darkness) Do not use "supercap" inn the line,if i right.
Peter
Title: Re: Gliding and weapons range
Post by: Legate Damar on April 15, 2012, 02:19:23 pm
I need supercap because I want it to be able to damage juggernauts
Title: Re: Gliding and weapons range
Post by: Legate Damar on April 15, 2012, 02:33:00 pm
Okay I did some tweaking and I got it working, even with the supercap flag, but there's another problem: Ever time the beam fires, it completely blocks out my field of view!
Title: Re: Gliding and weapons range
Post by: Dragon on April 15, 2012, 02:53:01 pm
Decrease the size of the beam glow and the width of the beam itself. That's pretty easy, check the wiki if you can't figure it out.
Title: Re: Gliding and weapons range
Post by: Legate Damar on April 15, 2012, 04:09:11 pm
Got it