openvibers/source.openvibe.games QUICK_REFERENCE.md
QUICK_REFERENCE.md
| 1 | # OpenVibe: Source Quick Reference |
| 2 | |
| 3 | ## Key Paths |
| 4 | |
| 5 | ```text |
| 6 | game/openvibe.games/ Source mod folder |
| 7 | sdk/openvibe/ Tracked OpenVibe C++ patch sources |
| 8 | engine/source-sdk-2013/ Local ignored Valve SDK checkout |
| 9 | backend/ Fastify API |
| 10 | hammer/vmf/ Editable VMF maps |
| 11 | game/openvibe.games/maps/ Compiled BSP maps |
| 12 | infra/ Local and production infra templates |
| 13 | tools/ Build, run, smoke, and map tools |
| 14 | ``` |
| 15 | |
| 16 | ## Build |
| 17 | |
| 18 | ```bash |
| 19 | cd ~/src/openvibe-source/backend |
| 20 | npm run build |
| 21 | npm test |
| 22 | ``` |
| 23 | |
| 24 | ```bash |
| 25 | cd ~/src/openvibe-source |
| 26 | tools/build-sdk-linux.sh |
| 27 | tools/setup-openvibe-bin.sh |
| 28 | ``` |
| 29 | |
| 30 | ## Run Locally |
| 31 | |
| 32 | ```bash |
| 33 | cd ~/src/openvibe-source |
| 34 | OPENVIBE_SRCDS_MAP_DELAY=3 tools/dev-up.sh |
| 35 | ``` |
| 36 | |
| 37 | Stop: |
| 38 | |
| 39 | ```bash |
| 40 | cd ~/src/openvibe-source |
| 41 | tools/dev-down.sh |
| 42 | ``` |
| 43 | |
| 44 | ## Smoke Tests |
| 45 | |
| 46 | ```bash |
| 47 | cd ~/src/openvibe-source |
| 48 | node tools/smoke-api.mjs |
| 49 | OPENVIBE_SRCDS_MAP_DELAY=3 OPENVIBE_SRCDS_SMOKE_TIMEOUT=45 tools/smoke-srcds.sh |
| 50 | ``` |
| 51 | |
| 52 | Expected SRCDS output: |
| 53 | |
| 54 | ```text |
| 55 | [srcds:hub] ok (ov_hub) |
| 56 | [srcds:prophunt] ok (ph_openvibe_dev) |
| 57 | [srcds:deathrun] ok (dr_openvibe_dev) |
| 58 | [srcds:fortwars] ok (fw_openvibe_dev) |
| 59 | [srcds:traitortown] ok (tt_openvibe_dev) |
| 60 | ``` |
| 61 | |
| 62 | ## Maps |
| 63 | |
| 64 | ```bash |
| 65 | cd ~/src/openvibe-source |
| 66 | node tools/generate-dev-vmfs.mjs |
| 67 | tools/compile-dev-maps-wine.sh |
| 68 | ``` |
| 69 | |
| 70 | Portal pads currently emit direct local connects for the Proton fallback: |
| 71 | |
| 72 | ```text |
| 73 | connect 127.0.0.1:27015 |
| 74 | connect 127.0.0.2:27016 |
| 75 | connect 127.0.0.3:27017 |
| 76 | connect 127.0.0.4:27018 |
| 77 | connect 127.0.0.5:27019 |
| 78 | ``` |
| 79 | |
| 80 | Set `OPENVIBE_USE_OV_JOIN=1` before regenerating VMFs to bake authenticated `ov_join <mode>` portal commands for a rebuilt custom client DLL. |
| 81 | |
| 82 | ## Client / Server Commands |
| 83 | |
| 84 | | Command | Side | Purpose | |
| 85 | | --- | --- | --- | |
| 86 | | `ov_join <mode>` | Client | Request travel token and connect to server. | |
| 87 | | `ov_auth_steam` | Client | Send Steam Web API ticket to backend auth. | |
| 88 | | `openvibe_menu` / `ov_menu` | Client | Open OpenVibe VGUI menu. | |
| 89 | | `ov_open_url <url>` | Client | Open OpenVibe web page in Steam/browser. | |
| 90 | | `ov_prophunt_disguise <model>` | Server | Apply allowlisted prop disguise. | |
| 91 | | `ov_prophunt_reset_disguise` | Server | Restore player model. | |
| 92 | | `ov_fortwars_spawn <type>` | Server | Spawn allowlisted build prop. | |
| 93 | |
| 94 | ## API |
| 95 | |
| 96 | ```bash |
| 97 | curl -s http://127.0.0.1:3000/health | jq |
| 98 | curl -s http://127.0.0.1:3000/v1/servers | jq |
| 99 | curl -s http://127.0.0.1:3000/v1/assets/manifest | jq |
| 100 | curl -s http://127.0.0.1:3000/metrics |
| 101 | ``` |
| 102 | |
| 103 | Travel request: |
| 104 | |
| 105 | ```bash |
| 106 | curl -s http://127.0.0.1:3000/v1/travel/request \ |
| 107 | -H 'Content-Type: application/json' \ |
| 108 | -d '{"steamId":"76561198000000000","mode":"prophunt"}' | jq |
| 109 | ``` |
| 110 | |
| 111 | ## SRCDS Runtime |
| 112 | |
| 113 | The working local Linux64 runtime is: |
| 114 | |
| 115 | ```text |
| 116 | ~/srcds/tf2 |
| 117 | ``` |
| 118 | |
| 119 | The installed Source SDK Base 2013 Dedicated Server directory in `/mnt/6tb/...` contains Windows server binaries in this environment, so it is not used for the Linux64 smoke tests. |
| 120 | |
| 121 | ## Production Values |
| 122 | |
| 123 | Set these before real deployment: |
| 124 | |
| 125 | ```text |
| 126 | DATABASE_URL |
| 127 | SESSION_REDIS_URL |
| 128 | STEAM_WEB_API_KEY |
| 129 | STEAM_APP_ID |
| 130 | OPENVIBE_ADMIN_SECRET |
| 131 | OPENVIBE_CDN_BASE_URL |
| 132 | ``` |
| 133 | |
| 134 | ## Backup |
| 135 | |
| 136 | ```bash |
| 137 | cd ~/src/openvibe-source |
| 138 | tools/backup-postgres.sh |
| 139 | ``` |
| 140 | |
| 141 | ## Common Fixes |
| 142 | |
| 143 | | Issue | Fix | |
| 144 | | --- | --- | |
| 145 | | API port still busy | `tools/dev-down.sh`, then check for leftover OpenVibe processes. | |
| 146 | | Server says map missing | Re-run `tools/compile-dev-maps-wine.sh`. | |
| 147 | | Game DLLs stale | Run `tools/build-sdk-linux.sh` then `tools/setup-openvibe-bin.sh`. | |
| 148 | | Hammer++ launch fails in Lutris | Use Steam non-game entry with Proton Experimental. | |
| 149 | | Steam auth returns 501 | Set `STEAM_WEB_API_KEY` and `STEAM_APP_ID`. | |
| 150 |