Author Topic: An attempt to create some table references  (Read 5904 times)

0 Members and 1 Guest are viewing this topic.

Offline Wanderer

  • Wiki Warrior
  • Moderator
  • 211
  • Mostly harmless
An attempt to create some table references
So this is my attempt to create table references to FS Wiki. I decided finally to do something for the community and wrote sort of references to ships and weapons tables though most of the stuff i currently have managed to get there was originally written by GE (Galactic Emperor?)

They are not linked. Opinions and proof reading would be appreaciated (you can access the files by searching them in FS wiki, ships.tbl and weapons.tbl). I hope some other people would also be interesting in completing the references for the tables so that we would finally have a good reference for all table editing. That is for the people who do not understand the code at all but still would like to do some modding, like me.

EDIT: I forgot to mention but thanks to Black Wolf for some guidelines and advices
« Last Edit: November 12, 2005, 08:42:00 am by Wanderer »
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: An attempt to create some table references
I was just thinking about this the other day, and I think a better option for SCP options would be to color them differently (Say, yellow for CVS, some shade of green for ones that have been in an official release.)

It'd be nice if flags didn't break up the layout so much, they could also use some description. Also, for the weapon values in ships.tbl, you should probably change the label from "flag" to something different. Right now you have:
Quote
Syntax: ( "Flag" "Flag" ) ( "Flag" "Flag" )

I'm impressed, though, I don't think there's ever been such a complete table reference ever made.
-C

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: An attempt to create some table references
Also, pretty much all values are now optional for fs2_open in ships.tbl...although if you try to make a ship without a model, something will break.
-C

 

Offline Wanderer

  • Wiki Warrior
  • Moderator
  • 211
  • Mostly harmless
Re: An attempt to create some table references
I'm just so bad with proper HTML that the current representation was easier for me to accomplish... The coloring is really much better way to do it, now that you mention it. I'll also try to get around into making the descriptions for the flags.

It would be for the best to alter atleast some of the places where i just put "Flag" as a placeholder to "Name" or something else... I'll get around into doing that tomorrow.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Wanderer

  • Wiki Warrior
  • Moderator
  • 211
  • Mostly harmless
Re: An attempt to create some table references
Just revamped the ship.tbl and now IMHO it indeed does look better.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: An attempt to create some table references
Technically, all entries are optional. (Except for name, obviously) It's just that if certain values aren't filled in by the end of the loading sequence for a certain ship, it'll crash. Off the top of my head, those values are just the ship model, and flags.

For nearly all fields, the default is 0, or none. I will try to list the fields that this is different for.

  • After $Name, the value "+nocreate" may be used in modular table files. This will tell FS2 to not create the ship if it doesn't exist.
  • $end_multi_text means nothing except to stop reading that field. It's used in cases where you might want multiple lines or something. I don't know if that's why you broke up the description text there though.
  • $Show damage does nothing ATM, I believe it was left over from FS2. Destroyers, Superdestroyers, Installations, the Knossos, sentry guns, and Shivan Comm Nodes have it set to no. I've thought about having it toggle lightning, but I doubt it will ever do anything, b/c of backwards compatibility concerns.
  • $Density is used for nothing right now, most FS2 ships have it set to 1.0 anyways. However, it does seem to be in g/cm^3, so 1.0 would be roughly the density of water.
  • After $Shockwave speed, there are some other fields missing:
  • $Shockwave count: number of shockwaves to spawn (I think this is in retail aswell)
  • $Shockwave model: Textured model for the ship's shockwave
  • $Shockwave name: Name of the animation to use for shockwave
  • $Weapon Model Draw Distance: Distance that external weapons are shown, ie missiles and such. (Default is 200)
  • After PBank capacity, "$Show Weapon Models:". I will be changing this to $Show Primary Models: to clarify what it does It takes a boolean list, with a boolean to determine whether weapon models are drawn for that weapon bank. For example: "$Show Weapon Models: (Yes No)"
  • $Allowed Sbanks has no description
  • After $Sbank capacity, "$Show Weapon Models:". I will be changing this to $Show Secondary Models: to clarify what it does. Same as $Show primary models, but for secondaries
  • Default trail width is 1, alpha is 1, and life is 5.
  • $Countermeasure type:, before $Countermeasures, takes a weapon name that will be used as countermeasures. Now that countermeasures and weapons are integrated, it can be anything specified in weapons.tbl, rather than just the #Countermeasures section. (This is pending testing prior to CVS commit)
  • $Shield color: Default is pure white
  • $Hull strength: Default is 100
  • $Scan time: Default is 2000 ms
  • $Subsystem repair rate: Default is FS2 default of 0.01 (1%)
  • $EngineSnd: or any other sound entry, can be the name of the sound in sounds.tbl, rather than the index.
  • $Closeup zoom: I believe this is in radians, and specifies the camera's FOV. So, 2Pi would specify 360 degrees, Pi/2 would specify 90, etc. Default is 0.5
  • $Topdown offset: after $Closeup zoom, specifies how high the camera is above the center point of a ship in topdown camera views, or 2D missions. (topdown is implemented in SCP only)
  • $Shield icon: hud.tbl is totally ignored in SCP, this should be noted somewhere in the wiki.
  • $Ship_icon, $Ship_anim, and $Ship_overhead all use the ship's model to generate the image in the techroom by default.
  • Thruster particles come before $Trail
  • Before thruster particles, the following fields exist: $Thruster Bitmap 1: (anim), $Thruster Bitmap 1a: (anim), $Thruster01 Radius factor: (float), $Thruster Bitmap 2: (anim), $Thruster Bitmap 2a: (anim), $Thruster02 Radius factor: (float), $Thruster01 Length factor: (float), $Thruster Bitmap 3: (anim), $Thruster Bitmap 3a: (anim), $Thruster03 Radius factor: (float). I don't know what they do, but they're in there...I think TBP uses them, not sure. Defaults for all floats is "1"
  • Ships can also use $Thruster Particle Bitmap: instead of the afterburner one to create another 3 normal-thruster particles. The fields are exactly the same though...maybe combine the duplicate entries somehow?
  • $Stealth: is located after thruster particles, but before trails. Note the colon. It doesn't take an argument, but does note that the ship is a stealth ship. I've set it up so you can also add "stealth" to the ship flags (It'll be in CVS soon)...I would consider this variable deprecated, and that the ship flag should be used from now on.
  • $Max decals: is right after stealth, it takes a whole number of the maximum decals that can be present on a ship at one time. Defaults: small ships - 50, big ships - 100, huge ships - 300, everything else - 10.
  • As of XMT being integrated in the code, you can just insert a comma to skip the hull value if you just want to set the turning rate. IE: "$Subsystem: Navigation, ,10". Defaults for both the turning rate and strength are 0.
  • $PBank capacity: and $Sbank capacity: both exist for turrets, after their respective defaults
  • After those, $Engine wash: looks for an entry wash with the same name, and applies that to the subsystem if found.
  • $AliveSnd: Specifies a sound to play when the subsystem is not destroyed (from where the subsystem is)
  • $DeadSnd: Specifies a sound to play when the subsystem is destroyed (from where the subsystem is)
  • $RotationSnd: Does nothing, may be deprecated.
  • $AWACS: How far from this subsystem the AWACS effect reaches.
  • +non-targetable marks the subsystem as non-targettable.
  • Now we get to Bobb's submodel animation stuff.

First, "$animation=triggered". This is the only type right now.

Next, "$type=" gets animation trigger types. Current ones are "initial" (when the mission starts), "docking" (when a ship starts docking), "docked" (when a ship is docked), "primary bank" when a primary bank is fired, "secondary bank" when a secondary is fired, "door" when ???

Then, "+sub_type:" gets the 'sub type' for the trigger...for example, which primary bank triggers it. (With the first pank as 0, i believe)

If the trigger type is initial:
Code: [Select]
+delay: How long til the trigger starts (seconds)
+absolute_angle: or +relative_angle: three floats that give the x, y, and z rotation degrees. Absolute means in world terms; relative means relative to the ship. So a 90 degree angle on the ship would always be straight up in relative degrees; it would vary depending how the ship was rotated in absolute degrees.
+velocity: Subobject rotation speed, in relative terms. (three floats, xyz)
+acceleration: Acceleration speed of subobject rotation. (three floats, xyz)
+time: Time for object to rotate, move, whatever. (seconds)
Otherwise,
Code: [Select]
+delay:
+reverse delay:
+absolute angle: or +relative angle:
+velocity:
+acceleration:
+time:
$Sound:
    +Start: sound to play when animation starts
    +Loop: sound to play while animation is going
    +End: sound to play when animation stops
    +Radius: Distance that sound is audible
  • "dont collide invisible" and "no_collide" are tacked on with "big damage"
  • "stealth" flag (going to go in CVS) makes ship a stealth ship, like "$stealth:" in retail FS.
  • "ship copy" indicates that a ship is a copy of another entry, ala GTD Bastion is a copy of GTD Orion.
  • "in tech database multi" makes a ship appear in the multi tech database all the time.
  • "flash" ship makes a flash when it dies
  • "surface shields" shots that impact the hull are applied to shields, even if the ship doesn't have a shield mesh. In the future this may use Bobb's decal code for _actual_ surface shields.
  • "show ship" Draws the ship model even in the cockpit views, which allows for 3D cockpits.
  • "generate icon" Generates a HUD icon of the ship using the model, if the ship doesn't have a HUD icon specified in the table.
  • "no weapon damage scaling" totally disables things like bombs doing different damage to different size ships, for more reliable armor usage.


YIKES! That was big. :eek:

So yeah, that's the info in raw form, straight from the codebase. I can add all that if you like.
-C

 

Offline Wanderer

  • Wiki Warrior
  • Moderator
  • 211
  • Mostly harmless
Re: An attempt to create some table references
I dropped next version in which was some little things added (Engine Wash etc, sample table file and so on).  It includes some of things you have mentioned, but is rather focused on bringing the rest of table file to the wiki.. So please include the data to the ships.tbl as you must know more of these things than i do.

IMHO Default values could be included in the same way as Examples...
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Wanderer

  • Wiki Warrior
  • Moderator
  • 211
  • Mostly harmless
Re: An attempt to create some table references
Perhaps the animation code would require a separate wiki page? Should we bother Bob to make it...
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: An attempt to create some table references
weapon_expl.tbl entry added
-C

 

Offline Wanderer

  • Wiki Warrior
  • Moderator
  • 211
  • Mostly harmless
Re: An attempt to create some table references
I added part of entries that you posted. Up to $Stealth: to be more precise.

Also modular tables and animation code have been added.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline FireCrack

  • 210
  • meh...
Re: An attempt to create some table references
Door is used for when a ship launches or retreives others through it's fighterbay
actualy, mabye not.
"When ink and pen in hands of men Inscribe your form, bipedal P They draw an altar on which God has slaughtered all stability, no eyes could ever soak in all the places you anoint, and yet to see you all at once we only need the point. Flirting with infinity, your geometric progeny that fit inside you oh so tight with triangles that feel so right."
3.141592653589793238462643383279502884197169399375105820974944 59230781640628620899862803482534211706...
"Your ever-constant homily says flaw is discipline, the patron saint of imperfection frees us from our sin. And if our transcendental lift shall find a final floor, then Man will know the death of God where wonder was before."

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: An attempt to create some table references
I've added pretty much everything from $Stealth onwards, except for subsystem Pbank and Sbank capacity.
-C

 

Offline Wanderer

  • Wiki Warrior
  • Moderator
  • 211
  • Mostly harmless
Re: An attempt to create some table references
I included the missing pbank and sbank capacity entries for the turret and also changed the formatting around the subsystems to implicate more clearly which entries are part of the subsystem entry.

Then there is the weapons.tbl... I have constructed the wiki entry in a bit different form compared to the ships.tbl.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: An attempt to create some table references
just incase you missed it in the other thread, primary/secondary bank trigger seems to be mislabled in function.  it doesnt happen when a weapon is fired but rather when a weapon is armed, the pf chimera uses it to unfold its wings and open the missile bay when selecting the various banks.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: An attempt to create some table references
Yeah, thanks nuke. I just did a quick once-over of the code so I'm not too surprised that I got something wrong.
-C

 

Offline Wanderer

  • Wiki Warrior
  • Moderator
  • 211
  • Mostly harmless
Re: An attempt to create some table references
Thanks for corrections. Fixed wiki accordingly.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Wanderer

  • Wiki Warrior
  • Moderator
  • 211
  • Mostly harmless
Re: An attempt to create some table references
Request: Could any 'code-literate' crack the ships flags open for me to be added to the wiki, please? Pretty please?

And please also check if the weapons.tbl in wiki is missing anything critical.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Wanderer

  • Wiki Warrior
  • Moderator
  • 211
  • Mostly harmless
Re: An attempt to create some table references
I think there is a need for SCP features to be clearly marked their with 'birthdate' so to speak. I mean in ships.tbl, weapons.tbl there are lots of options that are incompatible with for example 3.6.7 builds. So could some one give me a date when the 3.6.7 and possible 3.6.5 were compiled so that i could make notes for the SCP entries.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: An attempt to create some table references
3.6.5 was released very close to christmas last year though I can't remember the exact day.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: An attempt to create some table references
Christmas. ;)