Source-checkedLibraries & compatibility

ScheduleLua

by ScheduleLua · for Schedule I

A work-in-progress Lua modding framework for Schedule 1

24KDownloads
19 mo agoLast updated
BepInExLoaders
ThunderstoreSource

About ScheduleLua

From Thunderstore

A work-in-progress Lua modding framework for Schedule 1

ScheduleLua

ScheduleLua Logo

A Lua modding framework for Schedule I that exposes the game's functionality to Lua scripts, enabling custom gameplay mechanics, automation, and new features.

Important Note: ScheduleLua by itself does not add any gameplay features or content to Schedule I. It is a framework that allows you to run Lua scripts created by yourself or others. Without any scripts installed, this mod will not change your gameplay experience. Its purpose is to provide an easier way for modders to create custom gameplay modifications using Lua instead of requiring C# development knowledge.

Features

  • Robust Lua Environment: Built on MoonSharp for .NET integration
  • Hot Reloading: Edit scripts while the game is running for rapid development
  • Event System: Subscribe to game events like day changes, player status updates, etc.
  • Schedule I API: Access to player, NPCs, inventory, time, and more
  • Error Handling: Detailed error reporting and script isolation
  • Console Commands: Create custom console commands with the built-in command system

Installation

  1. Install MelonLoader for Schedule I
  2. Download the latest ScheduleLua release
  3. Extract the zip file and drag the Mods and UserLibs folders into your Schedule I game directory
  4. Launch the game on the alternate or alternate-beta branch

Getting Started

Documentation

Visit the Documentation Site for a full scripting guide and API reference.

Creating Your First Script

  1. Navigate to the Mods/ScheduleLua/Scripts directory
  2. Create a new .lua file (e.g., my_first_script.lua)
  3. Use the example script below as a template, or check the Examples section

Quick Start Guide

  1. Basic Structure: All scripts should return true to indicate successful loading
  2. Core Functions:
  • Initialize(): Called when script is first loaded
  • Update(): Called every frame
  • OnConsoleReady(): Called when console is available
  • OnPlayerReady(): Called when player is fully loaded
  • Shutdown(): Called when script is unloaded

Script Lifecycle

  1. Loading: Scripts are loaded when the game starts or when modified (hot reload)
  2. Initialization: The Initialize() function is called if it exists
  3. Update: The Update() function is called every frame if it exists
  4. Events: Event handlers are called when corresponding game events occur

Configuration

Edit settings in UserData/MelonPreferences.cfg:

[ScheduleLua]
EnableHotReload = true
LogScriptErrors = true

API Features

  • Player System: Get/set player stats, position, money, health, energy
  • NPC System: Access NPC information, positions, and regions
  • Inventory System: Manage player inventory
  • Time System: Access game time, days, and events
  • Map/World System: Access region information
  • Console Command System: Create custom in-game commands

Example Script

Check out this simple script to get started:

-- ATM Limit Example Script

-- Track ATM limit changes
local originalLimit = 10000.0
local presetLimits = {
    ["Default"] = 10000.0,
    ["Medium"] = 25000.0, 
    ["High"] = 50000.0,
    ["Very High"] = 100000.0,
    ["Unlimited"] = 999999.0
}

-- Initialize function called when script is first loaded
function Initialize()
    Log("ATM Limit Example script initialized!")
end

-- Called when the console is fully loaded and ready
function OnConsoleReady()
    -- Register console commands for ATM limits
    RegisterCommand(
        "atmlimit",
        "Shows or sets the ATM deposit limit using Harmony patching",
        "atmlimit [amount/preset]",
        function(args)
            if #args == 0 then
                -- No args, show current limit
                local currentLimit = GetATMDepositLimit()
                Log("Current ATM deposit limit: " .. FormatMoney(currentLimit))
                Log("Available presets: default, medium, high, veryhigh, unlimited")
                for name, limit in pairs(presetLimits) do
                    Log("  - " .. name .. ": " .. FormatMoney(limit))
                end
            else
                -- Try to set the limit
                local newLimit
                local presetName = string.lower(args[1])
                
                -- Check if it's a preset name
                if presetName == "default" then
                    newLimit = presetLimits["Default"]
                elseif presetName == "medium" then
                    newLimit = presetLimits["Medium"]
                elseif presetName == "high" then
                    newLimit = presetLimits["High"]
                elseif presetName == "veryhigh" then
                    newLimit = presetLimits["Very High"]
                elseif presetName == "unlimited" then
                    newLimit = presetLimits["Unlimited"]
                else
                    -- Try to parse as a number
                    newLimit = tonumber(args[1])
                    if not newLimit then
                        LogError("Invalid limit. Please specify a number or preset (default, medium, high, veryhigh, unlimited)")
                        return
                    end
                end
                
                -- Set the new limit
                Log("Applying Harmony patches for ATM deposit limit: " .. FormatMoney(newLimit))
                if SetATMDepositLimit(newLimit) then
                    Log("Successfully applied patches for ATM deposit limit: " .. FormatMoney(newLimit))
                    Log("Try visiting an ATM to see the new limit in action.")

Read the full description on Thunderstore →

Highlights

From source data

Loaders

Runs on BepInEx.

Footprint

Rated a light load on a server.

Dependencies

Needs 1 other project installed alongside it.

ScheduleLua on Nxeon

From our catalogue
One-click install
Not available. One-click install isn't available for this game's mods yet. Download it and upload it to your server in Files.
Server type needed
BepInEx
Server load
light
Latest build
0.1.5, released 2025-04-19

Game versions by loader

LoaderGame versionsNewest
BepInEx

From 6 recorded builds of ScheduleLua.

Recent builds

BuildReleasedGame versionsLoaders
0.1.52025-04-19n/aBepInEx
0.1.42025-04-18n/aBepInEx
0.1.32025-04-16n/aBepInEx
0.1.22025-04-16n/aBepInEx
0.1.12025-04-15n/aBepInEx
0.1.02025-04-13n/aBepInEx

Dependencies

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

What kind of mod it is

From the catalog
Listed on Thunderstore as “Core”

Libraries & compatibility

Foundations and fixes other mods build on. Usually installed because something else needs it.

Compatibility

Game
Schedule I
Loaders
BepInEx
Requires
One-click install needs a BepInEx server. 1 other project installed alongside it.

Verified at the source

  • ✓ThunderstoreOfficial listing, checked 2026-10-02Open ↗
  • ✓AuthorScheduleLua, as published on Thunderstore
  • ✓LicenseNot published by the sourceFree

ScheduleLua, answered

Generated from the mod’s own source data.

Which loaders does it support?

BepInEx.

Is it free?

Yes. ScheduleLua is free to download from Thunderstore.

How do I add it to my Nxeon server?

NxLabs doesn’t install Schedule I mods for you. Download ScheduleLua free from Thunderstore.

NxLabs

Run ScheduleLua on a Schedule I server.

Free to download from Thunderstore.