Promouvoir serveur

Add 2 tutorials (2 files)

Browse Source
Daemon666 committed parent 0ec9d95a06 commit b37b5c0aa21a964bad0fb9b882476b041ab9e437
2 changed files with 112 additions and 0 deletions
+51 -0 fix-model-overflow-precache/en.md A
@@ -0,0 +1,51 @@
1 +---
2 +title: "Fix: 'PF_precache_model: Model overflow'"
3 +excerpt: "Why the engine aborts with PF_precache_model: Model overflow, how the fixed precache table works, and how to find and cut the plugin or map that blew the limit."
4 +category: "errors"
5 +tags: "precache, models"
6 +image: ""
7 +read_time: "8 min read"
8 +---
9 +<p><code>PF_precache_model: Model overflow</code> is the engine telling you it ran out of model precache slots. The Half-Life engine reserves a fixed-size table for models that must be registered before the map starts sending entities; when the number of distinct models a map plus its plugins try to precache exceeds that table, the server aborts at map load. It is a hard ceiling, not a leak, so the fix is always "precache fewer models" — the skill is finding which plugin is greedy.</p>
10 +
11 +<h2>1. Understand the limit you hit</h2>
12 +<p>The engine's model precache table holds a fixed number of entries (the classic limit is 512, and the sound table has its own separate limit that throws <code>PF_precache_sound: Sound overflow</code>). Every player model, weapon model, sprite used as a model, and every custom model a plugin registers with <code>precache_model</code> consumes one slot. When the total crosses the ceiling the engine cannot continue and prints the overflow before dropping the map.</p>
13 +
14 +<h2>2. Read where it crashed</h2>
15 +<p>The line right before the overflow in the console or <code>addons/amxmodx/logs/</code> usually names the model being precached when the table filled. That is not always the culprit — it is just the straw — but it tells you which subsystem was precaching at the time (a skins plugin, a bots pack, a shop with dozens of model rewards, a zombie mod with many class models).</p>
16 +
17 +<h2>3. Blame the map or the plugins, and split them</h2>
18 +<p>Load the same map with plugins disabled to see whether the map alone is over budget:</p>
19 +<pre>amxx pause GamePlugins
20 +changelevel de_dust2</pre>
21 +<p>If a bare map loads and only overflows once plugins are active, it is a plugin. If a specific custom map overflows even with plugins off, that map ships too many models and no amount of plugin trimming will save it on that map. Use <a href="/tutorials/find-crashing-plugin">the plugin-isolation method</a> to bisect which plugin pushes it over.</p>
22 +
23 +<h2>4. The usual heavy precachers</h2>
24 +<ul>
25 +<li><strong>Player-model / skins plugins</strong> that precache a model per team per class — dozens of slots.</li>
26 +<li><strong>Zombie/biohazard modes</strong> with many zombie and human class models plus knife/claw models.</li>
27 +<li><strong>Shops and VIP systems</strong> that precache every possible reward model at map start instead of on demand.</li>
28 +<li><strong>Bot packs</strong> (podbot/ZBot custom models) that add their own model set.</li>
29 +</ul>
30 +<p>The cheapest win is trimming a model list you control: fewer skins, fewer shop models, or making a plugin precache only the models actually enabled by its cvars.</p>
31 +
32 +<h2>5. Cut the count</h2>
33 +<p>Once you know the plugin, reduce what it registers. For a config-driven skins or shop plugin that usually means editing its model list and removing entries you do not need:</p>
34 +<pre>// example: a models config that lists one line per precached model
35 +// trim it to the models you actually use
36 +models/player/leet/leet.mdl
37 +models/player/gign/gign.mdl</pre>
38 +<p>If two plugins each precache the same shared model, deduplicating helps — but only if they truly reference the identical path, because the engine counts distinct paths. There is no cvar that raises the 512 limit on stock HLDS; running <a href="/tutorials/install-rehlds-on-linux">ReHLDS</a> gives you a more robust engine but does not hand you unlimited model slots, so the discipline is the same.</p>
39 +
40 +<h2>Common errors</h2>
41 +<ul>
42 +<li><strong>Overflow only on one custom map</strong> — that map ships too many models; the fix is on the map, not the server. Try it with all plugins off to confirm.</li>
43 +<li><strong><code>PF_precache_sound: Sound overflow</code></strong> — same story, different table. A sounds/ambience or roundsound-heavy plugin is registering too many sounds.</li>
44 +<li><strong>Crash appears only after you added a plugin</strong> — that plugin's model list tipped you over an already-near-full table. Trim it or an existing one.</li>
45 +<li><strong>Precaching a model that does not exist</strong> — this throws a different error (missing file), not overflow, but people confuse the two. Overflow is about count, not a bad path.</li>
46 +</ul>
47 +
48 +<h2>Verification</h2>
49 +<p>After trimming, load your heaviest map (the one with the most custom content) with the full plugin set enabled:</p>
50 +<pre>changelevel your_heaviest_map</pre>
51 +<p>If the map loads cleanly and players spawn with correct models, you are back under the ceiling. Give yourself headroom — get comfortably below the limit, not one model under it, because the next map or the next plugin will otherwise put you right back into the overflow. If the server still aborts at map start for a different reason, isolate it with <a href="/tutorials/find-crashing-plugin">the crashing-plugin guide</a>.</p>
+61 -0 fix-server-only-visible-on-lan/en.md A
@@ -0,0 +1,61 @@
1 +---
2 +title: "Fix: Server Only Visible on LAN, Not on the Internet"
3 +excerpt: "Your server shows up on LAN but not in the internet list. Nine times out of ten it is sv_lan 1, a blocked UDP port, or the server never heartbeating the master. Full checklist."
4 +category: "errors"
5 +tags: "sv_lan, listing"
6 +image: ""
7 +read_time: "8 min read"
8 +---
9 +<p>The server runs, LAN players can join, but it never appears in the internet server browser. There are only a few real causes: <code>sv_lan</code> is set to 1, the server never reaches the Steam master server, or UDP&nbsp;27015 is not open to the internet. Work the checklist top to bottom.</p>
10 +
11 +<h2>1. sv_lan must be 0</h2>
12 +<p>With <code>sv_lan 1</code> the engine never heartbeats the master list and rejects internet clients with a LAN error. Set it in <code>server.cfg</code>:</p>
13 +<pre>sv_lan 0</pre>
14 +<p>Then verify it actually took &mdash; read it back in the console:</p>
15 +<pre>sv_lan</pre>
16 +<p>It must print <code>"sv_lan" is "0"</code>. If it prints <code>1</code>, something is overriding it; you may be passing <code>+sv_lan 1</code> on the command line, or a later config resets it. See <a href="/tutorials/fix-server-cfg-not-executing">why server.cfg settings do not apply</a>.</p>
17 +
18 +<h2>2. Force a heartbeat and watch</h2>
19 +<p>The server announces itself to the master by heartbeating. Trigger one manually:</p>
20 +<pre>heartbeat</pre>
21 +<p>If nothing leaves the box, the server is not talking to the master at all &mdash; check the firewall (step 3) and that outbound UDP is not blocked. A server that heartbeats but still never lists is usually a NAT/port-reachability problem (step 4).</p>
22 +
23 +<h2>3. Open UDP 27015 inbound</h2>
24 +<p>The internet list only shows servers the master can reach back on their game port. UDP&nbsp;27015 must be open <strong>inbound</strong>:</p>
25 +<pre>sudo ufw allow 27015/udp
26 +sudo ufw allow 27015/tcp</pre>
27 +<p>On Windows:</p>
28 +<pre>New-NetFirewallRule -DisplayName "HLDS UDP 27015" -Direction Inbound -Protocol UDP -LocalPort 27015 -Action Allow</pre>
29 +<p>Many cloud providers also have a separate security-group/firewall in their control panel &mdash; the OS firewall being open does not help if the provider blocks the port upstream. Open UDP&nbsp;27015 there too.</p>
30 +
31 +<h2>4. NAT / port forwarding</h2>
32 +<p>If the server is at home behind a router, forward UDP&nbsp;27015 (and TCP&nbsp;27015 for RCON) to the machine's LAN IP. Without a forward, the master server's reachability probe never arrives and the server is dropped from the list even though it heartbeats. Bind explicitly so there is no ambiguity:</p>
33 +<pre>./hlds_run -game cstrike -ip 0.0.0.0 -port 27015 +sv_lan 0 +map de_dust2 +maxplayers 20</pre>
34 +
35 +<h2>5. Confirm the port is really listening</h2>
36 +<pre>ss -lunp | grep 27015 # Linux
37 +netstat -ano | findstr 27015 # Windows</pre>
38 +<p>You must see <code>hlds_linux</code> / <code>hlds.exe</code> bound to <code>*:27015</code> UDP. If it is bound to <code>127.0.0.1:27015</code> instead of <code>0.0.0.0</code>, it is only reachable locally &mdash; add <code>-ip 0.0.0.0</code>.</p>
39 +
40 +<h2>6. The 2023 anniversary update and master servers</h2>
41 +<p>The 2023 25th-Anniversary update changed the Steam client and broke a lot of older server setups' visibility. If you run a very old HLDS build, update it, or move to <a href="/tutorials/install-rehlds-on-linux">ReHLDS</a>, which tracks the current master-server behaviour. Players stuck on old clients can roll back to the <code>steam_legacy</code> beta branch. For non-Steam players to see and join, you additionally need <a href="/tutorials/install-metamod-r">Metamod-r</a> plus Reunion (ReHLDS) or dproto (HLDS) &mdash; without one of those, non-Steam clients cannot authenticate and will not list the server for their community.</p>
42 +
43 +<h2>7. sv_region and community lists</h2>
44 +<p>Set <code>sv_region</code> so the server appears under the correct geographic filter in the browser; a wrong region hides you from players who filter by their own:</p>
45 +<pre>// 0 US East, 1 US West, 2 South America, 3 Europe,
46 +// 4 Asia, 5 Australia, 6 Middle East, 7 Africa, 255 world
47 +sv_region 3</pre>
48 +<p>Non-Steam communities often rely on their own game trackers rather than the Steam master. If your audience is non-Steam and you have Reunion/dproto working, make sure the server also heartbeats whatever community master your player base uses; those lists are populated independently of Steam and a server can be present on one and absent from the other.</p>
49 +
50 +<h2>Common errors</h2>
51 +<ul>
52 +<li><strong>Visible on LAN, never on internet</strong> &mdash; <code>sv_lan 1</code>, or UDP&nbsp;27015 blocked upstream by the provider.</li>
53 +<li><strong>Heartbeat sends but no listing</strong> &mdash; NAT with no port forward, or the provider firewall blocks the return probe.</li>
54 +<li><strong>Server bound to 127.0.0.1</strong> &mdash; add <code>-ip 0.0.0.0</code>.</li>
55 +<li><strong>Lists briefly then vanishes</strong> &mdash; intermittent packet loss or the server crashing/restarting; check the log.</li>
56 +</ul>
57 +
58 +<h2>Verification</h2>
59 +<p>From a machine <em>outside</em> your LAN (mobile hotspot works), open the console and:</p>
60 +<pre>connect YOUR_PUBLIC_IP:27015</pre>
61 +<p>If you connect and spawn, the port is reachable from the internet and the only remaining question is the master listing &mdash; which, with <code>sv_lan 0</code> and a reachable port, follows within a minute. Add the server to the internet <em>favorites</em> by IP as a fallback while the master catches up.</p>
0 62