====== Information ====== * 2004Scape Server ((https://github.com/2004Scape/Server)) * ''main'' Branch ((https://github.com/2004Scape/Server/tree/main)) * These notes provide a local singleplayer server for 2004Scape ((RSPS/RuneScape Private Server based on cache ''225'' from May 18th, 2004)) on Windows (see [[games;linux;2004scape_localhost|these notes]] for Linux) ===== Media ===== * [[https://www.youtube.com/watch?v=RFmbHS4w9mU|Desktop and Start Menu Shortcuts Presentation Video]] * [[https://www.facebook.com/media/set/?set=a.1020728566088031|My Progress Photo Album]] ===== Prerequisites ===== * [[windows:10|Windows 10]] ((later use of ''tar'' commands for Save Data requires Windows 10 1803+; presumably fine on W11; [[https://rune-server.org/threads/lost-city-225-emulation.701698/page-4#post-5805881|can apparently run on XP too]])) ===== Resources ===== * [[https://www.2004scape.org/img/rs2/worldmap/worldmap2.jpg|World Map]] ==== Web ==== * [[https://github.com/2004scape/Server/wiki/Feature-Complete-Progress|Feature Complete Progress]] * [[https://github.com/orgs/2004Scape/projects/3|Progress - Quests]] * [[https://github.com/orgs/2004Scape/projects?query=is%3Aopen|Projects List]] * [[https://rune-server.org/threads/lost-city-225-emulation.701698/|Rune-Server Forums]] * [[https://rune-server.org/threads/lost-city-225-emulation.701698/page-4#post-5805881|Info post]] (Jul 3, 2024) ====== Dependencies ====== * https://github.com/2004Scape/Server?tab=readme-ov-file#getting-started * https://github.com/2004Scape/Server?tab=readme-ov-file#environment-dependencies * Git, Java, NodeJS ===== Git ===== * https://www.git-scm.com/download/win * Last tested: ''Git-2.47.0.2-64-bit.exe'' * :!: Git from the command line and also from 3rd-party software (make sure it's selected) ===== Java ===== * https://learn.microsoft.com/en-us/java/openjdk/download * Last tested: ''microsoft-jdk-17.0.13-windows-x64.msi'' ((21 also works; 17 is easier to share with [[servers:windows:games:2009scape_localhost|2009Scape]])) * Entire feature install of ''Microsoft Build of OpenJDK'' ===== Node.js ===== * https://nodejs.org/en/download/prebuilt-installer * Last tested: ''node-v23.1.0-x64.msi'' * Node.js runtime, npm package manager, Add to PATH (corepack manager and Online documentation not required) * Tools for Native Modules not required (leave "Automatically install the tools" unchecked) ====== Firewall ====== ===== LAN ===== * ''80'' TCP * ''43594'' TCP * ''43595'' TCP * Allows loading the game applet and connecting to the server from other devices on LAN ((2024/11/09: Works on Xbox One Edge with physical keyboard for log-in; controller works in-game flawlessly)) * :!: This is optional if only doing ''localhost'' netsh advfirewall firewall add rule name="2004Scape Server" dir="in" action="allow" protocol="tcp" localport="80,43594,43595" remoteip="localsubnet" ====== Download Source ====== * https://github.com/2004Scape/Server/tree/main git clone --branch "main" --depth "1" --recurse-submodules "https://github.com/2004Scape/Server.git" "%UserProfile%\Projects\2004Scape-Server\src" explorer "%UserProfile%\Projects\2004Scape-Server\src" ====== Settings ====== * [[https://github.com/2004Scape/Server/blob/main/.env.example|Upstream Settings]] * 2024/11/10: ''NODE_PORT=44594'' seems like an easy fix to simultaneously-host [[servers:windows:games:2009scape_localhost|2009Scape]] notepad "%UserProfile%\Projects\2004Scape-Server\src\.env" WEB_PORT=80 NODE_PORT=44594 NODE_PRODUCTION=false NODE_ALLOW_CHEATS=false NODE_DEBUG=false NODE_STAFF=Test ====== Scripts ====== **** MKDIR "%UserProfile%\Projects\2004Scape-Server\scripts" ===== Server Start ===== notepad "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-start.bat" @echo off CD "%UserProfile%\Projects\2004Scape-Server\src" npm start :: End ===== Server Update ===== notepad "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-update.bat" @echo off git -C "%UserProfile%\Projects\2004Scape-Server\src" reset --hard git -C "%UserProfile%\Projects\2004Scape-Server\src" pull origin "main" --rebase CD "%UserProfile%\Projects\2004Scape-Server\src" npm run "clean" && pause :: End ===== Save Data Back-up ===== notepad "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-save-backup.bat" @echo off tar -cvzf "%UserProfile%\Downloads\%RANDOM%-2004Scape-Server-localhost-Saves.tar.gz" -C "%UserProfile%\Projects\2004Scape-Server\src\data" "players" echo 2004Scape Save Data Backed-up Successfully to Downloads pause :: End ====== Launcher Shortcuts ====== ===== Desktop ===== * Right-click Desktop -> New -> Shortcut ==== Server Start ==== "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-start.bat" 2004Scape Server ==== Client ==== http://localhost:80 2004Scape === Icon === **** "%UserProfile%\Projects\2004Scape-Server\src\public\favicon.ico" ===== Start Menu ===== **** MKDIR "%AppData%\Microsoft\Windows\Start Menu\Programs\2004Scape" ==== Shortcuts ==== * Right-click -> New -> Shortcut explorer "%AppData%\Microsoft\Windows\Start Menu\Programs\2004Scape" === Server Start === "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-start.bat" Server Start === Client === http://localhost:80 2004Scape (Client) == Icon == **** "%UserProfile%\Projects\2004Scape-Server\src\public\favicon.ico" === Update === "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-update.bat" Server Updater === Save Backup === "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-save-backup.bat" Save Data Back-up === Updates Check === https://github.com/2004Scape/Server/commits/main/ Server - Updates Check === Install Notes === https://wiki.realmofespionage.xyz/games:windows:2004scape_localhost Server - Install Notes ====== Steam ====== * Add Non-Steam Game -> Browse... "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" * Name 2004Scape (localhost) * Start In C:\Windows\Temp * Launch Options --kiosk --new-window "http://localhost:80" --edge-kiosk-type="public-browsing" --no-first-run ====== Quick Commands ====== ===== Execute ===== ==== Server ==== CD "%UserProfile%\Projects\2004Scape-Server\src" && npm start --verbose "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-start.bat" ==== Client ==== * http://localhost:80 ===== Update ===== * https://github.com/2004Scape/Server/commits/main/ * :!: Running ''npm run clean'' requires starting the server once afterwards with an internet connection to download packages to start the server for playing offline git -C "%UserProfile%\Projects\2004Scape-Server\src" reset --hard && git -C "%UserProfile%\Projects\2004Scape-Server\src" pull origin "main" --rebase && CD "%UserProfile%\Projects\2004Scape-Server\src" && npm run "clean" "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-update.bat" ===== Save Data Back-up ===== * :!: The ''tar'' command replaces ''Downloads\2004Scape-Server-localhost-Saves.tar.gz'' each time without back-up or date codes explorer "%UserProfile%\Projects\2004Scape-Server\src\data\players" tar -cvzf "%UserProfile%\Downloads\2004Scape-Server-localhost-Saves.tar.gz" -C "%UserProfile%\Projects\2004Scape-Server\src\data" "players" "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-save-backup.bat" ===== npm ===== * Lists available ''npm'' commands CD "%UserProfile%\Projects\2004Scape-Server\src" && npm run ===== File Manager ===== ==== Root ==== **** explorer "%UserProfile%\Projects\2004Scape-Server\src" ==== Save Data ==== **** explorer "%UserProfile%\Projects\2004Scape-Server\src\data\players"