Author Topic: fs2_open_C05242004: Modular ships.tbl and weapons.tbl  (Read 6798 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
Modular ships and weapons tables - especially useful for using multiple mods.

How they work:
Files are essentially the same as ships.tbl or weapons.tbl, except they can have any name and must end with "-shp.tbm" or "-wep.tbm". For example, "Inferno-shp.tbm".

However, each section(ie "#Engine Wash Info") is optional. Moreover, entries with the same name as previous entries in .tbl or other .tbm files will override previous entries' data. This means that if you were to add an entry of "GTF Ulysses" with the model of a Hercules, the Ulysses would show up as a Hercules.

Finally, any modular table files must be placed in data/tables. Enjoy. :)

ZIP file:
http://fs2source.warpcore.org/exes/latest/fs2_open_C05252004.zip

Note- I think module entries take backwards precedence due to replacement. So it goes: .tbm in VP -> .tbm in data/tables -> ships.tbl, with the VP being highest. This isn't (easily) possible without changing them to only add and not replace.
-C

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
Wow. This is certainly a surprise.

*Get's out the sissors*
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
Do the tbms get loaded in alphabetical order? So zxxxx.tbm overrides anything in axxxx.tbm?

 

Offline Lightspeed

  • Light Years Ahead
  • 212
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
WOW.

This is something i've always wanted. Can't wait till all this and Bob's cool stuff make it into one build.
Modern man is the missing link between ape and human being.

 

Offline Fineus

  • ...But you *have* heard of me.
  • Administrator
  • 212
    • Hard Light Productions
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
Agreed, it makes installation of single ships a hell of a lot easier. No more copying/pasting/sifting through stupidly large .tbl files to find the one piece of data you need. BRILLIANT.

 
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
Funny, when I suggested this a while ago it got poo-pood. :p

Indeed it's a great thing because it'll make error isolation so much easier, right now we have to rely on debug builds (which sometimes quit before they get to a table error and are fairly cranky to begin with) to point out where the errors occur. If it can isolate it to one or more smaller files then it'll cause much less of a headache.

 
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
Does this affect the total number of table entries allowed?

Definitely good idea though!
All I ask is a tall ship and a star to steer her by.
And a laughing yarn from a merry fellow rover.
And a quiet sleep and a sweet dream when the long trick's over.
- JOHN MASEFIELD

 
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
yeah, what does it do when it reaches 130 ship entry's?
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
Same thing as it did before; an assert is invoked. :)
Edit: Erm, for non-coders, this means ship/weapon/wash/etc limits are the same.

New build:
  • Fixes loading error messages (Some still specified ships.tbl, this has been updated to be the currently loaded table)
  • Fixes replacement precedence (lower-cased files on the HD take highest precedence)
  • Adds weapon_expl.tbl modular table(Note: Since the table only has one section, it is required. No empty tables for j00 :p)
  • Fixes bug where ship/weapon parsing was called on both.
  • Limit for modular ships tables is 32 per tbl file (Same as last one). This can be bumped much higher if needed.


Edit:
Quote
Do the tbms get loaded in alphabetical order? So zxxxx.tbm overrides anything in axxxx.tbm?

From this point on, no. They now load in reverse order, so that ship info will take precedence in the same way as other files
« Last Edit: May 26, 2004, 04:21:39 pm by 374 »
-C

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
Quote
Originally posted by SadisticSid
Funny, when I suggested this a while ago it got poo-pood. :p
I thought it would require a fundamental revision of the loading system.  Looks like WMCoolmon got it to work. :)

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
Okay, I uploaded a slightly newer version. One of my last changes broke the campaign room, no files would display.
-C

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
This is an awesome enhancement and would make a number of things much easier. In fact, I think we may have to use it in the effects media vp.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
can it be made so that the entirety of a table entry is optional, that way you could add a ships table that adds your new weapon to the alowed primaries of an exsisting ship or give them ab trails without altering any other important values that might be altered from defalt.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
If you have an hour or two available, you could do that. In that case, it might just be better to rewrite/add parse functions to include the string name and take a bool to determine whether the value is required or not.

ie
stuff_int(char* string, bool replace, int* value);

Edit: Actually...now that I think about it (again :p), you *might* be able to do this with some sloppy global work. Set a pointer if you replace an item, then set the parse options so if default is specified, it doesn't parse.
Parsing would take longer.
« Last Edit: May 28, 2004, 01:35:08 am by 374 »
-C

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
yeah but parseing only happens during level load, people arn't going to notice a few milliseconds added on to a minute, and I've got my hands quite full at the moment, I keep thinking I've just about got my decals system working when right before I upload a new mysterius crash happens, and I don't know why!
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline J3Vr6

  • 28
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
I guess people really like this...  To be honest, I really don't know enough about modding to know why I would need this.  But thanks!
"I wanna drink til I'm drunk, and smoke til I'm senseless..."
-Tricky

"Hey barkeep, who's leg do I have to hump to get a dry martini around here?"
-Brian, Family Guy

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
With this we can finally have seperate tables for each modded fighter. Maybe even package up every fighter in a vp all of it's own.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Anaz

  • 210
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
This is quite cool...especially for things like high-res effects, so you can delete the ones you don't need. So you could have HighSCP-efc.tbm, MedSCP-efc.tbm, etc... so that people will stop complaining (or will have an easier solution) when their box3s aren't l33t enough to run the really pretty stuff :p
Arrr. I'm a pirate.

AotD, DatDB, TVWP, LM. Ph34r.

You WILL go to warpstorm...

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
did this feature make 3.6? or is it just in an experimental stage at the moment? id like my mod to use this but i dont want to veer too far from 3.6
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 Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
fs2_open_C05242004: Modular ships.tbl and weapons.tbl
not in 3.6, new experimental feature like all of the new stuff
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together