Skip to content

sv_neo_wep_xp_override cheat, includes fix for detpack loadout grant - #2082

Open
sunmachine wants to merge 3 commits into
NeotokyoRebuild:masterfrom
sunmachine:xp-override-debugging-cvar
Open

sv_neo_wep_xp_override cheat, includes fix for detpack loadout grant #2082
sunmachine wants to merge 3 commits into
NeotokyoRebuild:masterfrom
sunmachine:xp-override-debugging-cvar

Conversation

@sunmachine

@sunmachine sunmachine commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

The commits in order:

  1. Adds a debugging cheat cvar sv_neo_wep_xp_override for testing XP-gated weapon behavior without grinding XP.
  2. Fixes the detpack loadout grant ignoring its existing convar.
  3. Consolidates sv_neo_ignore_wep_xp_limit into the same mechanism.

The new cheat sv_neo_wep_xp_override is bidirectional (a value below your real XP locks weapons, useful for testing the locked path), never mutates m_iXP, and leaves scoreboard/rank display untouched. It is consolidated with sv_neo_ignore_wep_xp_limit.

Detpack consistency fix: the recon path hardcoded m_iXP >= 4 before calling GiveDet, so sv_neo_detpack_xp_limit had no effect the detpack being granted. The convar is now the single source of truth, checked at the top of GiveDet before the weapon entity is created, preserving the old gate's property that ineligible spawns never pay an entity create/destroy cycle.

sv_neo_ignore_wep_xp_limit consolidation: This commit is separable if the wider scope is unwanted, but I'll argue it's consistency without breaking existing workflows.

Testing

sv_cheats 1; sv_neo_wep_xp_override 20; bot_class 0

All loadout tiers unlock from round one and Recon bots spawn with detpacks. Values apply on next spawn (loadouts and bot weapon choices are decided at spawn time); reopen the loadout menu after changing the value to refresh button states. Verified in-game on the toolchain below.

Toolchain

  • Linux GCC 10 Sniper 3.0

Linked Issues

Adds a replicated cheat cvar that overrides the effective XP used in
weapon eligibility checks, so any rank tier can be tested without
grinding XP. Applied at the loadout menu count, both server-side
loadout validations, and bot weapon selection.

Bot profile weapon-bit validation is left untouched since it validates
per-rank config rather than a specific player's XP. Note that bots
choose their loadout at spawn, so a mid-round change applies from the
next spawn onward.
The recon spawn path hardcoded an XP >= 4 check before calling
GiveDet, so raising or lowering sv_neo_detpack_xp_limit had no effect
on whether the detpack was actually granted. Replace the hardcoded
gate with an eligibility check at the top of GiveDet that reads the
convar directly, making it the single source of truth.

The check runs before the weapon entity is created, preserving the
old gate's property that ineligible spawns never pay a create/destroy
cycle. GiveDet's old internal cost check, which created the entity
first to reach GetNeoWepXPCost, is dropped in its favor. The check
routes through GetEffectiveXP so sv_neo_wep_xp_override covers the
detpack as well.
Reimplement the cvar inside GetEffectiveXP as an effective max rank
(XP_LIEUTENANT) instead of scattered bypass checks. This removes the
two redundant call-site checks in neo_player.cpp and the unused extern
in the loadout menu.

Behavior change, wider scope on purpose: the cvar previously bypassed
only the two server-side loadout validations, and the loadout menu
never honored it, so locked tiers stayed unclickable and it only
worked via a typed loadout command. It now also unlocks the menu UI,
bot weapon selection, and the recon detpack grant, matching what its
description already claims. It takes precedence over
sv_neo_wep_xp_override when both are set.
@sunmachine
sunmachine force-pushed the xp-override-debugging-cvar branch from b268a1d to f601aa6 Compare August 21, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant