MonBots
search
  • MonBots

MonBots

$0.00

NPCs that protect monuments

Monument Bots!

An EXPERIMENTAL basic plugin to provide for bots at Rust monuments otherwise recently evacuated and/or not yet populated by Facepunch.

A basic management GUI has been created and can be accessed by ADMINS ONLY using the /mb command.

Uses the infamous Kits plugin.

SUBJECT TO CHANGE!  With each release for now, please DELETE YOUR LANG FILE at oxide/en/MonBots.json.

Command and GUI

-- /mb -- Starts the gui where you can select and edit profiles including bot names, kit selection, etc. There are several other subcommands for this, all used by the gui and not yet documented.

UPDATE NOTES:
  With 1.0.4, you can now create your own profile locations, so you are not limited to monuments.  However, the bots must be able to navigate via the game navmesh system.  So, in general, keep on the terrain and you should be fine.

In the profile select screen there will be a new button, "Add Here."  Before pressing that, be at the general center of where you want to span your set of non-monument bots.  Once pressed, another screen will pop up prompting for a name.  Type or copy/paste the name and press enter.  This should take you to the standard edit screen for the new profile.  After you are done editing, the profile will be available in the profile select screen.

Custom profiles can also be deleted.

Also, 1.0.4 had a fix for conflicts with the HumanNPC plugin as well as for, in my case, the creation of a phantom Lighthouse.  Sounds cool, but sadly it wasn't actually there...


Initial GUI showing profile list and selection buttons.  Profiles(monuments) in green have active bots (spawnCount > 0).  Profiles in blue^H^H^H^HGRAY have some setup such as bot names or kits select, but no spawnCount.  The rest are inactive.  Custom profiles are now blue.



A (monument) profile with an active spawnCount, some bot names and selected kits.



Bot name editing.  A little funky.  But, you can edit or delete existing names, or create new ones one at a time.
As usual - copying and pasting the text into these fields works best.  Hit enter after pasting to save:

Configuration

{
  "Options": {
    "Default Health": 200.0,
    "Default Respawn Timer": 30.0,
    "debug": false
  },
  "Version": {
    "Major": 1,
    "Minor": 0,
    "Patch": 1
  }
}

Pretty basic here. The default should get you going. The real meat is in the data file.

Config values will populate the data file 1:1 where they essentially match (currently health and respawn timer, which both work).

Data file

Upon a fresh load of the plugin, various profiles are created at oxide/data/MonBots/spawnpoints.

Here is an example showing two monuments:

"Sphere Tank 0": {
    "monname": "Sphere Tank 0",
    "spawnCount": 0,
    "respawn": true,
    "respawnTime": 60.0,
    "detectRange": 60.0,
    "spawnRange": 30,
    "roamRange": 140.0,
    "startHealth": 200.0,
    "invulnerable": false,
    "lootable": false,
 "wipeClothing": true,
   "wipeBelt": true,
   "wipeMain": false,
  "wipeCorpseMain": false,
"dropWeapon": false, "hostile": false, "kits": null, "names": null, "pos": [] }, "Stables A 0": { "monname": "Stables A 0", "spawnCount": 0, "respawn": true, "respawnTime": 60.0, "detectRange": 60.0, "spawnRange": 30, "roamRange": 140.0, "startHealth": 200.0, "invulnerable": false, "lootable": false,
"wipeClothing": true,
   "wipeBelt": true,
  "wipeMain": false,
"wipeCorpseMain": false,
"dropWeapon": false, "hostile": false, "kits": null, "names": null, "pos": [] },

For each monument you want to populate, you would start by setting the spawnCount to 1 or more bots.

Next, you can pick a name or set of names to be randomly assigned to the bots if desired.

You can and probably do want to assign a kit from the Kits plugin to them. This setting can also be an array of kits if desired.

Beyond the lootable flag, you can set the following items, which are only relevant if lootable == true:
  - wipeClothing -- Do not copy clothes the NPC wore to the corpse (default true)
  - wipeBelt -- Do not copy items the NPC had in their belt to the corpse (default true)
  - wipeMain -- Do not copy items the NPC had in their main inventory to the corpse (default true)
  - wipeCorpseMain -- Delete the default loot added to an NPC corpse main inventory (default false)  Note that you probably want to set EITHER wipeMain or wipeCorpseMain to true, or set both to false

Leave pos: [] alone. This will be populated at runtime with the spawn point of each bot in case you have to look for them, etc.

  "Sphere Tank 0": {
    "monname": "Sphere Tank 0",
    "spawnCount": 3,
    "respawn": true,
    "respawnTime": 60.0,
    "detectRange": 60.0,
    "spawnRange": 30,
    "roamRange": 140.0,
    "startHealth": 200.0,
    "invulnerable": false,
    "lootable": false,
    "dropWeapon": false,
    "hostile": false,
    "kits": [
      "tankbots"
    ],
    "names": {
      "Barbara",
      "Megan",
      "Lacey"
    ],
    "pos": []
  },
  "Stables A 0": {
    "monname": "Stables A 0",
    "spawnCount": 5,
    "respawn": true,
    "respawnTime": 60.0,
    "detectRange": 60.0,
    "spawnRange": 30,
    "roamRange": 140.0,
    "startHealth": 200.0,
    "invulnerable": false,
    "lootable": false,
    "dropWeapon": false,
    "hostile": false,
    "kits": {
      "cowboy1",
      "cowboy2"
    },
    "names": [
      "Stabler"
    ],
    "pos": []
  },

You can also adjust the startHealth and other values as you like. Not everything is working yet, but they do fight and hide and do all of the usual NPC things you might expect.

USE THE GUI - /mb

For Developers

  • private bool IsMonBot(ScientistNPC player)

    Given a ScientistNPC object, determine whether or not this is a MonBot

  • private string[] AddGroupSpawn(Vector3 location, string profileName, string group, int quantity)

    Spawn a group of bots at a specific location using either a new or existing profile (group)

  • private string[] RemoveGroupSpawn(string group)

    Remove a profile (group) and associated bots

  • private string GetMonBotName(ulong npcid)

    Return the bot name given its userid

MONBOTS
Comments (0)
No customer reviews for the moment.