[QUESTION] How does FX work?

I am trying to make a new fx, but I cannot understand how they work. I thought I would copy an existing file and modify the values to play around, but I’m not having much success.

I copied fiery_cloud_streamer_trail.lua and added it to the events file of the hgn_defensefieldfrigate, to have an easy way to trigger it. It plays fine, but when I try to modify the line

property_09 = {name = "Duration",type = "VARTYPE_FLOAT",value = 3,},

to have a duration of 6, the fx does not play at all. There must be some subtlety I am missing…

I then tried with bullet_spark_trail_spray.lua and I got nothing - the fx won’t even play.

I feel like I’m swimming around in the dark at the moment, can anyone shed any light on why this is happening?

Hiya,

I kind of think the files in the game are being exported by a tool that we don’have, so I think you have to be kind of careful with them if you want them to work.

I usually start with an Fx that’s kind of close to the one I want. Like if you want a bullet, pick one - or a beam, whatever. There’s an effect listed as the ‘bulletfx’ in the weaponfire script which is the base of the Fx and where you want to start.

Once you pick one out, then you have to follow the paths through those files, which are pretty much always in the art\fx folder. There are somewhere around 3-5 files you have to change depending on the type of effect.

But just make it easy on yourself and add a number or a letter on the end of the file name so you can keep track of it all. Then you can mess with the values individually to see what happens, but I kind of think the names are usually self-explanatory.

If it’s just a duration that’s messing you up, make sure that it’s not getting triggered faster than the duration takes, like a weapon fire rate that goes faster than the length of the muzzle flash was messing some stuff up for me once.

1 Like

Thanks!

I have made some progress. I’ve been experimenting with boarding_beam_combo.lua. This is the full file:

fx = {
style = "STYLE_COMBO",
properties = {
property_06 = {name = "FX7",type = "VARTYPE_STRING",value = "BOARDING_BEAM_LIGHT",},
property_05 = {name = "FX6",type = "VARTYPE_STRING",value = "BOARDING_BEAM_SPRAY",},
property_07 = {name = "FX8",type = "VARTYPE_STRING",value = "BOARDING_BEAM_TUBE_SPRAY",},
property_02 = {name = "FX3",type = "VARTYPE_STRING",value = "boarding_beam_beam",},
property_01 = {name = "Fx2",type = "VARTYPE_STRING",value = "",},
property_04 = {name = "FX5",type = "VARTYPE_STRING",value = "boarding_beam_burn_ring",},
property_03 = {name = "FX4",type = "VARTYPE_STRING",value = "boarding_beam_burn_ring02",},
property_00 = {name = "Fx1",type = "VARTYPE_STRING",value = "",},
},
}

The “combo” part means that it is made up of multiple sub-fx. So I isolated each one by commenting out all the other lines:

property_06 = {name = "FX7",type = "VARTYPE_STRING",value = "BOARDING_BEAM_LIGHT",},

(No discernable effect):

property_05 = {name = "FX6",type = "VARTYPE_STRING",value = "BOARDING_BEAM_SPRAY",},

A sort of animated flame:
image

property_07 = {name = "FX8",type = "VARTYPE_STRING",value = "BOARDING_BEAM_TUBE_SPRAY",},`

A stream of particles moving out:
image

property_02 = {name = "FX3",type = "VARTYPE_STRING",value = "boarding_beam_beam",},

A beam of light (a sprite that is always facing the camera):
image

property_04 = {name = "FX5",type = "VARTYPE_STRING",value = "boarding_beam_burn_ring",},

A blob at the base of the beam (a sprite that is orthogonal to the beam):
image

property_03 = {name = "FX4",type = "VARTYPE_STRING",value = "boarding_beam_burn_ring02",},

A blob (sprite always facing the camera):
image

And this is what it looks like with no lines commented out, all the sub-fx combine to produce the boarding beam fx:

1 Like

wow! looks cool - did you start with another effect or make it from scratch?

That is what I started from. It’s the marine frigate boarding beam. I haven’t modified it yet!

Ah, okay. haha

How are you getting it to just show up in space? Is that a HOD with no geometry?

You can spawn an effect at any marker on the hod file, the marker does not need to be on the ship’s hull. In this case the marker is not near the ship, so I can look at the effect on its own.

so the thing with Duration is if you don’t modify the keyframe times, you won’t see a difference. (unless you modify it to be shorter)

Keyframe times? How are they defined? Perhaps that explains why some parameters have so many values associated with them…

iirc, it’s time, value, time, value, ...
everything comma separated

edit: i just remembered i have the original FX manual. I will upload it.

2 Likes

That would be very useful!

For realsies! That would be cool! I thought about posting some of the stuff I figured out, but even then it doesn’t seem like it works 100% of the time or always as you would expect. So I didn’t want to post what was… in fact… horsepucky.

Did you manage to find it? I had a search, but no joy :frowning: