====== Information ======
* Lost City ''225'' Server + Client
===== Media =====
* [[https://www.youtube.com/watch?v=1ew1fePXCzU|Launcher Presentation Video]]
* [[https://media.realmofespionage.xyz/index/category/2|Progress Pics]]
===== Prerequisites =====
* [[bsd;freebsd_14.2_xfce|FreeBSD 14.2 (Xfce)]]
===== 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
su -
pkg install git-lite openjdk24 npm-node23
====== Download Source ======
===== Engine-TS =====
* https://github.com/LostCityRS/Engine-TS/commits/225/
cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/LostCity-225-EngineTS/src' && git clone --branch '225' --depth '1' --recurse-submodules 'https://github.com/LostCityRS/Engine-TS.git' ~/'Projects/LostCity-225-EngineTS/src' && sync
===== Content =====
* https://github.com/LostCityRS/Content/commits/225/
cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/LostCity-225-EngineTS/content' && git clone --branch '225' --depth '1' --recurse-submodules 'https://github.com/LostCityRS/Content.git' ~/'Projects/LostCity-225-EngineTS/content' && sync
====== Initial Build ======
****
cd ~/'Projects/LostCity-225-EngineTS/src' && npm install --verbose
====== Set-up ======
* Set up as a development world
npm --prefix ~/'Projects/LostCity-225-EngineTS/src' run 'setup'
====== Scripts ======
===== Server Start =====
mkdir -p ~/'Projects/LostCity-225-EngineTS/scripts' && ee ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-start.sh' && chmod +x ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-start.sh'
#!/bin/sh
export _JAVA_OPTIONS='--sun-misc-unsafe-memory-access=allow'
npm --prefix ~/'Projects/LostCity-225-EngineTS/src' run 'start'
# End
~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-start.sh'
===== Server Update =====
mkdir -p ~/'Projects/LostCity-225-EngineTS/scripts' && ee ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh' && chmod +x ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh'
#!/bin/sh
git -C ~/'Projects/LostCity-225-EngineTS/src' reset --hard
git -C ~/'Projects/LostCity-225-EngineTS/src' pull origin '225' --rebase
git -C ~/'Projects/LostCity-225-EngineTS/content' reset --hard
git -C ~/'Projects/LostCity-225-EngineTS/content' pull origin '225' --rebase
npm --prefix ~/'Projects/LostCity-225-EngineTS/src' install
npm --prefix ~/'Projects/LostCity-225-EngineTS/src' run 'setup'
# Custom SoundFont
# SF End
notify-send -i ~/'Projects/LostCity-225-EngineTS/content/textures/painting2.png' '2004Scape localhost server update complete'
# End
~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh'
===== Save Data Back-up =====
mkdir -p ~/'Projects/LostCity-225-EngineTS/scripts' && ee ~/'Projects/LostCity-225-EngineTS/scripts/localhost-save-backup.sh' && chmod +x ~/'Projects/LostCity-225-EngineTS/scripts/localhost-save-backup.sh'
#!/bin/sh
tar -czf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-LostCity-225-localhost-Saves.tar.gz' -C ~/'Projects/LostCity-225-EngineTS/src/data/players' 'main'
notify-send -i ~/'Projects/LostCity-225-EngineTS/content/textures/painting2.png' '2004Scape Save Data Backed-up Successfully to Downloads'
# End
~/'Projects/LostCity-225-EngineTS/scripts/localhost-save-backup.sh'
====== Extras ======
===== Map =====
* https://runescape.wiki/images/June_2004_Map.jpg?35d17 ([[https://runescape.wiki/w/World_map#/media/File:June_2004_Map.jpg|Source]])
rm -f '/tmp/June_2004_Map.jpg' && mkdir -p ~/'Projects/LostCity-225-EngineTS/ext' && wget -O '/tmp/June_2004_Map.jpg' 'https://runescape.wiki/images/June_2004_Map.jpg?35d17' && sha384sum '/tmp/June_2004_Map.jpg' | grep 'abfdfe4597975addbb9d79d2cce2e56f0054f2742f351bd9dc700f55e91157e6c2142749f113927b027ed42efb8ad833' > '/dev/null' && mv -f '/tmp/June_2004_Map.jpg' ~/'Projects/LostCity-225-EngineTS/ext/June_2004_Map.jpg'
===== SC55_zzdenis SoundFont =====
* [[https://lostcity.rs/t/different-soundfonts-midi/4861|Lost City Forums]] ([[https://www.youtube.com/watch?v=mVPLVDXJjUY|Video]])
* 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
* ''298185428 SC55_zzdenis_v0.5.sf2''
* :!: Increases browser RAM usage notably
mkdir -p ~/'Projects/LostCity-225-EngineTS/ext' && sha384sum ~/'Downloads/SC55_zzdenis_v0.5.sf2' | grep 'f386f638777072fc220e39afbd7efcd227ca2bfcf13403bf47fbb2e2b8f4d151239710cc36c8530a75c3b4c3f55066b7' > '/dev/null' && mv -f ~/'Downloads/SC55_zzdenis_v0.5.sf2' ~/'Projects/LostCity-225-EngineTS/ext'
ee ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh'
ln -s -f ~/'Projects/LostCity-225-EngineTS/ext/SC55_zzdenis_v0.5.sf2' ~/'Projects/LostCity-225-EngineTS/src/public/client/SCC1_Florestan.sf2'
ls -la ~/'Projects/LostCity-225-EngineTS/src/public/client/SCC1_Florestan.sf2'
====== Desktop Launcher ======
===== 2004Scape =====
mkdir -p ~/'.local/share/applications' && ee ~/'.local/share/applications/lostcity-225-localhost.desktop' && sed -i -e 's/'CHANGEME'/'$USER'/g' ~/'.local/share/applications/lostcity-225-localhost.desktop' && update-desktop-database --quiet ~/'.local/share/applications'
[Desktop Entry]
Name=2004Scape
Categories=Game;
Exec='/bin/sh' -c "gio open 'http://localhost:8888/rs2.cgi'"
Type=Application
StartupNotify=false
Icon=/home/CHANGEME/Projects/LostCity-225-EngineTS/content/textures/painting2.png
Actions=Map;Server;Update;Saves-Backup;Saves-Folder;Updates-Check;Notes;
[Desktop Action Map]
StartupNotify=false
Exec='/bin/sh' -c "gio open ~/'Projects/LostCity-225-EngineTS/ext/June_2004_Map.jpg'"
Name=World Map
[Desktop Action Server]
Exec='/bin/sh' -c "xfce4-terminal -T '2004Scape - Server' -I ~/'Projects/LostCity-225-EngineTS/content/textures/painting2.png' -e ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-start.sh'"
Name=Start Server
[Desktop Action Update]
Exec='/bin/sh' -c "xfce4-terminal -T '2004Scape - Updater' -I ~/'Projects/LostCity-225-EngineTS/content/textures/painting2.png' -e ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh'"
Name=Server Update
[Desktop Action Saves-Backup]
StartupNotify=false
Exec='/bin/sh' -c "~/'Projects/LostCity-225-EngineTS/scripts/localhost-save-backup.sh'"
Name=Save Data Back-up
[Desktop Action Saves-Folder]
StartupNotify=false
Exec='/bin/sh' -c "gio open ~/'Projects/LostCity-225-EngineTS/src/data/players'"
Name=Open Saves Folder
[Desktop Action Updates-Check]
StartupNotify=false
Exec='/bin/sh' -c "gio open 'https://github.com/LostCityRS/Engine-TS/commits/225/' 'https://github.com/LostCityRS/Content/commits/225/'"
Name=Commits Check
[Desktop Action Notes]
StartupNotify=false
Exec='/bin/sh' -c "gio open 'https://wiki.realmofespionage.xyz/games:bsd:lostcity_225_localhost'"
Name=Installation Notes
# End
====== Quick Commands ======
===== Execute =====
* http://localhost:8888/rs2.cgi
_JAVA_OPTIONS='--sun-misc-unsafe-memory-access=allow' npm --prefix ~/'Projects/LostCity-225-EngineTS/src' run 'start'
===== Update =====
* https://github.com/LostCityRS/Engine-TS/commits/225/
* https://github.com/LostCityRS/Content/commits/225/
git -C ~/'Projects/LostCity-225-EngineTS/src' reset --hard && git -C ~/'Projects/LostCity-225-EngineTS/src' pull origin '225' --rebase && git -C ~/'Projects/LostCity-225-EngineTS/content' reset --hard && git -C ~/'Projects/LostCity-225-EngineTS/content' pull origin '225' --rebase && npm --prefix ~/'Projects/LostCity-225-EngineTS/src' install && npm --prefix ~/'Projects/LostCity-225-EngineTS/src' run 'setup'
===== Save Data Back-up =====
****
tar -cvzf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-LostCity-225-localhost-Saves.tar.gz' -C ~/'Projects/LostCity-225-EngineTS/src/data/players' 'main'
===== File Manager =====
==== Saves ====
****
mkdir -p ~/'Projects/LostCity-225-EngineTS/src/data/players' && gio open ~/'Projects/LostCity-225-EngineTS/src/data/players'