ScriptHook: Script

From Nomad DB
Revision as of 19:03, 14 April 2020 by Jan (talk | contribs) (Created page with "A Script is a collection of Lua scripts that are loaded by WD2 ScriptHook. Scripts are loaded upon starting the game with ScriptHook installed. This guide will give you an...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A Script is a collection of Lua scripts that are loaded by WD2 ScriptHook. Scripts are loaded upon starting the game with ScriptHook installed. This guide will give you an overview of the structure behind those Scripts.

Directory Structure

data/scripts
data/scripts/[name]
data/scripts/[name]/manifest.json
data/scripts/[name]/[...].lua

manifest.json

The manifest holds information about a Script. Name, Author & Version can be specified here. The "entrypoint" is the Lua script that is loaded. For the keyBinds section, check out WD2 ScriptHook: Key Binds.

{
	"name": "Simple Trainer",
	"author": "Nomad Group",
	"version": "1.0",
	
	"entrypoint": "main.lua",
	"keyBinds": {
		"menu": "F4"
	}
}