Aurora 4x

C# Aurora => C# Approved Mods => Topic started by: twice2double on May 07, 2021, 02:08:52 PM

Title: BlueBeGone - Mod that swaps all Aurora blue colors to black (DEPRECATED)
Post by: twice2double on May 07, 2021, 02:08:52 PM
DEPRECATED - please use T2DTheme instead: http://aurora2.pentarch.org/index.php?topic=12556

DISCLAIMER - this is a very simple proof-of-concept patch for 01010100's AuroraPatch open source project: https://github.com/Aurora-Modders/AuroraPatch (https://github.com/Aurora-Modders/AuroraPatch)

AuroraPatch is very much in it's infancy and this is the first attempt at a working patch which should (in theory) work for any future versions of Aurora.

This patch is very simple and will most likely be superseded by proper theme patches in the coming weeks (contributions welcome).

Installation

This patch requires the AuroraPatch runtime and the UIControls helper patch (both included).

Extract/copy all the files from the attached zip into your Aurora folder.

Running

Run AuroraPatch.exe from inside the Aurora directory.

What's Next

As stated above, this is a proof-of-concept patch (pretty much the simplest you could create as it's a single line of non-boilerplate C# code)
Feel free to check it out in the AuroraPatch repo: https://github.com/Aurora-Modders/AuroraPatch/blob/b914c06ed9f9c4bf18f0dafa5a39300955c861f2/BlueBeGone/BlueBeGone.cs (https://github.com/Aurora-Modders/AuroraPatch/blob/b914c06ed9f9c4bf18f0dafa5a39300955c861f2/BlueBeGone/BlueBeGone.cs)

I think AuroraPatch is a superior modding implementation than AuroraMod and I will be working towards AuroraMod feature parity moving forward (with some of your help).

Note that some AVs will flag AuroraPatch (as they should) due to how it hooks into a running process.
Since you probably shouldn't trust files downloaded on the internet from strangers, I recommend you fetch the code and build it yourself, otherwise the attachment and MediaFire link are below.

MediaFire Mirror: https://www.mediafire.com/file/jd0yory7tfndvyv/AuroraPatch+and+BlueBeGone.zip/file
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: nuclearslurpee on May 07, 2021, 02:21:40 PM
 :o

I'm very surprised to see that Steve has approved an open-source modding project. My recollection from the author of AuroraMod was that Steve did not approve of open source mods and when the author retired the mod it would be up to Steve to allow someone else to take over the mod and have access to its source code.

Don't get me wrong, I'm interested to see where this goes, but it does surprise me.
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: Droll on May 07, 2021, 02:27:21 PM
:o

I'm very surprised to see that Steve has approved an open-source modding project. My recollection from the author of AuroraMod was that Steve did not approve of open source mods and when the author retired the mod it would be up to Steve to allow someone else to take over the mod and have access to its source code.

Don't get me wrong, I'm interested to see where this goes, but it does surprise me.

Btw the author you are referring to is actually OP  ;D
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: twice2double on May 07, 2021, 02:45:11 PM
I'm very surprised to see that Steve has approved an open-source modding project. My recollection from the author of AuroraMod was that Steve did not approve of open source mods and when the author retired the mod it would be up to Steve to allow someone else to take over the mod and have access to its source code.

I can't speak for Steve (and I welcome his input here), but based on our discussions, this is why I think he's OK with people using the open source AuroraPatch versus allowing people to work with AuroraMod:

AuroraMod consisted of a deobfuscated and decompiled version of Aurora. It was essentially a messy and convoluted version of the Aurora source code, modified, then recompiled into an executable.
Someone contributing to AuroraMod would effectively have access to the entire code base (albeit not pleasant to work with).
I can see why this is scary from the point of view of Steve as it increases the chance of someone stealing the code and working on their own fork (granted that would be a lot of man-hours and be very bug-prone).

AuroraPatch on the other hand doesn't exist or make any sense without Aurora. It doesn't expose any of the source code of Aurora itself.
Instead of having an overview of the entire code base (like AuroraMod), it's like having a magnifying glass that allows you to look at the execution state of the application at certain points in time.
No deobfuscation or explicit decompilation is done.

That's my take on it anyways.
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: Droll on May 07, 2021, 02:46:57 PM
Installation

This patch requires the AuroraPatch runtime and the UIControls helper patch (both included).

Extract/copy all the files from the attached zip into your Aurora folder.

Running

Run AuroraPatch.exe from inside the Aurora directory.


I followed these instructions and extracted all the files to the Aurora directory but it seems that the BlueBeGone patch is not being recognized by the executable. Otherwise it works perfectly and launches aurora correctly.
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: twice2double on May 07, 2021, 02:53:50 PM
Quote
I followed these instructions and extracted all the files to the Aurora directory but it seems that the BlueBeGone patch is not being recognized by the executable. Otherwise it works perfectly and launches aurora correctly.

Did it appear in the list of patches in the AuroraPatch window?
Does your AV have a history of having blocked anything?

For me it takes maybe 5s for the theme to kick in after starting Aurora.
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: Droll on May 07, 2021, 02:54:34 PM
Did it appear in the list of patches in the AuroraPatch window?
Does your AV have a history of having blocked anything?

No and No
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: twice2double on May 07, 2021, 02:57:38 PM
Quote
No and No

Hmm. I'm confused by that.
And the Aurora/Patches/BlueBeGone/BlueBeGone.dll file is still sitting there?
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: nuclearslurpee on May 07, 2021, 02:59:29 PM
Awesome! Thanks for the answers, really excited to see this come together!
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: Droll on May 07, 2021, 02:59:34 PM
Quote
No and No

Hmm. I'm confused by that.
And the Aurora/Patches/BlueBeGone/BlueBeGone.dll file is still sitting there?

Yes, same for the UIControls thing. They are both in their own subdirectories in the Patches directory.

Edit: Is it supposed to be 0Harmony.dll? Or is the 0 a typo?
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: twice2double on May 07, 2021, 03:08:35 PM
Quote
Edit: Is it supposed to be 0Harmony.dll? Or is the 0 a typo?

Yeah that should be good.
This is a bit of a long-shot, but can you try adding the following two xml files in your Aurora directory as well?
https://www.mediafire.com/file/zloa7ciry6caj7k/0Harmony.xml/file (https://www.mediafire.com/file/zloa7ciry6caj7k/0Harmony.xml/file)
https://www.mediafire.com/file/talaypjgqfmvhlk/Newtonsoft.Json.xml/file (https://www.mediafire.com/file/talaypjgqfmvhlk/Newtonsoft.Json.xml/file)
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: Droll on May 07, 2021, 03:11:24 PM
Quote
Edit: Is it supposed to be 0Harmony.dll? Or is the 0 a typo?

Yeah that should be good.
This is a bit of a long-shot, but can you try adding the following two xml files in your Aurora directory as well?
https://www.mediafire.com/file/zloa7ciry6caj7k/0Harmony.xml/file (https://www.mediafire.com/file/zloa7ciry6caj7k/0Harmony.xml/file)
https://www.mediafire.com/file/talaypjgqfmvhlk/Newtonsoft.Json.xml/file (https://www.mediafire.com/file/talaypjgqfmvhlk/Newtonsoft.Json.xml/file)

No effect, its the same problem. The patchlist is empty. As I said I pretty much followed the instructions and just plopped everything into the aurora directory.

Edit: I'd like to say that I've also looked at the AV and nothing is currently being blocked. The only AV activity was when I first tried to launch the .exe, it warned me and I told it to run anyways.
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: twice2double on May 07, 2021, 03:13:42 PM
Quote
No effect, its the same problem. The patchlist is empty. As I said I pretty much followed the instructions and just plopped everything into the aurora directory.

OK, thanks for taking the time to troubleshoot with me.
I'll mark the patch as broken for now and debug it tonight (I'll try to reproduce on a fresh windows install).

If anyone else has a similar experience (or if they get it working), please post here as well.
Title: Re: BlueBeGone - a mod that swaps all Aurora blue colors to black
Post by: Steve Walmsley on May 07, 2021, 05:38:03 PM
:o

I'm very surprised to see that Steve has approved an open-source modding project. My recollection from the author of AuroraMod was that Steve did not approve of open source mods and when the author retired the mod it would be up to Steve to allow someone else to take over the mod and have access to its source code.

Don't get me wrong, I'm interested to see where this goes, but it does surprise me.

He spoke to me first :)

The AuroraPatch mod itself is open source, but it uses reflection and doesn't open up any Aurora code so it is a different situation to AuroraMod. It's also a very different situation now to the original debate on modding following the initial C# release. I was very concerned at the time that I would waste a lot of time chasing mod-related bugs. However, the code is far more stable now so any mod-related bugs should be more obvious. I am also conscious that people want the options around colours, etc. and this means I don't have to address it.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: twice2double on May 07, 2021, 07:29:41 PM
OK I think we should be good now. 01010100 identified and fixed an issue with patch dependency loading.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: Droll on May 07, 2021, 07:40:12 PM
OK I think we should be good now. 01010100 identified and fixed an issue with patch dependency loading.

Are we supposed to download the github repo and create a build from there or are we supposed to just download the attached zip.

In the case of the latter I have the same issue and it has not been resolved. Like last time I just put everything in the aurora directory and the dlls for BlueBeGone and UIControls are in their respective subdirectories, the list of patches still shows up as empty.

Edit when I launch aurora through the AuroraPatch.exe and close aurora Aurorapatch.log has this to say and nothing else:
Code: [Select]
Native library pre-loader is trying to load native SQLite library "C:\Program Files (x86)\Video Games\Aurora\x64\SQLite.Interop.dll"...
It would be nice if someone else could also see if they're having the same problem as me just so we know its not on my end.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: 01010100 on May 07, 2021, 08:04:41 PM
Edit when I launch aurora through the AuroraPatch.exe and close aurora Aurorapatch.log has this to say and nothing else:
Code: [Select]
Native library pre-loader is trying to load native SQLite library "C:\Program Files (x86)\Video Games\Aurora\x64\SQLite.Interop.dll"...

That's all, there is literally nothing else in the log? You could also try installing somewhere other than under the "Program Files" folder.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: twice2double on May 07, 2021, 08:44:58 PM
Quote
Are we supposed to download the github repo and create a build from there or are we supposed to just download the attached zip.

Either *should* work. Are you running Windows 10?
I think moving it to another folder as mentioned above could be worth trying.

I'm not sure what the issue would be - I just tried the following and it worked for me:
1) Fresh Windows 10 install
2) Download Aurora and dump all files directly in Downloads folder
3) Download BlueBeGone and dump all files directly in Downloads folder
4) Run Downloads/AuroraPatch.exe
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: Droll on May 07, 2021, 08:54:16 PM
Edit when I launch aurora through the AuroraPatch.exe and close aurora Aurorapatch.log has this to say and nothing else:
Code: [Select]
Native library pre-loader is trying to load native SQLite library "C:\Program Files (x86)\Video Games\Aurora\x64\SQLite.Interop.dll"...

That's all, there is literally nothing else in the log? You could also try installing somewhere other than under the "Program Files" folder.

Well I reinstalled on my desktop and same problem, I got this instead:
Code: [Select]
Native library pre-loader is trying to load native SQLite library "C:\Users\PC\Desktop\Aurora\x64\SQLite.Interop.dll"...
And nothing else, this is when I launch aurora and close it.

Also I am using windows 10. I should also mentioned that I tried running with admin privileges for the same result.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: Droll on May 07, 2021, 09:03:41 PM
Quote
Are we supposed to download the github repo and create a build from there or are we supposed to just download the attached zip.

Either *should* work. Are you running Windows 10?
I think moving it to another folder as mentioned above could be worth trying.

I'm not sure what the issue would be - I just tried the following and it worked for me:
1) Fresh Windows 10 install
2) Download Aurora and dump all files directly in Downloads folder
3) Download BlueBeGone and dump all files directly in Downloads folder
4) Run Downloads/AuroraPatch.exe

I followed these instructions with a fresh 1.13 install of aurora and have the exact same problem.

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?

Furthermore, reputation based protection is off on my windows 10, which is why I can run aurora from program files in the first place.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: simast on May 08, 2021, 02:50:04 AM
If I understood this correctly this mod will be basically what DFHack is for Dwarf Fortress :) e.g. you can build other mods on top of this and only AuroraPatch will need to be updated for new Aurora versions (and all mods should be compatible afterwards). Awesome work!
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: 01010100 on May 08, 2021, 04:40:30 AM
Well I reinstalled on my desktop and same problem, I got this instead:
Code: [Select]
Native library pre-loader is trying to load native SQLite library "C:\Users\PC\Desktop\Aurora\x64\SQLite.Interop.dll"...
And nothing else, this is when I launch aurora and close it.

That log message is normal, it's just Aurora loading in one of its native dependencies. What is strange is that you get no other log messages, at the very least there should be a "AuroraPatch logger initialized" message. Either you should get no log at all, or you should get a log with at least that "initialized" message in it. Getting a log but without that message is just strange, I have no idea how that's even possible.

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?

Yes this is correct.

Quote
Furthermore, reputation based protection is off on my windows 10, which is why I can run aurora from program files in the first place.

I'd still keep it somewhere else for now, the special program files rules might also interfere with AuroraPatch's patch loading process. If you keep your installation somewhere else for the time being we can exclude it as a factor in the issues you are having.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: 01010100 on May 08, 2021, 04:51:01 AM
If I understood this correctly this mod will be basically what DFHack is for Dwarf Fortress :) e.g. you can build other mods on top of this and only AuroraPatch will need to be updated for new Aurora versions (and all mods should be compatible afterwards). Awesome work!

It's more akin to RimWorld modding. AuroraPatch doesn't need updating for new Aurora versions, all it does is provide services to patch creators, in particular providing Harmony support. Individual patches may require updating for new Aurora versions depending on what the patch is doing exactly, although there is work on a Lib patch to try to minimize this.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: Cobaia on May 08, 2021, 06:47:07 AM
I'm having the same behavior, AuroraPatch doesn't show the patches, doesn't write in the log file.

I'm trying a fresh machine install.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: 01010100 on May 08, 2021, 07:16:09 AM
In first instance it's a logger problem then. I have no idea how this is even possible, these are 3 lines of code in the logger's constructor:
Code: [Select]
Debug.Listeners.Add(traceListener);
Debug.AutoFlush = true;
LogInfo("AuroraPatch logger initialized");

The first line is what allows the message from the native library loader to show up in the log, so we know that is being called, the third line logs the "initialization" message through the exact same mechanism, and somehow that's not showing up.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: skoormit on May 08, 2021, 07:38:30 AM
In first instance it's a logger problem then. I have no idea how this is even possible, these are 3 lines of code in the logger's constructor:
Code: [Select]
Debug.Listeners.Add(traceListener);
Debug.AutoFlush = true;
LogInfo("AuroraPatch logger initialized");

The first line is what allows the message from the native library loader to show up in the log, so we know that is being called, the third line logs the "initialization" message through the exact same mechanism, and somehow that's not showing up.

Just throwing a dart at the board: could it be a difference in .Net Framework version?
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: Zincat on May 08, 2021, 07:53:20 AM
I'm following this with great interest. The blue color background hurts my eyes a LOT, so I'm a big fan.

I wanted to ask, could it be possible eventually to have a light theme too? Light backgrounds, black text.
Unfortunately my eyes have problems with contrast more than with luminosity, and dark backgrounds with white text is still hard on them. It's still much better than blue though....
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: twice2double on May 08, 2021, 08:32:17 AM
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 :)
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: twice2double on May 08, 2021, 08:37:07 AM
I wanted to ask, could it be possible eventually to have a light theme too? Light backgrounds, black text.

Yes. That's going to be especially easy to do once a proper theme patch comes out.
Just a matter of someone forking the code, changing some RBG values, and sharing the new patch.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: twice2double on May 08, 2021, 08:39:02 AM
Quote
Just throwing a dart at the board: could it be a difference in .Net Framework version?

That could be a legit reason for it to break, but in this case everything is .NET 4.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: Droll on May 08, 2021, 08:47:19 AM
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
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: twice2double on May 08, 2021, 09:04:30 AM
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.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: Droll on May 08, 2021, 09:17:39 AM
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.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: twice2double on May 08, 2021, 09:26:20 AM
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.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: Droll on May 08, 2021, 09:49:18 AM
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.
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (FIXED)
Post by: twice2double on May 08, 2021, 09:54:00 AM
This fixed it for me. Thanks for taking the time.

Thanks for contributing!
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (DEPRECATED)
Post by: TMaekler on June 02, 2021, 03:00:35 AM
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?!?
Title: Re: BlueBeGone - Mod that swaps all Aurora blue colors to black (DEPRECATED)
Post by: twice2double on June 06, 2021, 09:43:37 PM
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.