Git is probably the best tool for that. It may take a while to learn how to use it, but once you are familiar with it, you will never look back and you will be wondering why you wasted so much time managing your code with other primitive tools.
Git can be used from the command line but it is also supported in Visual Studio Code and
You must be registered to see the links
. You will easily find several guides for using Git or GitHub with Ren'Py and there are several Reddit discussions about it in r/RenPy so I will not get into the details of how to use git for Ren'Py files, how to set up .gitignore, etc. There are several tutorials that explain this better than I could. Instead, I will focus on the part about automatically tracking changes between the previous and current upstream versions (the official releases from togs) and between those versions and yours.
Git is very good at tracking and merging changes between source code files (such as rpy files). The basic idea is that you would keep two or three branches:
- One branch for your own code. Call this branch "master" or "emelex" or whatever you want. This is the branch in which you will do all your work.
- One branch for the upstream code from togs. Call this branch "upstream" or "official" or "togs" or whatever you want. You will never do any local modifications in this branch. Instead, whenever togs releases a new version, you will switch to this branch, copy all source files and store them in git with a single commit message that mentions the version number (0.10.x, 0.11.x, ...), then switch back to your master branch.
- Optionally, one branch for JokerLeader's WT mod. Again, you will never work with the code in this branch: you will only commit the source files for each release.
When togs releases a new version and you copy it into the upstream branch, the "git status" command (or the equivalent in VS Code or any other development environment) will instantly tell you about all files that have been added or modified. You can then use "git diff" (or the equivalent command in your environment) to see what has changed in all files or in a specific file.
After that, you can switch back to your master branch and then use "git merge" (or equivalent) to merge all changes from the upstream branch into your branch. Git will not overwrite your files with the ones from the upstream branch; instead, the merge command will try to apply to your code the same changes that were done by togs in the upstream branch since the previous release.
At any time, you can use "git diff" (or equivalent) with the appropriate parameters to see a list of changes between your previous version and your current working version, or between your version and the one in the upstream branch, or again between the last two versions in the upstream branch, etc. This is what makes git so useful: as it keeps the complete revision history in all branches, you can check at any time what has changed within a branch or between branches.