Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Test Builds => Topic started by: WMCoolmon on May 25, 2004, 10:57:35 pm
-
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.
-
Wow. This is certainly a surprise.
*Get's out the sissors*
-
Do the tbms get loaded in alphabetical order? So zxxxx.tbm overrides anything in axxxx.tbm?
-
WOW.
This is something i've always wanted. Can't wait till all this and Bob's cool stuff make it into one build.
-
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.
-
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.
-
Does this affect the total number of table entries allowed?
Definitely good idea though!
-
yeah, what does it do when it reaches 130 ship entry's?
-
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: (http://fs2source.warpcore.org/exes/latest/fs2_open_C05262004.zip)
- 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:
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
-
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. :)
-
Okay, I uploaded a slightly newer version. One of my last changes broke the campaign room, no files would display.
-
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.
-
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.
-
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.
-
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!
-
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!
-
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.
-
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
-
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
-
not in 3.6, new experimental feature like all of the new stuff
-
If you're making a small ship or weapons pack, I'd suggest using it just for convenience and mentioning that a specific build is needed.
For anything else it'd probably be less trouble to just use the old method.
Modular tables will almost for certain be in the next build. Although, I haven't added support for all of them...it can be pretty tedious.
-
hmmmmm.......you mean that using this build.....I could use the ST ships.......and if I could get them, the SW ships, in the same mission without going through all the .tbl files??
suh-w33t :D
-
i think its a good idea, just to keep my table files smaller. will it work with all tables or just ship and weapons. i also use custom sound and explosions with some of my weapons so it would be awesome if the weapon_expl.tbl and sounds.tbl are also modular.
another idea (for multiplayer mainly) is to have missions with an allow custom ships option. any mission with the flag set would allow any ships and weapons in modular files will be added to the team loadout.
one more thing, will it work if its in a vp file?