sv_neo_wep_xp_override cheat, includes fix for detpack loadout grant - #2082
Open
sunmachine wants to merge 3 commits into
Open
sv_neo_wep_xp_override cheat, includes fix for detpack loadout grant #2082sunmachine wants to merge 3 commits into
sv_neo_wep_xp_override cheat, includes fix for detpack loadout grant #2082sunmachine wants to merge 3 commits into
Conversation
sunmachine
force-pushed
the
xp-override-debugging-cvar
branch
from
August 20, 2026 04:19
7f0e608 to
b268a1d
Compare
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
force-pushed
the
xp-override-debugging-cvar
branch
from
August 21, 2026 06:01
b268a1d to
f601aa6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The commits in order:
sv_neo_wep_xp_overridefor testing XP-gated weapon behavior without grinding XP.sv_neo_ignore_wep_xp_limitinto the same mechanism.Note
Follow-up: sunmachine/ntre-dev // Check loadout XP eligibility before creating weapon entities - #3
The new cheat
sv_neo_wep_xp_overrideis bidirectional (a value below your real XP locks weapons, useful for testing the locked path), never mutatesm_iXP, and leaves scoreboard/rank display untouched. It is consolidated withsv_neo_ignore_wep_xp_limit.Detpack consistency fix: the recon path hardcoded
m_iXP >= 4before callingGiveDet, sosv_neo_detpack_xp_limithad no effect the detpack being granted. The convar is now the single source of truth, checked at the top ofGiveDetbefore 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_limitconsolidation: This commit is separable if the wider scope is unwanted, but I'll argue it's consistency without breaking existing workflows.Testing
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
Linked Issues