Releases: Torphedo/pd_loader_core
Better dependency loading
Bugfixes
Console Commands
- Added support for console commands
- Plugin developers can add console commands with the
command_registerfunction. Commands receive arguments the same way as a standalone C program, and some basic parsing functions are available. - The only builtin commands are
core!hello(a hello world), and!exit/!quit(which quits the command prompt, but leaves everything else running)
- Plugin developers can add console commands with the
On a more technical note, the initial injector pdpl.exe is now open-source, and much more reliable and simpler. There are also no more hooks trying to reset the version number.
Feature Complete
This release was built & tested in mid-to-late August, but I consider it feature-complete at this point.
Use pdpl.zip if you just need to install a plugin or load mods. Use plugin_dev.zip for build instructions, a copy of the single_skills example plugin source code, and other information about plugin creation.
- Plugins can now link against each other from their import tables, even if they're in separate
zip/7z/rararchives. - Console init and stdio redirection are now implemented in
pd_loader_core.dllinstead ofpdpl.exe(insrc/console.c) - File metadata in the example mod
bullet_hell.7zis fixed, so the mod will actually work out of the box - Fixed some seemingly random crashes on boot
- We now correctly use a mutex when locking/unlocking the game's filesystem on boot
- Messages from the
CreateFile2()are much shorter, and the requested access is shown by color coding:- Green -> Read-only
- Yellow -> Read/write
- Red -> Write-only
- Modded files can now be read from archives
Technical Notes
I wanted to pipe data from archive files in-memory with function hooks, but nothing I tried worked. In this implementation, I just copy files from the archive into a regular file (outside PhysicsFS' view), then redirect the game to open that copy. This requires extra space and is slower than a proper in-memory solution.
For plugin creators: you can now use exported functions from pd_loader_core.dll or other plugins without manually maintaining function pointers from the core loader's plugin_get_proc_address(). You'll need to use Visual Studio or switch to the MSVC toolchain in CLion, because it relies on MSVC-only #pragma features. This could probably also done with a linker script and zig cc or MinGW, but most people use MSVC so I went with that solution. It doesn't really matter, as long as your DLL imports the other DLL and function by name in its import table.
Initial Release
This is the first release on GitHub! Instructions for installation and mod development can be found in the readme in this repo and in the download below.