插件介绍
添加可以通过其他插件修改的交互式人类 NPC
PLEASE READ THE UPDATE NOTES
Adds customizable, human, non-player characters in-game. Make your cities a little bit more lively!
Features
NPC_ADDCreates a new NPC, and edits it.It will be created where you stand, and be looking the same way that you are. Using /npc_add XXXX (npc ID from /npc_list) will clone the NPC to your position
主要用途
主要用于imported、npcs、娱乐玩法等服务端功能。 本插件由 Razor 发布,当前目录记录版本为 v0.6.7,uMod 累计下载 94,001 次。
适用场景
- PVE、活动服或任务玩法服务器
- 希望改善玩家交互与日常体验的社区服务器
功能分类
查看 uMod 官方英文简介
Adds interactive human NPCs which can be modded by other plugins
指令说明
/npc_add => create a new NPC and edit it
/npc_edit [id] => edit the NPC you are looking at or specified ID
/npc_remove [id] => erase the NPC you are looking at or specified ID
/npc_sound => record sound for your npc to say
/npc_end => stop editing an NPC
/npc OPTION VALUE => set a value of an option of your NPC
/npc_reset => removes all NPCs
/npc_pathtest => follow NPC path
/npc_list => list all NPCs
/npc_way [id] => draws path of the NPC you are looking at or specified ID
NPC_ADDCreates a new NPC, and edits it.It will be created where you stand, and be looking the same way that you are. Using /npc_add XXXX (npc ID from /npc_list) will clone the NPC to your position
NPC_EDITEdit an NPC (not needed if you just did /npc_add)Then you can use the command: /npc
NPC_ENDStop editing an NPC
NPCBy entering the command alone, you will see what values are currently set. Option values:
attackdistance XX => Distance between NPC and the target needed for the NPC to ignore the target and go back to spawn
bye reset/"TEXT" "TEXT2" etc => Dont forgot the \", this what will be said when the player walks away from the NPC
damageamount XXX => Damage done by that NPC when he hits a player
damagedistance XXX => Min distance for the NPC to hit a player (3 is default, maybe 20-30 needed for snipers?)
damageinterval XXX => Interval in seconds that the NPC has to wait before attacking again
enable true/false => Enable (default) or disable the NPC without deleting it (notice that when you are editing a bot it will stay active until you say /npc_end)
radius XXX => Radius in which the NPC will detect the player
health XXX =>_ To set the Health of the NPC (limited by rust to max 100)_
hello reset/"TEXT" "TEXT2" etc => Dont forgot the \", this what will be said when the player gets close to the NPC
hurt reset/"TEXT" "TEXT2" etc => Dont forgot the \", set a message to tell the player when he hurts the NPC
hostile true/false_ => Set the NPC Hostile, will attack players on sight (radius is the sight limit)_
invulnerable true/false => To set the NPC invulnerable or not
kill reset/"TEXT" "TEXT2" etc => Dont forgot the \", set a message to tell the player when he kills the NPC
kit reset/"KitName" => To set the kit of this NPC, requires the Kits plugin (see below)
lootable true/false_ => Set if the NPC is lootable or not_
maxdistance XXX => Max distance from the spawn point that the NPC can run from (while attacking a player)
name "THE NAME" => To set a name to the NPC
respawn true/false XX =>_ To set it to respawn on death after XX seconds, default is instant respawn_
spawn new =>_ To set the new spawn location_
speed XXX => To set the NPC running speed (while chasing a player)
stopandtalk true/false XXX_ => To set if NPC should stop when a player talks to it, and if true for how much time.
use reset/"TEXT" "TEXT2" etc => Dont forgot the \", this what will be said when the player presses USE on the NPC_
playTune True/False allow the npc to play a tune
waypoints reset/"Waypoint list Name" => To set waypoints of an NPC
hitchance float_ => chance to hit target_
fireduration float => time to fire
reloadduration float => time to reload
defend true/false_ => attack if attacked_
evade true/false_ => move if hit while being attacked_
evdist float_ => how far to move when hit (some randomization is built-in)_
allowsit_ => Find a chair nearby and sit on spawn_
follow_ => Follow the attacker as they are running out of range (default is true as with older versions)
sit_ => Make the NPC sit (toggles allowsit)_
stand_ => Make the NPC stand (toggles allowsit)_
needsAmmo true/false_ => needs to have ammo in inventory to shoot_
sound => recorded sound name
soundonenter => play the sound on enter (true/false)
soundonuse => play the sound on use (true/false)
NPC WAYPOINTS:You will need to make waypoints with the Waypoints plugin. Create a set of waypoints with NAME and use /npc waypoints NAME when editing your NPC.
NPC KIT:
You will need the Kits plugin. Create a new kit with the kit plugin like you usually do, then:/kit add NAME "random description" -authlevel2 (the level is set so NO players can use the kit, only admins and NPCs)Then while editing the NPC do: /npc kit NAME (being the same name as the kit ofc)
NPC ATTACK MOVEMENTS & PATHFINDING:The Pathfinding is still not perfect, but it's getting there. Currently, the main problem isn't really coming from the Pathfinding but from the HumanNPC plugin because of the way i wrote it, so I'll need to rewrite a part of the plugin to make better movements and player attacks.You will need to download PathFinding for Rust to make the NPC attack movements work. If the NPC can't find any paths for 5 seconds it will stop targetting the entity and go back to its spawn point with full health.
相关依赖
- Path Finding
- Waypoints
- GUI Shop
- Rust Kits
- Vanish
- Bank
- Hotel
- Hunt RPG
- NPC Vending Map Marker
- Npc TP
- Quests
- Recycle
- Rust Lottery
- Server Rewards
- Skin Shop
配置说明
{ "Weapon To FX": { "pistol_eoka": "fx/weapons/vm_eoka_pistol/attack", "pistol_revolver": "fx/weapons/vm_revolver/attack", "rifle_ak": "fx/weapons/vm_ak47u/attack", "rifle_bolt": "fx/weapons/vm_bolt_rifle/attack", "shotgun_pump": "fx/weapons/vm_waterpipe_shotgun/attack", "shotgun_waterpipe": "fx/weapons/vm_waterpipe_shotgun/attack", "smg_thompson": "fx/weapons/vm_thompson/attack" } }
官方配置示例
OnHitNPC(BasePlayer npc, HitInfo info)OnUseNPC(BasePlayer npc, BasePlayer player)更新日志
本站记录 uMod 官方插件信息。完整的历史更新日志请参阅 uMod 官方页面。
安装方法
- 确认服务器已安装 Oxide / uMod 或兼容的 Carbon 框架。
- 登录本站后点击"下载",由 uMod 官方地址获取作者发布的文件。
- 将 .cs 文件放入服务器的
oxide/plugins目录。 - 观察服务端控制台,确认插件编译并成功加载。
- 具体配置、权限、指令和依赖请查看原作者的 uMod 页面。
使用前注意
- Rust 更新后,请先确认插件是否仍兼容当前服务端版本。
- 修改配置前建议备份原配置文件,并在测试服验证后再部署到正式服。
- 若插件依赖其他扩展或库,以 uMod 原作者页面的最新说明为准。
- 本站中文内容用于辅助理解,遇到版本差异时以官方英文文档和源码为准。
中文介绍由 uMod 官方简介翻译整理。插件著作权、许可证、完整文档和最新发布状态均以原作者及 uMod 官方页面为准。