Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: FlareBaffled on January 10, 2007, 02:21:12 pm

Title: afterburner effects
Post by: FlareBaffled on January 10, 2007, 02:21:12 pm
Whilst busily assembling all the effects, tricks and knowledge I need to make the sort of ships/universe laws I want...I have turned my attention to afterburners!

I want them....but not in the rather crude way the stock ships do it! I have noticed that the FSP ships seem to do things in a different way..namely changing the colour of the engine glow. Nice...but agan, not what I want!

What I want ( if it's possible ) is something a bit more like the particle effect you get when a ship is damaged. It spews out a glorious plume of flame... which is exactly what I want for the fuel wasting boost of acceleration! Can this be done? I want a really spectacular flame of an afterburner ( just like the BSG original series Vipers when they hit their turbo's )

Any way to make this happen?
Title: Re: afterburner effects
Post by: Bobboau on January 10, 2007, 02:35:52 pm
in the ships table, after $score:
before subsystems (right before stealth on ships that have that tag)

Code: [Select]
$Thruster Particles:
[optional]$Thruster Particle Bitmap: filenamegoeshere
[optional]$Afterburner Particle Bitmap: filenamegoeshere
$Min Radius: #.#;;floats, I don't remember if they are scalers of the thruster glow size or the actual size
$Max Radius: #.#
$Min created:#;;these are ints, should be small ones too
$Max created:#
$Variance:#.#;;sort of like a spew angle  but between 0.0 and 1.0

you need $Thruster Particle Bitmap: or $Afterburner Particle Bitmap:, you can use both, but you don't have to. also you can havemore than one particle system defined, just do the same thing you did for the first one.

BTW no one has used this in a LONG time, so it might be broken.
Title: Re: afterburner effects
Post by: FlareBaffled on January 10, 2007, 02:54:57 pm
That seems simple enough!

Are there any particular restrictions on the bitmaps I should use. I assume they are just giving colour to the particles....so I guess they should be pretty small. I will give it a test, and let you know if it works :D
Title: Re: afterburner effects
Post by: Bobboau on January 10, 2007, 03:01:13 pm
I think they need to be in ani/eff format
Title: Re: afterburner effects
Post by: FlareBaffled on January 10, 2007, 03:10:58 pm
Put this in between $score and the trail data in the Ulysses...
$Thruster Particles:
$Min Radius: 3.5
$Max Radius: 10.5
$Min created:2
$Max created:5
$Variance:0.3

run the launcher, and the game crashes when it loads the ships tbl file.


Error: formatting error in the thruster's particle section for ship GTF Ulysses

File:J:\src\cvs\fs2_open_3_6_9.rc7dot9x\code\ship\Ship.cpp
Line: 3902
[This filename points to the location of a file on the computer that built this executable]

Call stack:
------------------------------------------------------------------
    fs2_open_3_6_9-7dot9x.exe 0049c315()
    fs2_open_3_6_9-7dot9x.exe 00402a47()
------------------------------------------------------------------

The debugger says it has found $min radius when it expected $subsystem, end or $name.

I added in a line after the Thrust particles:
$Thruster Particle Bitmap: fglare.pcx

Glare is a simple 32x32 green pcx file. This gets rid of the error message.... but the afterburners are identical to standard. No evidence of any particle effects at all.
Title: Re: afterburner effects
Post by: Bobboau on January 10, 2007, 03:35:42 pm
$Afterburner Particle Bitmap:

and green in pcx gets turned transparent

and I think the file needs to be eff or ani
Title: Re: afterburner effects
Post by: Trivial Psychic on January 10, 2007, 10:51:23 pm
If you don't specify the effect, which one will it default to?
Title: Re: afterburner effects
Post by: Bobboau on January 11, 2007, 02:16:01 am
clarify that query.
Title: Re: afterburner effects
Post by: FlareBaffled on January 11, 2007, 03:06:39 am
When I left out the reference to the effect, the game crashed. It clearly needs to have something specified, or it fails to find an element in the ships.tbl and throws out an error.

Not sure what I use to create an eff file... but I think there are some ani files in the vp files I can test this with.

What program do I use to make an eff or ani file with, and what does it need to do? It looks as though this should still be in place somewhere, since the thing didn't crash..or at least...I think thats how it would work :nervous:
Title: Re: afterburner effects
Post by: Herra Tohtori on January 11, 2007, 03:35:07 am
I suggest you check the wiki entry about texturing and in particular, animated textures (http://www.hard-light.net/wiki/index.php/Texturing#Animated_Textures). Don't be confused - the article is about textures, but the EFF animation system works exactly the same in effects.

Long story short - an EFF file is a plain text file that tells the game to use a certain number of image files (TGA, DDS, PCX, JPG... practically anything that the game supports AFAIK) as animation frames, as opposed to an ANI file which is a roughly similar file type as animated GIF, albeit with slightly better quality. ANI file contains all the frames in it, whereas an EFF animation uses individual image files as frames.
Title: Re: afterburner effects
Post by: FlareBaffled on January 11, 2007, 02:00:26 pm
The Thruster particles bit works like a charm now. I pinched an ani file from the media VP file to test it, and got the thruster particles working. This gives you the particle trails when the afterburners are OFF!!!! Soon as you hit the 'burners though, the effect stops and you get the old 'modelled' afterburners in stead.

If I try to put in particle AND afterburners, you get an error message which seems to indicate that it can't cope with the second set of parameters.

---------------------------
Error!
---------------------------
Error: ships.tbl(line 212:
Error: Missing required token: [$Min Radius:]. Found [$Afterburner Particle Bitmap: te]
in ship: GTF Ulysses instead.


File:J:\src\cvs\fs2_open_3_6_9.rc7dot9x\code\Parse\PARSELO.CPP

Line: 656

[This filename points to the location of a file on the computer that built this executable]



Call stack:

------------------------------------------------------------------

------------------------------------------------------------------



[ This info is in the clipboard so you can paste it somewhere now ]





Use Ok to break into Debugger, Cancel exits.


---------------------------
OK   Cancel   
---------------------------

I tried putting in the Afterburners bit after all the parameters for the thruster particles, but it can't have it there either. Looks like the afterburners don't have a working particle trail function... :(
Title: Re: afterburner effects
Post by: Bobboau on January 11, 2007, 03:04:20 pm
what is the syntax you are useing exactly?
Title: Re: afterburner effects
Post by: Unknown Target on January 11, 2007, 04:09:15 pm
And why in god's name are you using the old models with the old block flares? Why not use the bitmap flares? Combining that with the particle effect might look better.
Title: Re: afterburner effects
Post by: FlareBaffled on January 11, 2007, 04:17:10 pm
All these lines were pasted into the ship tbl entry for the Ulysses. It went after the 'score' entry, and before the trails bit for the trail effects in nebulae.

This chunk worked, and displayedthe expected effect when the ship was not using burners...

$Thruster Particles:
$Thruster Particle Bitmap: test.ani
$Min Radius: 3.5
$Max Radius: 10.5
$Min created:2
$Max created:5
$Variance:0.3

The next chunk was put in, and did nothing when the burners were activated.

$Thruster Particles:
$Afterburner Particle Bitmap: test.ani
$Min Radius: 3.5
$Max Radius: 10.5
$Min created:2
$Max created:5
$Variance:0.3

No error messsages were displayed, and the game ran OK.

Next, I tried putting in the following:

$Thruster Particles:
$Thruster Particle Bitmap: test.ani
$Afterburner Particle Bitmap: test2.ani
$Min Radius: 3.5
$Max Radius: 10.5
$Min created:2
$Max created:5
$Variance:0.3

Both .ani files were placed in the same effects folder and were stock files. I tested both with the first, known to work thruster particles bit, so I know they will both display. The game displays an immediate error when you load it up. Presumably, it is parsing the ships tbl at this point. The following error message occurs:

Error: ships.tbl(line 212:
Error: Missing required token: [$Min Radius:]. Found [$Afterburner Particle Bitmap: te]
in ship: GTF Ulysses instead.

File:J:\src\cvs\fs2_open_3_6_9.rc7dot9x\code\Parse\PARSELO.CPP
Line: 656
[This filename points to the location of a file on the computer that built this executable]

Call stack:
------------------------------------------------------------------
------------------------------------------------------------------

Thinking that it might need a full set of parameters for each type of trail, I tried the following:

$Thruster Particles:
$Thruster Particle Bitmap: test.ani
$Min Radius: 3.5
$Max Radius: 10.5
$Min created:2
$Max created:5
$Variance:0.3
$Afterburner Particle Bitmap: test2.ani
$Min Radius: 3.5
$Max Radius: 10.5
$Min created:2
$Max created:5
$Variance:0.3

This crashes with the error message:

Error: ships.tbl(line 217:
Error: Required token = [#End], [$Subsystem:] or [$Name], found [$Afterburner Particle Bitmap: te].

File:J:\src\cvs\fs2_open_3_6_9.rc7dot9x\code\Parse\PARSELO.CPP
Line: 656
[This filename points to the location of a file on the computer that built this executable]

Call stack:
------------------------------------------------------------------
------------------------------------------------------------------


Which says to me that the game has read the first parameter block, and was not expecting to find a second one!

Unknown Target.... I am simply using an old, stock Ulysses model because I know it will not have anything in it to confuse the issues. If I start making a model of my own and throwing in lots of other complexities I don't fully understand, it will make it harder to pin down issues. I have no clear idea or guidelines for any of these effects, if you are referring to the 'green light' on the afterburners compared to the bluish ordinary engine glows....well...thats not the effect I want! Afterburners, in my opinion, work by throwing lots of raw fuel into the engine exhausts, and igniting it. It should look like the Colonial Viper engines in the original BSG series. That's what I want to get to ... and I don't care how ;)
Title: Re: afterburner effects
Post by: Trivial Psychic on January 11, 2007, 10:29:57 pm
clarify that query.
Well, the table data summary you put up had:

[optional]$Thruster Particle Bitmap: filenamegoeshere
[optional]$Afterburner Particle Bitmap: filenamegoeshere

If the thruster particle and afterburner particle bitmaps are optional, what will the code force displayed and what effect will it chose if neither of the above optional lines are present?
Title: Re: afterburner effects
Post by: Bobboau on January 11, 2007, 10:39:41 pm
I believe it throws an error if you don't supply anything. so it's sort of like an xor, you can have one or the other but not both, but you need one, I realized it was worded ambiguously but I thought people would figure out what I meant.

if you don't give it any graphics it has nothing to display.
Title: Re: afterburner effects
Post by: Bobboau on January 11, 2007, 10:50:25 pm
you need to repete the whole block, includeing the $Thruster Particles:
 and one of the bitmap defines

use a diferent ANI for the two effects, you won't be able to tell the diference if they are exactly the same, other than that your first attempt was right.

man it's like your doing everything perfictly wrong, narrowly averting success :lol:
Title: Re: afterburner effects
Post by: FlareBaffled on January 12, 2007, 02:20:39 am
:D It's good to know I was on the right track! Just slightly derailed :lol:

I will try it again tonight with the full thing in there. It is just about the only combination I haven't tried! I have 2 different ani files to play with, both pinched from the stock VP's and both ( as I recall ) different colours.

SO...if I put in:

$Thruster Particles:
$Thruster Particle Bitmap: test.ani
$Min Radius: 3.5
$Max Radius: 10.5
$Min created:2
$Max created:5
$Variance:0.3
$Thruster Particles:
$Afterburner Particle Bitmap: test2.ani
$Min Radius: 3.5
$Max Radius: 10.5
$Min created:2
$Max created:5
$Variance:0.3

then it should display a cloud of 'test' animations scattering around on normal power, and a cloud of 'test2' particles on afterburner.

What worries me is the fact that the game would not display the afterburner ones when there was no thruster ones as well. I suppose I could use a blank file for the thruster ones, or put nil values in the number created. Anyway.... I will play with that once I actually have it working! Will test when I get in from work today.
Title: Re: afterburner effects
Post by: Bobboau on January 12, 2007, 02:47:22 am
did you try just putting in

$Thruster Particles:
$Afterburner Particle Bitmap: test2.ani
$Min Radius: 3.5
$Max Radius: 10.5
$Min created:2
$Max created:5
$Variance:0.3

?
Title: Re: afterburner effects
Post by: FlareBaffled on January 12, 2007, 10:02:59 am
yes..I tried that.

The game returned no erros and ran fine..there was no particle effects displayed though. I used the same ani file and values I had used for the thruster trails to double check it. I know the values and ani were OK, it just didn't display when the afterburner button was hit.

Title: Re: afterburner effects
Post by: FlareBaffled on January 12, 2007, 11:53:09 am
Update:

Home from work, and I threw in the text as Bobbau suggested..and it works just fine!

I used the 'circle hit' ani for the burners, and it looks pretty much how I wanted right off.  Pure luck on the choice of file...but good for me! I have some blue sparkly effect on thrusters which won't stay.... but it's easy to see that things are working! I will play about a bit to get a feel for how the parameters will tune the effect to give me just what I want..but this os good so far!

Thanks for the help Bobbau! I would never have got this by trial and error  ;)
Title: Re: afterburner effects
Post by: Getter Robo G on January 13, 2007, 08:39:30 am
The masses (namely me) demand screenies!)  :P

Might want to pick your brain later about this for "other things" (ominous huh?).

TBC...
Title: Re: afterburner effects
Post by: FlareBaffled on January 13, 2007, 12:26:32 pm
flying in normal mode...
(http://img79.imageshack.us/img79/601/noburnerbx2.jpg)

Then with afterburners
(http://img57.imageshack.us/img57/1253/burnerdb3.jpg)

The afterburner effects are using stock FS2 ani files, and are pretty much a first stab at parameters. Reducing the variation tightens the field of particles some ( which it needs ) and reducing the volum would be a good plan too! But if I can get it like this...then it should be easy enough to get right with practice!
Title: Re: afterburner effects
Post by: Snail on January 13, 2007, 12:32:49 pm
Oooooh... Look at that flame!
Title: Re: afterburner effects
Post by: Huggybaby on January 13, 2007, 12:34:19 pm
Yeah man, thanks for persisting, that looks awesome! I want it!

What really bothers me in my games is that the ships have a long (nice looking) plume coming out the exhaust, even when they're motionless! So much for suspension of disbelief.

Can you fix that too?
Title: Re: afterburner effects
Post by: Taristin on January 13, 2007, 01:58:57 pm
That was code, and supposedly been replaced, or being replaced, no?
Title: Re: afterburner effects
Post by: MetalDestroyer on January 13, 2007, 02:35:34 pm
flying in normal mode...
http://img79.imageshack.us/img79/601/noburnerbx2.jpg

Then with afterburners
http://img57.imageshack.us/img57/1253/burnerdb3.jpg


OMFG !! Are they available to download ? if yes, can I get the link ? :p
I like them pretty much. Are there any variant for the Shivan and Vasudan ships ?

Edit : Oups, sorry, I didn't read the whole thread. Well, the animation thruster are pretty good except the afterburner one where you have a bit exagerated into the effect >_<.
Title: Re: afterburner effects
Post by: FlareBaffled on January 13, 2007, 03:22:43 pm
I have already toned it down a bit. I will also try and make some proper ani files to work with this. These are just using 2 stock ones ( akheton_impact and circe_bitmap ) which I picked pretty much at random  until I found ones I liked. I am sure I can make something that creates particles more in keeping.

Once I have it done, I will gladly put it up for others who want it. It's just a simple bit of code to paste into the ship table and a couple of small graphic files. For other races, it would just be a question of finding other colours/animations to give a bit of differential.
Title: Re: afterburner effects
Post by: Commander Zane on January 13, 2007, 09:20:20 pm
Those look like they would make my computer explode. :nervous:
Title: Re: afterburner effects
Post by: Snail on January 14, 2007, 04:01:10 am
The Afterburner one made me laugh actually. :)
Title: Re: afterburner effects
Post by: Herra Tohtori on January 14, 2007, 12:28:18 pm
Quote
(http://img57.imageshack.us/img57/1253/burnerdb3.jpg)

Damn, it looks like GTVA has gone back to good ol' chemical rocket era...  :lol: :yes:

(http://www.ussyorktown.com/yorktown/appflame.jpg)

For reference, the rocket there is a Saturn V which was 111 metres (364 ft) tall in lift-off configuration for Apollo missions...

Title: Re: afterburner effects
Post by: FlareBaffled on January 14, 2007, 04:03:31 pm
The flare of burning chemical fuel was exactly what I DID want :D For the stuff I want to build, the afterburner was essentially a supply of chemical fuel to be sprayed into the cruise ingine exhaust to create an additional thrust for short periods. Fuel will be limited, so when it's gone... it's gone.

I have tamed it a little since the first screenshots, and it is looking how I wanted it to look. I like the effects... and that's all that actually matters to me ;)