Setting up development enviroment - Woospringbreak1/Luamod_Docs GitHub Wiki

Setting up development environment

Unity

The Lua Modding Framework is designed to be used within an installation of the Extended SDK.

Follow these instructions to install the SDK https://github.com/notnotnotswipez/Marrow-ExtendedSDK-MAINTAINED

Download the source .zip from the repo

Inside the ZIP file, copy the contents of the "Unity Project" folder into your Unity project Assets folder.

This will create two new folders:

  • Assets/LuaMod/ (this contains the C# script files)
  • Assets/LuaMod test content/ (this contains examples)
  • Assets/LuaScripts/ (directory for embedded .lua.txt script TextAssets)

These examples have been stripped of SLZ assets, so expect missing sounds and textures.

LUA IDE

All Lua development was done using Visual Studio Code - a free editor from Microsoft, making use of the Lua Language Server extension developed by Sumneko

https://code.visualstudio.com/

https://luals.github.io/

  • Install Visual Studio code, and open it
  • Install the Lua Language Server
  • File->Open Folder-> Navigate to [Bonelab Install Folder]/Mods/LuaMod/LuaScripts/

Visual Studio

To modify the framework its self, install Visual Studio 2022.

The project will require modification to compile:

  • References to Bonelib and FieldInjector will need to be corrected to your [Bonelab Install Folder]/Mods folder
  • References to the following C# scripts will need to be corrected to your Unity project folder, or manually added to the VS project:

ISciptedObject.cs

LuaBehaviour.cs

LuaGun.cs

LuaResources.cs

These scripts are kept in the unity project to ensure compatibility between Unity and the code mod.