Author Topic: BlueBeGone - Mod that swaps all Aurora blue colors to black (DEPRECATED)  (Read 12620 times)

0 Members and 1 Guest are viewing this topic.

Offline Droll

  • Vice Admiral
  • **********
  • D
  • Posts: 1721
  • Thanked: 608 times
Quote
Just to clarify, the Patches directory is in the same directory as aurorapatch.exe and aurora.exe. There are two directories inside Patches called UIControls and BlueBeGone, each of those subdirectories contain their respective .dll files. This is correct right?

That's correct.

Can you try the attached debug build please?
Same deal, dump files in Aurora folder, run AuroraPatch.exe.
After closing AuroraPatch, the AuroraPatch.log file should get populated with (hopefully) useful information.
Ignore the double-logging for now :)

Ok this is much more helpful, the program is finding the patches correctly but cannot load them as assemblies for some reason. Here are the debug logs:
Code: [Select]
08/05/2021 15:45:45 - AuroraPatch - Info: AuroraPatch logger initialized
08/05/2021 15:45:45 - AuroraPatch - Info: AuroraPatch logger initialized
08/05/2021 15:45:45 - AuroraPatch - Info: Found Aurora at C:\Users\PC\Downloads\Aurora\Aurora.exe
08/05/2021 15:45:45 - AuroraPatch - Info: Found Aurora at C:\Users\PC\Downloads\Aurora\Aurora.exe
08/05/2021 15:45:45 - AuroraPatch - Debug: Calculating checksum
08/05/2021 15:45:45 - AuroraPatch - Debug: Calculating checksum
08/05/2021 15:45:45 - AuroraPatch - Debug: Checksum: chm1c7
08/05/2021 15:45:45 - AuroraPatch - Debug: Checksum: chm1c7
08/05/2021 15:45:45 - AuroraPatch - Info: Loading patches from C:\Users\PC\Downloads\Aurora\Patches
08/05/2021 15:45:45 - AuroraPatch - Info: Loading patches from C:\Users\PC\Downloads\Aurora\Patches
08/05/2021 15:45:45 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone
08/05/2021 15:45:45 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone
08/05/2021 15:45:45 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll can not be loaded as Assembly.
08/05/2021 15:45:45 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll can not be loaded as Assembly.
08/05/2021 15:45:45 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\UIControls
08/05/2021 15:45:45 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\UIControls
08/05/2021 15:45:45 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll can not be loaded as Assembly.
08/05/2021 15:45:45 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll can not be loaded as Assembly.
08/05/2021 15:45:47 - AuroraPatch - Info: Loading Aurora C:\Users\PC\Downloads\Aurora\Aurora.exe with checksum chm1c7
08/05/2021 15:45:47 - AuroraPatch - Info: Loading Aurora C:\Users\PC\Downloads\Aurora\Aurora.exe with checksum chm1c7
08/05/2021 15:45:47 - AuroraPatch - Info: Running Load
08/05/2021 15:45:47 - AuroraPatch - Info: Running Load
08/05/2021 15:45:47 - AuroraPatch - Info: Done running Load
08/05/2021 15:45:47 - AuroraPatch - Info: Done running Load
08/05/2021 15:45:47 - AuroraPatch - Info: Running PreStart
08/05/2021 15:45:47 - AuroraPatch - Info: Running PreStart
08/05/2021 15:45:47 - AuroraPatch - Info: Done running PreStart
08/05/2021 15:45:47 - AuroraPatch - Info: Done running PreStart
08/05/2021 15:45:47 - AuroraPatch - Info: Starting Aurora
08/05/2021 15:45:47 - AuroraPatch - Info: Starting Aurora
08/05/2021 15:45:47 - AuroraPatch - Info: TacticalMap found: jt
08/05/2021 15:45:47 - AuroraPatch - Info: TacticalMap found: jt
Native library pre-loader is trying to load native SQLite library "C:\Users\PC\Downloads\Aurora\x64\SQLite.Interop.dll"...
Native library pre-loader is trying to load native SQLite library "C:\Users\PC\Downloads\Aurora\x64\SQLite.Interop.dll"...
08/05/2021 15:45:52 - AuroraPatch - Info: Running PostStart
08/05/2021 15:45:52 - AuroraPatch - Info: Running PostStart
08/05/2021 15:45:52 - AuroraPatch - Info: Done running PostStart
08/05/2021 15:45:52 - AuroraPatch - Info: Done running PostStart
 

Offline twice2double (OP)

  • Warrant Officer, Class 1
  • *****
  • t
  • Posts: 76
  • Thanked: 119 times
Ok this is much more helpful...

Can you replace the AuroraPatch.exe with this one attached. It should now print the exception encountered.

We'll get there! Haha.

Thanks for taking the time.
 

Offline Droll

  • Vice Admiral
  • **********
  • D
  • Posts: 1721
  • Thanked: 608 times
Ok this is much more helpful...

Can you replace the AuroraPatch.exe with this one attached. It should now print the exception encountered.

We'll get there! Haha.

Thanks for taking the time.

Ok so now I get this, what I don't understand is that it seems to be complaining about the NET framework version, but I can play aurora no problem so I should have that framework installed and working already.

Code: [Select]
08/05/2021 16:15:42 - AuroraPatch - Info: AuroraPatch logger initialized
08/05/2021 16:15:42 - AuroraPatch - Info: AuroraPatch logger initialized
08/05/2021 16:15:42 - AuroraPatch - Info: Found Aurora at C:\Users\PC\Downloads\Aurora\Aurora.exe
08/05/2021 16:15:42 - AuroraPatch - Info: Found Aurora at C:\Users\PC\Downloads\Aurora\Aurora.exe
08/05/2021 16:15:42 - AuroraPatch - Debug: Calculating checksum
08/05/2021 16:15:42 - AuroraPatch - Debug: Calculating checksum
08/05/2021 16:15:42 - AuroraPatch - Debug: Checksum: chm1c7
08/05/2021 16:15:42 - AuroraPatch - Debug: Checksum: chm1c7
08/05/2021 16:15:42 - AuroraPatch - Info: Loading patches from C:\Users\PC\Downloads\Aurora\Patches
08/05/2021 16:15:42 - AuroraPatch - Info: Loading patches from C:\Users\PC\Downloads\Aurora\Patches
08/05/2021 16:15:42 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone
08/05/2021 16:15:42 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone
08/05/2021 16:15:42 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll can not be loaded as Assembly: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at AuroraPatch.Loader.FindPatches()


08/05/2021 16:15:42 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll can not be loaded as Assembly: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\PC\Downloads\Aurora\Patches\BlueBeGone\BlueBeGone.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at AuroraPatch.Loader.FindPatches()


08/05/2021 16:15:42 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\UIControls
08/05/2021 16:15:42 - AuroraPatch - Info: Looking for assemblies in C:\Users\PC\Downloads\Aurora\Patches\UIControls
08/05/2021 16:15:42 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll can not be loaded as Assembly: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at AuroraPatch.Loader.FindPatches()


08/05/2021 16:15:42 - AuroraPatch - Debug: File C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll can not be loaded as Assembly: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\PC\Downloads\Aurora\Patches\UIControls\UIControls.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at AuroraPatch.Loader.FindPatches()


08/05/2021 16:15:46 - AuroraPatch - Info: Loading Aurora C:\Users\PC\Downloads\Aurora\Aurora.exe with checksum chm1c7
08/05/2021 16:15:46 - AuroraPatch - Info: Loading Aurora C:\Users\PC\Downloads\Aurora\Aurora.exe with checksum chm1c7
08/05/2021 16:15:46 - AuroraPatch - Info: Running Load
08/05/2021 16:15:46 - AuroraPatch - Info: Running Load
08/05/2021 16:15:46 - AuroraPatch - Info: Done running Load
08/05/2021 16:15:46 - AuroraPatch - Info: Done running Load
08/05/2021 16:15:46 - AuroraPatch - Info: Running PreStart
08/05/2021 16:15:46 - AuroraPatch - Info: Running PreStart
08/05/2021 16:15:46 - AuroraPatch - Info: Done running PreStart
08/05/2021 16:15:46 - AuroraPatch - Info: Done running PreStart
08/05/2021 16:15:46 - AuroraPatch - Info: Starting Aurora
08/05/2021 16:15:46 - AuroraPatch - Info: Starting Aurora
08/05/2021 16:15:46 - AuroraPatch - Info: TacticalMap found: jt
08/05/2021 16:15:46 - AuroraPatch - Info: TacticalMap found: jt
Native library pre-loader is trying to load native SQLite library "C:\Users\PC\Downloads\Aurora\x64\SQLite.Interop.dll"...
Native library pre-loader is trying to load native SQLite library "C:\Users\PC\Downloads\Aurora\x64\SQLite.Interop.dll"...
08/05/2021 16:15:51 - AuroraPatch - Info: Running PostStart
08/05/2021 16:15:51 - AuroraPatch - Info: Running PostStart
08/05/2021 16:15:51 - AuroraPatch - Info: Done running PostStart
08/05/2021 16:15:51 - AuroraPatch - Info: Done running PostStart

If my hunch is correct and the problem is the NET framework version somehow, what would I need to do in order to force the correct version for Aurora.exe and AuroraPatch.exe only, as I don't want to affect anything else on my computer.
« Last Edit: May 08, 2021, 09:20:21 AM by Droll »
 

Offline twice2double (OP)

  • Warrant Officer, Class 1
  • *****
  • t
  • Posts: 76
  • Thanked: 119 times
Ok so now I get this, what I don't understand is that it seems to be complaining about the NET framework version, but I can play aurora no problem so I should have that framework installed and working already.

OK, that makes sense. Windows won't load web-downloaded assemblies by default. Which explains why the devs never encountered this.
There's a few options but the simplest is to make the change in the code.

Try the new debug build attached. If it works I'll update the main release build attachment.

Edit: To clarify, this is a CAS policy issue, not really a .NET Framework issue. It just so happens that the .NET Framework version on your machine has that default policy in place to disallow foreign DLL loads (which I suspect is most people). The testing I did with a fresh VM was a VM oriented towards Microsoft developers (the only way I could get quick access to a VM image), so it probably had more open CAS policies in place.
« Last Edit: May 08, 2021, 09:36:04 AM by twice2double »
 
The following users thanked this post: Cobaia, Droll

Offline Droll

  • Vice Admiral
  • **********
  • D
  • Posts: 1721
  • Thanked: 608 times
Ok so now I get this, what I don't understand is that it seems to be complaining about the NET framework version, but I can play aurora no problem so I should have that framework installed and working already.

OK, that makes sense. Windows won't load web-downloaded assemblies by default. Which explains why the devs never encountered this.
There's a few options but the simplest is to make the change in the code.

Try the new debug build attached. If it works I'll update the main release build attachment.

Edit: To clarify, this is a CAS policy issue, not really a .NET Framework issue. It just so happens that the .NET Framework version on your machine has that default policy in place to disallow foreign DLL loads (which I suspect is most people). The testing I did with a fresh VM was a VM oriented towards Microsoft developers (the only way I could get quick access to a VM image), so it probably had more open CAS policies in place.

This fixed it for me. Thanks for taking the time.
 

Offline twice2double (OP)

  • Warrant Officer, Class 1
  • *****
  • t
  • Posts: 76
  • Thanked: 119 times
This fixed it for me. Thanks for taking the time.

Thanks for contributing!
 

Offline TMaekler

  • Vice Admiral
  • **********
  • Posts: 1113
  • Thanked: 300 times
So with AuroraPatch it is possible to create a mod for Aurora - which, if he likes it, Steve could very easily implement into his source code and make it part of the main game?!?
 

Offline twice2double (OP)

  • Warrant Officer, Class 1
  • *****
  • t
  • Posts: 76
  • Thanked: 119 times
So with AuroraPatch it is possible to create a mod for Aurora - which, if he likes it, Steve could very easily implement into his source code and make it part of the main game?!?

Maybe some things.
More likely than not it would be easier for Steve to implement a feature his own way without needing the Patch source code - patches are dealing with obfuscated code after all.