Create a hostile NPC?
Hello,

I'm trying to create a base where NPCs are guarding it using humanNPC. I was already able to create an NPC configuration plus a kit (just tier two items). Here is the observed behavior:

- not hostile even if i set it as hostile
- when defend true, it attacks, but only when you attack it
- initially it had to run very close to me before firing its gun (thompson), but i was able to adjust using attackdistance

The help that i'm looking for is what is the "recommended" configuration ie.attack distance, etc. for creating a basic NPC that is hostile (like a scientist). 

{
  "HumanNPCs": [
    {
      "userid": 5827124736,
      "displayName": "NPC",
      "invulnerability": false,
      "health": 200.0,
      "respawn": true,
      "respawnSeconds": 60.0,
      "spawnInfo": {
        "position": "335.1475 2.996632 -1516.296",
        "rotation": "0.1531988 0.66604 -0.1425155 0.715968"
      },
      "waypoint": "levelone",
      "collisionRadius": 70.0,
      "spawnkit": "raider",
      "damageAmount": 10.0,
      "damageDistance": 60.0,
      "damageInterval": 0.0,
      "attackDistance": 100.0,
      "maxDistance": 200.0,
      "hostile": true,
      "speed": 5.0,
      "stopandtalk": false,
      "stopandtalkSeconds": 3.0,
      "enable": true,
      "lootable": true,
      "hitchance": 0.75,
      "reloadDuration": 0.0,
      "needsAmmo": false,
      "defend": true,
      "evade": true,
      "follow": true,
      "evdist": 0.0,
      "allowsit": false,
      "musician": null,
      "playTune": false,
      "SoundOnEnter": false,
      "SoundOnUse": false,
      "band": 0.0,
      "permission": "",
      "Sound": "",
      "message_hello": null,
      "message_bye": null,
      "message_use": null,
      "message_hurt": null,
      "message_kill": null,
      "protections": {
        "Generic": 0.0,
        "Hunger": 0.0,
        "Thirst": 0.0,
        "Cold": 0.0,
        "Drowned": 0.0,
        "Heat": 0.0,
        "Bleeding": 0.0,
        "Poison": 0.0,
        "Suicide": 0.0,
        "Bullet": 0.0,
        "Slash": 0.0,
        "Blunt": 0.0,
        "Fall": 0.0,
        "Radiation": 0.0,
        "Bite": 0.0,
        "Stab": 0.0,
        "Explosion": 0.0,
        "RadiationExposure": 0.0,
        "ColdExposure": 0.0,
        "Decay": 0.0,
        "ElectricShock": 0.0,
        "Arrow": 0.0,
        "AntiVehicle": 0.0,
        "Collision": 0.0,
        "Fun_Water": 0.0
      }
    }
  ]
}​

appreciate any help!

for reference: I tried reading all the items here in the support page, but not all of them really provide final/recommended settings as someone just says "fixed" but doesnt explain what was fixed or what setting was used. 
Set defend to false and hostile to true.
Hi Ts3hosting. Thanks for the prompt reply. Tried that, NPC is just standing there. Tried being far and standing just beside no reaction (not attacking me). Tried shooting them, no reaction. Only getting attacked if defend = true. equipped with thompson (same config as above, except defend = false). 

Merged post

Hi - I did some testing and found this pattern.  as mentioned before, I set defend false and hostile true but NPC is not attacking me. 

tests done:
near - none
far - none
fired bullets - none

NPC is equipped with kit thompson

then this happened. I reloaded the plugin. check logs below

o.reload HumanNPC




[DEBUG] Plugin compilation is already queued: HumanNPC (0.008 ago)

HumanNPC and PathFinding were compiled successfully in 2766ms

[Human NPC] Deleting drussy (5827124736)

Calling 'Unload' on 'HumanNPC v0.3.47' took 697ms

Unloaded plugin Human NPC v0.3.47 by Ts3Hosting

Calling 'Unload' on 'PathFinding v1.1.3' took 347ms

Unloaded plugin PathFinding v1.1.3 by Reneb / Nogrod

[DEBUG] HumanNPC plugin is waiting for requirements to be loaded: PathFinding

Loaded plugin PathFinding v1.1.3 by Reneb / Nogrod

[Human NPC] Spawned NPC: 5827124736 and made team leader

Calling 'OnServerInitialized' on 'HumanNPC v0.3.47' took 379ms

Loaded plugin Human NPC v0.3.47 by Ts3Hosting

Calling 'OnEntityDeath' on 'RustIO v2.17.0' took 213ms

saintmichel13[76561############] was suicide by Bullet

saintmichel13[76561############] has spawned

after this, i went back to the NPC and it is not attacking me again. but when i reload, it attacks and kills me then stops attacking again. 

Merged post

to be clear what happened was when i reloaded the plugin (not just reset the npc), it attacked me. but after that it was peaceful again. i tried killing it to see what happens upon respawn, nothing it didnt attack me again. might help in whats happening.