All you need to do is include the script in a -sct.tbm. The script-eval SEXP would only need to be used if the effect needed to be triggerable per-ship, rather than automatically affecting all occurrences of the ship class.
Anyway, here's the simplest kind of version of it:
#Conditional Hooks
$Application: FS2_Open
$On Game Init: [
last_particle_time = 0
next_particle_time = -1
]
$State: GS_STATE_GAME_PLAY
$On Frame: [
local currenttime = mn.getMissionTime()
if currenttime > 0.1 then
local num = #mn.Ships
for i=1,num do
local ship = mn.Ships[i]
if ship.Class.Name == "GTC Fenris" then
if currenttime > next_particle_time then
local ppos, pdir, pvel, plife, prad
ppos = ship.Position + ship.Orientation:unrotateVector(ba.createVector(35, 0, 0))
pdir = ba.createVector(10.0 + math.random() * 5.0, math.random() * 3.0 - 1.5, math.random() * 3.0 - 1.5)
pvel = ship.Physics.Velocity + ship.Orientation:unrotateVector(pdir)
plife = 1.0 + math.random() * 2.0
prad = 5.0 + math.random() * 5.0
ts.createParticle(ppos, pvel, plife, prad, PARTICLE_SMOKE)
-- Use PARTICLE_SMOKE, PARTICLE_SMOKE2 or PARTICLE_FIRE
ppos = ship.Position + ship.Orientation:unrotateVector(ba.createVector(-35, 0, 0))
pdir = ba.createVector(-10.0 - math.random() * 5.0, math.random() * 3.0 - 1.5, math.random() * 3.0 - 1.5)
pvel = ship.Physics.Velocity + ship.Orientation:unrotateVector(pdir)
plife = 1.0 + math.random() * 2.0
prad = 5.0 + math.random() * 5.0
ts.createParticle(ppos, pvel, plife, prad, PARTICLE_SMOKE2)
-- Use PARTICLE_SMOKE, PARTICLE_SMOKE2 or PARTICLE_FIRE
last_particle_time = currenttime
next_particle_time = currenttime + 0.1 + math.random() * 0.1
end
end
end
else
next_particle_time = -1
end
]
#End
Automatically spews smoke/fire plumes from both sides of all Fenrises (so change the ship class name reference). It wouldn't be hard to make it fancier and more customizable and more optimized, but as said, it's a prototype. The particle direction/radius/velocity/lifetime randomizations should be somewhat self-explanatory and easy to tweak.
If that's all you need for your particular usecase and it doesn't have any visible drawbacks then great; if you need more customization (custom smoke bitmap, or for it to work on different ship classes with different emitter locations, etc) then I could easily add those.