Skip to content
praydog edited this page Dec 8, 2021 · 38 revisions

This is the REFramework wiki. It will mostly serve as documentation for the upcoming scripting system.

Mirrors can be found here: http://praydog.com/projects/

Lua Scripting

REFramework comes with a scripting system using Lua.

Leveraging the RE Engine's IL2CPP implementation, REFramework gives developers powerful control over the game engine.

Lua scripting can be found here now:

Binaries: https://ci.appveyor.com/project/praydog/reframework-dev/build/artifacts

Source code: https://github.com/praydog/REFramework/tree/sdk-improvements-re7-mhr

Loading a script

Manual Loading

Click on ScriptRunner from the main REFramework menu. From there, press Run Script and locate the corresponding *.lua file you wish to load.

Automatic Loading

Create an autorun folder in your game directory. REFramework will automatically load whatever *.lua scripts are in here during initialization.

Handling Lua errors

During script startup

When a Lua error occurs here, a MessageBox will pop up explaining what the error is.

During callback execution

When a Lua error occurs here, the reason will be written to a debug log. DebugView is required to view these.

We don't pop a MessageBox here so the user doesn't lock their game.

Side notes

Everything is subject to change and maybe refactored over time.

RE Engine's IL2CPP implementation is not the same as Unity's. While RE Engine and Unity have many similarities, they are not the same, and no existing tooling for Unity or IL2CPP will work on the RE Engine.

C# scripting maybe a possibility in the future for more natural interaction with the engine, but is not currently being looked at. REFramework is open source, so any developer wishing to do that can try.

Thanks

cursey for helping build the scripting system.

The Hitchhiker for testing/writing scripts/finding bugs/helpful suggestions.

alphaZomega for testing/writing scripts/finding bugs/helpful suggestions.

Clone this wiki locally