56RAF_klem
Mar-20-2013, 07:05
A longish post but worth the effort if you want to swap easily between versions. Of course one way is to go into your folders every time and recreate the appropriate maddox.dll but this will do it for you at the click of a button. There are simpler batch files to do simple renaming but this method will always check that you have the necessary files available.
These instructions assume you have the Team Fusion version installed and haven't done anything to change that. They also assume you have installed CoD to your C: drive, if you haven't you must mentally adjust the instructions to suit your installation.
First you must make backup copies of the Stock and Team Fusion (TF) versions of the file maddox.dll in the folder
C:/Programe Files (x86)/Steam/steamapps/common/il-2 sturmovik cliffs of dover/parts/core.
( DO NOT confuse this main game installation location with your personal settings (.ini files) folder at:
C:/Users/[your PC login name]/My Documents/1C Soft Club/il-2 sturmovik cliffs of dover/ )
When you installed the TF patch it will have backed up the stock version of maddox.dll, giving it a name in the form of :
maddox.dll.ModInstallBackup_16-3-2013-9_59_20
You need to rename this file. Note that if you have more than one file like that (usually caused by multiple attempts to install the mod) make sure you rename the oldest version. You should rename the file to maddox_stock.dll and this file should NEVER be deleted.
Next, make a copy of maddox.dll, which is the version placed there by the TF patch, and name it maddox_fusion.dll.
Now go to your Destop and, away from the other Desktop icons, right click on the background, select New.... Text Document. Accept the name it gives you for now.
Double click on the Desktop icon or Right click on it and Open it file with Notepad. Copy all of the following text between, but not including, the ============== lines.
Don't worry, you don't need to understand the code.
==============================
Option Explicit
'mods installation must place a copy of stock maddox.dll as maddox_stock.dll in \parts\core\ folder
'mods installation must place a copy of fusion maddox.dll as maddox_fusion.dll in \parts\core\ folder
'OTHERWISE, make these files yourself by copying and editing the filenames of the stock and fusion maddox.dll's
Dim CodPath
'EDIT YOUR GAME PATH TO SUIT:-
CodPath = "C:\Program Files (x86)\Steam\steamapps\common\il-2 sturmovik cliffs of dover\"
'Main Code:-
Dim objFSO, objShell
Dim strFile0, strFile1, strFile2
Dim stockdll, fusiondll, response, msg
Set objShell = WScript.CreateObject("WScript.Shell")
stockdll= 0
fusiondll = 0
' Create the File System Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Check that the required dlls exist
strFile0 = CodPath & "parts\core\maddox.dll"
strFile1 = CodPath & "parts\core\maddox_stock.dll"
If objFSO.FileExists(strFile1) Then stockdll = 1
if stockdll = 0 then call nostockdll
strFile2 = CodPath & "parts\core\maddox_fusion.dll"
If objFSO.FileExists(strFile2) Then fusiondll = 1
if fusiondll = 0 then call nofusiondll
'ask the question
response = MsgBox("Do you want to run Fusion modsversion?" & vbcr & "'Yes' will run Fusion version, 'No' will run Stock version",515, "Stock or MODs version")
if response = 2 then WScript.Quit
if response = 6 then
objFSO.CopyFile strFile2, strFile0, true
msg = "Fusion version"
WScript.Sleep 1000
end if
if response = 7 then
objFSO.CopyFile strFile1, strFile0, true
msg = "Stock version"
WScript.Sleep 1000
end if
'objShell.Run Chr(34) & CodPath & "Launcher.exe" & Chr(34), 1
MsgBox "You can now run CoD in " & msg & " from your usual shortcut or Steam."
WScript.Quit
Sub nostockdll
MsgBox "No stock version of maddox.dll named maddox_stock.dll available. Cannot proceed. You can run your currently installed version by running the Launcher from Desktop or Steam Library."
WScript.Quit
End Sub
Sub nomoddll
MsgBox "No fusion version of maddox.dll named maddox_fusion.dll is available. Cannot proceed. You can run your currently installed version by running the Launcher from Desktop or Steam Library."
WScript.Quit
End Sub
errorswap:
If err.number <> vbEmpty then WScript.echo "VBScript Error: " & err.number
' End of VBScript to select dll file
=============================
Note! This code is written for a main CoD installation on the default path of:
C:\Program Files (x86)\Steam\steamapps\common\Il-2 sturmovik cliffs of dover
If yours isn't at that location find the lines that read:
'EDIT YOUR GAME PATH TO SUIT:-
CodPath = "C:\Program Files (x86)\Steam\steamapps\common\il-2 sturmovik cliffs of dover\"
and edit the CodPath line (inside the quotation marks) to read the location of your CoD main installation folder.
(DO NOT confuse this main game installation location with your personal settings (.ini files) folder at:
C:/Users/[your PC login name]/My Documents/1C Soft Club/il-2 sturmovik cliffs of dover/)
Now save the file and close it. Finally right click on the Desktop icon, select Rename and name it CoD_Swap.vbs. You will probably get warnings about changing the filetype or extension and that it may not work properly, just ignore this and rename it.
That's it, just double click on the Desktop icon and it will ask you which version you want to use. After that you just start the game in the normal way (desktop icon or in Steam, etc).
ERROR MESSAGES:
If you get an error message about maddox.dll, maddox_stock.dll or maddox_fusion.dll not being available you made a mistake renaming files or perhaps renamed maddox.dll instead of renaming a copy of it. Go back to the beginning of these instructions and be sure you named everything correctly. If you find you do not have a maddox.dll you must copy either the _stock or the _fusion version and rename the copy maddox.dll. It doesn't matter which, your Mod Swapper will take you where you want to go.
If all goes to rats just re-validate your game in Steam, test it and then reinstall the patch and follow these instructions again.
FUTURE PATCHES
Install any future patch then immediately make a copy of maddox.dll to replace your maddox_fusion.dll
NOTES
In the very unlikely event that the game is formally updated by 1C through Steam, i.e. creating a new stock version, then that maddox.dll should be used to replaced the maddox_stock.dll you just made. (Updating by 1C is extremely unlikely as they have officially walked away from CoD.)
If you ever re-validate your files through Steam you will be taken back to the stock version but the Mod Swapper will still work because it has the same _stock version of maddox.dll that Steam will have given you.
These instructions assume you have the Team Fusion version installed and haven't done anything to change that. They also assume you have installed CoD to your C: drive, if you haven't you must mentally adjust the instructions to suit your installation.
First you must make backup copies of the Stock and Team Fusion (TF) versions of the file maddox.dll in the folder
C:/Programe Files (x86)/Steam/steamapps/common/il-2 sturmovik cliffs of dover/parts/core.
( DO NOT confuse this main game installation location with your personal settings (.ini files) folder at:
C:/Users/[your PC login name]/My Documents/1C Soft Club/il-2 sturmovik cliffs of dover/ )
When you installed the TF patch it will have backed up the stock version of maddox.dll, giving it a name in the form of :
maddox.dll.ModInstallBackup_16-3-2013-9_59_20
You need to rename this file. Note that if you have more than one file like that (usually caused by multiple attempts to install the mod) make sure you rename the oldest version. You should rename the file to maddox_stock.dll and this file should NEVER be deleted.
Next, make a copy of maddox.dll, which is the version placed there by the TF patch, and name it maddox_fusion.dll.
Now go to your Destop and, away from the other Desktop icons, right click on the background, select New.... Text Document. Accept the name it gives you for now.
Double click on the Desktop icon or Right click on it and Open it file with Notepad. Copy all of the following text between, but not including, the ============== lines.
Don't worry, you don't need to understand the code.
==============================
Option Explicit
'mods installation must place a copy of stock maddox.dll as maddox_stock.dll in \parts\core\ folder
'mods installation must place a copy of fusion maddox.dll as maddox_fusion.dll in \parts\core\ folder
'OTHERWISE, make these files yourself by copying and editing the filenames of the stock and fusion maddox.dll's
Dim CodPath
'EDIT YOUR GAME PATH TO SUIT:-
CodPath = "C:\Program Files (x86)\Steam\steamapps\common\il-2 sturmovik cliffs of dover\"
'Main Code:-
Dim objFSO, objShell
Dim strFile0, strFile1, strFile2
Dim stockdll, fusiondll, response, msg
Set objShell = WScript.CreateObject("WScript.Shell")
stockdll= 0
fusiondll = 0
' Create the File System Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Check that the required dlls exist
strFile0 = CodPath & "parts\core\maddox.dll"
strFile1 = CodPath & "parts\core\maddox_stock.dll"
If objFSO.FileExists(strFile1) Then stockdll = 1
if stockdll = 0 then call nostockdll
strFile2 = CodPath & "parts\core\maddox_fusion.dll"
If objFSO.FileExists(strFile2) Then fusiondll = 1
if fusiondll = 0 then call nofusiondll
'ask the question
response = MsgBox("Do you want to run Fusion modsversion?" & vbcr & "'Yes' will run Fusion version, 'No' will run Stock version",515, "Stock or MODs version")
if response = 2 then WScript.Quit
if response = 6 then
objFSO.CopyFile strFile2, strFile0, true
msg = "Fusion version"
WScript.Sleep 1000
end if
if response = 7 then
objFSO.CopyFile strFile1, strFile0, true
msg = "Stock version"
WScript.Sleep 1000
end if
'objShell.Run Chr(34) & CodPath & "Launcher.exe" & Chr(34), 1
MsgBox "You can now run CoD in " & msg & " from your usual shortcut or Steam."
WScript.Quit
Sub nostockdll
MsgBox "No stock version of maddox.dll named maddox_stock.dll available. Cannot proceed. You can run your currently installed version by running the Launcher from Desktop or Steam Library."
WScript.Quit
End Sub
Sub nomoddll
MsgBox "No fusion version of maddox.dll named maddox_fusion.dll is available. Cannot proceed. You can run your currently installed version by running the Launcher from Desktop or Steam Library."
WScript.Quit
End Sub
errorswap:
If err.number <> vbEmpty then WScript.echo "VBScript Error: " & err.number
' End of VBScript to select dll file
=============================
Note! This code is written for a main CoD installation on the default path of:
C:\Program Files (x86)\Steam\steamapps\common\Il-2 sturmovik cliffs of dover
If yours isn't at that location find the lines that read:
'EDIT YOUR GAME PATH TO SUIT:-
CodPath = "C:\Program Files (x86)\Steam\steamapps\common\il-2 sturmovik cliffs of dover\"
and edit the CodPath line (inside the quotation marks) to read the location of your CoD main installation folder.
(DO NOT confuse this main game installation location with your personal settings (.ini files) folder at:
C:/Users/[your PC login name]/My Documents/1C Soft Club/il-2 sturmovik cliffs of dover/)
Now save the file and close it. Finally right click on the Desktop icon, select Rename and name it CoD_Swap.vbs. You will probably get warnings about changing the filetype or extension and that it may not work properly, just ignore this and rename it.
That's it, just double click on the Desktop icon and it will ask you which version you want to use. After that you just start the game in the normal way (desktop icon or in Steam, etc).
ERROR MESSAGES:
If you get an error message about maddox.dll, maddox_stock.dll or maddox_fusion.dll not being available you made a mistake renaming files or perhaps renamed maddox.dll instead of renaming a copy of it. Go back to the beginning of these instructions and be sure you named everything correctly. If you find you do not have a maddox.dll you must copy either the _stock or the _fusion version and rename the copy maddox.dll. It doesn't matter which, your Mod Swapper will take you where you want to go.
If all goes to rats just re-validate your game in Steam, test it and then reinstall the patch and follow these instructions again.
FUTURE PATCHES
Install any future patch then immediately make a copy of maddox.dll to replace your maddox_fusion.dll
NOTES
In the very unlikely event that the game is formally updated by 1C through Steam, i.e. creating a new stock version, then that maddox.dll should be used to replaced the maddox_stock.dll you just made. (Updating by 1C is extremely unlikely as they have officially walked away from CoD.)
If you ever re-validate your files through Steam you will be taken back to the stock version but the Mod Swapper will still work because it has the same _stock version of maddox.dll that Steam will have given you.