[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:

Sorry fo rthe delay. Have been sick…

2 Likes

Thanks, that looks like it’s going to be very useful!

Hope you’re feeling better!

wow! Thanks! The acceptable value ranges are totally useful too!

Assuming they still apply for HWRM…

as far as I can tell, the FX system/parameters did not change from HW2 to HWRM.

Thanks for the hopeful wishes! :slightly_smiling_face: I’m not yet though… :man_shrugging:

1 Like

I kind of think things are the same too. Looking at some of the things I was trying and the value ranges, I think I was out of the acceptable values when things were getting weird. (sometimes) other times it was just plain weird.

Or at least if things are getting flakey with whatever your trying, you can check the value ranges to see if that might be it.

Maybe there’s another layer in between the FX tool and the output files:

I’ve been redoing the platforms so that you can REALLY seal a front or mount a defense with them. So there are four of them, one for fighters, one for corvettes , frigates and cap ships. They’re expensive and kind of easy to take out individually, but if all four of them together, you’ve got a REAL problem.

Anyway, of course the anti cap-ship one has a super-duper über-laser on it, and I’ve been messing with in on and off for the last couple of weeks. Anyway, the max beam width in the documentation is 10 and the rings on this version have a width of 50:

The rings don’r move along the beam! I was thinking of that time in the Flash Gordon movie where Baron finds that laser-machine-gun-thingy and them blasts those two knuckleheads with the gas masks on when they come through the door before he kicks the tripod away totally cool-like. I’m pretty sure the bullets didn’t move, they were just kind of dots floating in space, which I though was super-awesome when I was a kid. But whatever, I wanted to see if there would be a difference if I change the beam width to 10 and:

Itty-bitty stupid rings!

This effect does seem to get dropped as one of the first ones once the game starts filling up though, so maybe the engine can do it, but it doesn’t like it.