View topic - Can CEGTag be applied to debris?



All times are UTC + 1 hour


Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 28 Nov 2007, 21:59 
User avatar

Joined: 24 Aug 2006, 05:13
Location: USA West
Notice that when you have a severely killed unit that fragments, the fragments of the model emit particles. Can these be customized?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 28 Nov 2007, 22:04 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
Not yet. Lurker said something about hard-coded FX issues, I put just about the whole "sm├â┬Ârg├â┬Ñsbord" of hard-coded stuff in front of him, hopefully he'll look into this and make it so that we can customize this... maybe (gasp) per unit. Not going to worry about any of it, until it actually happens.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 28 Nov 2007, 22:24 
Spring Developer

Joined: 08 Oct 2006, 15:58
Would be trivial to add at first glance, I'll
try to cook something up in the next few
days.


Last edited by Kloot on 28 Nov 2007, 23:57, edited 1 time in total.

Top
 Offline Profile  
 
 Post subject:
PostPosted: 28 Nov 2007, 22:47 
Game Developer
User avatar

Joined: 25 Jun 2006, 07:44
Location: Germany
Would help if we could somehow define different CEGs to use on the pieces, don't just make that a global setting please.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 29 Nov 2007, 14:58 
User avatar

Joined: 24 Aug 2006, 05:13
Location: USA West
I'd prefer the option to define both a global default and specifics per unit. This coupled with death animations would make blowing things up a whole lot prettier.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 29 Nov 2007, 16:29 
User avatar

Joined: 16 Sep 2004, 22:20
Location: I FUCK IN SKY
Can't you just use emitsfx to make a weapon that's just there to look like debris?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 29 Nov 2007, 18:00 
Game Developer
User avatar

Joined: 25 Jun 2006, 07:44
Location: Germany
Yeah but that takes more work (especially if you want different parts of a unit to break off) and adds a weapon. On a second though, the ballistic property would be difficult.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Dec 2007, 15:55 
Spring Developer

Joined: 08 Oct 2006, 15:58
In case you missed the changelog entry, this can now be
done using the new unit FBI tags pieceTrailCEGTag and
pieceTrailCEGRange (where Tag is a string and Range is
an integer). If Tag is given, each piece of an exploding
unit randomly loads one of <pieceTrailCEGRange> CEG's
whose tag starts with the prefix <pieceTrailCEGTag> and
ends with a number in the range [0, pieceTrailCEGRange - 1]:

Code:
// CEG definitions
[Fire0]
   ...
[Fire1]
   ...
[Fire2]
   ...
[Fire3]
   ...


Code:
// unit FBI
pieceTrailCEGTag = "Fire";
pieceTrailCEGRange = 4;


If range is 1 (default) then you only need Fire0 defined,
otherwise all possible <pieceTrailCEGRange> tags are
expected to be valid.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Dec 2007, 16:20 
Game Developer
User avatar

Joined: 25 Jun 2006, 07:44
Location: Germany
Is there a way to make a piece pick a certain CEG or have it not use one at all?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Dec 2007, 16:38 
Spring Developer

Joined: 08 Oct 2006, 15:58
Nope, both of those would require specific
per-piece data to be set from COB prior to
the projectile's creation. It's all-or-nothing
for now.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Dec 2007, 16:41 
Game Developer
User avatar

Joined: 25 Jun 2006, 07:44
Location: Germany
Can't you at least make it depend on the FIRE bit?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Dec 2007, 17:50 
Spring Developer

Joined: 08 Oct 2006, 15:58
Sure, although I consider it something of
a hack to use that flag as an on/off switch
(might be better to define a new one, eg.
PP_CEGTrail).


Top
 Offline Profile  
 
 Post subject:
PostPosted: 07 Dec 2007, 17:57 
Game Developer
User avatar

Joined: 25 Jun 2006, 07:44
Location: Germany
Just as well, as long as it means I won't get blood trails on dropped weapons.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Dec 2007, 00:00 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
hmmm since r4951 it doesn't work for me anymore (r4939 worked). I add the CEGTRAIL to the cob :(

Btw I prefer the fbi-only system, cus changing the cob of >100 units is a pain :? (perhaps add a 3. fbi param to overwrite cob values?)


Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Dec 2007, 01:21 
Spring Developer

Joined: 08 Oct 2006, 15:58
Yeah, it seems the bitflags from COB do
not correspond to the actual flags used
by the projectiles. This is in CCobInstance:

Code:
int newflags = 0;
if (flags & 2) newflags |= PP_Explode;
// if (flags & 4) newflags |= PP_Fall;
if ((flags & 8) && ph->particleSaturation<1) newflags |= PP_Smoke;
if ((flags & 16) && ph->particleSaturation<0.95f) newflags |= PP_Fire;


Whereas this is in CPieceProjectile:

Code:
const int PP_Fall     = (1 << 0); // 1
const int PP_Smoke    = (1 << 1); // 2
const int PP_Fire     = (1 << 2); // 4
const int PP_Explode  = (1 << 3); // 8
const int PP_CEGTrail = (1 << 4); // 16


I'm tempted to equalize them, but that will
mean a lot of mods will have a lot of COB
scripts to edit. ;) In the meantime, r4955
should work again (PP_CEGTrail has been
renamed to PP_NoCEGTrail and is now 64
for backward-compatibility).


Top
 Offline Profile  
 
 Post subject:
PostPosted: 08 Dec 2007, 09:32 
Game Developer
User avatar

Joined: 25 Jun 2006, 07:44
Location: Germany
Kloot wrote:
I'm tempted to equalize them, but that will
mean a lot of mods will have a lot of COB
scripts to edit. ;)


Why not just equalize the Spring internal side instead of changing the interface?


Top
 Offline Profile  
 
 Post subject:
PostPosted: 10 Dec 2007, 09:39 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
it still doesn't work for me. is it still bugged?
(I added the fbi values and reseted the cob - this way it worked in r4939)


Top
 Offline Profile  
 
 Post subject:
PostPosted: 10 Dec 2007, 18:18 
Spring Developer

Joined: 08 Oct 2006, 15:58
Ya, it was. r4978 has the fix.


Top
 Offline Profile  
 
 Post subject:
PostPosted: 11 Dec 2007, 07:22 
Spring Developer
User avatar

Joined: 28 Jun 2007, 06:30
yup, works now again. BIG THX :3


Top
 Offline Profile  
 
PostPosted: 29 Apr 2011, 04:42 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
Can someone luaize this so it makes more sense to me?

Kloot wrote:
In case you missed the changelog entry, this can now be
done using the new unit FBI tags pieceTrailCEGTag and
pieceTrailCEGRange (where Tag is a string and Range is
an integer). If Tag is given, each piece of an exploding
unit randomly loads one of <pieceTrailCEGRange> CEG's
whose tag starts with the prefix <pieceTrailCEGTag> and
ends with a number in the range [0, pieceTrailCEGRange - 1]:

Code:
// CEG definitions
[Fire0]
   ...
[Fire1]
   ...
[Fire2]
   ...
[Fire3]
   ...


Code:
// unit FBI
pieceTrailCEGTag = "Fire";
pieceTrailCEGRange = 4;


If range is 1 (default) then you only need Fire0 defined,
otherwise all possible <pieceTrailCEGRange> tags are
expected to be valid.


Particularly the fire0, fire1, etc part.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: luckywaldo7 and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.