Difference between revisions of "Version Control"

3,707 bytes added ,  01:47, 31 August 2019
m
no edit summary
imported>HaploTR
imported>Qazaaq
m
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Tutorials]]
What is Version Control?
<br />
<BR>
Information contained herein was taken from the Skyrim page, and amended after testing in the Fallout 4 Creation Kit. Though instructions are similar, this page shall document the process specifically for Fallout 4, in the context of mod collaboration from multiple contributors. This page will not document how to use external revision control software such as Perforce, or Git.
The [[Version Control]] system allows multiple developers to work simultaneously on a single [[Data File]].
<br />
During production of [[Fallout 4]], the team at Bethesda used ''version control'' as a way to manage multiple artists, producers, designers, and programmers all working together on the same content.
<br />
The [[Creation Kit]] ''version control'' system is also capable of providing intergrations with conventional source control managers such as [[Perforce]] or [[Git]].
== Setup your Creation Kit installation to enable version control ==
The primary way the [[Creation Kit]] provides ''version control'' is by merging the contents of multiple child plugins into a single master plugin.
<br />
Using the ''version control'' system is essential to working on team projects.
* Navigate to your Fallout 4 directory
* Create the following new folders:
** Fallout 4\Merging\Data
** Fallout 4\Merging\VersionBackup
** Fallout 4\Data\CheckInBackup
 
* Enable Windows Sharing for the newly created folders
** Right click on the CheckInBackup folder -> select "Properties" -> select the "Sharing" tab -> click "Advanced Sharing..."
** Click "Share this folder", and then "OK"
** Back on the Properties windows, click "Share..."
*: [[File:SharePropertiesTab.png]]
** You won't actually be sharing your computer with anyone else, so you don't have to add any additional users - just click "Share" -> "Done"
** Make note of the "Network Path" displayed, you'll need this for the next step
** Repeat the above for the Merging folder (you don't need to do this individually for the two sub-folders within)
 
 
* Next, navigate back to your Fallout 4 directory
* Open the file "CreationKit.ini"
* Modify the following line to say:
<source lang="ini">bUseVersionControl=1</source>
 
* Add the following lines (anywhere under the "[General]" heading):
 
<source lang="ini">
SNetwork Path=\\COMP-NAME\Merging\
SNewVersionBackupPath=\\COMP-NAME\Merging\VersionBackup\
SNetworkMasterPath=\\COMP-NAME\Merging\Data\
SLocalBackupPath=Data\CheckInBackup\
</source>
* Note:
*: - There is a space in "SNetwork Path"
*: - Replace "COMP-NAME" with your computer name, displayed on the window in the above screenshot
*: - Do not omit the "\" at the end of the paths above, or this will not work properly
*: [[File:versioncontrol_creationkit.png]]
 
 
* Finally, open "CreationKitPrefs.ini"
* Scroll to the bottom of the file, and add the following lines
<source lang="ini">
[WhoCanMerge]
YOURWINDOWSUSERNAME=1
</source>
* Note:
*: - Replace "YOURWINDOWSUSERNAME" with your actual windows username
*: [[File:versioncontrol_creationkitprefs.png]]


This document will cover mod collaboration with multiple contributors.
This document will '''not''' cover how to use external revision control software such as [[Perforce]], or [[Git]].
This document assumes basic usage knowledge of the Creation Kit.


= Setup =
To begin, configure the [[Creation Kit]] to enable version control.
This will involve creating directories, network sharing folders, editing [[Initialization File]]s, and creating a master [[Data File]].


 
=== Understanding Data Files ===
== Understanding .esp and .esm files ==
The .esp files are "Bethesda Plugin Data Files"
<br />
.esp files are "Bethesda Plugin Data Files"
* This is the standard file type created by the Creation Kit, to save your mod
* This is the standard file type created by the Creation Kit, to save your mod
* It contains all of the asset reference data used in your mod
* It contains all of the asset reference data used in your mod
<br />
<br />
.esm files are "Bethesda Master Data Files"
The .esm files are "Bethesda Master Data Files"
* This is the file type you'll see used by DLC
* This is the file type you'll see used by DLC
* It contains the same information used by .esp files, but it can have references merged into it
* It contains the same information used by .esp files, but it can have references merged into it
<br />
<br />
In the context of using version control in the Fallout 4 Creation Kit:
In the context of using version control in the Fallout 4 Creation Kit:
Line 71: Line 32:
* It will become .esm the first time you do a merge to prepare it for multi-contributor collaboration
* It will become .esm the first time you do a merge to prepare it for multi-contributor collaboration


=== Create Directories ===
Navigate to the Fallout 4 installation directory and create the following new folders.
* <code>...\steamapps\common\Fallout 4\Merging\Data</code>
* <code>...\steamapps\common\Fallout 4\Merging\VersionBackup</code>
* <code>...\steamapps\common\Fallout 4\Data\CheckInBackup</code>
=== Enable Windows Sharing ===
Enable ''Windows File Sharing'' on the following two folders.
* <code>...\steamapps\common\Fallout 4\Merging</code>
* <code>...\steamapps\common\Fallout 4\Data\CheckInBackup</code>
Configure sharing for <code>CheckInBackup</code>, and then repeat these steps for the <code>Merging</code> folder.
There is no need to share any of the <code>Merging</code> sub-folders.
* Right click on the '''CheckInBackup''' folder and select '''Properties'''.
* Select the '''Sharing''' tab -> click '''Advanced Sharing...'''.
* Click '''Share this folder''', and then '''OK'''.
* Back on the ''Properties'' windows, click the '''Share...''' button.
*: [[File:SharePropertiesTab.png]]
* You won't actually be sharing your computer with anyone else, so you don't have to add any additional users - just click '''Share''' -> '''Done'''.
* Make note of the '''Network Path''' displayed, you'll need this for the next step.
=== Enable Version Control ===
{{Enable Version Control}}


== First merge and creation of your .esm file ==
== First merge and creation of your .esm file ==
<br/>
Regardless of the content, once the mod has been saved as an <code>*.esp</code>, you must perform a first merge to create your initial <code>*.esm</code> file.
Once you've saved your mod as a .esp (regardless of the content), you must do a first merge to create your initial .esm file:
 
<br/>
* Navigate to your <code>...\Steam\steamapps\Common\Fallout 4\Data</code> directory.
* Navigate to your "Fallout 4\Data" directory
* Copy "Fallout4.esm" to <code>...\Steam\steamapps\Common\Fallout 4\Merging\Data</code>.
* Copy "Fallout4.esm" to "Fallout 4\Merging\Data"
** If you don't copy this file, the merge process will error out.
** If you don't copy this file, the merge process will error out
* Next, open your <code>*.esp</code> as the ''Active File''
* Next, open your .esp as the Active File
* After the file has finished loading in the Creation Kit, click "File" -> "Data...", or the open folder icon.
* After the file has finished loading in the Creation Kit, click "File" -> "Data..." (or the open folder icon)
* Select "Fallout4.esm" in the list, and click "Details..."
* Select "Fallout4.esm" in the list, and click "Details..."
*: [[File:versioncontrol_data_Details.png]]
*: [[File:versioncontrol_data_Details.png]]
* When asked "Do you want to use an empty list to save memory?", click "Yes"
* When asked "Do you want to use an empty list to save memory?", click '''Yes'''.
* You'll now be shown a new popup titled "File Details", but it will have no contents.
* You'll now be shown a new popup titled '''File Details''', but it will have no contents.
** On your keyboard, press Shift+Ctrl+B
** On your keyboard, press {{key press|Shift|Ctrl|B}}.
* You'll be asked if you want to update the Bit Array Files, and warned it can take several minutes. Of course, click "Yes".
* You'll be asked if you want to update the '''Bit Array Files''', and warned it can take several minutes. Of course, click '''Yes'''.
*: [[File:versioncontrol_update_bit_array_file.png]]
*: [[File:versioncontrol_update_bit_array_file.png]]
* When it's finished, you'll see "Updating bit arrays...Done" in the bottom status bar of the main window
* When it's finished, you'll see "Updating bit arrays...Done" in the bottom status bar of the main window.
*: [[File:versioncontrol_update_bit_array_done.png]]
*: [[File:versioncontrol_update_bit_array_done.png]]
<br/>
<br/>
Now you're ready to create your .esm file!
Now you're ready to create your .esm file!
* Ensure the .esp mod file has been opened as the Active File (this should have been done earlier, but do it again if you restarted the Creation Kit)
* Ensure the <code>.esp</code> mod file has been opened as the ''Active File''. This should have been done earlier, but do it again if you restarted the [[Creation Kit]].
* You'll notice that you have a new little Version Control icon from when we enabled it in the Creation Kit. Click it.
* You'll notice that you have a new ''Version Control'' [[File:Version Control Icon.png]] icon on the [[Editor_Interface#Toolbar|Editor Toolbar]]. '''Click it'''.
*: [[File:versioncontrol_button.png]]
*: [[File:versioncontrol_button.png]]
* For this tutorial, I created "MyMod.esp", and I duplicated the "aaaMarkers" Cell from the base game Fallout4.esm
* For this tutorial, I created "MyMod.esp", and I duplicated the "aaaMarkers" Cell from the base game Fallout4.esm
Line 170: Line 155:
* User 3 uploads version 4 of the .esm to the repository
* User 3 uploads version 4 of the .esm to the repository
<br/>
<br/>
And the project continues on and on in similar fashion!
<br/>
== Merge process and workflow of the individual team member ==
<br/>
* Download the latest .esm file from the repository, to both the \Fallout 4\Data\ folder, AND \Merging\Data\.
* Open the Creation Kit, and begin making your changes to the .esp file.
* When you're finished your changes to the .esp, save, and close down the Creation Kit.
<br/>
* Download the latest .esm file from the repository, to the \Merging\Data\ folder.
** A team member could have uploaded a new version while you were working, so don't skip this step. Always ensure you merge into the latest version.
** This is why team communication is so important. You need to know what your team members plan to work on, and they need to know what you plan to work on, so that no changes collide.
** The merge is not done from \Fallout 4\Data\, so ensure this is your final step before initiating your merge.
* With the latest version of the .esm in \Merging\Data\, re-open the Creation Kit.
* Open the .esp as the Active File
** Do not try to skip opening the file, the merge won't work without opening it first
* Once the file is finished opening, click "File" -> "Data..."
* Click on your mod .esm file, and then "Details".
*: [[File:versioncontrol_mergeprep_details.png]]
* When asked "Do you want to use an empty list to save memory?", click "Yes"
* You'll now be shown a new popup titled "File Details", but it will have no contents.
** On your keyboard, press Shift+Ctrl+B
* You'll be asked if you want to update the Bit Array Files, and warned it can take several minutes. Click "Yes".
*: [[File:versioncontrol_update_bit_array_file.png]]
* When it's finished, you'll see "Updating bit arrays...Done" in the bottom status bar of the main window
*: [[File:versioncontrol_update_bit_array_done.png]]
<br/>
* With the bit array updated, you're ready to merge!
* Cancel out of the Data window, you don't need to re-open the .esp, because you already opened it.
* Now click the Version Control button
*: [[File:versioncontrol_button.png]]
* Select all the entries in the list, and click "Check Out"
* Select all the entries again, and click "Check In"
* Once you regain control of the window, your merge is complete!
<br/>
* The new .esm is in \Merging\Data\. Upload that masterpiece back to the repository!
<br/>
<br/>
Good luck!
Good luck!
<br/>
<br/>
<br/>
<br/>
== Notes ==
* Information contained herein was taken from the Skyrim page, and amended after testing in the Fallout 4 [[Creation Kit]].
== See Also ==
* [[Creation Kit]]
* [[Data Window]]
* [[Version Control Window]]
* [[Data File]]
* [[CreationKit.ini]]
* [[CreationKitPrefs.ini]]
== Links ==
* [https://www.creationkit.com/index.php?title=Version_control Skyrim - Version Control]
* [http://geck.bethsoft.com/index.php?title=Version_Control Fallout 3 & New Vegas - Version Control]
* [https://cs.elderscrolls.com/index.php?title=Version_Control Elder Scrolls III & IV - Version Control]
* [https://support.microsoft.com/en-us/help/4092694 File sharing over a network in Windows 10 at Microsft.com].
* [https://www.perforce.com/ Perforce - Source Control Manager]
* [https://git-scm.com/ Git - Source Control Manager]
* [http://wiki.tesnexus.com/index.php/Version_control_primer Elder Scrolls IV - Version Control Primer at NexusMods.com]
* [https://www.youtube.com/watch?v=6eInvAyMXoI Wheeze's Creation Kit Tutorials - Skyrim Version Control]
[[Category:Editor Reference]]
[[Category:Tutorials]]
Anonymous user