Releases: HSValhiem/HST_ModSourceChecker
Valheim Mod Source Changes Checker - Second Version
Info
Drag a Mod onto the Tool to check if it uses sources that have been changed or deleted in the game update.
The tool will provide the name of the classes that are changed or deleted for you to reference within WinMerge for changes.
Instructions to Use
Prerequisite Download Required Tools
Note: You will need both the last version of the game and the current version to compare against.
If you don't have the old version I.E Steam has already updated automatically then follow the guide at the bottom of this page to get it.
Step 1: Extract Game Sources with DNSpy
Note: You will need to repeat this step for both Versions of the game(Old and New) and use different directories
Remember where you save both projects as the location will need to be used later
- Open DNSpy
- Click "File->Open" in Toolbar at top
- Open assembly_valheim.dll in "Valheim\valheim_Data\Managed"

- Click "File->Export to Project" in Toolbar at top
- Select a Folder to save to and press Export
Note: Use the Picture Below for Reference, Don't forget to set Visual Studio version to 2022

Don't forget to extract both versions of the game!
Step 2: Use Notepad++ to Remove Token Tags with Regex
Note: You will need to repeat this step for both Versions of the game(Old and New)
- Open Notepad++
- Click "Search->Find in Files..." in Toolbar at top
- Enter the following
^\s*\/\/(?:\s*\((get|add|invoke|set|remove)\))?\s*Token:.+$into the "Find what:" box - Browse or Enter the Path to the folder that you exported the source to with DNSpy
- Make sure the search is setup like the following image and press "Replace in Files" Button and Press OK to Confirm

Don't forget to do this for both versions of the game!(Both Directories Old and New)
Step 3: Use WinMerge to Check Differences
-
Open WinMerge
-
Click "File->Open" in Toolbar at top
-
Open the old version dump directory and new version dump directory in Minmerge
Note: Make sure to select the directory that contains the .cs files not the .sln -
Click the Options Button and Make sure that the Options Look Like the Second Picture
-
Make sure Everything looks like the Picture and Click the Compare Button
Note: These are the Locations that you saved During the DNSpy Step
Note: Make sure that the First Folder is the Old Valheim Version and that the Second Folder is the New Version
Note: Click the Options Button and Make sure that the Options Look Like the Second Picture


-
Click "Tools->Generate Report" in Toolbar at top
-
Save the file with name "newVersion" to the same directory that modSourceChecker.exe is located and select CSV for the "Style"


Step 4: Use It!!!
- Simply Drag the Mod onto the modSourceChecker.exe and it will tell you if the Mod has source code references that have been changed or deleted in between version updates for Valheim.
- (New in the Latest Version) Now you can run modSourceChecker.exe from command line to supply a folder and filter class.method to check.
- Like this:
modSourceChecker.exe "D:\\Valheim_Dev\\Valheim\\BepInEx\\plugins" "ZNet.Awake" - One you have the classname in question you can go back into WinMerge and see the changes.



How to get last version of Valheim in steam Tutorial
Valheim Mod Source Changes Checker - First Release
Info
Drag a Mod onto the Tool to check if it uses sources that have been changed or deleted in the game update.
The tool will provide the name of the classes that are changed or deleted for you to reference within WinMerge for changes.
Instructions to Use
Prerequisite Download Required Tools
Note: You will need both the last version of the game and the current version to compare against.
If you don't have the old version I.E Steam has already updated automatically then follow the guide at the bottom of this page to get it.
Step 1: Extract Game Sources with DNSpy
Note: You will need to repeat this step for both Versions of the game(Old and New) and use different directories
Remember where you save both projects as the location will need to be used later
- Open DNSpy
- Click "File->Open" in Toolbar at top
- Open assembly_valheim.dll in "Valheim\valheim_Data\Managed"

- Click "File->Export to Project" in Toolbar at top
- Select a Folder to save to and press Export
Note: Use the Picture Below for Reference, Don't forget to set Visual Studio version to 2022

Don't forget to extract both versions of the game!
Step 2: Use Notepad++ to Remove Token Tags with Regex
Note: You will need to repeat this step for both Versions of the game(Old and New)
- Open Notepad++
- Click "Search->Find in Files..." in Toolbar at top
- Enter the following
^\s*\/\/(?:\s*\((get|add|invoke|set|remove)\))?\s*Token:.+$into the "Find what:" box - Browse or Enter the Path to the folder that you exported the source to with DNSpy
- Make sure the search is setup like the following image and press "Replace in Files" Button and Press OK to Confirm

Don't forget to do this for both versions of the game!(Both Directories Old and New)
Step 3: Use WinMerge to Check Differences
-
Open WinMerge
-
Click "File->Open" in Toolbar at top
-
Open the old version dump directory and new version dump directory in Minmerge
Note: Make sure to select the directory that contains the .cs files not the .sln -
Click the Options Button and Make sure that the Options Look Like the Second Picture
-
Make sure Everything looks like the Picture and Click the Compare Button
Note: These are the Locations that you saved During the DNSpy Step
Note: Make sure that the First Folder is the Old Valheim Version and that the Second Folder is the New Version
Note: Click the Options Button and Make sure that the Options Look Like the Second Picture


-
Click "Tools->Generate Report" in Toolbar at top
-
Save the file with name "newVersion" to the same directory that modSourceChecker.exe is located and select CSV for the "Style"


Step 4: Use It!!!
- Simply Drag the Mod onto the modSourceChecker.exe and it will tell you if the Mod has source code references that have been changed or deleted in between version updates for Valheim.
- One you have the classname in question you can go back into WinMerge and see the changes.




