A server scripting API for Sub Rosa.
Find a file
2021-11-09 14:33:52 -08:00
.github Get submodules using actions/checkout 2021-11-09 13:46:04 -08:00
cpp-httplib@35ef1c7bae Update cpp-httplib 2021-10-08 23:21:31 -07:00
miniz@ca1a779ee1 Update miniz 2021-10-08 23:25:59 -07:00
moonjit@a2a39ea718 Switch from LuaJIT to moonjit 2020-11-17 12:08:19 -08:00
RosaServer Rename point to freeLook 2021-10-23 12:01:40 -07:00
RosaServerSatellite Add error wrapping to RosaServerSatellite 2021-10-01 16:35:05 +03:00
shared Reformat 2021-10-08 21:47:27 -07:00
sol2@d0eba0a754 Update sol2 2020-11-30 07:34:34 +00:00
stb@af1a5bc352 Update stb 2021-10-08 23:26:06 -07:00
subhook@284047b761 Move subhook to submodule 2021-05-29 14:01:25 -07:00
test Add argument to level intersections 2021-10-10 12:08:29 -07:00
.clang-format Reformat 2020-12-07 14:50:21 -08:00
.gitignore Delete build-debug 2021-02-09 16:06:51 +03:00
.gitmodules Removed backward-cpp, synced submodules 2021-09-07 17:57:35 +03:00
build.sh Added build-debug and removed openssl specifyings 2021-02-08 16:00:38 +03:00
CMakeLists.txt Normalize line endings 2020-11-17 11:32:02 -08:00
LICENSE Change license 2020-12-26 23:30:36 -08:00
README.md Add OpusEncoder type 2021-05-30 23:50:05 -07:00

CMake CodeQL

A linux server scripting API for Sub Rosa.

⚠ Early in development, APIs can change at any time.

RosaServer uses LuaJIT/moonjit; this means there's no hit to performance while being able to create anything from moderation tools to complex custom games with easy-to-write version agnostic code.

Getting Started

Installing

  • Build the library or download the latest Release.
  • Your directory should contain libluajit.so, librosaserver.so, subrosadedicated.x64, and the data folder (the last two can be found with your game install).
    • You will also need the rosaserversatellite binary if you plan to use the ChildProcess API. Make sure it has execute permissions.
  • There's a 99% chance you'll also want to use RosaServerCore.

Running

LD_PRELOAD="$(pwd)/libluajit.so $(pwd)/librosaserver.so" ./subrosadedicated.x64

The server will start as normal and main/init.lua will be executed.

Documentation

For complete reference on using the Lua API, go to the wiki.

Building

Make sure all submodules are cloned, and run ./build.sh

Required Packages

  • build-essential on Debian/Ubuntu
  • cmake
  • libssl-dev
  • libsqlite3-dev
  • libopus-dev

Here's a basic script I use to copy the required files after they're compiled. For example, ./build.sh && ./postbuild.sh

#!/bin/bash

DEST=../RosaServerCore/

cp ./moonjit/src/libluajit.so "$DEST"
cp ./release/RosaServer/librosaserver.so "$DEST"
cp ./release/RosaServerSatellite/rosaserversatellite "$DEST"

Thanks to these open source libraries: