Difference between revisions of "Version Control"
Jump to navigation
Jump to search
no edit summary
imported>HaploTR |
imported>HaploTR |
||
Line 110: | Line 110: | ||
== Workflow for multiple team members contributing to the same .ESM file == | == Workflow for multiple team members contributing to the same .ESM file == | ||
<br/> | |||
As mentioned at the top of the page, this document will not explain how to use external revision control software such as Perforce or Git, but now we will discuss the workflow for multiple team members contributing to the same project while using such software. | As mentioned at the top of the page, this document will not explain how to use external revision control software such as Perforce or Git, but now we will discuss the workflow for multiple team members contributing to the same project while using such software. | ||
<br/> | |||
Think of the .esm as the one true source for what your mod is. When you want to make changes to it, you make those changes through the .esp file. The .esp file is essentially a changelist for your local edits. | Think of the .esm as the one true source for what your mod is. When you want to make changes to it, you make those changes through the .esp file. The .esp file is essentially a changelist for your local edits. | ||
<br/> | |||
Let's say a room already exists in your .esm master file | Let's say a room already exists in your .esm master file: | ||
* When you modify a single wall in that room and save, only the modifications for that wall get saved to the .esp -- the rest of the room is not in the .esp, because it remains unchanged in the .esm file. | * When you modify a single wall in that room and save, only the modifications for that wall get saved to the .esp -- the rest of the room is not in the .esp, because it remains unchanged in the .esm file. | ||
* When you merge the .esp into the .esm, the Creation links the IDs of those changed assets, to the assets in the .esm that share the same IDs. | * When you merge the .esp into the .esm, the Creation links the IDs of those changed assets, to the assets in the .esm that share the same IDs. | ||
* When you add things to the .esp that don't exist in the .esm, the Creation Kit knows those are new because no assets in the .esm share the same ID. So in the merge, those new asset references are added to the .esm. | * When you add things to the .esp that don't exist in the .esm, the Creation Kit knows those are new because no assets in the .esm share the same ID. So in the merge, those new asset references are added to the .esm. | ||
* After you merge your changes into the .esm, the .esp is emptied out - there are no more changes left in your .esp, because they are now an integrated part of your .esm as the one true source. | * After you merge your changes into the .esm, the .esp is emptied out - there are no more changes left in your .esp, because they are now an integrated part of your .esm as the one true source. | ||
<br/> | |||
<br/> | |||
There are a few things to remember with multiple team members working on the same master file. | There are a few things to remember with multiple team members working on the same master file. | ||
* Merges into the .esm by different people must be done one a time. | * Merges into the .esm by different people must be done one a time. | ||
Line 126: | Line 127: | ||
** Revision control software usually has their own tools to merge files like this together, but depending on what the changes are (especially changes to new custom content) that can be difficult, and is sometimes just not possible when two people's changes collide. | ** Revision control software usually has their own tools to merge files like this together, but depending on what the changes are (especially changes to new custom content) that can be difficult, and is sometimes just not possible when two people's changes collide. | ||
** Luckily the backup directories we created way at the top of this page are used by the Creation Kit to backup your .esp file. If a team member was to merge into a local .esm out of turn, their .esp is still in tact in the backup folder, and they can step back in line to merge in the proper queue. | ** Luckily the backup directories we created way at the top of this page are used by the Creation Kit to backup your .esp file. If a team member was to merge into a local .esm out of turn, their .esp is still in tact in the backup folder, and they can step back in line to merge in the proper queue. | ||
<br/> | |||
* Even when properly merging changes one after another - using the last person's updated .esm to initiate your next merge - it's important that team members aren't working on the same assets, thus simply overriding the previous person's change. | * Even when properly merging changes one after another - using the last person's updated .esm to initiate your next merge - it's important that team members aren't working on the same assets, thus simply overriding the previous person's change. | ||
** As an example: | ** As an example: | ||
Line 138: | Line 140: | ||
**** User two uploads the new .esm to the online repository | **** User two uploads the new .esm to the online repository | ||
** Uh oh! User two, though following the correct queue for merging changes, just blew away user one's changes. It's as if the room was never moved down, but the new elevator to nowhere probably looks great. | ** Uh oh! User two, though following the correct queue for merging changes, just blew away user one's changes. It's as if the room was never moved down, but the new elevator to nowhere probably looks great. | ||
<br/> | |||
This may seem like an obvious example of where merging can go wrong, but there are many different types of content, assets, scripts, etc... that may be less obvious. Always keep this in mind, and promote frequent communication on your team. | |||
<br/> | |||
<br/> | |||
Here's a diagram demonstrating the proper workflow for multiple team members contributing to the same mod. | |||
<br/> | |||
[[File:versioncontrol_workflowdiagram.png]] | |||
* User 1 downloads version 1 of the master file | |||
* User 1 modifies Layer 1 | |||
* User 2 also downloads version 1 of the master file | |||
* User 2 modifies Layer 2 | |||
** This is okay, because User 1 and User 2 have communicated and understand the scope and direction of each other's changes. They know what sections of the level the other is modifying, and their changes will not collide. | |||
* User 1 merges his modifications of Layer 1 into the .esm file | |||
* User 1 uploads version 2 of the .esm to the repository | |||
* User 2 waits for User 1 to finish his merge. | |||
* User 2 downloads version 2 of the master file, to ensure it retains all the changes that User 1 just made | |||
* User 2 merges his modification of Layer 2 into the new .esm file | |||
* User 2 uploads version 3 of the .esm to the repository | |||
* User 3 is also in communication with the other users, and he also needs to modify Layer 1 | |||
* User 3 must wait until User 1 is finished before he starts modifying Layer 1, or their changes will collide | |||
* User 3 downloads version 3 of the master file | |||
* User 3 modifies Layer 1, which contains the modifications User 1 already made | |||
* User 3 merges his modifications of Layer 1 into the .esm file | |||
* User 3 uploads version 4 of the .esm to the repository | |||
* And the project continues on and on in similar fashion! |