openvibers/source.openvibe.games QUICK_REFERENCE.md

QUICK_REFERENCE.md

main 3.6 KB · 150 lines · markdown

1# OpenVibe: Source Quick Reference
2
3## Key Paths
4
5```text
6game/openvibe.games/ Source mod folder
7sdk/openvibe/ Tracked OpenVibe C++ patch sources
8engine/source-sdk-2013/ Local ignored Valve SDK checkout
9backend/ Fastify API
10hammer/vmf/ Editable VMF maps
11game/openvibe.games/maps/ Compiled BSP maps
12infra/ Local and production infra templates
13tools/ Build, run, smoke, and map tools
14```
15
16## Build
17
18```bash
19cd ~/src/openvibe-source/backend
20npm run build
21npm test
22```
23
24```bash
25cd ~/src/openvibe-source
26tools/build-sdk-linux.sh
27tools/setup-openvibe-bin.sh
28```
29
30## Run Locally
31
32```bash
33cd ~/src/openvibe-source
34OPENVIBE_SRCDS_MAP_DELAY=3 tools/dev-up.sh
35```
36
37Stop:
38
39```bash
40cd ~/src/openvibe-source
41tools/dev-down.sh
42```
43
44## Smoke Tests
45
46```bash
47cd ~/src/openvibe-source
48node tools/smoke-api.mjs
49OPENVIBE_SRCDS_MAP_DELAY=3 OPENVIBE_SRCDS_SMOKE_TIMEOUT=45 tools/smoke-srcds.sh
50```
51
52Expected 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
65cd ~/src/openvibe-source
66node tools/generate-dev-vmfs.mjs
67tools/compile-dev-maps-wine.sh
68```
69
70Portal pads currently emit direct local connects for the Proton fallback:
71
72```text
73connect 127.0.0.1:27015
74connect 127.0.0.2:27016
75connect 127.0.0.3:27017
76connect 127.0.0.4:27018
77connect 127.0.0.5:27019
78```
79
80Set `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
97curl -s http://127.0.0.1:3000/health | jq
98curl -s http://127.0.0.1:3000/v1/servers | jq
99curl -s http://127.0.0.1:3000/v1/assets/manifest | jq
100curl -s http://127.0.0.1:3000/metrics
101```
102
103Travel request:
104
105```bash
106curl -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
113The working local Linux64 runtime is:
114
115```text
116~/srcds/tf2
117```
118
119The 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
123Set these before real deployment:
124
125```text
126DATABASE_URL
127SESSION_REDIS_URL
128STEAM_WEB_API_KEY
129STEAM_APP_ID
130OPENVIBE_ADMIN_SECRET
131OPENVIBE_CDN_BASE_URL
132```
133
134## Backup
135
136```bash
137cd ~/src/openvibe-source
138tools/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