Author Topic: Particle trail script  (Read 31816 times)

0 Members and 1 Guest are viewing this topic.

Offline m!m

  • 211
Particle trail script
script functionality ... checked
cool screenshots   ... checked
documentation      ... checked
all code in trunk     ... checked

I have a new script for you! :D
This time I cannot describe what it does but I have screeens! ;)

Death particles of an Orion:


Weapon impact effects:


Credit for script idea goes to Nighteyes.

Be sure to use a build that is revision 7736 or later

And here it is:
Script Download

Have fun!

Changelog:
Date: 1.12.2012
  • Fixed error with the +Default option of the DebrisTrail type
Date: 6.09.2012
  • Improved compatibility with other scripts using the same functions
  • Fixed some bugs
  • Possibly improved performance
Date: 4.11.2011
  • Added option "+Particle collides" to type "Weapon"
  • Added option "+PPS" to type "ParticleTrail"
  • Splitted documentation into smaller documents
Date: 19.10.2011
  • Added option "+Subsystem" to type "ShipTrail"
  • Added option "+Radius" to type "ShipTrail"
  • Added option "+Fixed Size" to type "ParticleTrail"
Date: 14.9.2011
  • Added experimental option "+PPS" to "ShipTrail" and "WeaponTrail"
Date: 7.9.2011

For script users: If you change a configuration file you don't have to exit FreeSpace for the change to take effect just reload the current mission.
« Last Edit: December 01, 2012, 05:46:55 am by m!m »

 

Offline Nighteyes

  • 211
Re: Particle trail script
well I'll just add some more information regarding what you can do with this awesome script...
If you know about my questions regarding "death particles", this is the answer for them, this script basically generates particles when a ship dies, you can control the size, speed, effect used, number of particles generated, and even stack multiple particle combinations on the same ship type.
a few cool things this can be used for:
adding more glowy particles when a capship dies
adding a few more big particles with an explosion effect with slow speed, giving more depth to normal explosions
burning trails of fire and smoke going in all direction, apart from the ones we already have on the debris
the latest addition is allowing particles to generate particles, this basically gives us real volumetric burning trails :D

*these screenshots are an overkill of the effect, but it gets the point across nicely  :yes:

m!m just wanted to thank you for all the time spent on this, now only thing left to do is getting into trunk, and making it possible to use with weapon impacts as well

 

Offline Darius

  • 211
Re: Particle trail script
BSG-style explosions! That Orion one looks amazing.

 

Offline m!m

  • 211
Re: Particle trail script
I added a "+Weapon" (expects a weapon class name) value to types "Ship" and "Weapon" that triggers the creation of weapons instead of particles. See documentation for more information.
Disclaimer: Creating too much weapons will result in game slowdown and possibly in reaching the maximum weapons number. Now nobody can say I didn't warn you  :p.

 

Offline Commander Zane

  • 212
  • Spoot Knight of Anvils
Re: Particle trail script
Pretty. :eek:

 

Offline Nighteyes

  • 211
Re: Particle trail script
I added a "+Weapon" (expects a weapon class name) value to types "Ship" and "Weapon" that triggers the creation of weapons instead of particles. See documentation for more information.
Disclaimer: Creating too much weapons will result in game slowdown and possibly in reaching the maximum weapons number. Now nobody can say I didn't warn you  :p.

awesome, using this we can have sparks/burning parts that can actually interact with other ships, or even simulate a kind of shockwave, with enough "weapons" firing we can have a spherical ball of death shooting outwards from an explosion!
*please note excessive use of this script will kill your comp :D

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Particle trail script
Looks nice, can't wait to see the patch integrated.
BTW, would that allow for real smoke trails (via scripting, I guess that getting them into table would take a while...) and things such as clouds to be done in FSO?

 

Offline Fury

  • The Curmudgeon
  • 213
Re: Particle trail script
Can you clarify what these states are exactly?

Quote
A number specifying the state in which the
particles will emit. These states are engineintern values that give the current explosion
state. Valid values are 1, 2 and 3.

Also, I love you m!m.

 

Offline m!m

  • 211
Re: Particle trail script
To my knowledge:
  • 1 is shortly before the ship breaks apart
  • 2 is the moment the ship breaks apart
  • 3 is the state from the point where a ship is at 0% to the end
but a coder might give you better information.

 

Offline Nighteyes

  • 211
Re: Particle trail script
Looks nice, can't wait to see the patch integrated.
BTW, would that allow for real smoke trails (via scripting, I guess that getting them into table would take a while...) and things such as clouds to be done in FSO?

this specific script wont help with clouds and missile trails, but similar particle generating scripts are possible... a nice way I made a cloud was to make an invisible box with no collide flag, and place glow points with a cloud texture, try it out.

Fury: from testing it I didn't see any difference between the state values, so I usually use "2" as its when usually you would want the particles to emmit.

this might help, I'll add some table values I'm using to test(this is from Diaspora, my personal testing only):

$Class:          Battlestar Sobek Class  --  first effect for ship class, glowy particle going in all directions
   +Effect:       capparticles   -- a glowy particle type effect, time it lives is according to the effect EFF file, so if you want it to last a long time lower the FPS
   +Time:          1
   +Emitstate:    1
   +Number:       65, 125
   +Speed:       35, 105
   +Size:          0.15, 2
   +Box Min:       0,0,0
   +Box Max:       0,0,0
   +Spewcone:       90
   
   +Trail effect:    Particlesmoke01  -- I didn't test yet the trails...

$Class:          Battlestar Sobek Class  -- second effect, only generates a handful of particles, big size with an explosion effect on them
   +Effect:       Exp_Huge
   +Time:          0.05
   +Emitstate:    1
   +Number:       2, 4
   +Speed:       35, 85
   +Size:          35 , 55
   +Box Min:       0,0,0
   +Box Max:       0,0,0
   +Spewcone:       90
   
   +Trail effect:    Particlesmoke01
« Last Edit: May 29, 2011, 12:39:17 pm by Nighteyes »

 

Offline Fury

  • The Curmudgeon
  • 213
Re: Particle trail script
Oh, there is a clear difference in state values. I prefer 1 personally, but it doesn't seem to trigger in all ships. I wonder what the underlying condition is. 3 is clearly different from the other two.

 

Offline Nighteyes

  • 211
Re: Particle trail script
well as I said I was mostly testing older builds of the script, didn't have time yet to see the final version...
can you specify the different particle behavior?

 

Offline Fury

  • The Curmudgeon
  • 213
Re: Particle trail script
What m!m said earlier in this topic should be spot on.

 

Offline Shivan Hunter

  • 210
  • FRED needs lambdas!
Re: Particle trail script
THIS IS EPIC

I love the Orion one, the Raynor one looks kinda wonky though.

This will go very well with the flaming debris script

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Minecraft
    • Steam
Re: Particle trail script
OMG, with this FSO is one step closer from making real my dreamy cap ship explotion thing!, It's just lacking the ability to define a "path" on top of the model from where particles need to be casted... figure out what I want to do with that :P
el hombre vicio...

 

Offline m!m

  • 211
Re: Particle trail script
Well, you can specify a very precise direction for the particles which may produce the intended effect :D

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Minecraft
    • Steam
Re: Particle trail script
BURNING DECKS!!! SCREAMING CREWMAN!!! and then... a hulk, a burnt out hulk is all that's left.

Oh dreamy, dreamy drama.
el hombre vicio...

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Particle trail script
I've been messing around with this sweet script for a bit now

I'm completely lost on how +Velocity X Off-set is suppose to work though

Also, I'd like to request +speed for the parent particle or life time min/max, whatever works. Right now all the particles pretty much fade out at the exact same moment (as if they hit an invisible sphere wall)
« Last Edit: May 29, 2011, 06:36:20 pm by Spoon »
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline m!m

  • 211
Re: Particle trail script
I'm completely lost on how +Velocity X Off-set is suppose to work though
Okay, for every one of those three values you can specify either one or two numbers. When a particle gets created a vector is created where every value of the vector (x, y, z) is randomized to be between the specified values or the exact value is used when only value was specified for an axis. After that the vector will be normalized to be of length one (standard mathematical operation) and after that multiplied by the "+Speed" value as specified before. This way you can force the particle to fly in one specific direction, especially useful for weapon-impacts where you want the particles fly in exactly one direction.
I hope that helped, I'm aware that the documentation is lacking at some points but I'm planing to improve the documentation :nervous:

Also, I'd like to request +speed for the parent particle or life time min/max, whatever works. Right now all the particles pretty much fade out at the exact same moment (as if they hit an invisible sphere wall)
These values are specific to a particle bitmap as these values are computed based on the number of frames and the specified FPS of an effect. I could modify "+Effect" to accept multiple effects where one will be chosen randomly thus creating some diversity.

 
Re: Particle trail script
I can see a major use for something like this in a campaign like DEM or JAD. Can you make something like this for FRED? Like, scripted destruction particles/effects/debris?
Could we with ink the ocean fill, and were the skies of parchment made
Were every stalk on earth a quill, and every man a scribe by trade
To write the love of God above, would drain the ocean dry
Nor could the scroll contain the whole, though stretched from sky to sky!