Hi!
I used for my server.cfg :
ai.npc_enable "false"
server.events "false"
ai.npc_max_junkpile_count "0"
ai.npc_junkpile_g_spawn_chance "0"
ai.npc_junkpile_a_spawn_chance "0"
but I can not find the command to disable the new type of NPC (bandit camp)
Can u help me pls?
Command for disable NPC (bandit camp)
Discussion in 'Rust Discussion' started by Chevreuil59 ( FR ), Aug 3, 2018.
-
press F1 & enter:
del npcvendingmachine
del shopkeeper_vm_invis -
Error : "couln't find npcvendingmachine"
"couln't find shopkeeper_vm_invis" -
Afaik there isn't a command to disable the NPC Guards. Only way that worked for me is below, also the shopkeepers will stay put.
This currently only works after a server restart.
I expect there will be a new plugin/updated plugin for this soon.
Code:using Rust.Ai;private static bool disableGuardNPC = true; void OnEntitySpawned(BaseNetworkable entity) { if (entity == null) return; if (disableGuardNPC) KillNPC(entity); }void KillNPC(BaseNetworkable entity) { if (!(entity is NPCPlayer)) return;var npcApex = entity.gameObject.GetComponent<NPCPlayerApex>(); if (npcApex == null) return;var npcLocationType = npcApex?.AiContext?.AiLocationManager?.LocationType; if (npcLocationType == null) return;if (npcLocationType == AiLocationSpawner.SquadSpawnerLocation.BanditTown) { entity.Kill(BaseNetworkable.DestroyMode.Gib); } }
-
on my servers are the shops on bandit town are red and shops dont work. any idea =?
Picture here:
https://preview.ibb.co/n8V46K/Screenshot_2.png -
Here is the right order:
del assets/prefabs/npc/bandit/shopkeepers/bandit_shopkeeper.prefab
del assets/prefabs/npc/bandit/guard/bandit_guard.prefab
del assets/prefabs/npc/bandit/bandit_town_npc_spawner.prefab
del assets/prefabs/deployable/vendingmachine/npcsellorders/weapons_bandit.asset
del assets/prefabs/deployable/vendingmachine/npcsellorders/building_bandit.asset
del assets/prefabs/deployable/vendingmachine/npcsellorders/attire_bandit.asset