forked from piqseu/ltsteamplugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Development
Toxc edited this page Jun 25, 2026
·
1 revision
This page describes the OpenLuaTools repository layout and useful notes for contributors.
OpenSteamToolPlugin/
├─ .millennium/Dist/ # Built Millennium frontend bridge files
├─ backend/ # Lua backend modules
│ ├─ data/ # Default settings/data
│ ├─ locales/ # Translation files
│ ├─ settings/ # Settings manager/options
│ ├─ api.json # Default API source definitions
│ ├─ main.lua # Plugin lifecycle and exported API methods
│ ├─ downloads.lua # Download, extraction, and Lua install flow
│ ├─ fixes.lua # Helper/fix archive check/apply flow
│ ├─ paths.lua # Plugin/backend/public path helpers
│ ├─ safety.lua # URL/path/archive safety validation
│ └─ steam_utils.lua # Steam/OpenSteamTool path helpers
├─ public/ # Webkit assets, icon, CSS, themes
├─ scripts/ # Contributor/dev scripts
├─ CHANGELOG.md
├─ plugin.json
└─ readme.md
plugin.json defines:
{
"name": "openluatools",
"common_name": "OpenLuaTools",
"description": "OpenLuaTools Millennium plugin for OpenSteamTool.",
"version": "1.0.0",
"backendType": "lua",
"include": ["public"]
}backend/main.lua returns a lifecycle table with:
on_loadon_unloadon_frontend_loaded
On load, the plugin:
- Logs startup.
- Detects the Steam install path.
- Ensures the temporary download directory exists.
- Initializes settings.
- Applies any pending update state.
- Copies public webkit files.
- Injects browser CSS and JS.
- Initializes API sources.
- Calls
millennium.ready().
The backend exposes methods for:
- Plugin directory detection.
- API initialization and source management.
- Update checks and Steam restart.
- Lua script presence checks.
- Lua script install status.
- Lua script deletion.
- API availability checks.
- Icon data lookup.
- Installed script listing.
- Game install path lookup.
- Opening game folders and external URLs.
- Settings schema/value retrieval.
- Settings changes.
- Locale and translation lookup.
- Theme lookup.
Most exported methods return JSON-encoded strings so the frontend receives predictable data through the Millennium Lua bridge.
The Lua install flow is handled in backend/downloads.lua.
High-level flow:
- Select a trusted configured source.
- Start an async download.
- Extract to a temporary plugin directory.
- Validate every extracted file path.
- Copy valid manifests into Steam's
depotcache. - Copy the expected
<appid>.luafile into<Steam>/config/lua. - Preserve
setManifestid(...)lines. - Clean temporary files.
Do not weaken these checks:
- HTTP/HTTPS-only external URLs.
- Unsafe character rejection for URLs and paths.
- Archive path traversal rejection.
- Destination path containment checks.
- App ID based Lua filename validation.
- Numeric manifest filename validation.
- Temporary extraction before copying.
For development, place the repository folder directly in the Millennium plugins directory or use a symbolic link.
After frontend/public changes, a Steam UI reload may be enough. After backend Lua changes, restart Steam.
Before committing:
- Confirm
plugin.jsonis valid JSON. - Confirm the plugin loads in Millennium.
- Test enabling and disabling the plugin.
- Test settings load and save.
- Test locale validation if translations changed.
- Test downloads only with files you are allowed to use.
- Check logs for Lua errors.
- Update
CHANGELOG.mdfor user-facing changes.
OpenLuaTools documentation for ToxcGang/OpenSteamToolPlugin.