Umbrella is a collection of LuaCATS typings for Project Zomboid's API. This includes:
- Candle: The exposed Java API typings.
- PZLuaStubs: The Lua API typings.
- PZEventStubs: The Events API typings.
- Types are exposed to IntelliSense through LuaCATS, showing what goes where and what's returned.
- No time spent decompiling the game and running tools to get typings. (They are provided already)
- Built using PZ-Rosetta, using Project Zomboid's JavaDocs to make the typings friendlier. (Parameter names, Documentation notes, etc.)
- Different Lua environments can behave differently. (vscode plugin, IntelliJ IDEA, etc.) This could cause issues.
VSCode is recommended as it is the best supported Lua IDE, and its addon manager will automatically update Umbrella.
- Install VSCode.
- Open and use the extension manager to install the Lua extension.
- Install Git. You may need to restart your computer after installation.
- Open your project or folder.
- Press Ctrl-Shift-P and search for
Lua: Open Addon Manager
in the context menu that opens. - Search for Umbrella, and click enable. You will need to enable it for any future projects as well. a) For Unstable versions of Project Zomboid, use Umbrella (Unstable).
- Install the SumnekoLUA plugin.
- Download Umbrella from Releases (or clone it).
- Open/create your project.
- Create a file named
.luarc.json
at the root directory of your project with the contents:
{
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"workspace.library": ["path/to/umbrella"],
"runtime.version": "Lua 5.1",
"runtime.path": [
"shared/?.lua",
"client/?.lua",
"server/?.lua"
],
"completion.requireSeparator": "/",
"workspace.preloadFileSize": 800,
"runtime.builtin": {
"debug": "disable",
"io": "disable",
"package": "disable"
}
}
- Change the
"workspace.library": ["path/to/umbrella"]
line to the absolute path to where you downloaded Umbrella. - You may need to restart your IDE to apply the changes.
- Create new project.
- Download the correct version of Umbrella (PZ versions used) from Releases page, or clone it.
- Copy the downloaded folder into your project somewhere, or link it as a dependency if your IDE supports it.
If you want to install Umbrella globally, Add a path to Umbrella via this extension setting:
If you like what I do and helped your community a lot, feel free to buy me a coffee! https://ko-fi.com/jabdoesthings