Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Nighteyes on January 20, 2011, 07:25:59 pm
-
topic, but just to clarify, you know when a Sathanas explodes for hours, and there are lots of those glow particles floating about along with the debris? im speaking about them, how can I set the amount that spews? why do I have ships that don't spew them at all? can their speed be altered?
-
I have absolutely no idea, but since no one else replied I'm willing to throw some wild guesses out there.
Is it based on mass at all? or the Expl propagates line in ship.tbl. Maybe it has to do with the amount of time it takes for the Sathanas to explode. Again, based on size or mass?
-
Or hitpoints. ;) I don't know that, just saying.
-
I know there is a lot of those particles thrown out when a Comm note dies. You might want to have a look there.
-
That's specific to the "knossos" ship type (both the Knossos and the Shivan Comm Node are of that type), if I recall correctly.
-
well, I tried a few things, none of them affected the particles... not mass(in pof file), not explosion damage, not ship HP... anything else I can test?
also, anyone else knows if its at all possible to affect the speed at witch the explosion of a ship propagates? a Sathanas explodes for a very long time, with the 2 halved parts exploding on and on, any way to make it just generate a few explosions and "sweep" through the ship faster?
-
Propagation is based on bounding box size or radius, either one.
-
We probably need a definite answer from one of the coders. I'd like more control over this as well.
-
Knossos type objects and other types of objects generate different particle effects
-
17:57:15 Wanderer: given that those are wee bit lenghty and complex thing and there seems to be a bit of variety of questions in the thread so what exactly do you need to know?
17:59:03 Fury`: Well, first being what exactly controls how many particles (particlesmoke02) are spawned and if any is at all.
17:59:35 Fury`: Secondly, is there any way to control the amount and velocity of said particles?
18:00:15 Wanderer: no and no
18:00:38 Fury`: Thirdly, is there any way to set what kind of particles are spawned, as you said that certain objecttypes have different particles?
18:01:05 Wanderer: i can post the actual particle emitters code makes use of - if it helps to clear the matter any
18:01:21 Fury`: probably wouldn't
18:01:40 Wanderer: well.. they are roughly the same in format as table based emitters
18:01:58 Fury`: So, what's the answer to the first question?
18:02:27 Wanderer: number of particles is randomized
18:03:50 Wanderer: and does not depend on any ship/model statistic or ability
18:04:16 Fury`: too bad :/
18:04:46 Fury`: this along with getting scalable propagating explosions would go a long way in getting nicer ship deaths
18:05:34 Wanderer: for knossos its 15-30, for normal small shrapnel its 50-100 and for ones generated from ship halves its 40-80 (the last ones are most likely the ones you referred to)
18:05:44 pecenipicek: and defining how the ship should behave when dieing. :p
18:06:06 Wanderer: its lengthy code
18:07:00 Wanderer: and if you take the math involved to get 'really_final_death_time' and 'final_death_time' then its even longer
18:13:39 Wanderer: Knossos type particles
Code:
pe.num_low = 15; // Lowest number of particles to create
pe.num_high = 30; // Highest number of particles to create
pe.pos = outpnt; // Where the particles emit from
pe.vel = objp->phys_info.vel; // Initial velocity of all the particles
pe.min_life = 2.0f; // How long the particles live
pe.max_life = 12.0f; // How long the particles live
pe.normal = objp->orient.vec.uvec; // What normal the particle emit around
pe.normal_variance = 2.0f; // How close they stick to that normal 0=on normal, 1=180, 2=360 degree
pe.min_vel = 50.0f;
pe.max_vel = 350.0f;
pe.min_rad = 30.0f; // * objp->radius;
pe.max_rad = 100.0f; // * objp->radius;
particle_emit( &pe, PARTICLE_SMOKE2, 0, 50 );
Non-knossos particles
Code:
pe.num_low = 50; // Lowest number of particles to create
pe.num_high = 100; // Highest number of particles to create
pe.pos = objp->pos; // Where the particles emit from
pe.vel = objp->phys_info.vel; // Initial velocity of all the particles
pe.min_life = 0.5f; // How long the particles live
pe.max_life = 4.0f; // How long the particles live
pe.normal = objp->orient.vec.uvec; // What normal the particle emit around
pe.normal_variance = 2.0f; // How close they stick to that normal 0=on normal, 1=180, 2=360 degree
pe.min_vel = 0.0f; // How fast the slowest particle can move
pe.max_vel = 20.0f; // How fast the fastest particle can move
pe.min_rad = 0.1f; // Min radius
pe.max_rad = 1.5f; // Max radius
if (!knossos_ship) {
particle_emit( &pe, PARTICLE_SMOKE2, 0 );
}
Particles from ship halves
Code:
pe.num_low = 40; // Lowest number of particles to create
pe.num_high = 80; // Highest number of particles to create
pe.pos = model_clip_plane_pt; // Where the particles emit from
pe.vel = half_ship->phys_info.vel; // Initial velocity of all the particles
float range = 1.0f + 0.002f*half_ship->parent_obj->radius;
pe.min_life = 0.5f*range; // How long the particles live
pe.max_life = 6.0f*range; // How long the particles live
pe.normal = vmd_x_vector; // What normal the particle emit around
pe.normal_variance = 2.0f; // How close they stick to that normal 0=on normal, 1=180, 2=360 degree
pe.min_vel = 0.0f; // How fast the slowest particle can move
pe.max_vel = half_ship->explosion_vel; // How fast the fastest particle can move
float scale = half_ship->parent_obj->radius * 0.01f;
pe.min_rad = 0.5f*scale; // Min radius
pe.max_rad = 1.5f*scale; // Max radius
particle_emit( &pe, PARTICLE_SMOKE2, 0, range );
-
so basically what this means that a non coder(like me) can't really do anything with them... :/
-
Some of the variables could be made available for the modders. Would just need to decide on what level and on what level of control should those be implemented - if they were to be implemented at all that is.
EDIT: Some of the other variables related to ship death procedure could be modder definable as well but please keep in mind that there are PLENTY of those - just be reasonable in what you request.
-
just be reasonable in what you request.
It's not reasonable at all, but anything that is not yet modifiable via tables should be. The question is in what order they are implemented and to what table. As long as we're talking about ship deaths, the best table to have those settings is ships.tbl for per-ship control over the settings.
As I don't know what exactly could be in the tables, I really cannot request anything specific either. That would have to be decided by coders what to implement. The more the better, but anything is better than nothing at all. More can always be implemented later.
-
Well... on a glance it seems that multiplier based solution would be easiest to implement. Number of particles, and particle lifetime, velocity, and radius. Possibly entry for allowing other bitmaps to be used.
-
That sounds like a great start!
Related to ship deaths, it'd be awesome if this flag could be upgraded to work with propagating explosions. I assume this would fix the issue with capital ships having humongous fireballs when they break apart.
http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Expl_Visual_Rad: (http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Expl_Visual_Rad:)
Not related to deaths, but damage. Following flags exist:
http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Impact_Spew: (http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Impact_Spew:)
http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Damage_Spew: (http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Damage_Spew:)
But you can't control radius or width of the spew. Fighters have really large particle spews emanating from hull impacts, it's borderline ridiculous. Right now I don't care too much about those flags being unable to use custom spews, although modders could use that too.
Unreasonable already? :nervous: