Author Topic: 2008-05-28 Stable Branch - Customized Explosions and Cockpit Fixes  (Read 8871 times)

0 Members and 1 Guest are viewing this topic.

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
2008-05-28 Stable Branch - Customized Explosions and Cockpit Fixes
http://wwwcsif.cs.ucdavis.edu/~chos/20080328trunk.zip

Notable bug fixes:
- Fixed zbuffer clipping bug for cockpit POFs (IE, no more ships flying through your cockpit if you're using separate cockpit POFs)
- TrackIR users can no longer lean backwards in the cockpit and subsequently clip through their cockpit seat.

Notable changes:
- Adds the capability to define more than 6 bitmap animations in fireball.tbl. Limit has been bumped to 32. Custom fireballs need to be explicitly referenced in order to be used.
- Animations defined in fireball.tbl can now be referenced as explosions for specific ship types (in objecttypes.tbl) or classes (ships.tbl). Animations defined for a particular ship class or type will cycle through randomly upon creation of each instance.

Rudimentary and needlessly complicated documentation (Will be added to the Wiki):

Adding more fireballs:

Adding more entries to fireball.tbl is the same as defining the default 6:

Code: [Select]
$Name: [Effect filename (String)]
$LOD: [LOD Number (Integer)] (Optional)
$Light color: [RGB values (3 integers delimited by commas)] (Optional)

Remember to end the file with a "#End" token

The first six animations will always be used as the defaults and must always be present. They are defined in this order from 0-5 as:
    0. Medium sized explosion
    1. Normal warp effect
    2. Knossos warp effect
    3. Asteroid explosion
    4. Large explosion 1
    5. Large explosion 2

Any animations subsequently defined thereafter will not be used in the game unless you specify the entry in ships.tbl or objecttypes.tbl.

Example of fireball.tbl:

Code: [Select]
#Start
$Name: exp04 ;0 Used for the 4 little explosions before a ship explodes
$LOD: 1
$Name: WarpMap01 ;1 Used for the warp in / warp out effect
$LOD: 4
$Name: WarpMap02 ;2 Used for the KNOSSOS warp in / warp out effect
$LOD: 4
$Name: exp05 ;3 Used when an asteroid explodes
$LOD: 4
$Name: exp05 ;4 ship explosion 1
$LOD: 4
$Name: exp06 ;5 ship explosion 2
$LOD: 4
$Name: customBoom ;6
$LOD: 1
$Name: customBoom04 ;7
$LOD: 1
$Name: customBoom20 ;8
$LOD: 1
$Name: customBoom06 ;9
$LOD: 1
#End

If you already defined a custom fireball in fireball.tbl, you can redefine/replace existing entries with a modular fireball table.

Code: [Select]
$Name: [Effect filename (String)]
+Custom_Fireball [Index of a fireball defined in fireball.tbl]

Example of xxx-fbl.tbm:

Code: [Select]
$Name: betterExp
      +Custom_Fireball 8
$LOD: 1

You cannot define additional custom fireballs using a modular fireball table, you can only replace entries that are already defined in fireball.tbl.

Using more fireballs:

In order to make a ship blow up using these custom explosions, you can either make types of ships share the same explosion(s) in objecttypes.tbl or you can limit it to specific ship class in ships.tbl.

New optional field in objecttypes.tbl defined after "$AI:" and should be the last optional entry.

Code: [Select]
$Explosion Animations: ( [Index number of animation(s) from fireball.tbl (Integers delimited by strings] )
Example of xxx-obt.tbm:

Code: [Select]
#Ship Types
$Name: Capital
+nocreate
$Explosion Animations: (6, 7, 8, 9)
#End

New optional field in ships.tbl defined after "$Shockwave name:" and before "$Weapon Model Draw Distance:"

Code: [Select]
$Explosion Animations: ( [Index number of animation(s) from fireball.tbl (Integers delimited by strings)] )

Example of xxx-shp.tbm:

Code: [Select]
#Ship Classes
$Name: GTF Ulysses
+nocreate
$Explosion Animations: ( 6 )
#End

Happy Modding!
« Last Edit: May 29, 2008, 12:31:21 am by Swifty »

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: 2008-05-28 Stable Branch - Customized Explosions and Cockpit Fixes
Oh wow - that's really cool. :D

Question: With capships, the explosion animations that you define - are they the little explosions before the big main one, the main explosion or both?
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: 2008-05-28 Stable Branch - Customized Explosions and Cockpit Fixes
Hmm, how are shockwaves defined? I remember someone a while back talking about how they'd like to use different kinds of shockwaves for each species. In retail of course they're all 2D, but with 3D shockwaves now it might be handled differently.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: 2008-05-28 Stable Branch - Customized Explosions and Cockpit Fixes
Oh wow - that's really cool. :D

Question: With capships, the explosion animations that you define - are they the little explosions before the big main one, the main explosion or both?
They're both. It uses the animations for both the surface explosions and the big ones. So yeah, make sure they look good for both. :)

Galemp: Shockwaves are defined per ship using the entry in ships.tbl called "$Shockwave model:"
« Last Edit: May 30, 2008, 01:54:28 pm by Swifty »