User Tools

Site Tools


games:windows:2004scape_localhost

This is an old revision of the document!


Information

  • 2004Scape Server 1)
  • These notes provide a local single-player server for 2004Scape 2)
  • Last tested commit: 910f191

Media

Prerequisites

Resources

Dependencies

Git

  • No components required
  • Git from the command line and also from 3rd-party software

Java

  • Entire feature install of Microsoft Build of OpenJDK

Node.js

  • [x] Node.js runtime
  • [x] npm package manager
  • Add to PATH → [x] Node.js and npm
  • corepack manager, Online documentation shortcuts, PATH npm modules not required
  • Tools for Native Modules not required (leave auto-install necessary tools unchecked)

Download Source

"%ProgramFiles%\Git\bin\git.exe" clone --branch "main" --depth "1" --recurse-submodules "https://github.com/2004Scape/Server.git" "%UserProfile%\Projects\2004Scape-Server\src"

Initial Build

CD "%UserProfile%\Projects\2004Scape-Server\src" && "%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" install --verbose

Set-up

  • Set up as a development world
"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "setup"

Scripts

MKDIR "%UserProfile%\Projects\2004Scape-Server\scripts"

Server Start

"notepad.exe" "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-start.bat"
@echo off

"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "quickstart"

:: End
"%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-start.bat"

Server Update

"notepad.exe" "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-update.bat"
@echo off

"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\2004Scape-Server\src" reset --hard
"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\2004Scape-Server\src" pull origin "main" --rebase

"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "clean"
CD "%UserProfile%\Projects\2004Scape-Server\src"
"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" install --verbose
"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "setup"

:: End
"%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-update.bat"

Save Data Back-up

"notepad.exe" "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-save-backup.bat"
@echo off

"tar.exe" -czf "%UserProfile%\Downloads\%RANDOM%-2004Scape-Server-localhost-Saves.tar.gz" -C "%UserProfile%\Projects\2004Scape-Server\src\data\players" "main"

:: End
"%UserProfile%\Projects\2004Scape-Server\scripts\localhost-save-backup.bat"

Firewall

Block

"netsh.exe" advfirewall firewall add rule name="2004Scape localhost Server (node.exe)" dir="in" action="block" profile="any" program="%ProgramFiles%\nodejs\node.exe"
"netsh.exe" advfirewall firewall add rule name="2004Scape localhost Server (node.exe)" dir="out" action="block" profile="any" program="%ProgramFiles%\nodejs\node.exe"

LAN

  • Allows loading the game applet/connecting on other devices on LAN 3)
  • :!: Can't have above block rule enabled at the same time
"netsh.exe" advfirewall firewall add rule name="2004Scape localhost Server (node.exe)" dir="in" action="allow" profile="any" program="%ProgramFiles%\nodejs\node.exe" protocol="tcp" localport="80" remoteip="localsubnet"

Delete Rule

"netsh.exe" advfirewall firewall delete rule name="2004Scape localhost Server (node.exe)"

Extras

MKDIR "%UserProfile%\Projects\2004Scape-Server\ext"

Map

"%UserProfile%\Projects\2004Scape-Server\ext\June_2004_Map.jpg"

Icon

Save Back to Downloads

"%UserProfile%\Downloads\favicon.ico"
DEL /Q "%UserProfile%\Downloads\favicon.ico"

Launcher Shortcuts

Desktop

  • Right-click Desktop → New → Shortcut

Server Start

"%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-start.bat"
2004Scape Server

Client

"http://localhost/rs2.cgi"
2004Scape

Icon

"%UserProfile%\Projects\2004Scape-Server\ext\favicon.ico"

Start Menu

  • Right-click → New → Shortcut
MKDIR "%AppData%\Microsoft\Windows\Start Menu\Programs\2004Scape"
"explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\2004Scape"

Server Start

"%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-start.bat"
Server Start

Client

"http://localhost/rs2.cgi"
2004Scape (localhost)

Icon

"%UserProfile%\Projects\2004Scape-Server\ext\favicon.ico"

Update

"%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-update.bat"
Updater

Save Backup

"%UserProfile%\Projects\2004Scape-Server\scripts\localhost-save-backup.bat"
Save Back-up

Save Folder

MKDIR "%UserProfile%\Projects\2004Scape-Server\src\data\players"
"%UserProfile%\Projects\2004Scape-Server\src\data\players"
Save Folder

Commits Check

"https://github.com/2004Scape/Server/commits/main/"
Updates Check

World Map

"%UserProfile%\Projects\2004Scape-Server\ext\June_2004_Map.jpg"
World Map

Install Notes

"https://wiki.realmofespionage.xyz/games;windows;2004scape_localhost"
Install Notes

Quick Commands

Execute

Server

"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "quickstart" --verbose

Client

Update

"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\2004Scape-Server\src" reset --hard && "%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\2004Scape-Server\src" pull origin "main" --rebase && "%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "clean" --verbose && "%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" "ci" --verbose && "%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "setup" --verbose

Save Data Back-up

  • :!: The tar command replaces Downloads\2004Scape-Server-localhost-Saves.tar.gz each time without back-up or date codes
"explorer.exe" "%UserProfile%\Projects\2004Scape-Server\src\data\players"
"tar.exe" -cvzf "%UserProfile%\Downloads\2004Scape-Server-localhost-Saves.tar.gz" -C "%UserProfile%\Projects\2004Scape-Server\src\data\players" "main"

npm

  • Lists available npm commands
"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run
CD "%UserProfile%\Projects\2004Scape-Server\src" && npm run

File Manager

Save Data

  • :?: Restoring a .sav may require logging in once to Tutorial Island, logging out, then re-restoring the .sav
MKDIR "%UserProfile%\Projects\2004Scape-Server\src\data\players\main"
"explorer.exe" "%UserProfile%\Projects\2004Scape-Server\src\data\players"

SoundFont Tests

"explorer.exe" "%UserProfile%\Projects\2004Scape-Server\src\public\client"
SCC1_Florestan.sf2

SoundFonts

2)
RSPS/RuneScape Private Server based on cache 225 from May 18th, 2004
3)
2024/11/09: Works on Xbox One Edge with physical keyboard for log-in; controller works in-game flawlessly; :?: may work better 2025 with touch/phone improvements
C:/www/wiki/data/attic/games/windows/2004scape_localhost.1744052456.txt.gz · Last modified: by Sean Rhone