Jump to content

Vfs Tool Newbie


Vulgarius

Recommended Posts

So....I just downloaded the VFS tool. I got started by learning how to browse around and unpack files as well as browsing the different types of files.. (yes the directions are starting to make sense through no fault of the writer :) . So Id like to start with something simple. Say, a new grenade or a satchel charge. What would be the best way to do this? Any help would be appreciated.

 

:power:

Link to comment
Share on other sites

I started writing how to add a grenade, but there's a lot of stuff that needs to come first and I'm not sure how much you've already done. I apologise if some (all?) of these questions seem a bit insulting, I'm just trying to find out what to tell you next :)

 

Whose VFS tool are you using (sigget's or Flux's)?

Have you extracted the entire contents of gamedata.vfs to a new directory for easy access?

Do you know that you need to create a new directory tree within which the files you want to mod are placed?

Do you know how to import the new directory tree to a new/empty cfg.vfs file?

Do you know why you should do it this way rather than import the files back into gamedata.vfs?

Do you know the air-speed velocity of an unladen swallow (European, African or Reticulan)?

 

This isn't a test btw :power:, none of this stuff is difficult (except the last one which is optional anyway) but you need to be able to get data files back into UFO before you can start making mods. You may already know all this, in which case I apologise for the condescending questions, but since you haven't mentioned it I thought I'd better check before launching into descriptions of the data files.

 

Fulby

Link to comment
Share on other sites

Sorry for the late reply. The Lab I work in has been very busy for the last couple of days. BTW.I downloaded siggets tool kit.

 

No I have not extracted the whole contents. Just the tactical and shared directories....I was interrupted by a dead turkey.

 

Do you know why you should do it this way rather than import the files back into gamedata.vfs?....Nope. Please elaborate.

 

 

Do you know how to import the new directory tree to a new/empty cfg.vfs file.... I havent figured this out yet...This somehow reminds me of when I get overzealous about repairing a multi million dollar piece of precision test equipment... Putting it back together :power:

 

 

The more fun I have at this The better! no insults taken!

V

Link to comment
Share on other sites

OK first thing to do if you haven't already is to backup gamedata.vfs and localizationpack.vfs (in the localization directory), assuming you haven't altered them by importing files. If you have then the best thing to do in the long term is to reinstall UFO: Aftermath and then back them up.

 

No I have not extracted the whole contents. Just the tactical and shared directories....I was interrupted by a dead turkey.

:) Create a directory called 'gamedata' or 'original' or something similar in your UFO directory, then call the following command line in the UFO directory (vfstool should be in the UFO directory as well).

 

vfstool e gamedata.vfs original

 

This will extract everything into a directory tree inside the directory 'original'. This is where you copy the files from when you want to mod something.

 

When you're importing files into a vfs they need to be in the same directories as the original files where. This image should hopefully elaborate - the original directory tree is in the 'gamedata' folder, with the one for a mod in 'changed'. The 'changed' directory tree only has those files which have been modified and are will be imported.

 

Do you know how to import the new directory tree to a new/empty cfg.vfs file.... I havent figured this out yet...This somehow reminds me of when I get overzealous about repairing a multi million dollar piece of precision test equipment... Putting it back together

:power: Well the process still works if you import into gamedata.vfs, but then to remove the mod you have to delete the file (at 1.something GB) and copy in the backup. Same problem for anyone who is using your mod. By using a separate cfg.vfs file you can just delete it and make a new one which is faster, and people just drop the cfg.vfs into the UFO directory to use it.

Once you've got your mod files in their own directory tree (for example the 'changed' directory), you make a new cfg.vfs files and import the modded files.

 

vfstool mk cfg.vfs 4096 30000 64 1

This will make a new cfg.vfs file in the UFO directory. Don't worry about the extra parameters. If you're interested there's a post by sigget on the Mods board somewhere which explains what each one is.

 

vfstool in cfg.vfs changed

This imports the directory tree and files from 'changed' into cfg.vfs.

 

When you now start UFO, the files in cfg.vfs take precedence over the ones in gamedata.vfs. Try something simple to check you've got the process correct. Copy listofweapon.txt from original\tactical\configs\game\ to changed\tactical\configs\game\. Then open it with a text editor and search for "pump". This is the record for the pump-action shotgun. It begins at the line 'WEAPON' and ends at 'END_OF_WEAPON' :). Find the WEIGHT field and change its value to 30.0. Then save the file and import it into a new cfg.vfs. Run the game and check that the shotgun's weight has changed. If it has then start exploring the files in 'original' and tinker away :D.

 

I've probably missed out some vital pieces of information, if something doesn't work or isn't clear please ask and I or someone else should hopefully be able to help.

 

Fulby

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...