Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Spoon on May 14, 2009, 06:38:35 pm

Title: muzzle flash question (solved)
Post by: Spoon on May 14, 2009, 06:38:35 pm
I've been messing with the weapons.tbl a bit and I can't seem to figure out where to change the muzzle flash of weapons that are not flak guns.
Example
Code: [Select]
$Name:                                  Terran Huge Turret
$Model File:                    none
@Laser Bitmap:                  laserglow03
@Laser Glow:    2_laserglow03
@Laser Color:    20, 150, 20
@Laser Color2:    20, 150, 20
@Laser Length:       20.0
@Laser Head Radius:  6.40
@Laser Tail Radius:  2.60
$Mass:                                  0.4
$Velocity:                              175.0                           ;; speed of the weapon (initially) -- may or may not change
$Fire Wait:                             3.0                     ;; in seconds
$Damage:                                        100
$Armor Factor:                  1.25
$Shield Factor:                 0.5
$Subsystem Factor:              0.75
$Lifetime:                              12.0
$Energy Consumed:               0.30                            ;; Energy used when fired
$Cargo Size:                    0.0                             ;; Amount of space taken up in weapon cargo
$Homing:                                        NO
$LaunchSnd:                             111                                     ;; The sound it makes when fired
$ImpactSnd:                             85                                      ;; The sound it makes when it hits something
$Flags:                                 ("Big Ship")
$Icon:                                  icongun03
$Anim:                                  LoadGun02
$Impact Explosion:      none
Gets a white muzzle flash whereas a Prometheus gets a green one
How come and where does one change that?

Speaking of the Prometheus, for some reason it seems to be immune to color change...
Title: Re: muzzle flash question
Post by: Trivial Psychic on May 14, 2009, 07:57:20 pm
Firstly, you need to add a $Muzzleflash: line after the impact explosion line.  Now by default, you only have the explosion effect used by Flak weapons as your available muzzleflash.  Any further effects will need to be defined in mflash table file.  You can read about the weapons table entry in the Wiki at THIS (http://www.hard-light.net/wiki/index.php/Weapons.tbl#.24Muzzleflash:) location, and the mflash.tbl HERE (http://www.hard-light.net/wiki/index.php/Mflash.tbl).  Hope they help.
Title: Re: muzzle flash question
Post by: Spoon on May 15, 2009, 04:04:28 am
Firstly, you need to add a $Muzzleflash: line after the impact explosion line.  Now by default, you only have the explosion effect used by Flak weapons as your available muzzleflash.  Any further effects will need to be defined in mflash table file.  You can read about the weapons table entry in the Wiki at THIS (http://www.hard-light.net/wiki/index.php/Weapons.tbl#.24Muzzleflash:) location, and the mflash.tbl HERE (http://www.hard-light.net/wiki/index.php/Mflash.tbl).  Hope they help.
No you see, that's the part where I am confused. That muzzleflash flag is used for those flakgun effects and requires that you define all those .ani files and what not.
The prometheus cannon already Has a muzzleflash but it's Nowhere in the weapons.tbl (or in the very least, I cannot find it) no $Muzzleflash: line and nothing like that.
Code: [Select]
$Name:                                 Prometheus S
+Title:                                XSTR("GTW-5 Prometheus (standard) Cannon", 3274)
+Description:
XSTR(
"Medium Energy Usage
Level 5 Hull Damage
Level 4 Shield Damage", 3275)
$end_multi_text
+Tech Title:    XSTR("GTW-5 Prometheus S", 3276)
+Tech Anim:    Tech_GTW-5_Prometheus_S
+Tech Description:
XSTR(
"The original GTW-5 Prometheus S was removed from service when the link to Earth was lost and the GTVA was unable to obtain sufficient quantities of argon (a required element in the Prometheus's power-generation module). Recent deployment of Anuket and Zephyrus gas miners has enabled us to resume production of the GTW-5 Prometheus S. The S-type is a minor variant of the original Prometheus laser cannon. The S-type's faster recharge cycle and lower energy drain cause many pilots to prefer it over the R variant.", 3277)
$end_multi_text
$Model File: none
@Laser Bitmap: laserglow03
@Laser Glow:    2_laserglow03
@Laser Color:    20, 150, 20
@Laser Color2:    20, 150, 20
@Laser Length: 10.0
@Laser Head Radius: 1.0
@Laser Tail Radius: 1.0
$Mass:                                 0.2
$Velocity:                             750.0                           ;; speed of the weapon (initially) -- may or may not change
$Fire Wait:                            0.35                            ;; in seconds
$Damage:                               30
$Armor Factor: 0.9
$Shield Factor: 1.0
$Subsystem Factor: 0.35
$Lifetime:                             2.0
$Energy Consumed: 1.0                            ;; Energy used when fired
$Cargo Size: 0.0                             ;; Amount of space taken up in weapon cargo
$Homing:                               NO
$LaunchSnd:                            80                              ;; The sound it makes when fired
$ImpactSnd:                            85                              ;; The sound it makes when it hits something
$Flags:                                ( "player allowed")
$Icon:                                 iconPromS
$Anim:                                 PromS
$Impact Explosion: none
(http://xs139.xs.to/xs139/09205/muzzleflash868.jpg)
See what I mean?
Title: Re: muzzle flash question
Post by: starbug on May 15, 2009, 04:51:57 am
For all the weapons that use muzzleflash look at the mv_adveffects-wep.tbm in the mediavps and that has list of every weapon and lists the muzzleflashes and impact explosions etc.

eg
#Primary Weapons

$Name:         Subach HL-7
+nocreate
$Muzzleflash:                 PWmuzzle

$Name:         Subach HL-D
+nocreate
$Muzzleflash:                 PWmuzzle


$Name:         Mekhu HL-7
+nocreate
$Muzzleflash:                 PWmuzzle


$Name:         Mekhu HL-7D
+nocreate
$Muzzleflash:                 PWmuzzle


$Name:         Akheton SDG   
+nocreate
$Muzzleflash:                 Bmuzzle


$Name:         Morning Star
+nocreate
$Muzzleflash:                 PWmuzzle


$Name:         MorningStar D
+nocreate
$Muzzleflash:                 PWmuzzle

If your wanting to alter what the flash looks like you need to use the mv_advmuzzle-mfl.tbm. It gives you a list of all the muzzleflashs and what makes them up, but if you want to add one to a weapon not on the list in mv_adveffects-wep you just put the $Muzzleflash: <name of effect> at the end of the weapon tbl.
Title: Re: muzzle flash question
Post by: Spoon on May 15, 2009, 06:45:48 am
There we go, that's what I needed to know
Thanks a lot Starbug!