Getting item & entity names
A lot of objectives can be configured with item short names or entity names. This guide explains how to find the correct names to use in your contracts.
Item short names
Section titled “Item short names”Item short names are arguably the easiest to find. Simply head to RustHelp’s Item Database, search for the item you want and copy the Short name. For example, the Short name for a LR-300 Assault Rifle is rifle.lr300.
The Web editor is pretty good at suggesting item short names as you type. Because Rust exposes all items in the game to plugins with a lot of details about them, I’m able to programmatically generate a full list of all items in the game and suggest them to you in the editor as you type. I just need to re-run the script every now and then so the editor stays up to date with the latest Rust items. If you notice an item is missing, please let me know on Discord!
Entity names
Section titled “Entity names”Unlike item short names, entity names are not as easy to find and are much more numerous. There are a couple of ways to find an entity’s name.
Similar to item short names, Rust exposes all entities in the game to plugins. However, unlike items, these entities are just string paths to their file. They’re not detailed at all like items are. For this reason, the Web editor knows all the entities when you type, but it can’t “pretty” suggest them with display names like it can for items. Some common entities have been manually curated and given display names, but for most other ones, you’ll need to know the exact entity name to use it in your contract. The editor will still suggest them to you, but they will be displayed as their raw prefab name.
Using Carbon’s Rust Entities Reference
Section titled “Using Carbon’s Rust Entities Reference”You can search through Carbon’s exported list of Rust entities on their Rust Entities Reference. This is a comprehensive list of all entities in Rust, including animals, deployables, and more. Only use the last part of the prefab name, without .prefab at the end. E.g:
assets/bundled/prefabs/radtown/oil_barrel.prefab→oil_barrel.assets/prefabs/npc/patrol helicopter/patrolhelicopter.prefab→patrolhelicopter.assets/rust.ai/agents/npcplayer/humannpc/scientist/gen2/scientist2.prefab→scientist2.
Using the in-game console
Section titled “Using the in-game console”While looking at the entity in-game, open the console and type entity.debug_lookat. Some entities will highlight with a green outline after the command. Use the Ent property that gets printed in the info dump. E.g: for a barrel:
Looking At: assets/bundled/prefabs/radtown/loot_barrel_1.prefab Ent: loot_barrel_1 Pos: (-1076.24, 8.98, 1186.99) Layer: Default Hierarchy: assets/bundled/prefabs/radtown/loot_barrel_1.prefabYou would use loot_barrel_1 as the entity name in your contract.
Another way to find entity names is to use the spawn command. If you know approximately what you’re looking for, the spawn command will suggest entity names that match your search when no entity matches it exactly. For example, if you type spawn scientist, the console will suggest all entity names that contain the word “scientist”. You can then use one of those names in your contract.
> spawn scientistUnknown entity - could be:
sentry.scientist.bargesentry.scientist.barge.staticsentry.scientist.staticheavyscientistplushie_deployedscientistplushie_deployedheavyscientist_youtooz.deployedscientistboatoilrigmanagerch47scientists.entityscientist_corpsescientist2.corpsescientist2.grenade.f1.deployedscientist2.grenade.smoke.deployedscientist2.heavy.corpsescientist2.heavyscientist2scientist2.shotgunscientistnpc_arenascientistnpc_bradleyscientistnpc_bradley_heavyscientistnpc_cargoscientistnpc_cargo_turret_anyscientistnpc_cargo_turret_lr300scientistnpc_ch47_gunnerscientistnpc_excavatorscientistnpc_full_anyscientistnpc_full_lr300scientistnpc_full_mp5scientistnpc_full_pistolscientistnpc_full_shotgunscientistnpc_heavyscientistnpc_junkpile_pistolscientistnpc_oilrigscientistnpc_outbreakscientistnpc_patrolscientistnpc_patrol_arcticscientistnpc_peacekeeperscientistnpc_ptboatscientistnpc_rhibscientistnpc_roamscientistnpc_roam_nvg_variantscientistnpc_roamtethered