Both sides previous revisionPrevious revisionNext revision | Previous revision |
games:windows:2004scape_localhost [2025/04/07 15:00] – [Block] Sean Rhone | games:windows:2004scape_localhost [2025/05/08 22:21] (current) – OSRS Map Viewer (225_2004-05-18) Sean Rhone |
---|
| |
* These notes provide a local single-player server for 2004Scape ((RSPS/RuneScape Private Server based on cache ''225'' from May 18th, 2004)) | * These notes provide a local single-player server for 2004Scape ((RSPS/RuneScape Private Server based on cache ''225'' from May 18th, 2004)) |
* Last tested commit: [[https://github.com/2004Scape/Server/commit/910f1910c1f489503e3885cebcff62c75f45b1a1|910f191]] | * Last tested commit: [[https://github.com/2004Scape/Server/commit/0a606a329729ff519c7b63e424c3d7b7db0e43c1|0a606a3]] |
| |
===== Media ===== | ===== Media ===== |
| |
* [[windows:10|Windows 10 (21H2)]] | * [[windows:10|Windows 10 (21H2)]] |
* [[windows;11_ltsc|Windows 11 (24H2)]] | |
| |
===== Resources ===== | ===== Resources ===== |
* [[https://lostcity.rs/t/singleplayer-main-branch-scripts-and-desktop-start-launchers-on-windows-linux-freebsd/54|Lost City Forums]] | * [[https://lostcity.rs/t/singleplayer-main-branch-scripts-and-desktop-start-launchers-on-windows-linux-freebsd/54|Lost City Forums]] |
* [[https://2004.lostcity.rs/worldmap|World Map]] (interactive) | * [[https://2004.lostcity.rs/worldmap|World Map]] (interactive) |
| * [[https://github.com/2004Scape/Server/wiki/FAQ|FAQ]] |
| |
| * [[https://osrs.world/?cache=rs2-225_2004-05-18|OSRS Map Viewer]] (3D aerial view) |
| * [[https://2004hq.com/|2004HQ]] ([[https://lostcity.rs/t/2004hq-a-runehq-2004-inspired-aio-website/5721|info]]) |
| |
====== Dependencies ====== | ====== Dependencies ====== |
| |
* https://learn.microsoft.com/en-us/java/openjdk/download#openjdk-21 | * https://learn.microsoft.com/en-us/java/openjdk/download#openjdk-21 |
* Last tested: ''microsoft-jdk-21.0.6-windows-x64.msi'' | * Last tested: ''microsoft-jdk-21.0.7-windows-x64.msi'' |
| |
* Entire feature install of ''Microsoft Build of OpenJDK'' | * Entire feature install of ''Microsoft Build of OpenJDK'' |
| |
* https://nodejs.org/en/download | * https://nodejs.org/en/download |
* Last tested: ''node-v22.14.0-x64.msi'' | * Last tested: ''node-v22.15.0-x64.msi'' |
| |
| * ''[x]'' Node.js runtime |
| * ''[ ]'' corepack manager |
| * ''[x]'' npm package manager |
| * ''[ ]'' Online documentation shortcuts |
| * ''[~]'' Add to PATH |
| * ''[x]'' Node.js and npm |
| * ''[ ]'' npm modules |
| |
* [x] Node.js runtime | * ''[ ]'' Automatically install the necessary tools. |
* [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 ====== | ====== Download Source ====== |
"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "clean" | "%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" | 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" install |
"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "setup" | "%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "setup" |
| |
| "netsh.exe" advfirewall firewall delete rule name="2004Scape localhost Server (node.exe)" |
| "netsh.exe" advfirewall firewall add rule name="2004Scape localhost Server (node.exe)" dir="in" action="block" profile="any" program="%ProgramFiles%\nodejs\node.exe" protocol="tcp" localport="80" |
| |
:: End</code> | :: End</code> |
| |
"%UserProfile%\Projects\2004Scape-Server\scripts\localhost-save-backup.bat" | "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-save-backup.bat" |
| |
| ===== LAN Open ===== |
| |
| * Removes [[#sc55_zzdenis_soundfont|custom SoundFont]] and opens Firewall for LAN access |
| |
| "notepad.exe" "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-lan-prep.bat" |
| |
| <code> |
| @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 |
| "%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "setup" |
| |
| "netsh.exe" advfirewall firewall delete rule name="2004Scape localhost Server (node.exe)" |
| "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" |
| |
| :: End</code> |
| |
| "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-lan-prep.bat" |
| |
====== Firewall ====== | ====== Firewall ====== |
===== Block ===== | ===== 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" | "netsh.exe" advfirewall firewall add rule name="2004Scape localhost Server (node.exe)" dir="in" action="block" profile="any" program="%ProgramFiles%\nodejs\node.exe" protocol="tcp" localport="80" |
| |
===== LAN ===== | ===== LAN ===== |
* Allows loading the game applet/connecting on other devices on LAN ((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)) | * Allows loading the game applet/connecting on other devices on LAN ((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)) |
* :!: Can't have above block rule enabled at the same time | * :!: Can't have above block rule enabled at the same time |
| * TODO: Covered in above batches; move to quick commands |
| |
"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" | "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" |
| |
DEL /Q "%UserProfile%\Downloads\favicon.ico" | DEL /Q "%UserProfile%\Downloads\favicon.ico" |
| |
| ===== SC55_zzdenis SoundFont ===== |
| |
| * https://www.doomworld.com/forum/topic/129928-new-sc55-soundfont-266mb-all-new-441k-samples/ |
| * https://drive.google.com/file/d/1wdYpwoCka8r7ZuIzPn1CHy13_4aP9oSq/view?usp=sharing |
| * ''SC55_zzdenis_v0.5.sf2'' |
| * :!: Increases browser RAM usage notably |
| * :!: 2025/05/04: Music broken even with default SF ([[https://github.com/2004Scape/Server/issues/1741|#1741]]) |
| |
| MOVE /Y "%UserProfile%\Downloads\SC55_zzdenis_v0.5.sf2" "%UserProfile%\Projects\2004Scape-Server\ext" |
| |
| DEL /Q "%UserProfile%\Projects\2004Scape-Server\src\public\client\SCC1_Florestan.sf2" && MKLINK "%UserProfile%\Projects\2004Scape-Server\src\public\client\SCC1_Florestan.sf2" "%UserProfile%\Projects\2004Scape-Server\ext\SC55_zzdenis_v0.5.sf2" |
| |
| ==== Update Script ==== |
| |
| * Add below ''netsh.exe'' lines |
| |
| "notepad.exe" "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-update.bat" |
| |
| <code> |
| :: SC55_zzdenis_v0.5.sf2 |
| |
| DEL /Q "%UserProfile%\Projects\2004Scape-Server\src\public\client\SCC1_Florestan.sf2" |
| MKLINK "%UserProfile%\Projects\2004Scape-Server\src\public\client\SCC1_Florestan.sf2" "%UserProfile%\Projects\2004Scape-Server\ext\SC55_zzdenis_v0.5.sf2" |
| |
| :: SF End</code> |
| |
====== Launcher Shortcuts ====== | ====== Launcher Shortcuts ====== |
==== Client ==== | ==== Client ==== |
| |
"http://localhost/rs2.cgi" | "http://localhost:80/rs2.cgi" |
| |
2004Scape | 2004Scape |
==== Client ==== | ==== Client ==== |
| |
"http://localhost/rs2.cgi" | "http://localhost:80/rs2.cgi" |
| |
2004Scape (localhost) | 2004Scape (localhost) |
| |
Save Folder | Save Folder |
| |
| ==== LAN Open ==== |
| |
| "%UserProfile%\Projects\2004Scape-Server\scripts\localhost-server-lan-prep.bat" |
| |
| Updater (LAN) |
| |
==== Commits Check ==== | ==== Commits Check ==== |
==== Client ==== | ==== Client ==== |
| |
* http://localhost/rs2.cgi | * http://localhost:80/rs2.cgi |
* http://localhost:80 | |
| |
===== Update ===== | ===== Update ===== |
"explorer.exe" "%UserProfile%\Projects\2004Scape-Server\src\data\players" | "explorer.exe" "%UserProfile%\Projects\2004Scape-Server\src\data\players" |
| |
====== SoundFont Tests ====== | ====== Tests ====== |
| |
"explorer.exe" "%UserProfile%\Projects\2004Scape-Server\src\public\client" | ===== Edge Standalone ===== |
| |
SCC1_Florestan.sf2 | * Edge needs efficiency settings disabled to maintain connection, see [[windows;notes;edge_tweaks|Edge Tweaks]] |
| |
| "%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge_proxy.exe" --app="http://localhost:80/rs2.cgi" |
| |
| "%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe" --proxy-server="localhost:80" --kiosk --edge-kiosk-type="public-browsing" --new-window "http://localhost:80/rs2.cgi" |
| |
| ===== Auto Log-in ===== |
| |
| * https://github.com/2004Scape/Server/issues/1498 |
| * :?: Looks settable in update scripts with ''sed'' Linux/FreeBSD |
| * //Technically// 2-click log-in |
| |
| "%ProgramFiles%\Notepad++\notepad++.exe" "%UserProfile%\Projects\2004Scape-Server\src\public\client\client.js" |
| |
| <code>usernameInput="";passwordInput="";</code> |
| |
| <code>usernameInput="Espionage724";passwordInput="1"</code> |
| |
| ===== Settings ===== |
| |
| * :!: It matters where ''--env-file='' is (Node vs npm), but unknown if all envs are Node-specific or if any apply to npm |
| |
| * Last commit: [[https://github.com/2004Scape/Server/commit/9b8c91ab21edc1a370216cd1322e5456031d7a81|January 12, 2025]] ''9b8c91a'' |
| * [[https://github.com/2004Scape/Server/commits/main/.env.example|New commits check]] |
| * [[https://github.com/2004Scape/Server/blob/main/.env.example|Upstream Settings]] ([[https://raw.githubusercontent.com/2004Scape/Server/refs/heads/main/.env.example|raw]]) |
| |
| * ''NODE_PORT=44594'' //was// an easy fix to simultaneously-host [[servers;windows;games;2009scape_localhost|2009Scape]], but this doesn't seem needed today and both servers open fine |
| * 2025/05/03: Settings below not tested |
| |
| MKDIR "%UserProfile%\Projects\2004Scape-Server\conf" |
| |
| notepad "%UserProfile%\Projects\2004Scape-Server\conf\localhost.env" |
| |
| <code> |
| WEB_PORT=80 |
| NODE_PORT=44594 |
| NODE_PRODUCTION=false |
| NODE_ALLOW_CHEATS=false |
| NODE_DEBUG=false |
| NODE_STAFF=Test |
| |
===== SoundFonts ===== | # End</code> |
| |
* https://www.doomworld.com/forum/topic/115527-roland-sc-55-soundfonts-compared-500-soundfont-pack-w-download/?tab=comments#comment-2153630 | * ''node.exe --env-file='' (not after ''npm-cli.js'') |
* https://www.doomworld.com/forum/topic/136501-best-soundfonts/ | * :?: ''start'' works, comes from old notes, but ''quickstart'' was switched to upstream |
| |
* ''SC-55 SoundFont v1.2a1.sf2'' preferred | "%ProgramFiles%\nodejs\node.exe" --env-file="%UserProfile%\Projects\2004Scape-Server\conf\localhost.env" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\2004Scape-Server\src" run "start" --verbose |
| |