Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: MachManX on May 11, 2010, 01:43:30 am

Title: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: MachManX on May 11, 2010, 01:43:30 am
Let's say that I have a favorite fighter (user created) that I'd like to use in every mission that I play.  The only way I know how to add this fighter is to use Fred2 and modify each mission file to include the fighter + add a custom version ships.tbl to the tables directory.  Now, this gets more complicated when I play user-created missions that introduce their own ships that are not included with the original FS2, which means they introduce their own ships.tbl file.  I have to edit their ships.tbl file to include my fav fighter.  It's a pain to extract the .vp and put all the files in the appropriate directories, edit the ships.tbl, and edit all the missions.  So my question:-

-Is there an easier way to include my fav fighter in all missions rather than edit each mission one at a time, preferably without resorting to extracting the .vp to the appropriate directories?

-Is it possible to load 2 ships.tbl, or like load the user-created ships.tbl first, and then load another .tbl which only contains the info of my fav fighter?

-Which has more priority: Files loaded via .vp or files directly in the appropriate directory, ex: ships.tbl in bang.vp located in the main FS2 directory VS ships.tbl located in the tables directory?


I guess I'm trying to make it so that no matter what user-created campaign I load, I want to be able to choose my fav fighter without having to edit anything, or a simple edit without the tedious task.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: FreeSpaceFreak on May 11, 2010, 01:50:15 am
You will have to edit each mission individually, but you should use a TBM (http://www.hard-light.net/wiki/index.php/Tbm) for the fighter instead of a modified ships.tbl. Call it xxx-shp.tbm (the xxx may vary), start it with #Ship Classes, cut-paste your fighter's entry and end the tbm with #End . Place into data\tables, and you'll see that the fighter is now available for use in FRED.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: Scourge of Ages on May 11, 2010, 01:55:44 am
Create a .tbm called something like: myship-shp.tbm

Just put the entire entry for your ship there. Put the file into whichever mod you're playing's data/tables/ (create it if you need to). The .tbm will load on top of whatever is in the .vp.
You could also put your .tbm in a seperate mod folder, and add it as a secondary mod to whatever you're playing.
As to whether it's usable in a mission, that depends if ships are marked as available until otherwise noted, or are marked unavailable until otherwise noted. If it's the latter, you'll need to manually add your ship to every single mission you play.

I'm sure somebody else can give you much better (accurate) information than I can though.

EDIT: yup, FSF beat me.
Another EDIT: Preliminary testing indicates that you will need to manually add your fighter into every mission in order to use it. Unless there's a modular mission file I don't know about...
Oh yeah, about your last question: .vp files are loaded first, then .tbl files, then .tbm files, each one overriding the one before if necessary. I strongly suggest using .tbm files for this purpose.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: Rodo on May 11, 2010, 08:21:51 am
Note that you'll also need to tell fred to use your mod, that's done making a shortcut to fred and adding the name of the folder of your mod in the target box (tab shortcut) like this:

C:\Games\FreeSpace2\fred2_openR.exe -mod mediavps

That will load the mediavps folder and when you open fred with that shortcut the files loaded will be the ones on that mod.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: FreeSpaceFreak on May 11, 2010, 12:34:11 pm
Note that you'll also need to tell fred to use your mod, that's done making a shortcut to fred and adding the name of the folder of your mod in the target box (tab shortcut) like this:

C:\Games\FreeSpace2\fred2_openR.exe -mod mediavps

That will load the mediavps folder and when you open fred with that shortcut the files loaded will be the ones on that mod.
The recent FRED builds read the active mod from the launcher though :P
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: Droid803 on May 11, 2010, 01:14:11 pm
Well, what you're doing is likely to cause massive compatability issues in certain campaigns due to modified weapons (speak nothing of breaking mission balance, you might just stop the mod from loading at all).

The reason it is tedious is for a reason - it shouldn't be messed with unless you really know what you're doing.

Well, not really, but you won't be able to get the same fighter working in, say, TBP and Derelict without changing the tables (a lot) in between.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: The E on May 11, 2010, 01:14:49 pm
Note that you'll also need to tell fred to use your mod, that's done making a shortcut to fred and adding the name of the folder of your mod in the target box (tab shortcut) like this:

C:\Games\FreeSpace2\fred2_openR.exe -mod mediavps

That will load the mediavps folder and when you open fred with that shortcut the files loaded will be the ones on that mod.
The recent FRED builds read the active mod from the launcher though :P

The recent unreleased builds, you mean. Unless you make your own ones from svn trunk, you won't get that feature.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: Droid803 on May 11, 2010, 01:16:35 pm
Note that you'll also need to tell fred to use your mod, that's done making a shortcut to fred and adding the name of the folder of your mod in the target box (tab shortcut) like this:

C:\Games\FreeSpace2\fred2_openR.exe -mod mediavps

That will load the mediavps folder and when you open fred with that shortcut the files loaded will be the ones on that mod.
The recent FRED builds read the active mod from the launcher though :P

The recent unreleased builds, you mean. Unless you make your own ones from svn trunk, you won't get that feature.

I swear RC1 did it.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: FreeSpaceFreak on May 11, 2010, 04:39:09 pm
Note that you'll also need to tell fred to use your mod, that's done making a shortcut to fred and adding the name of the folder of your mod in the target box (tab shortcut) like this:

C:\Games\FreeSpace2\fred2_openR.exe -mod mediavps

That will load the mediavps folder and when you open fred with that shortcut the files loaded will be the ones on that mod.
The recent FRED builds read the active mod from the launcher though :P

The recent unreleased builds, you mean. Unless you make your own ones from svn trunk, you won't get that feature.

I swear RC1 did it.
And my RC2 does it as well.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: Rodo on May 11, 2010, 11:11:16 pm
wtf? I have RC2 and I ... wait I'll try to see what happens.

EDIT:


nope, selecting the mod in the launcher does nothing in my FRED, and I'm running RC2.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: Droid803 on May 11, 2010, 11:32:28 pm
Launcher version? Or does it not matter?
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: Rodo on May 11, 2010, 11:45:27 pm
mine is 5.5 E... the latest AFAIK.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: FreeSpaceFreak on May 12, 2010, 01:01:23 am
I have 5.5d, apparently... I also have -mod mediavps in the shortcut, but ASW as active mod in the launcher, so it starts up in ASW mode.
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: MachManX on May 12, 2010, 01:42:02 am
Thanks for the answers, FreeSpaceFreak and Scourge Of Ages :)  So create a .tbm for that fighter alone.  Heh, but I still have to edit each mission to include the ship.  Guess there's no master code I can put in the ships.tbm to force the fighter as a selection in all missions.

Yeah, Droid803, I know it's gonna break the balance, but I only use the fav fighter after I've played through the campaign at least once ;)  So I play the campaign completely unaltered the first time, then follow through with the fav fighter the second time through (if I liked the campaign a lot).  Just wanna see and feel the differences...I guess I'm wierd like that  :lol:
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: karajorma on May 12, 2010, 07:44:45 am
Thanks for the answers, FreeSpaceFreak and Scourge Of Ages :)  So create a .tbm for that fighter alone.  Heh, but I still have to edit each mission to include the ship.  Guess there's no master code I can put in the ships.tbm to force the fighter as a selection in all missions.

Actually, there may be one. Edit this line.

Code: [Select]
#Default Player Ship
$Name: GTF Ulysses

to the name of your new ship. Then go into the Freespace2 campaign file in the Campaign Editor in FRED and uncheck all the ships from the initial ships list.

I've not actually tested it but that should work for the first 3 missions at least and might last a while longer than that too. :p
Title: Re: Easier way to add a fighter to campaigns rather than edit each mission?
Post by: Rodo on May 12, 2010, 12:39:10 pm
Or maybe you can try to open the mission files with notepad and use the "replace" option... I've done that a couple of times but only with background image files, so I'm not sure if it will work with ships.
I recon you'll need to know the exact string in order to replace correctly, but it might break your mission files so make a back up before even trying that.