All Projects → libertylocked → webscripthook

libertylocked / webscripthook

Licence: MIT License
WebScriptHook is a web plugin framework for GTAV, which allows interaction with a running instance of GTAV through a REST API.

Programming Languages

C#
18002 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
go
31211 projects - #10 most used programming language
CSS
56736 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to webscripthook

RAGE-StringsDatabase
This repository contains known string lines and file names for RAGE based games (GTA IV, GTA V, RDR 2)
Stars: ✭ 26 (+36.84%)
Mutual labels:  modding, gtav
gtav-audio-occlusion
🔧 Audio occlusion generation tool for GTA V custom interiors
Stars: ✭ 35 (+84.21%)
Mutual labels:  modding, gtav
FFXIV Modding Tool
FFXIV Modding Tool is the Cross-platform Commandline interface alternative for TexTools
Stars: ✭ 39 (+105.26%)
Mutual labels:  modding
Unity-Lua
A wrapper around MoonSharp that allows easy development of moddable Unity games
Stars: ✭ 105 (+452.63%)
Mutual labels:  modding
dont-starve-tools
🔨 Mod tools for Don't Starve (And other Klei Entertainment games)
Stars: ✭ 88 (+363.16%)
Mutual labels:  modding
LegendaryExplorer
Editor toolset for Mass Effect Trilogy and Mass Effect Legendary Edition
Stars: ✭ 85 (+347.37%)
Mutual labels:  modding
LoS-Mod Files X
Mod Files for the Xbox 360 version of Sonic '06 mod; Legacy of Solaris.
Stars: ✭ 22 (+15.79%)
Mutual labels:  modding
gtav-online-ahk
GTA V Online AHK-Macros
Stars: ✭ 45 (+136.84%)
Mutual labels:  gtav
Sims4ScriptingBPProj
Sims 4 Scripting Boilerplate Project
Stars: ✭ 32 (+68.42%)
Mutual labels:  modding
Showoff-NVSE
An NVSE plugin that adds functions and some engine-level tweaks.
Stars: ✭ 32 (+68.42%)
Mutual labels:  modding
openvr fsr
Add Image Upscaling via AMD FidelityFX SuperResolution or NVIDIA Image Scaling to SteamVR games
Stars: ✭ 1,182 (+6121.05%)
Mutual labels:  modding
MBINCompiler
A tool for decompiling No Man's Sky .MBIN files to XML format
Stars: ✭ 168 (+784.21%)
Mutual labels:  modding
m2sdk
Software Development Kit for the Steam version of Mafia2.
Stars: ✭ 19 (+0%)
Mutual labels:  modding
XnaToFna
Relink games / tools using the XNA Framework 4.0 to use FNA instead
Stars: ✭ 40 (+110.53%)
Mutual labels:  modding
snaily-cadv4
💻 An open source Computer Aided Dispatch (CAD) for FiveM, this is a web based integration for communities who love police roleplaying and dispatching. Discord: https://discord.gg/eGnrPqEH7U
Stars: ✭ 36 (+89.47%)
Mutual labels:  gtav
skyrimse
The TES V: Skyrim Special Edition masterlist.
Stars: ✭ 99 (+421.05%)
Mutual labels:  modding
Android-ML
@cos8oih 👋
Stars: ✭ 20 (+5.26%)
Mutual labels:  modding
redscript
Compiler/decompiler toolkit for redscript
Stars: ✭ 191 (+905.26%)
Mutual labels:  modding
dftools
Tools for Star Wars: Dark Forces assets.
Stars: ✭ 18 (-5.26%)
Mutual labels:  modding
openvr foveated
Fixed Foveated Rendering for SteamVR games
Stars: ✭ 74 (+289.47%)
Mutual labels:  modding

WebScriptHook plugin + server

Build status

A platform that allows interaction with a running instance of GTAV through a REST API. Extendable through extensions! Includes server and game-side plugin. Inspired by ETS2 Telemetry Server

Features

  • Second-screen experiences for GTAV through a web interface
  • Fetching real-time game statistics in JSON format with a GET request
  • Calling GTAV script native functions with POST requests
  • Web server included! Drop your HTML and CSS and JavaScript and you are good to go
  • Extension support allows developers to create extensions to handle more request types. Extensions are stateful and can be ticked with the game
  • You can easily port an existing ScriptHook V .NET script to a WebScriptHook extension
  • Includes a "Drive Cars With Your Phone" example extension (frontend and backend)

Installation

Requirements

WebScriptHook

  • Extract "WebScriptHook" folder to "GTAV/scripts"
  • The configuration file should be at GTAV/scripts/WebScriptHook/WebScriptHook.ini
  • The DLLs should be at GTAV/scripts/WebScriptHook/*.dll
  • The server exe should be at GTAV/scripts/WebScriptHook/webscripthook-server.exe
  • Run the game

WebScriptHook apps

Running a web app

  • Start the game
  • Run "webscripthook-server.exe"
  • You need to allow the program to communicate through firewall
  • The default port is 25555. Can be changed in config (restart game and the server to apply)
  • Open your browser and go to http://localhost:25555 You should see the home page
  • To access the page from devices on your LAN, replace "localhost" above with the address of your PC. Google "How to find my LAN IP" if you don't know how to do that
  • There is an Android client app for WebScriptHook

Installing a web app

  • Drop the folder of a WebScriptHook app under "/apps" folder
  • If done correctly, the index page of the app should be at /apps/<app name>/index.html
  • Refresh the webpage

WebScriptHook REST API

WebScriptHook provides a REST API that allows you to pull real-time data from the game, as well as calling native functions remotely!

  • Pulling some real-time data in JSON format
GET /pull
  • Calling a native function
POST /input
{
	"Cmd": "native",
	"Arg": "GET_ENTITY_HEALTH", <- Name or hash of the native function
	"Args": ["int", 2]  <- Return type (a string), native function arguments (an int/float/string/bool)
}

WebScriptHook extensions

Installing an extension

  • Put the extension dll files under "/extensions" folder
  • WebScriptHook searches for assemblies recursively, so create subfolders if you wish
  • Extensions will be automatically loaded when WebScriptHook starts

Creating an extension

  • You can write your own extensions to handle inputs sent through web
  • Subclass WebScriptHook.Extensions.Extension and override HandleCall method, which is invoked whenever your extension is called through web
  • Implement WebScriptHook.Extensions.ITickable if you want your extension to be ticked every frame
  • Your extension can also send stuff back to the caller, whenever HandleCall is called
  • It's possible to convert an existing ScriptHookVDotNet script to a WebScriptHook extension
  • See the wiki page for details

Calling an extension through REST API

  • POST to /input with cmd "extension"
  • Arg needs to be "assemblyname.namespace.classname". e.g. extension-examples.ExampleExtensions.MyExtension
  • Args will be used to call the extension

Other notes

  • Whether you start the game first or the server first does not matter
  • If things broke, check "GTAV/ScriptHookVDotNet-2016-01-19.log" (replace the date with your current date) for errors

Screenshots

Video

Video2 Video1

Have fun making your own apps! Pull requests are welcome

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].