Alternate muzzle flash for special attack?


(GOLIATH Mod) #1

Hello Forum-Friends!

I’m working on some weapon upgrades for the fighters using the unaltered models. Check out theses cool Flash-Gordon-lookin’ ray-guns!

I’d like to give the death ray a big bright lensflare at the nose of the fighter, but I can’t figure it out.

So the muzzle flash is set in the SHIP.events file. Maybe I could add another event or animation with a different muzzle flash? I tried the following, but it didn’t work:

Weapons part of the .ship file:


StartShipWeaponConfig(NewShipType,"Hgn_KineticAutoGun","Weapon_FrontGun","Fire");

StartShipWeaponConfig(NewShipType,"MW_H","Weapon_FrontGun","FireSpecial");

MW_H means MicroWave_Hiigaran and it’s set as a special attack which is activated by an upgrade. (gonna give everybody their own color.) That all works already.

I tried adding the animation ‘FireSpecial’ to the events file, but it didn’t work. I also kinda have no idea what I’m doing with models yet, so maybe this is the way to solve it, but something is set wrong? Here’s the events file:

effects =
{
    animations =
    {
        animation1 =
        {
            name = "Fire",
            length = 2,
            loop = 0,
            parent = "",
            minimum = 0,
            maximum = 0,
            markers = {""}
        },
        animation2 =
        {
            name = "Death",
            length = 2,
            loop = 0,
            parent = "",
            minimum = 0,
            maximum = 0,
            markers = {""}
        },
        animation3 =
        {
            name = "Deathtrail",
            length = 3,
            loop = 0,
            parent = "",
            minimum = 0,
            maximum = 0,
            markers = {""}
        },				
				animation4 =
        {
            name = "PowerOff",
            length = 2,
            loop = 0,
            parent = "",
            minimum = 0,
            maximum = 0,
            markers = {""}
        },
				animation5 =
        {
            name = "Damage",
            length = 1,
            loop = 1,
            parent = "",
            minimum = 0,
            maximum = 0,
            markers = {""}
        },
        animation6 =
        {
            name = "dmg01",
            length = 1,
            loop = 1,
            parent = "Damage",
            minimum = 0.75,
            maximum = 1,
            markers = {""}
        },        

--this one is added in:

        animation7 =
        {
           name = "FireSpecial",
            length = 2,
            loop = 0,
            parent = "",
            minimum = 0,
            maximum = 0,
            markers = {""}
        },  

    },
    events =
    {
        event1 =
        {
            { "anim", "Deathtrail" },
            { "animtime", "0" },
            { "marker", "Root" },
            { "fx", "FIERY_EXPLOSION_WAVE" },
            { "sound", "EXPLOSION/MEDIUM/ETG_EXPLODE_MEDIUM_FIREY" },
            { "fx_scale", "0.5" },
        },
        event2 =
        {
            { "anim", "Fire" },
            { "animtime", "0" },
            { "marker", "Weapon_FrontGun_Position" },
		{ "fx", "muzzle_flash_combo" },
            { "sound", "WEAPON/FIGHTER/FIRE/WEAPON_FIGHTER_KINETIC_AUTOGUN_BURSTFIRE" },
            { "fx_nlips", "on" },
		--{ "fx_scale", "1" },
        },
        event3 =
        {
            { "anim", "Deathtrail" },
            { "animtime", "0" },
            { "marker", "Root" },
            { "fx", "FIERY_TRAIL_SPRAY" },
            { "sound", "EXPLOSION/DEATHTRAIL" },
            { "fx_scale", "5" },
        },
        event4 =
        {
            { "anim", "Deathtrail" },
            { "animtime", "0" },
            { "marker", "Root" },
            { "fx", "fiery_trail_spray_small" },
            { "fx_scale", "5" },
        },
        event5 =
        {
            { "anim", "Deathtrail" },
            { "animtime", "0" },
            { "marker", "Root" },
            { "fx", "fiery_flash_ring_long" },
            { "fx_scale", "30" },
        },
        death0 =
        {
            { "anim", "Death" },
            { "animtime", "0" },
            { "marker", "Root" },
            { "fx", "death_generic_fighter" },
            { "sound", "EXPLOSION/SMALL/ETG_EXPLODE_SMALL_PLASMA" },
            { "fx_scale", "0.75" },
        },
				death1 =
        {
            { "anim", "Death" },
            { "animtime", "0.85" },
            { "marker", "Root" },
            { "fx", "death_generic_fighter_nodebris" },
            { "sound", "EXPLOSION/MEDIUM/ETG_EXPLODE_MEDIUM_FIREY" },
            { "fx_scale", "2" },
        },
        event7 =
        {
            { "anim", "Deathtrail" },
            { "animtime", "0.5" },
            { "marker", "root" },
            { "fx", "fiery_trail_lines_spray" },
            { "fx_scale", "entity" },
        },
        event8 =
        {
            { "anim", "Deathtrail" },
            { "animtime", "0.5" },
            { "marker", "root" },
            { "fx", "fiery_trail_death_combo" },
            { "sound", "EXPLOSION/MEDIUM/ETG_EXPLODE_MEDIUM_FIREY" },
            { "fx_scale", "7" },
        },
        event9 =
        {
            { "anim", "Deathtrail" },
            { "animtime", "1" },
            { "marker", "root" },
            { "fx", "fiery_trail_shockwave_small" },
            { "fx_scale", "entity" },
        },

--this one is added in too:

        event10 =
        {
            { "anim", "FireSpecial" },
            { "animtime", "0" },
            { "marker", "Weapon_FrontGun_Position" },
            { "fx", "muzzle_flash_glow_blue" },
            { "sound", "SP_ELEMENTS/KPR_ATTACKDROID_OPEN" },
            { "fx_nlips", "on" },
        },

        dmg1 =
        {
            { "anim", "dmg01" },
            { "animtime", "-1" },
            { "marker", "Root" },
            { "fx", "dmg_damage_puff_combo,dmg_damage_steam_combo" },
            { "sound", "DAMAGE/SMOKE/DAMAGE_SMOKE_EXHAUST_HEAVY" },
            { "fx_scale", "1.5" },
            { "fx_nlips", "on" },
        },  
				--chunck fast				
				chunckfast1 = 
				{ 
						{ "anim", "death", }, 
						{ "animtime", "0.86", }, 						
						{ "marker", "Root", }, 
						{ "fx", "dmg_capital_explosion_large_hull_flare_cf_noscar_35_final_fast2", },                 
						{ "fx_scale", "0.4", }, 
				},	
				eventPowerOff = 
				{ 
						{ "anim", "PowerOff", }, 
						{ "animtime", "0", }, 
						{ "marker", "Root", }, 
						{ "fx", "plasma_ball_spray", }, 
						{ "sound", "SPECIAL/SPECIAL_ABILITIES_PHASE_OFF", }, 
						{ "fx_scale", "5", }, 
				},
    }
}

I also tried adding the term ‘firefx’ to the weaponfire file, but that didn’t work either:


-- formats: 
-- hitfx = "name"
-- bulletfx = "name"
-- nopenetratefx = "name"
-- missfx = "name"
-- anticipatefx = "name"
-- deathtype = "name"
-- component = "name"


hitfx = "ion_dmg_ring_spray"
bulletfx = "beam_generic_FU_H"


--firefx = "muzzle_flash_glow_blue"
fire_sfx = "SP_ELEMENTS/KPR_ATTACKDROID_OPEN"


nopenetratefx = "ion_dmg_ring_spray"
blowthroughfx = "blowthrough_generic"
deathtype = "deathBeam"
scartype = "iontrail"

hit_sfx = "WEAPON/FRIGATE/IMPACT/WEAPON_FRIGATE_ION_CANNON_BEAM_HIT"
nopentrate_sfx = "WEAPON/FRIGATE/IMPACT/WEAPON_FRIGATE_ION_CANNON_BEAM_HIT"
hit_clamp = {0.5, 1.25}

Anybody have any ideas?
Thanks!


(Taiidan Republic Mod) #2

I had a look through what you did and it looks fine to me. Are there any examples of this in the vanilla files? Maybe it is not possible to have two fx from the same marker? In which case just duplicate Weapon_FrontGun_Position and set the new fx to that marker.


(ajlsunrise) #3

Are you sure your weapon files are setup correctly?


(GOLIATH Mod) #4

Thanks for your answers, guys.

The weapon files are set up okay. If you want to see the Microwave Beam Emitter in action, it’s in the latest version of GOLIATH on Steam. I think it looks totally cool! If you get the jump on other groups of strike craft you fry 'em up like popcorn shrimp with it. It somehow really satisfying… until they do it to you that is. :smiley:

I was thinking the same thing about not being able to assign more than one muzzle flash to the same marker, even though more than one weapon at the same node is apparently fine.

I could duplicate the node if I was making a new model, but that’s not possible using an existing one, right? As far as I know the current files can’t be opened.

For my understanding, are the animations also defined in the model? I wasn’t sure if I’m allowed to just type in dummy animations in the event file like the ‘FireSpecial’ from above. I got the shields working by copying and pasting stuff, but I still don’t really completely get it. Because if not, then I don’t think it will be possible using the existing models.


(Sastrei) #5

I believe if you set the firefx in the .wf file, you shouldn’t need an .events file entry.


(Taiidan Republic Mod) #6

Or why not use Weapon_FrontGun_Muzzle for the marker for the special weapon? That way the fx would not share the same marker…


(GOLIATH Mod) #7

I’m not too sure if you can do that. The commented out section under ‘formats’ doesn’t list it. I just tried to enter it there, but it didn’t work.


(GOLIATH Mod) #8

Good idea! I’ll try it out.


(ajlsunrise) #9

Wrong kind of animation. mesh animations are stored in .mad files. Weapon, damage, etc. FX “animations” are stored in the .events files.


(GOLIATH Mod) #10

very useful info - thanks!


(GOLIATH Mod) #11

It works! I have it set up just like the original post, but apparently it doesn’t work with all FX.

I changed it to ‘muzzle_flash_combo’ and it worked: `

        event10 =
        {
            { "anim", "FireSpecial" },
            { "animtime", "0" },
            { "marker", "Weapon_FrontGun_Position" },
            { "fx", "muzzle_flash_combo_mw" },
            { "sound", "SP_ELEMENTS/KPR_ATTACKDROID_OPEN" },
            { "fx_nlips", "on" },
	{ "fx_scale", "5" },
        },


It doesn’t look right yet, but looky! Two different muzzle flashes!

Thanks guys!


(GOLIATH Mod) #12


that’s better! =D


(ajlsunrise) #13

Ah, right.

muzzle_flash_glow_blue is a ring FX. I’d have to double check, but the size defined in the FX file is probably small enough that you just couldn’t see it.

muzzle_flash_combo is a combo FX (which is just a combination of a bunch of other FX), one of which is probably called muzzle_flash_spray, which is an emitter (or spray) FX, which in turn emits ring particles (i.e. muzzle_flash_glow). The emitter has the ability to control the size of the particles emitted, which is probably what is happening here.

You should be able to use ring FX as fire fx, but you just have to ensure the correct size is defined in the FX file, or that you put an appropriate value in the fx_scale value of the .events file.


(GOLIATH Mod) #14

Hi,

Could really be. But there were some other ones that really didn’t work. For instance, I tried the steam from the top of the hgn ion cannon frigate, and the squares where the effects are portrayed were visible. It looked kind of like static on an old tv set. My guess is that it has something to do with the animation time, or whatever ‘nlips’ is maybe. There were some other ones like that too.

That’s totally useful info though. :wink: I’ve been doing all the effects so far by finding one that sort of works about right, and changing it from there.