Giter VIP home page Giter VIP logo

autoload's Introduction

Autoload: automatically hot-reload paks on change

Warning: This is alpha quality software. Filesystem corruption is possible, so back up your files. Use at your own risk. Only tested with UE 5.1.

Autoload is a C++ plugin for UE4SS. It works by watching for changes to a folder of paks and hot-reloading pak files that have changed.

The selling point of this plugin is that you don't have to restart the game to update assets.

Hot-reloading paks comes with some caveats. You should first understand how pak patching works in Unreal Engine. Hot-reloading paks adds a bit more nuance on top of that. For example, any existing instances of assets will not be updated automatically. You'd have to destroy and re-instantiate them to see the updated asset.

Installation

  1. Download the latest release from this repository. I can only guarantee the mod will work if you use my bundled build of UE4SS; the official releases don't support C++ mods out of the box yet, so you can't just drop the mod into your installation of UE4SS and expect it to work.
  2. If you have a pre-existing installation of UE4SS, back it up or remove it.
  3. Install the version of UE4SS you just downloaded (i.e. extract all of the files into <game>/Binaries/Win64)

Usage

  1. Start with some pak files in <game>\Content\Paks\Autoload
  2. When you want to update a pak file, create a new file in the directory with the same name but with '.staged' tacked on the end. At this point, Autoload should detect the new file and performs the following filesystem operations:
    1. Unmount the original pak
    2. Delete the original pak
    3. Rename the .staged pak to take its place
    4. Mount the new pak

Warning: Your success with this will vary. Sometimes it will get stuck and you just have to quit and try again. I'm working on making this more reliable.

Tips

  • Check the UE4SS logs to make sure Autoload is working properly.
  • Autoload requires that you create a folder at <game>\Content\Paks\Autoload. This isn't created automatically.
  • Make sure you don't have any other programs reading the paks in your game files, e.g. UModel.

Building

  1. git clone --recursive <this repo> or if already cloned without --recursive, cd in and do git submodule update --init --recursive
    1. If you get an error about RE-UE4SS/deps/first/Unreal failing to clone, you can fix this by joining the Epic Games organization on Github.
  2. cmake -S . -B Output
    1. This may fail with CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. and CMake Generate step failed. Build files cannot be regenerated correctly. This is probably okay and you can safely ignore it.
  3. Open Output/Autoload.sln in Visual Studio (tested with VS 2022)
  4. Build > Build Solution (or Ctrl+Shift+B)
  5. To deploy: Copy Output/AutoloadMod/<build-config>/AutoloadMod.dll to <game>/Binaries/Win64/Mods/AutoloadMod/dlls/main.dll

Source: https://github.com/UE4SS-RE/RE-UE4SS/blob/852c937ac6445f7e865f0438e05faf2ae76d8e7d/docs/guides/creating-a-c%2B%2B-mod.md#creating-a-c-mod

Credits

Thank you to @trumank for doing the initial reverse engineering of Unreal Engine and writing the code for resolving the pak mounting routines. This project would not be possible without their work.

autoload's People

Contributors

turncoda avatar

Stargazers

Nadz avatar Vanan A. avatar  avatar

Watchers

 avatar

autoload's Issues

Starting with a .pak and a .staged in Autoload results in surprising behavior

Observations:

  • The game automatically mounts the .pak file on startup (regardless of whether it has _p as the end of the file stem)
  • Autoload can't unmount the .pak file.
  • Autoload can delete the .pak file, if it waits long enough.

Expected behavior:

Unmount the .pak file if necessary, delete it, replace it with the .staged file, and mount that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.