github Reloaded-Project/Reloaded-II 1.7.0
[Beta] I'm Glad That You're Evil Too | 1.7.0

latest releases: 1.27.5, 1.27.4, 1.27.3...
3 years ago

Note

This is a beta release; it may have issues.
Updating to this version is optional.

Don't accept this update if you are working with Persona 4 Golden; please use version 1.6.1 instead.
Some (but not all) people seem to be having an issue with P4G at the moment.

Summary

  • Epic Stuff
    • Built-in Dependency Checker
    • Single File Launcher & .NET 5 (Next Update)
    • Theme Support
    • Minor UI Overhaul
      • Alphabetical Sidebar Sorting
      • Configure Mods
      • Separate Add/Edit Application
      • Add Useful Links
      • Reduce Tooltip Delays
      • Application Sidebar Grouping
      • Create Mod Menu
      • Enable ClearType for Text
    • 32-bit Support for Launcher
    • Startup Time Improvements
    • Fix Window Corner Bug
  • Miscellaneous
    • Support for Multiple NuGet Sources
    • Standalone NuGet Build Tool
    • Ignore Mod Configurations in Unexpected Folders
    • Remove Ready2Run from Launcher
    • Generate Crashlog on Loader Failure
    • Ability to mark mods as Libraries
    • More Descriptive User Errors
    • Issue Templates
    • Improvements to Archive Extractor
    • Improvements in Dependency Resolution
    • Additional Translations
    • Asynchronous Logging
    • Multithreaded Compilation Flag
  • Bug Fixes
    • Workaround for Missing WMI (Wine & Custom OS)
    • Workaround for Corrupted Loader Config
    • Fix Crash on Rapidly Clicking Application
    • Fix Broken Download Mods Menu Functionality on Exiting and Re-Entering Menu
    • Miscellaneous Fixes and Changes

This is the biggest update that Reloaded has ever had since it released over a year ago.

Epic Stuff

Built-in Dependency Checker

People are bad at reading. For a while now, this has been Reloaded's #1 end user issue. Users every other day would ask for help running Reloaded because they did not install the requirements listed. This issue alone generally amounts to what feels like 75-80% of all questions asked.

This would happen in many places. Github issues, GameBanana comments, game specific Discord groups and even on guides with images that direct users how to install step by step.

In the past, the required dependencies were at the top of readme. This did not work very well on Github, as the user required to scroll the page to see the dependencies; so it was changed in favour of a more optimised system. However, surprisingly, a lot of GameBanana users had a tendency of missing the prerequisites too, which was an annoyance.

I then figured that placing the dependencies beside the download buttons so that the users literally can't miss them would be better. This worked out pretty well at the time, however as more and more users started to use Reloaded, the issue would once again become an annoyance.

Well, things are better now. I had to write a .NET Core Install Checking Library from scratch while taking into account various ways .NET Core can "Roll Forward" to use a newer version if available (e.g. run 3.0 application on 3.1) as well as resolve dependencies (e.g. Desktop Runtime / Microsoft.WindowsDesktop.App requires Runtime (Microsoft.NETCore.App)).

It was non-trivial work but not difficult for someone like me. Hopefully this should help prevent any further issues.

Note:

Before seeing the dependency checker above; first time users might experience a dialog that looks like this:

This will take them to the following download page (large screenshot) where they'll need to hit Download x64 or Download x86 depending on their choice of 32 or 64-bit launcher.

For this reason it's not ideal, but it's better than no visible message or text for a casual end user. There is also a basic help file in the launcher folder Help.html in case things don't go smoothly.

Single File Launcher & .NET 5 (Next Update)

Last Minute Note: Due to a last minute bug introduced by Microsoft in .NET 5 Release Candidate, this feature is postponed until next update.

The launcher has been upgraded to now run on .NET 5. It is a bit smaller now and it is single file.

Before, I wasn't able to do this for various technical reasons, including:

  • Longer load times.
  • Actual application path not matching EXE path (Deal breaker: Launcher needs to find the loader!)
  • Inability to edit launcher files (default theme etc.) for end users.

.NET 5 greatly improves on how single file applications are packaged; providing real single file applications which load libraries from memory and without needing to extract to a temporary directory. All is good, load times are faster too.

Before (Note the Scrollbar):

After:

Theme Support

Based off of some users' preferences to change minor UI elements (e.g. rounded window corners), update 1.7 features experimental theming support for the launcher.

This should allow you to customize just about every aspect of the Reloaded's default theme including but not limited to:

  • Images
  • Colours
  • Animations
  • Button/Control Styles

A template theme for custom themes named Halogen can be found in Theme/Halogen.xaml.

Meanwhile NoCorners.xaml provides an example of how individual small elements of the default theme may be edited without creating a fully blown theme.

Please note that this functionality is experimental; expect the possibility of minor bugs and/or issues.

Minor UI Overhaul

Alphabetical Sidebar Sorting

There used to be no strict order to how the individual applications are displayed, as it is only expected to have users add 3-4 at most. However, Reloaded has been getting traction and for the real power users out there, sooner or later this number may expand.

Before, individual applications were displayed used to be alphabetically by AppId (normally EXE name) because that is how the list of configs is returned from filesystem. But this is no good as the AppId doesn't always match what the user might expect.

This update sorts the games on the sidebar by alphabetical order.

Configure Mods

As Reloaded went more widescreen this update to allow for better localization support and a cleaner UI; there was plenty more of horizontal space to now be leveraged by the various menus.

Therefore Author Name and Mod Version have now been inlined directly into the mod list.

In addition, the Mod Id has been removed from this menu as it is only useful to developers, not end users. This is a-ok as most mods use a folder name matching the ID anyway.

Before:

After:

The great benefit of this is that mods are now able to have longer descriptions without shrinking the mod list and stretching the image. Pretty cool.

Separate Add/Edit Application

Looking good?

It turns out that in practice, most Reloaded users do not need changing any of the application details after adding an application. There were also concerns that people might not know that the same menu which adds an application can also be used to edit it.

As a result; adding and editing application details have been split into separate functions. Adding an application will automatically take you to the default menu: Configure Mods; while the old menu is now available under the Edit Application button.

PS. Will have to figure something out about long game names.

Add Useful Links

A variety of useful links have been added to the main startup screen of Reloaded. Looks nice, and may potentially be very useful.

Reduce Tooltip Delays

Some more minor features and pieces of potentially useful to know information (e.g. mod order) do not not yet have their own explicit buttons.

Many of these misc. features have now had their tooltip delayed to 0, such that they should be better discoverable.

Application Sidebar Grouping

From time to time, new features are introduced onto the sidebar as Reloaded's capabilities expand.

To make it easier for the end user to navigate the UI, all actions are now grouped into categories.

Before and After

Create Mod Menu

When you are creating a new mod from inside the launcher, you can now search dependencies you might want to add by name.

This is useful for people creating basic file redirection based mods.

Enable ClearType for Text

It has never occurred to me before that text in WPF does not use ClearType for font smoothing; but instead does a much more primitive version of anti aliasing. Well, that is changed now.

32-bit Support for Launcher


R-II on a clean Windows 7 Virtual Machine

While Reloaded supports both 32-bit and 64-bit applications; the launcher has been 64-bit only for a while.

The original Reloaded did support 32-bit operating systems (the launcher was built with "Any CPU"), however that was dropped in update 1.4.0. This is because a little known new .NET feature called ReadyToRun was added to the launcher; in hopes for allowing for faster startup times.

While 64-bit processors and operating systems have been a standard since 2009; there are still people out there using older machines. This includes people who are not wealthy, people in 3rd world countries and people who are trying to run new stuff on old machines simply for the sake of science.

With that in mind; 32-bit support has been restored by building the launcher twice; once for 64-bit and once for 32-bit. The only thing of note is that users will need to run Reloaded-II32.exe instead of Reloaded-II.exe. I hope that should be fairly obvious.

Startup Time Improvements

As a direct result of optimizations performed on the underlying library used to load plugins (mods) and the introduction of some of the below features (e.g. Asynchronous Console Logging); startup time of the Mod Loader has been greatly improved.

Before:

After:

Fix Window Corner Bug

Before and After:

I wouldn't make a super huge deal out of this but this has been Reloaded's longest standing bug. It has been around since day 0; when the launcher was still a work in progress and before Reloaded could even load mods. It even had side effects on the other corner windows where the window contents wouldn't fully cover the background.

It has always been an enigma, it would trigger on loading a new page at startup or opening a new window with no clear indication as to why.

The way window rounding worked in older Reloaded was to use an invisible border. Then this border was used as a opacity mask; i.e. everything within this border is visible and everything outside is invisible. This border had the same dimensions as the border which glows the window, so in theory everything should have worked out ok.

Welp, it never did for some reason. The glow border worked but the opacity mask did not, even though they should have been the same in theory. It was replaced by instead adding a clipping border (instead of opacity mask); which is programatically generated in code using data binding and a value converter that passes width, height and corner radius.

Well, with a change of how the window is rounded at a fundamental level; this issue has now been fixed.

Miscellaneous

Support for Multiple NuGet Sources

Reloaded can now fetch packages and updates from multiple NuGet sources as opposed to a single source. Packages can be sourced from both official and 3rd party unofficial services.

To access this feature, go to the Download Mods Menu and press the Configure Sources button.
This menu replaces the old option to visit the website for the default/official NuGet package source.

Standalone NuGet Build Tool

When you downloaded Reloaded for the first time and tried installing some mods; you probably were met with a small prompt like this one; probably prompting you to download the file redirector.

Well, these mods have to magically be found somewhere.
Reloaded has its own small little public server based off of BaGet which hosts Reloaded mods as NuGet packages. As things stand right now; this server is singlehandedly used for resolving all of the missing dependencies.

While NuGet was originally born with the sole purpose of distributing .NET libraries; the NuGet package format was not too wildly different from Reloaded in terms of how it handles dependencies. Thus it logically made sense to use existing technology with tried and tested servers and APIs.

While the launcher has had the feature to convert a mod into a NuGet package for a while; it was a bit annoying to use for a number of reasons, the main one being that I had to remove user configs before converting.

To handle this issue I built a standalone tool:

Sewer56@NotALinuxMachine: $./NuGetConverter.exe

Reloaded-II NuGet Package Converter
Converts mod folders or archives into NuGet packages
Usage: NuGetConverter.exe <Mod Folder or Archive Path> <Output Path>
Example: NuGetConverter.exe Mod.zip .
Example: NuGetConverter.exe reloaded.test.mod .
Example: NuGetConverter.exe reloaded.text.mod ./packages/

This should allow developers to set up "Continuous Integration/Continuous Deployment", where in theory you could fully automate building and uploading of mod updates to end users.

PS. Help Wanted! If you are familiar with ASP.NET; please consider stopping by issue #44. Reloaded is in need of various NuGet related improvements such as a backup server and misc. moderation tools. I'm not sure if I have the time to learn multiple new technologies at the current time.

Ignore Mod Configurations in Unexpected Folders

One of the rare, albeit still valid source of user errors has been users placing mod configurations in unexpected places.

For example, users of the File Redirector mod, which is used by other mods to replace application/game files sometimes mistakenly create a folder named Redirector inside the File Redirector instead of their own mod.

While some of these cases can be resolved by being more clear in documentation (since end users are not experienced in mods providing "services" to other mods), this can be partially avoided by the launcher itself.

The previous versions of Reloaded supported placing mods anywhere, as long as they were inside the Mods folder; but to avoid confusion, I have decided to remove this rarely used functionality.

In addition; it is no longer possible to place mod contents directly into the Mods folder without a subfolder. Why you might ask? Well, aside it being a silly thing to do, removing that mod from inside the launcher would nuke the whole Mods folder.

It took a year for someone to do that but it happened, big oof.

Remove Ready2Run from Launcher

An optimization originally added to the launcher and loader in update 1.4.0 was adding a very little known called ReadyToRun.

  • ReadyToRun is a new .NET Core assembly (DLL) format that combines precompiled native code with existing IL code to bring the best of both managed and unmanaged worlds.
  • It is known for improving startup times at the expense of slightly inflating the size of the applications/mods (and needing separate x86/x64 versions).
  • R2R has originally been implemented at both, Launcher/Loader level and mod level.

In practice however, while it turns out that while the uplift is significant the first time the user runs the application; on subsequent runs the impact wasn't quite as noticeable.

Given that the launcher already starts up pretty fast and that most of the startup bottleneck has actually been from I/O (reading libraries), ReadyToRun was removed from the launcher (loader still has it).

This change ties in nicely with two other changes; 32-bit support and upgrade to .NET 5. Improved single file loading in .NET 5 resolves the IO bottleneck while the 32-bit binary is mostly identical to the 64-bit one. The combination of these mean that loader downloads can now be smaller again when using a solid compression format such as .7z with LZMA.

For comparison:

1.6.2 (zip): 13,855,196 bytes
1.6.2 (7z): 9,028,579 bytes
1.7.0 (7z): 5,845,034 byte

Also consider that 1.7.0 is much more fully featured including a secondary theme, a higher quality banner and even a 32-bit version.

Generate Crashlog on Loader Failure

Instead of only showing the dialog, the mod loader now also exports a crash log of the last 1000 logged items to a text file. This is intended to help both loader development, fixing end users' issues and reporting loader or mod related bugs.

This dialog should function for both internal loader errors as well as errors thrown by other mods that would otherwise terminate the application.

Ability to mark mods as Libraries

Some mods out there don't perform any actions on their own. Instead, they exist to provide services to other mods such as:

  • Redirecting original game files to custom ones.
  • Allow other mods to tamper with controller/keyboard inputs.
  • Inject arbitrary data/code to allow other mods to perform various actions without custom code (e.g. Stage Injector for Sonic Heroes).

As Reloaded automatically enables mods that are marked as dependencies of another mod; it is of no use to the end user to enable these mods explicitly. Some users think they should for understandable reasons as mod descriptions list them as a requirement, however this is not necessary.

There is now a new switch you can add to ModConfig.json for mods. Setting "IsLibrary": true in the mod configuration will prevent the user from being able to enable the mod in the launcher; instead showing a read only shaded box. This should improve startup times by making these mods only enabled when required by another mod.

Applicable mods will soon be updated to make use of this feature.

More Descriptive User Errors

Some errors related to common user errors and rare obscure bugs have now got human readable error messages.
Examples:

Examples

Issue Templates

Some basic issue templates were added to the repository to make reporting bugs, requests and issues easier than ever for end users.

Examples

Improvements to Archive Extractor

Aside some minor internal code cleanup, the archive extractor for downloaded mods now more accurately reports progress by counting the amount of uncompressed data against the total as opposed to compressed data.

This helps archives with Solid Compression such as .7z.

Improvements in Dependency Resolution

The algorithm used for finding dependencies for a given mod (i.e. all other mods a single mod requires to run) has been optimised and should run considerably faster. Not a noticeable difference for the end user but it was done as part of writing the algorithm for finding .NET Core dependencies in the new Dependency Checker.

Additional Translations

  • es-ES (Spanish) by Shadow Side
  • ru-RU (Russian) by Roker2

Asynchronous Logging

Not everyone knows but logging to the console actually carries a performance overhead.
Writing to the console is actually a "blocking" operation which means that your code actually waits for the output to be written before proceeding with the execution of your program.

While this blocking is very short, it is possible for it to have a noticeable performance impact if you are spamming heaps of log messages at full force.

To address this, mods can now asynchronously log individual items to the console to prevent stalling execution using the standard ILogger interface available in the mod template:

/// <summary>
/// Writes a new line to the console output
/// </summary>
/// <param name="message">The message to print.</param>
/// <param name="color">The color to print the message in.</param>
void WriteLineAsync(string message, Color color);

/// <summary>
/// Writes a new line to the console output
/// </summary>
/// <param name="message">The message to print.</param>
void WriteLineAsync(string message);

/// <summary>
/// Writes additional text to the console output without proceeding to the next line.
/// </summary>
/// <param name="message">The message to print.</param>
/// <param name="color">The color to print the message in.</param>
void WriteAsync(string message, Color color);

/// <summary>
/// Writes additional text to the console output without proceeding to the next line.
/// </summary>
/// <param name="message">The message to print.</param>
void WriteAsync(string message);

By using the newly introduced async overloads mods can now log without stalling program execution. Messages will be printed on a separate thread.

In order to get this feature, simply update the NuGet package Reloaded.Mod.Interfaces that comes standard in every Reloaded mod.

PS. Looking at you, Persona 4 Golden's Video Decoder.

Multithreaded Compilation Flag

The C++ bootstrapper DLL which loads the .NET Core runtime and the mod loader itself has had the multithreaded compilation flag enabled for faster build times.

Bug Fixes

Workaround for Missing WMI (Wine & Custom OS)

Bringing up a random topic; you would think that something as simple as getting a list of all processes on Windows would be cheap... well, it's actually very expensive! But features like Auto Inject require relatively fast launch detection.

Therefore, when Reloaded is ran as Administrator, it uses an interface known as Windows Management Instrumentation (WMI) to receive events of when new applications are launched. All is good, overhead is small and latency is small... except...

Any program launched under Wine assumes that it's running as Administrator. While Wine technically supports WMI, stock installs seem to be having issues; so a simple fallback was implemented to default to the non-Administrator implementation if anything goes wrong.

(image taken by ĐeäTh)

Note: Reloaded is not actively tested on Wine or Proton. I'm just one person and I lack resources, sorry!

Workaround for Corrupted Loader Config

Bug Report

This bug is an enigma; it has only been seen by me 3 times since Reloaded has released over a year ago. It is unknown what might cause this issue to occur.

If the config is corrupted; Reloaded will now at least generate a new one; although you'll lose your user settings (Theme, Language, Custom Mod Directories etc.).

I know it's not an ideal fix but for now it should at least ensure that users still can use the launcher after encountering this rare bug.

Fix Crash on Rapidly Clicking Application

See this bug report for more details

Fix Broken Download Mods Menu Functionality on Exiting and Re-Entering Menu

Caused by a minor bug where things that shouldn't be were being cleaned up.

Specifically:

  • Search was partially broken.
  • Download button would not update regardless of whether mod was available or not.

Miscellaneous Fixes and Changes

  • Fixed: Reloaded does not work when games/programs are loaded from a NAS/Network Drive.
  • [WIP] Publish script can now build for either .NET 5 or Core 3
  • Minor Code Cleanups

Don't miss a new Reloaded-II release

NewReleases is sending notifications on new releases.