Profile fields
A profile is a named description of an NPC. Its fields are the same wherever a profile is written, so this one page serves all four places:
- The site’s profile editor, whose sections this page follows, and whose label for each field is in the second column.
- The console, where
rnpc.profile set <name> <field> <value>takes the path in the first column:rnpc.profile set warden ranges.sense 40. - The data file,
data/RunicNPC/profiles.json, on a server no site manages. - The API:
RunicNpc_SetProfilestakes profiles in this shape, andRunicNpc_Spawn’s overrides change any of these fields for one NPC.
The paths are checked against the API’s specification on every build. The site’s editor shows some values in friendlier units: health thresholds, a loot row’s chance and a phase’s health as percentages, and the hack time in minutes. Everywhere else they are fractions and seconds.
A profile is checked whole when it is saved. A kit the server does not have refuses the profile then, not when an NPC spawns; a refused profile is kept, and listed with its reason, but never spawns.
| Field | On the site | Allowed | What it does |
|---|---|---|---|
names | NPC names | at least one | One is picked for each NPC. The first is the profile’s name on the leaderboard |
kits | Kits | at least one; each must exist in Kits | One is picked for each NPC, which is equipped with it. A kit the server lacks refuses the profile when it is saved, not when an NPC spawns |
prefab | Prefab | a plain Rust scientistnpc_* prefab | What it is built from |
role | Role | roamer, sentry, guard or passive | A roamer moves, chases and fights. A sentry never moves, and may stand off the navmesh. A guard holds its spot facing the way it was placed, chases within its chase range, and walks back. A passive NPC never fights — it takes no target, does not shoot back and raises no alarm — and pressing E on it does what its use says |
Moving
Section titled “Moving”| Field | On the site | Allowed | What it does |
|---|---|---|---|
movement.mode | How it moves | wander, monument, route:<name>, or stand for a passive profile only | Wander around its spot, follow Rust’s own paths in the monument it stands in, or walk a recorded route. A passive NPC that stands holds its spot, may stand off the navmesh, and turns to whoever presses E on it. A placement may override it |
movement.radius | Wander radius (m) | above 0 for wander | How far from home it wanders |
sleepDistance | Sleeps with nobody within (m) | 0 or more | With no player this close it walks home, then sleeps. 0: it never sleeps |
Fighting
Section titled “Fighting”| Field | On the site | Allowed | What it does |
|---|---|---|---|
health | Health | above 0 | Its health, and its maximum |
damageDealt | Damage dealt × | 0 or more | Multiplies its weapon’s damage; 1 is the weapon’s full damage |
aimCone | Aim spread | 0 or more | How much its aim spreads. Rust’s scientists use 2 |
visionCone | Vision cone | −1 to 1 | Rust’s vision cone |
damageTaken | Damage taken × head, body, legs | head, body and legs, each 0 or more | Multiplies the damage it takes to the head, the legs (legs and feet) and the body — everything else, including hits with no body part, like fire and explosions |
ranges.sense | Notices players at (m) | above 0 | How far it notices players |
ranges.loseTarget | Forgets them at (m) | at least sense | How far a target must get before it is forgotten |
ranges.chase | Chases up to (m from home) | 0 or more | How far from home it will chase; 0 is no limit. At that distance it waits 5 s for the target to come back within range, then gives up and walks home |
ranges.attack | Shoots from (m) | above 0 | How far it shoots from. This replaces the weapon’s own range |
healthThresholds | Health thresholds (%) | fractions between 0 and 1 | Where OnRunicNpcHealth is raised, once each — and so what an event’s phase can wait for |
Press E
Section titled “Press E”| Field | On the site | Allowed | What it does |
|---|---|---|---|
use | Press E | required on a passive profile, refused on any other | What pressing E on it does, from up to 3 m. mode chat says one of lines (picked at random, each at most 256 characters) in that player’s chat. mode window opens a window with title (blank: its name), text (at most 2,000 characters) and a Close button. {player} in either is the player’s name |
A passive profile, as it looks in the file:
{ "names": ["Quartermaster"], "kits": ["outpost_clothes"], "role": "passive", "movement": { "mode": "stand", "radius": 0 }, "hurtByPlayers": false, "use": { "mode": "chat", "lines": ["Back again, {player}?", "Supplies are short."], "title": "", "text": "" }}| Field | On the site | Allowed | What it does |
|---|---|---|---|
boss | It is a boss | null, or the block below; not on a passive profile | Makes a roamer, sentry or guard a boss. It keeps moving and fighting as its role does |
boss.barDistance | Bar shown within (m) | above 0, at most 1,000; default 100 | Players this close see its health bar at the top of the screen, and so does every player who has hurt it, wherever they are, until it dies or despawns. A player near two bosses sees the nearer |
boss.announce | Lines said in | chat or popup; default chat | Where its lines are said. popup uses PopupNotifications where it is loaded, and chat where it is not |
boss.spawnLine | When it spawns, to everyone | at most 256 characters; blank says nothing | Said to everyone on the server. {name} is its name |
boss.deathLine | When it dies, to everyone | at most 256 characters; blank says nothing | Said to everyone on the server. {killer} is the player who landed the killing blow, empty when there was none |
boss.phases | Phases | a list; each at a fraction between 0 and 1, no two alike | When its health falls to a phase’s at, that phase applies from then on. Every other part of a phase is optional, and changes only that boss’s own copy of its profile |
phases[].damageDealt | Damage dealt × | 0 or more | Replaces the profile’s |
phases[].aimCone | Aim spread | 0 or more | Replaces the profile’s |
phases[].speed | Speed × | above 0, at most 5 | A multiple of Rust’s own speed for it: 1.3 is a third faster |
phases[].ranges | Notices at, Forgets at, Chases to, Shoots from | as the profile’s ranges | Replace the profile’s |
phases[].kit | Swaps to kit | a Kits kit the server has | Its inventory is stripped, the kit given and its weapon equipped |
phases[].adds | Summons (profile), How many | profile: one that is not a boss; count: 1 to 20 | NPCs of that profile placed on a 6 m ring around it, one per server frame. They belong to its owner, so an event’s teardown removes them, and they fight on after it dies |
phases[].line | Line | at most 256 characters | Said only to the players near it (within barDistance) and to those who have hurt it |
A boss gives no reward of its own. On a Runic Gateway server, an event’s reward steps do, and can name everyone who hurt it.
| Field | On the site | Allowed | What it does |
|---|---|---|---|
loot | Its own loot | null, or the block below | Null keeps Rust’s scientist loot |
loot.start | The corpse starts with | rust (default), kit or none | What the corpse holds before the table: Rust’s scientist loot and the clothes it wore; what it carried (its kit) and the clothes; or nothing at all, clothes included |
loot.always | Always rolled | up to 30 rows: item, min, max, chance (above 0, at most 1), and an optional skin | Each row rolls on its own. item is a Rust short name — scrap, rifle.ak, explosive.timed |
loot.pool | The pool | pick (0 to its rows), nothing (a weight, 0 or more), and up to 30 rows, each with a weight above 0 instead of a chance | At most pick draws by weight, never the same row twice; a draw of "nothing" uses one up. A kill never pays out more than pick pool rows, however lucky — the fair cap on rare items |
loot.crate | The table goes into | null (the corpse), wooden, military, elite or locked | The table goes into one of Rust’s crates beside the corpse, with Rust’s own loot off, and stays until emptied; a locked crate keeps Rust’s two-hour removal while unhacked. The always-rows plus pick must fit its slots: 6, 6, 12 or 24 (the corpse has 24) |
loot.hackSeconds | Hack time (minutes) | 1 to 86,400; default 900 | A locked crate’s hack time, counted once a player starts the hack |
loot.corpseSeconds | The corpse stays | null (Rust’s own 600 s), 0 (no corpse), or more | How long the corpse lasts |
loot.dropTable | not in the editor | true (default) or false | False rolls no table; the start and the corpse’s time still apply. An event’s Place NPCs step sends it as false for the NPCs it places, through a spawn’s overrides |
| Field | On the site | Allowed | What it does |
|---|---|---|---|
faction | Faction | null, or 1–40 of a-z, 0-9, _ and -; not scientists or animals | Profiles of one faction are allies. With none, its allies are its own profile’s NPCs |
relations | Its own exceptions | keys: a faction, scientists, animals or profile:<name>; values hostile, neutral or allied | Its own exceptions, which win over the faction table. A profile with no faction settings fights players only |
alertRadius | Alert radius (m) | 0 or more; default 40 | Allies this close learn whoever attacked one of them, seen or not. 0 is off |
turrets | Turrets | default, ignore or always | default: as Rust’s scientists — player turrets shoot it, Outpost’s and Bandit Camp’s sentries do not. ignore: no turret targets it. always: those sentries too. It shoots back at a turret that shoots it |
hurtByPlayers | Players can hurt it | true or false; default true, but false for a passive profile unless it is given | Off makes it unkillable by players. RunicNPC enforces it itself, and answers TruePVE’s and NextGenPVE’s damage checks the same way. Turrets, fire and other NPCs are not affected |
hurtsPlayers | It can hurt players | true or false; default true | Off makes it harmless to players. It still fights NPCs and turrets |
Whom it fights besides players is decided by its own senses: only factions it is hostile to, within its sense range of itself and its chase range of its spot, so it never walks into a monument to look for scientists. Rust’s scientists never fight back, by Rust’s own rule; they take cover. Whoever shoots one of RunicNPC’s NPCs, it fights back, whatever the table says.
The kit’s extras
Section titled “The kit’s extras”| Field | On the site | Allowed | What it does |
|---|---|---|---|
kitUse | The kit’s extras | heal, grenades, melee, rockets, flamethrower, each true or false | The extras its kit gives that it uses, each only if true and each used up from its inventory, so its loot is what is left. The main weapon — the belt’s first slot — is always used and never runs out |
A whole profile
Section titled “A whole profile”A roamer that is also a boss, with its own loot, as it looks in the file and through the API:
{ "names": ["Warden", "Old Warden"], "kits": ["warden_rifle", "warden_smg"], "prefab": "scientistnpc_roam", "role": "roamer", "movement": { "mode": "wander", "radius": 20 }, "health": 250, "damageDealt": 1.0, "damageTaken": { "head": 1.0, "body": 1.0, "legs": 1.0 }, "aimCone": 2.0, "ranges": { "sense": 30, "loseTarget": 40, "chase": 40, "attack": 30 }, "visionCone": -0.8, "sleepDistance": 160, "healthThresholds": [0.5], "faction": "bandits", "relations": { "scientists": "hostile" }, "alertRadius": 40, "turrets": "default", "hurtByPlayers": true, "hurtsPlayers": true, "kitUse": { "heal": false, "grenades": false, "melee": false, "rockets": false, "flamethrower": false }, "boss": { "barDistance": 100, "announce": "chat", "spawnLine": "{name} has risen!", "deathLine": "{name} has fallen to {killer}.", "phases": [ { "at": 0.5, "adds": { "profile": "raider", "count": 3 }, "line": "{name} calls for help!" }, { "at": 0.25, "damageDealt": 1.5, "speed": 1.3, "kit": "warden_heavy", "line": "{name} is enraged!" } ] }, "use": null, "loot": { "start": "rust", "always": [ { "item": "scrap", "min": 100, "max": 300, "chance": 1 }, { "item": "rope", "min": 1, "max": 1, "chance": 0.5 } ], "pool": { "pick": 1, "nothing": 85, "rows": [ { "item": "lmg.m249", "min": 1, "max": 1, "weight": 10 }, { "item": "explosive.timed", "min": 1, "max": 1, "weight": 5 } ] }, "crate": "locked", "hackSeconds": 600, "corpseSeconds": 0, "dropTable": true }}