Both sides previous revisionPrevious revisionNext revision | Previous revision |
games:windows:2004scape_localhost_node [2025/06/09 18:06] – Sean Rhone | games:windows:2004scape_localhost_node [2025/08/20 14:49] (current) – removed Sean Rhone |
---|
====== Information ====== | |
| |
* Lost City ''225'' Server + Client | |
* TODO: Lock Node config (no ''bun'') | |
| |
===== Media ===== | |
| |
* [[https://www.youtube.com/watch?v=RFmbHS4w9mU|Desktop and Start Menu Shortcuts Presentation Video]] | |
* [[https://media.realmofespionage.xyz/index/category/2|Progress Pics]] | |
| |
===== Prerequisites ===== | |
| |
* [[windows:10|Windows 10 (21H2)]] | |
* [[programs;windows;git|Git]] | |
* [[programs;windows;nodejs_npm|Node.js + npm]] | |
* [[windows;notes;edge_tweaks|Microsoft Edge]] | |
| |
===== Resources ===== | |
| |
* [[https://lostcity.rs/t/singleplayer-main-branch-scripts-and-desktop-start-launchers-on-windows-linux-freebsd/54|Lost City Forums]] | |
| |
====== Dependencies ====== | |
| |
* https://github.com/LostCityRS/Engine-TS/blob/225/README.md#dependencies | |
| |
===== Java ===== | |
| |
* https://learn.microsoft.com/en-us/java/openjdk/download#openjdk-21 | |
* Last tested: ''microsoft-jdk-21.0.7-windows-x64.msi'' | |
| |
* Entire feature install of ''Microsoft Build of OpenJDK'' | |
| |
===== Bun ===== | |
| |
* [[https://github.com/oven-sh/bun/releases/latest/download/bun-windows-x64.zip|bun-windows-x64.zip]] | |
* 2025/06/05: ''bun'' has an odd ''cdn'' TCP connection and higher RAM ([[https://github.com/LostCityRS/Engine-TS/issues/7|#7]]) | |
| |
MKDIR "%UserProfile%\Projects\LostCity-225-EngineTS\ext" | |
| |
"explorer.exe" "%UserProfile%\Projects\LostCity-225-EngineTS\ext" | |
| |
DIR "%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" | |
| |
===== Node.js ===== | |
| |
* https://nodejs.org/en/download | |
* Last tested: ''node-v22.16.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 | |
| |
* ''[ ]'' Automatically install the necessary tools. | |
| |
====== Download Source ====== | |
| |
===== Engine-TS ===== | |
| |
* https://github.com/LostCityRS/Engine-TS/commits/225/ | |
| |
"%ProgramFiles%\Git\bin\git.exe" clone --branch "225" --depth "1" --recurse-submodules "https://github.com/LostCityRS/Engine-TS.git" "%UserProfile%\Projects\LostCity-225-EngineTS\src" | |
| |
"%ProgramFiles%\Git\bin\git.exe" clone --rev "0fb09fb0506fd884d82b8fec556a822e69d25e14" --depth "1" --recurse-submodules "https://github.com/LostCityRS/Engine-TS.git" "%UserProfile%\Projects\LostCity-225-EngineTS\src" | |
| |
===== Content ===== | |
| |
* https://github.com/LostCityRS/Content/commits/225/ | |
| |
"%ProgramFiles%\Git\bin\git.exe" clone --branch "225" --depth "1" --recurse-submodules "https://github.com/LostCityRS/Content.git" "%UserProfile%\Projects\LostCity-225-EngineTS\content" | |
| |
====== Initial Build ====== | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" install | |
| |
CD "%UserProfile%\Projects\LostCity-225-EngineTS\src" && "%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" install --verbose | |
| |
====== Set-up ====== | |
| |
* Set up as a development world | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" run "setup" | |
| |
"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\LostCity-225-EngineTS\src" run "setup" | |
| |
====== Scripts ====== | |
| |
**** | |
| |
MKDIR "%UserProfile%\Projects\LostCity-225-EngineTS\scripts" | |
| |
===== Server Start ===== | |
| |
"notepad.exe" "%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-server-start.bat" | |
| |
<code> | |
@echo off | |
| |
TITLE 2004Scape - Server | |
| |
::"%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" run "quickstart" | |
| |
"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\LostCity-225-EngineTS\src" run "quickstart" | |
| |
:: End</code> | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-server-start.bat" | |
| |
===== Server Update ===== | |
| |
"notepad.exe" "%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-server-update.bat" | |
| |
<code> | |
@echo off | |
| |
TITLE 2004Scape Updater | |
| |
::"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\LostCity-225-EngineTS\src" reset --hard | |
::"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\LostCity-225-EngineTS\src" pull origin "225" --rebase | |
| |
"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\LostCity-225-EngineTS\content" reset --hard | |
"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\LostCity-225-EngineTS\content" pull origin "225" --rebase | |
| |
::"%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" run "clean" | |
::"%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" install | |
::"%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" run "setup" | |
| |
"%ProgramFiles%\nodejs\node.exe" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\LostCity-225-EngineTS\src" run "clean" | |
CD "%UserProfile%\Projects\LostCity-225-EngineTS\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\LostCity-225-EngineTS\src" run "setup" | |
| |
:: End</code> | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-server-update.bat" | |
| |
===== Save Data Back-up ===== | |
| |
"notepad.exe" "%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-save-backup.bat" | |
| |
<code> | |
@echo off | |
| |
"tar.exe" -czf "%UserProfile%\Downloads\%RANDOM%-2004Scape-localhost-Saves.tar.gz" -C "%UserProfile%\Projects\LostCity-225-EngineTS\src\data\players" "main" | |
| |
::COPY /Y "%UserProfile%\Projects\LostCity-225-EngineTS\src\data\players\main\*.sav" "\\Alira\NAS\Games\Saves\2004Scape" | |
| |
:: End</code> | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-save-backup.bat" | |
| |
====== Extras ====== | |
| |
===== Map ===== | |
| |
* https://runescape.wiki/images/June_2004_Map.jpg?35d17 ([[https://runescape.wiki/w/World_map#/media/File:June_2004_Map.jpg|Source]]) | |
* ''781,684 June_2004_Map.jpg'' | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\ext\June_2004_Map.jpg" | |
| |
===== Icon ===== | |
| |
* https://raw.githubusercontent.com/2004Scape/Server/7b0f1ec303dc1f76c7b29a2fff83b5797dafa01b/public/favicon.ico | |
* ''9,662 favicon.ico'' | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\ext\favicon.ico" | |
| |
===== Save Back to Downloads ===== | |
| |
* For Firefox to go back to default ''Downloads'' folder after above downloads | |
* https://raw.githubusercontent.com/2004Scape/Server/7b0f1ec303dc1f76c7b29a2fff83b5797dafa01b/public/favicon.ico | |
| |
"%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 | |
* ''298,185,428 SC55_zzdenis_v0.5.sf2'' | |
| |
MOVE /Y "%UserProfile%\Downloads\SC55_zzdenis_v0.5.sf2" "%UserProfile%\Projects\LostCity-225-EngineTS\ext" | |
| |
DEL /Q "%UserProfile%\Projects\LostCity-225-EngineTS\src\public\client\SCC1_Florestan.sf2" && MKLINK "%UserProfile%\Projects\LostCity-225-EngineTS\src\public\client\SCC1_Florestan.sf2" "%UserProfile%\Projects\LostCity-225-EngineTS\ext\SC55_zzdenis_v0.5.sf2" | |
| |
==== Update Script ==== | |
| |
"notepad.exe" "%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-server-update.bat" | |
| |
<code> | |
:: SC55_zzdenis_v0.5.sf2 | |
| |
DEL /Q "%UserProfile%\Projects\LostCity-225-EngineTS\src\public\client\SCC1_Florestan.sf2" | |
MKLINK "%UserProfile%\Projects\LostCity-225-EngineTS\src\public\client\SCC1_Florestan.sf2" "%UserProfile%\Projects\LostCity-225-EngineTS\ext\SC55_zzdenis_v0.5.sf2" | |
| |
:: SF End</code> | |
| |
===== Login Autofill ===== | |
| |
* [[https://github.com/2004Scape/Server/issues/1498|#1498]] | |
| |
"notepad.exe" "%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-autologin-sed.sh" | |
| |
<code> | |
#!/bin/sh | |
| |
sed -i -e 's/usernameInput="";passwordInput=""/usernameInput="Espionage724";passwordInput="1"/g' ~/'Projects/LostCity-225-EngineTS/src/public/client/client.js' | |
| |
# End</code> | |
| |
==== Update Script ==== | |
| |
"notepad.exe" "%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-server-update.bat" | |
| |
<code> | |
:: Login Autofill | |
| |
"%ProgramFiles%\Git\bin\sh.exe" -- "%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-autologin-sed.sh" | |
| |
:: Autofill End</code> | |
| |
====== Launcher Shortcuts ====== | |
| |
===== Desktop ===== | |
| |
==== Server Start ==== | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-server-start.bat" | |
| |
2004Scape Server | |
| |
==== Client ==== | |
| |
"%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge_proxy.exe" --proxy-server="localhost:80" --kiosk --edge-kiosk-type="public-browsing" --new-window --window-size="820,600" --app="http://localhost:80/rs2.cgi" | |
| |
2004Scape | |
| |
=== Icon === | |
| |
**** | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\ext\favicon.ico" | |
| |
===== Start Menu ===== | |
| |
MKDIR "%AppData%\Microsoft\Windows\Start Menu\Programs\2004Scape" | |
| |
"explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\2004Scape" | |
| |
==== Server Start ==== | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-server-start.bat" | |
| |
Server Start | |
| |
==== Client ==== | |
| |
"%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge_proxy.exe" --proxy-server="localhost:80" --kiosk --edge-kiosk-type="public-browsing" --new-window --window-size="820,600" --app="http://localhost:80/rs2.cgi" | |
| |
2004Scape (localhost) | |
| |
=== Icon === | |
| |
**** | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\ext\favicon.ico" | |
| |
==== Update ==== | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-server-update.bat" | |
| |
Updater | |
| |
==== Save Backup ==== | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\scripts\localhost-save-backup.bat" | |
| |
Save Back-up | |
| |
==== Save Folder ==== | |
| |
MKDIR "%UserProfile%\Projects\LostCity-225-EngineTS\src\data\players" | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\src\data\players" | |
| |
Save Folder | |
| |
==== World Map ==== | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\ext\June_2004_Map.jpg" | |
| |
World Map | |
| |
==== Install Notes ==== | |
| |
"https://wiki.realmofespionage.xyz/games;windows;2004scape_localhost" | |
| |
Install Notes | |
| |
====== Quick Commands ====== | |
| |
===== Execute ===== | |
| |
==== Server ==== | |
| |
**** | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" run "quickstart" | |
| |
==== Client ==== | |
| |
* http://localhost:80/rs2.cgi | |
| |
"%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge_proxy.exe" --proxy-server="localhost:80" --kiosk --edge-kiosk-type="public-browsing" --new-window --window-size="820,600" --app="http://localhost:80/rs2.cgi" | |
| |
===== Update ===== | |
| |
* https://github.com/LostCityRS/Engine-TS/commits/225/ | |
* https://github.com/LostCityRS/Content/commits/225/ | |
| |
"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\LostCity-225-EngineTS\src" reset --hard && "%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\LostCity-225-EngineTS\src" pull origin "225" --rebase && "%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\LostCity-225-EngineTS\content" reset --hard && "%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\LostCity-225-EngineTS\content" pull origin "225" --rebase && "%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" run "clean" && "%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" install && "%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" run "setup" | |
| |
===== Save Data Back-up ===== | |
| |
"tar.exe" -cvzf "%UserProfile%\Downloads\%RANDOM%-2004Scape-localhost-Saves.tar.gz" -C "%UserProfile%\Projects\LostCity-225-EngineTS\src\data\players" "main" | |
| |
"explorer.exe" "%UserProfile%\Projects\LostCity-225-EngineTS\src\data\players" | |
| |
===== bun ===== | |
| |
* Lists available ''bun'' commands | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" run | |
| |
===== Bookmarks ===== | |
| |
* https://github.com/LostCityRS/Engine-TS/commits/225/ | |
* https://github.com/LostCityRS/Content/commits/225/ | |
| |
===== File Manager ===== | |
| |
==== Save Data ==== | |
| |
MKDIR "%UserProfile%\Projects\LostCity-225-EngineTS\src\data\players\main" | |
| |
"explorer.exe" "%UserProfile%\Projects\LostCity-225-EngineTS\src\data\players" | |
| |
====== TODOs ====== | |
| |
===== Settings Test ===== | |
| |
* Last commit: [[https://github.com/LostCityRS/Engine-TS/commit/b582003ba82c5e57e5bf12bc1cf9fc233dac3018|Mar 27, 2025]] ''b582003'' | |
* [[https://github.com/LostCityRS/Engine-TS/commits/225/.env.example|New commits check]] | |
* [[https://github.com/LostCityRS/Engine-TS/blob/225/.env.example|Upstream Settings]] ([[https://raw.githubusercontent.com/LostCityRS/Engine-TS/refs/heads/225/.env.example|raw]]) | |
| |
MKDIR "%UserProfile%\Projects\LostCity-225-EngineTS\conf" | |
| |
"notepad.exe" "%UserProfile%\Projects\LostCity-225-EngineTS\conf\localhost.env" | |
| |
<code> | |
NODE_STAFF=Test | |
NODE_DEBUGPROC_CHAR=: | |
NODE_CLIENT_ROUTEFINDER=false | |
| |
# End</code> | |
| |
"%UserProfile%\Projects\LostCity-225-EngineTS\ext\bun.exe" --cwd="%UserProfile%\Projects\LostCity-225-EngineTS\src" --env-file="%UserProfile%\Projects\LostCity-225-EngineTS\conf\localhost.env" run "quickstart" | |
| |
"%ProgramFiles%\nodejs\node.exe" --env-file="%UserProfile%\Projects\LostCity-225-EngineTS\conf\localhost.env" "%ProgramFiles%\nodejs\node_modules\npm\bin\npm-cli.js" --prefix "%UserProfile%\Projects\LostCity-225-EngineTS\src" run "quickstart" | |
| |
===== Save NAS ===== | |
| |
* Batch to pull non-old ''tar.gz'' from NAS to client/PC ''Downloads'' | |
* Add flat-file sync to NAS in Save batch (no auto tar.gz); above pull straight to ''main'' from NAS | |
| |
===== Node ===== | |
| |
* ''node-v22.16.0-x64.msi'' | |
| |
"%ProgramFiles%\Git\bin\git.exe" clone --rev "0fb09fb0506fd884d82b8fec556a822e69d25e14" --depth "1" --recurse-submodules "https://github.com/LostCityRS/Engine-TS.git" "%UserProfile%\Projects\LostCity-225-EngineTS\src" | |
| |