Shenmue Posted May 12, 2020 Share Posted May 12, 2020 Solve patch conflicts with Visual Studio  Patches can be hard to deal with when they have conflicts. Here is a tutorial on how to use them with the merge operation of Visual Studio. First of all, if you don't know how to apply a patch, you should look the official AscensionGameDev tutorial about them by clicking the link below. How to apply a patch  When applying a patch, conflicts can occur when: 1) Basically, you have modifications on your code that has conflicts with the patch. For example, you changed a line of code used by the patch, or you applied another one. 2) You are not on the correct branch or version of the branch to apply the patch. Is the patch working on master or development banch? What is the latest official working commit with the patch? 3) The patch is not up to date with your project version or code.  Note: For this tutorial to work, you need to have a branch where the patch can first apply. If the issue is that the patch is not up to date with the version it's supposed to work on, you can right click on the clean branch you want to apply the patch, then on view history. A list of all the modifications (commits) in the branch will appear. Then you right click on the last working commit with the patch, then on new branch and the patch should apply on the new branch without any conflict. If you don't know the last working commit, you will have to apply the patch on branches from previous commits until you find the right working commit. Spoiler  You can also download the official Kash Shop tutorial about patch conflicts on the link below. Download Kash Shop tutorial Or manually edit your project code with the patch one using diffy.org. Click on the link below for more information. About diffy.org  Context: I have diagonal movement patch on a branch and I want to apply the running patch on the same branch, but I am having conflicts. 1. Create a branch where the patch is working (official AGD developper branch in this case). 2. Apply the patch on that branch.  3. Go on the branch you initially wanted to apply the patch. 4. Right click on the branch and click on "Merge From...". 5. Select the branch you applied the patch on the "Merge from branch" section. 6. Click on merge. There should be conflicts. 7. Click on the "Conflicts" action link. 8. Click on the file where there are conflicts. 9. Click on merge.  Step 3 to 9 Step 3 to 9 separated below Spoiler  3. Go on the branch you initially wanted to apply the patch. 4. Right click on the branch and click on "Merge From...".  5. Select the branch you applied the patch on the "Merge from branch" section.  6. Click on merge.  7. There should be conflicts. Click on the "Conflicts" action link.  8. Click on a file where there are conflicts.  9. Click on merge.   10. A page with conflicts information should appear. Select the checkbox with the code you want to keep. In this case we want both since one is related to the running patch and the other the diagonal move patch (final version is shown on the bottom window. You can edit code on that window). 11. Check all the other conflicts (in this case there was just one). 12. Once there is "0 Remaining" conflicts, click "Accept Merge" Step 10 to 12  Step 10 to 12 separated below Spoiler  10. A page with conflicts information should appear. Select the checkbox with the code you want to keep. In this case we want both since one is related to the running patch and the other the diagonal move patch (Final version is shown on the bottom window. You can edit code on that window).  Spoiler After  11. Check all the other conflicts (in this case there was just one).  12. Once there is "0 Remaining" conflicts, click "Accept Merge"   13. Do the same for all the other file on the "Resolve Conflicts" section (in this case there was just one).  14. Once every conflicts have been solved, build your solution to check if there are still errors. Click on "Build", then "Build Solution". You should also do some tests in game to be sure everything is fine.  15. Everything should be fine now. You can commit changes and play with your new mod.  Nick, Beefy Kasplant, Xiphoid and 3 others 6 Link to comment Share on other sites More sharing options...
Nick Posted May 12, 2020 Share Posted May 12, 2020 Â Â good job, as always. Shenmue 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now