Version control primer

From Nexus Mods Wiki
Revision as of 02:00, 16 June 2011 by Omeletted (talk | contribs) (Created page with "Source: [http://forums.bethsoft.com/index.php?/topic/793590-version-control-a-primer Bethesda Forums] by Rocket The Oblivion Construction Set has a functional version control s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Source: Bethesda Forums by Rocket


The Oblivion Construction Set has a functional version control system built-in. And yet a lot of people don't know that it exists, nor how to get it working. As more and more people look towards creating their own stand-alone world with the Oblivion Construction Set, many will find such knowledge useful. There's an article up on the CS Wiki which has been there for some time now, but it appears to be poorly linked and might not be straightforward to some. So here's a basic primer. This will concentrate on setting things up to work on a local computer, rather than a network.


Setup ConstructionSet.ini

To start with, open the ConstructionSet.ini file in C:\Documents and Settings\<username>\My Documents\My Games\Oblivion\


Find the following and modify them to suit. This depends on the full network name of your computer, and the Oblivion install path. Don't just copy them verbatim. I'll pretend my computers full network name is PathFinder, and Oblivion is installed to C:\Games\ElderScrolls\Oblivion. The dollar sign ($) you see is supposed to be there.

bUseVersionControl=1
SNetwork Path=\\PathFinder\C$\Games\ElderScrolls\Oblivion
SNetworkMasterPath=\\PathFinder\C$\Games\ElderScrolls\Oblivion\Data\
SNewVersionBackupPath=\\PathFinder\C$\Games\ElderScrolls\Oblivion\VersionBackup\
SLocalBackupPath=Data\CheckInBackup


Next, append the following to the end of the same file. This is needed to unlock some of the functions we need to use. Substitute your local computer login name for <username>.

[WhoCanMerge]
<username>=1


Now create two folders. Using the install path above, they would be C:\Games\ElderScrolls\Oblivion\VersionBackup and C:\Games\ElderScrolls\Oblivion\Data\CheckInBackup


And before you go any further, copy Oblivion.esm somewhere as a backup, just in case.

Start the CS

Now start up the CS and select Oblivion.esm from the Data Files list and load it. You will see the following ...

---------------------------
Warning
---------------------------
TESBitArrayFile::OpenAndMapBitArrayFile could not find file 'Oblivion.fud'.


Continue Running Executable?

"Yes to all" will disable all Warnings this session.
---------------------------
Yes No Cancel
---------------------------


Now if you see something different, then you have no active network connections. You need to rectify this. A dial-up connection is sufficient. Don't ask me why, it's just the way it is. Assuming you see what we wanted, click "Yes". Once loaded, you will see the button on the far left of the toolbar is now accessible. Leave it alone for now.


Open the Data Files window again. Oblivion.esm should be highlighted. Click on the Details button. Two confirmations will pop up. Click "Yes" for both.


The CS will parse the master file and then the File Details window will open. Enter CONTROL + SHIFT + B. You will see the following ...

---------------------------
Confirm Bit Array File Update.
---------------------------
You have chosen to create/update the bit array files for the current file.
This operation cannot be undone and may take a long time to complete.

Do you wish to continue?

---------------------------
Yes No
---------------------------


We need these files. Select "Yes" to create them. Close the File Detail window, and select "OK" in the Date Files window to reload the master file.

Usage

Now you're set. All the functions available can be found either in the Version Control screen, accessible via the button on the far left of the toolbar, or in the File Details window where we created the Oblivion.fid and Oblivion.fud files. The Version Control screen, accessible via the button on the far left of the toolbar is the one most useful. The functions found in the File Details window can be dangerous (and time consuming).


What's useful here, is merging to a master. If your creating plugins to run with Oblivion.esm, this is pointless. If your creating your own stand-alone master file, this is priceless. So lets test it on Oblivion.esm


Save a plugin file first. Always do this. Now find the player character in the NPC list, and delete everything from the players inventory. These are the items you start with. Add whatever you want to replace them and save again. I've added Mithril Boots, Mithril Greaves, and a huntsmans vest. The point here is to change something that is instantly visible when you start a new game.


If you now have another a look at the player character in the Object Window, you will see that it is highlighted in green. this means you have that form checked out. Click the Version Control button and you will see the same thing in the Version Control window. Highlight the player character in the Version Control window and click on "Check In."


Once that's done, close the Version Control window, open the Data Files window, and reload the master file. Now start a new game with only Oblivion.esm (and DLCShiveringIsles.esp if SI is installed) and look at what your character wears. Groovy huh?


In the VersionBackup folder you created earlier you will find a copy of the pre-merge master file and plugin. In the CheckInBackup folder you created earlier you will find a second copy of the pre-merge plugin. Your plugin will still exist in the Data folder, and will still be loaded by the CS, but it will now be empty.


You can use the Version Control system to create a non-dependent master file from scratch as well.

Available functions

The functions available from within the File Details window that I am aware of are as follows. Some of them will render your master file un-usable. Some require selecting specific forms or groups in the File Details window. I suspect that a lot of them are a left over from a time when the master file format was still being finalized, but the game world was well and truly under construction.


Ctrl+Shift+T

New form type string


Ctrl+Shift+U

---------------------------
Confirm Size Update.
---------------------------
You have chosen to update the size of the selected group.
This operation cannot be undone.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+I

---------------------------
Confirm ID Update.
---------------------------
You have chosen to update the form ID for one or more forms from the current file. 
This operation cannot be undone. Additionally, this will not remove any links in 
other forms to the old ID. Errors may be encountered on load.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+O (letter O)

---------------------------
Confirm ESM Conversion.
---------------------------
You have chosen to create a version of the current ESM file optimized for XBox loading.
This operation cannot be undone.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+P

---------------------------
Confirm Child Sort.
---------------------------
You have chosen to sort all child sub groups in the file.
This operation cannot be undone.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+A

---------------------------
Confirm Bit Array File Validation.
---------------------------
You have chosen to validate the bit array files for the current file.
This operation may take a long time to complete.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+S

---------------------------
Confirm Form Sort.
---------------------------
You have chosen to re-sort the forms in the current file.
This operation cannot be undone and may take a long time to complete.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+F

---------------------------
Confirm FORM Size Update.
---------------------------
You have chosen to update the size of the selected form.
This operation cannot be undone.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+G (Don't use this. You'll regret it.)

---------------------------
Confirm Group Update.
---------------------------
You have chosen to update the form groups in the current file.
This operation cannot be undone and may take a long time to complete.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+L

---------------------------
Confirm ESM Conversion.
---------------------------
You have chosen to create a version of the current ESM file with
Tamriel land only. This operation cannot be undone.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+Z

---------------------------
Confirm Version Update.
---------------------------
You have chosen to update the file version of the master file.
This operation cannot be undone.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+C

---------------------------
Confirm Group Update.
---------------------------
You have chosen to update the child group of the selected form.
This operation cannot be undone.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+V

---------------------------
Confirm File Validation.
---------------------------
You have chosen to validate the loaded forms against the current file.
This operation may take a long time to complete.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+B

---------------------------
Confirm Bit Array File Update.
---------------------------
You have chosen to create/update the bit array files for the current file.
This operation cannot be undone and may take a long time to complete.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+0 (number 0)

---------------------------
Confirm Group Removal.
---------------------------
You have chosen to remove any empty groups in the current file.
This operation may take a long time to complete.

Do you wish to continue?

---------------------------
Yes No
---------------------------


Ctrl+Shift+Delete

---------------------------
Confirm Delete.
---------------------------
You have chosen to remove one or more forms from the current file.
Unlike setting the ignore flag, this operation cannot be undone.
Additionally, this will not remove any links in remaining forms to
the deleted ones. Errors may be encountered on load.

Do you wish to continue?

---------------------------
Yes No
---------------------------