Author Topic: MOD handling  (Read 1954 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Here's an idea on how to handle mods (several actually :D):
How they are stored
Two ways. First, they can be stored in a folder with the prefix "mod_", with the same directory structure as the "data" folder already with FS2. Second, they can be stored in a VP file (without the mod_ prefix). Both methods would use the standard folder names (ie tables, maps, etc), and VP files would continue to have everything be a subset of "data". Freespace itself would recognize the original VP filenames, so "FSPort.vp" would be flagged as being a mod.
Inside each mod would be a "config.tbl" containing the mod's full name and any other info that would be handy to have included with the mod (Home page, perhaps? Version?).
How they are accessed
Mods would be accessed through a command line prefix in the short term, until a better solution can be found. The command line prefix would use the folder name (excluding mod_) or the VP file name (excluding .VP), ie '-mod "TBP"' for The Babylon Project. Freespace would load TBP's files, then it would look in the data folder for any missing info, then check the default FS2 VP files. In case of having both a Babylon project folder and a VP file, FS would look in the folder first, then the VP, then continue on. So, if you entered 'FS2.exe -mod "TBP"', Freespace would do the following:

if "mod_TBP" exists, load the files in it.
if "TBP.vp" exists, load any files not in the above.
Load any files in "data" that are not in the above.
Load any files in DEFAULT_VPs that are not in the above.
if any required files are missing, output an error message.

IMO, in the long term, mod switching should be done from what is now the campaigns room; that way, there aren't any problems with running a campaign without its mods. Doing in-game mod switching would take some time as the new files are loaded, though.

Fire away :D :nervous:
-C

 

Offline vadar_1

  • Mr. Crispy
  • 29
  • .
    • http://dynamic4.gamespy.com/~freespace/hosted/fullcircle/
or you could... you know... create a folder for each /data/ folder, and swap the /data/ folders back and forth. It takes about 5 seconds and maybe 6 keystrokes max.
"Shockingly, checking Draw Lines Between Marked Icons draws lines between the marked icons. " -Volition quality help files

Projects;
The Full Circle Project (site down - server side problem)
Paradox (site down - server side problem)

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
that's what I do, and it only takes about three seconds, but that's just becase my computer is slow
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 Martinus

  • Aka Maeglamor
  • 210
    • Hard Light Productions
What's wrong with the halflife approach? (I know, I know, I keep referring to Halflife :) )

Have the mods in their appropriately named folders in the FS2 directory. When you start FS2 you get a bootup screen that allows you to choose which mod you want to run. Getting the right data tables etc. is simply a case of switching the default folder names in the code with the ones in the selected mod. Would this not be a better long term fix?

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
all this talk about the Half-life way, which infact is a decandant of the Quake 1 way, since the half-life engine derives from that, is not a smart way, even the build in MOD support is crapping up, very often. example, my screen got a whole lot of odd lines where there should be OPENGL effects. The text was there, but it fubared until I restarted the Vidio system. This happend each time I changed Mods.

quake1 and 2 and 3 is build up so that there is the Exe file and there is the Dynamic Link Libary aka DLL files.

The Dll files are what the modders usually are allowed to mess with the first many years, and then after some time all of the Source is realeased.

DLL is ok when, you have situations where the developing company would like protect some of theire code for a time(like CD checks), so that they can split it up into two files. and at the same time keep the game modable.

But in our situation this is not needed, since we have the full code, and what we have not is because of Interplay(MVE) and possible abuse(PXO, "cheating").

The best way approach, and easiest way to enable modsupport would be to, like in Quake1,2,3 to do a set a Game name.

example fs2.exe -Game mypack

This will look in freespace2/Mypack/for tbl files and additional ANI and model files + search VP files if they exist in that directory.

If TBL files does not exits then it takes the defaults found in the DATA directory, and the same goes for all other files. IF a replacement file is found, Use it.

If game dir does not exits use the default Data dir which would be in Freespace2/Data/

-hell, maybe even I could code this, since i have already messed Alot with command line paramerters and how to pass them on to the correct functions.

all good functions will be incorperated into CVS, i'm sure.
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline Inquisitor

Design it first, don;t just start coding.
No signature.