Skip to Content
PAPAMO / DOCS
Cosmetics

Runtime V/P/W models

Load local first-person, held and dropped cosmetic models without consuming server precache slots.

The opportunity

GoldSrc's traditional model table has a finite server precache budget, commonly 512 model entries. A managed client can load a cosmetic model through its native model loader and substitute it locally in first-person (v_), held/player (p_) and dropped/world (w_) draw paths without adding that model to the server's precache table.

This can let a managed client display a much larger cosmetic collection over time. It does not expand the server's model table or remove every GoldSrc resource limit.

What has been demonstrated?

Native Linux x86 GoldSrc build 10211 has recorded runtime tests for all three draw paths:

Draw pathObserved result
v_ first-personCustom knife loaded after map start, switched off/on; server model index remained 191
p_ held/playerCustom knife replaced a bot's held knife, switched off/on; server weapon model index remained 131
w_ dropped/worldCustom dropped Deagle model switched off/on; server model index remained 94

The P/W tests used debug controls in private sessions. They demonstrate local runtime substitution after map load, not a completed production pipeline for every weapon, host or late-joining player. The recorded Windows test also demonstrated an unprecached first-person knife. Windows P/W, NextClient P/W, dynamic player/item mapping, drop/pickup continuity and map transitions need their own runtime validation.

Approved delivery flow

  1. The backend decides the player's entitlement and required cosmetic recipe.
  2. The launcher fetches its approved manifest and immutable assets.
  3. Paths are constrained to approved roots and SHA-256 hashes are verified.
  4. The native worker prepares the authorized catalog for the session.
  5. The server selects a recipe already in that catalog.
  6. The native draw path validates session, endpoint, source model and sequence before substituting local presentation.
  7. Missing/unknown/expired selections retain the normal model.

The server's entity model index stays authoritative. A cosmetic selector never submits results, grants ownership or changes gameplay rules.

AMXX recipe interface

Download papamo_cosmetics.inc.

#include <papamo_cosmetics>

// In plugin_init:
papamo_cosmetics_init();

// Once your platform has authorized/staged this exact recipe:
papamo_cosmetics_select(id, verifiedRecipeId);

// Return to normal presentation:
papamo_cosmetics_select(id, "");

verifiedRecipeId is a 32-character lowercase hexadecimal recipe ID, not a model path, skin UUID, signing key or arbitrary hash of your choosing. It must match a recipe already staged by the approved launcher pipeline for this player/session and source weapon.

The existing 16CSticker protocol is used for these verified recipes. Refresh selection every 250ms while applicable; native selection expires after 750ms. papamo_cosmetics_available(id) reports recent capability only. Unknown recipes fail closed even if the server sends them. Avoid multiple plugins writing this selector for one player.

The .inc selector does not create a partner entitlement API or authorize new recipe manifests. A platform needs an approved backend/launcher integration before using its own assets. Source delivery and signing remain separately controlled.

What still needs server precache?

The server's own entity models and ordinary stock/web client paths still use models supported and precached by the active map/server. Managed viewers can render local v_, p_ and w_ replacements when they have the verified assets and correct player/weapon/entity mapping. Every viewer needs that integration to see the same cosmetic; a local replacement does not change the server model table or transmit an appearance to other clients. Keep a stock fallback.

The client still has memory, model-format, texture-size and rendering budgets. Load approved content in bounded amounts, reuse cached assets and validate on low-end hardware.