wrye-bash / garybash

A port of Wrye Bash to Fallout 3 & New Vegas. This repo is mainly used to store diffs between Bash and the two versions of this fork, in preparation for merging back into Bash.
1 stars 0 forks source link

Identifying game-specific files and code #2

Closed Ortham closed 7 years ago

Ortham commented 10 years ago

Currently Wrye Flash and Wrye Flash NV are developed separately on the master and newvegas branches respectively, which is slightly mad, because they share a lot of code and fixes have to be applied twice.

I would like to add support for FO3 and FNV to Wrye Bash, which has a more up-to-date codebase and is maintained, so identifying what is game-specific is necessary. I think I'll do this in several stages, in the master-newvegas-merge branch:

  1. Work out what's different between the two branches. This can be done using git diff.
  2. For each file that differs, go through the differences and decide what differences need to be kept, and which aren't important (eg. variable names aren't important, but differing values could be). In some cases (eg. images) only one version should be kept.
  3. For file differences that are kept, rearrange folder structure as necessary so that both can be kept. Bash's folder structure should be mimicked in such cases for easy transfer later. For variable values in code, make a record of each game's values in separate files . Try to use the same variable names. as in the game-specific files in Bash. Otherwise, edit the code as necessary to ensure both game's functions, etc. are kept.

Once that's done, the differences between Wrye Flash and Flash NV will be easily seen, with all unique code in game-specific files, and a git diff between master and master-newvegas-merge showing the other changes.

Then it will be time to diff between master and the SVN revision of Wrye Bash that it is based on. I've added Utumno's Git version of the Bash repository as a remote, so I can use git diff again, and I need to diff against adc06d3c3ef0d8d335a91101979f030c3d5f9306.

As before, the diff will need to be worked through, using the fallout-specific branch to hold files that can be dropped into Bash. New files should be placed in the folder structure they will have in Bash, and any changed files should have their diffs placed where the files themselves would go.

Once that's done, the third and final stage can begin. New files can be dropped directly into Bash, but the diffs will be against old versions of the Bash files, so the changes in Bash will need to be traced to see where the Fallout-specific changes should end up in the latest Bash code.

Diffs yet to be processed

FO3 -> FNV:

Bash -> Flash:

Details of the resolution of each diff are posted below or appear in relevant commit messages.

Ortham commented 10 years ago

I generated two diffs:

If I've got it right, the latter should be enough to distinguish the game-specific stuff, though there may also be stuff which is the same for both Fallouts but different from Oblivion. Rather than go through the 204,000 line diff for that stuff though, it would probably be easier to find the Bash revisions that the Flash files are based off and diff them.

I think I'm going to create a new branch to hold the diff file, and split it into a separate diff file for each file within it, and then I can reference them to make code changes to merge the two branches.

Ortham commented 10 years ago

Resolved README.md

No action required, generic file that should be present and is.

Ortham commented 10 years ago

Resolved Fallout3_ids.pkl

No action required. Fallout 3 specific file that should be present and is.

Ortham commented 10 years ago

Resolved FalloutNV_ids.pkl

In 6bb7f190ec52e24b8eb3281ed8c19070cbab73e2.

Ortham commented 10 years ago

Resolved fallout3*.png

No action required. Icons had been deleted in FNV branch.

Ortham commented 10 years ago

Resolved falloutnv.png, fo3.png, fnv*.png, Bashed Patch, 0.esp and Blank.esp

In c84b51eac49f798ec4436eb106473d53d396519a, aa91a38813ced3c5c834b20f6d4ffd3b469765f5 and 8a73ac5361d9629a675130fec111f77fd7e19ba0.

Ortham commented 10 years ago

Hooray, only 4183 lines of code diff remaining to process!

Ortham commented 10 years ago

I've decided to not bother altering variables in code or changing text going forwards, I'll just be extracting game-specific data and code, because I could replace variables with generic equivalents and rewrite text to be more generic, but since none of that will be used there's little point.

Ortham commented 10 years ago

Resolved bish.py

The file diff was only for UI text and a few cases where the game master file was hardcoded into code, so nothing needed splitting off.

Ortham commented 10 years ago

Resolved barb.py

The only differences were in Bash file and folder paths, which were relative to the game directory and no new data was present.

Ortham commented 10 years ago

In c2ca50cd15ab91042bf32603e99cb297ba9b9721 I reverted some unimportant changes I'd make to make the diff between master and master-newvegas-merge cleaner: now only the Bash icons have been changed, all other files are either additions or deletions (which, apart from taglist.txt, are because files have been moved).

Ortham commented 10 years ago

I went ahead and started populating the fallout-specific branch, and have gotten to the point where I can do no more until basher.py and bosh.py both have their diffs resolved in the master-newvegas-merge branch.

Ortham commented 10 years ago

As of the last commit above, the remaining lines in the bosh.py diff are game-specific differences in code functionality or hardcoded values that still have their Oblivion equivalents in the same place in the latest SVN so I couldn't take any pointers from that.

As such, I'll go ahead to generating the Bash-Flash diffs of bosh.py and basher.py, and move the game-specific files to the fallout-specific branch.

Ortham commented 10 years ago

49,000 lines of diffs to process between the fallout-specific and master-newvegas-merge branches...

Ortham commented 7 years ago

Closing this as I've long since lost interest in it.