A simple Node.js app that reads NARAKA: BLADEPOINT game state and allows user to:
- Switch OBS scenes depending on game state.
- Run Twitch ads automatically during lobby times.
- Must have Node.js
v18or greater, andpnpminstalled. - Must have the repository cloned
pnpm installCopy config/default.yaml.example to config/default.yaml and change the values accordingly by refering to the Configuration section.
Execute the main program:
node .- Download the latest release.
- Create a
configfolder and copy default.yaml.example asdefault.yamlin theconfigfolder, then change the values accordingly by refering to the Configuration section. - Execute the executable
naraka-autoad.exe.
For Twitch:
client_idandclient_secretwill be found in your Twitch API console.user_idwill be found by manually calling Twitch Helix API or using an external service.- Copy
tokens.YOUR_TWITCH_USER_ID.json.exampletotokens.YOUR_TWITCH_USER_ID.json(replaceYOUR_TWITCH_USER_IDto the same one found previously)- If you already know your twitch API access token and refresh token, put them in the json file.
- If you don't know your twitch API access token and refresh token (you will be required to clone this repository, and have the Pre-requisites section fulfilled):
- Make sure you have
http://localhostas a redirect URI in your twitch API - Modify and then go to the following URL:
https://id.twitch.tv/oauth2/authorize?response_type=code&client_id=YOUR_TWITCH_CLIENT_ID&redirect_uri=http://localhost&scope=channel%3Aedit%3Acommercial&state=c3ab8aa609ea11e793ae92361f002671 - Click
Authorize, you will be redirect to alocalhostpage that will fail. You will find the code in the redirected URL. - Copy the code, open
init.jsand replaceYOUR_TWITCH_CODEwith the obtained code. - Execute the script:
node init.js
- You will find your access token and refresh token in the console output, modify
tokens.YOUR_TWITCH_USER_ID.jsonwith them accordingly.
- Make sure you have
For OBS:
Open OBS, go to Tools > WebSocket Server Settings, check the box Enable WebSocket Server. The port and password can be found after clicking on the Show Connect Info button.