RPG Xdocumentation About RPG X

Server settings

Every convar, with its default and what it does.

All of these go in garrysmod/cfg/server.cfg. On a listen server they also show up in the gamemode's settings when starting a game.

Convar Default What it does
rpgx_localchat_range 1024 How far local chat reaches, in units.
rpgx_voice_range 1024 How far voice chat reaches, in units. Voices fade out smoothly towards the edge.
rpgx_voice_global 0 1 = everyone hears everyone at full volume, ignoring rpgx_voice_range.
rpgx_inventory_slots 20 Inventory slots per player (1-200). Per-player sizes override it, see Inventory.
rpgx_hotbar_slots 9 How many of the inventory's first slots are the hotbar (1-10: keys 1-9 and 0).
rpgx_pve 1 1 = PvE only: players can't hurt other players (directly, with explosives, or with a vehicle they drive). They can still hurt themselves. 0 = PvP.
rpgx_falldamage_safe_height 240 Falls up to this height (units) do no damage. About 6 m (1 unit is about an inch at player scale).
rpgx_falldamage_fatal_height 1200 A fall from this height does 100 damage (about 30 m). Damage rises evenly with height in between, and keeps rising past it.
rpgx_enemy_activation_range 3000 A spawn point only spawns while a player is this close (units).
rpgx_enemy_idle_despawn 60 Seconds without a player near before a point's enemy is removed.
rpgx_enemy_health_per_level 0.1 Extra enemy health per level above 1 (0.1 = +10% per level).
rpgx_enemy_damage_per_level 0.1 Extra enemy damage per level above 1.
rpgx_enemy_max_alive 0 Most spawn point enemies alive at once on the map. 0 = no limit.
rpgx_enemy_hunt_time 30 Seconds a shot enemy (and its hive) keeps knowing where the shooter is, even out of sight. 0 = told once.
rpgx_hive_alert_on_kill 1 1 = a hive learns who killed one of its enemies even with one shot. 0 = a clean kill goes unnoticed.
rpgx_death_drop 1 1 = a player's whole inventory drops in a container when they die. 0 = they keep it.
rpgx_death_container_model models/props_junk/cardboard_box003a.mdl The prop it drops in: the model path the Q menu shows when you hover a prop. An invalid one falls back to the default.
rpgx_death_container_lifetime 0 Seconds before an untouched dropped inventory disappears. 0 = never (the default).
rpgx_server_corpse_time 30 Only with sandbox's "Keep corpses" on: seconds before a corpse fades away. 0 = never. Otherwise each player sets it themselves, see Corpses.
rpgx_stamina_*, rpgx_mana_* Pool sizes, refilling and training; see Stamina and mana.
rpgx_level_max 100 The highest level a player can reach.
rpgx_skill_points_per_level 1 Skill points for every level up.
rpgx_skill_bonus_stamina, rpgx_skill_bonus_mana 10 Max stamina / mana per level of the Bonus stamina / Bonus mana skill.
rpgx_combat_timeout 10 Seconds without attacking, dealing or taking damage before a player is out of combat (nothing refills in combat; reloading pauses it).
rpgx_weapon_resource stamina What guns' shots cost, unless a gun is set otherwise: a resource (stamina, mana, an addon's) or none.
rpgx_weapon_cost 1 How much of it each round fired costs, unless a gun is set otherwise.
rpgx_weapon_spare_magazine 1 1 = a gun's spare ammo is always exactly one magazine.
rpgx_quest_sync 30 MySQL only: how often (seconds) to check whether another server sharing the database changed the quests or givers, and reload them if so. 0 = never.

For scale: a player is 72 units tall, so 1024 units is roughly 14 player heights (about 20 m).

Example server.cfg:

rpgx_localchat_range 1024
rpgx_voice_range 1024
rpgx_voice_global 0
rpgx_inventory_slots 20
rpgx_hotbar_slots 9

sv_alltalk has no effect; use rpgx_voice_global. The level curve and XP per kill aren't convars but formulas, set with commands and saved in the database; see Levels and skills.

Workshop addons #

Add weapons, NPCs and model packs to the server's workshop collection (+host_workshop_collection on the start line). The server only downloads a collection's addons for itself; the gamemode lists every mounted one with resource.AddWorkshop on start, so players download them when they join and see their models and materials instead of errors. The server log says which ones on each start (Players download N workshop addons: ...). A restart picks up newly added ones.