TreasureBox

TreasureBox 0.3.6

Removed TC spawning
Fixed bots trying to claim kits that dont exist
Changed ZoneManager Option section of the config
Added config options to disable building and deployable placement within a specified range
** "Radius of the event zone" is now the radius in which building will be disabled, and it also is the radius of the generated ZoneManager zone if you use it
Raycast NPC positions to prevent spawning in rocks
  • Like
Reactions: VinylFresh
Changes to kit supply for NPCs
Added error messages when the kit is not set up correctly

** Side note - NPCs seem to have gotten alot better at navigation with this weeks patch, using them at box spawns is far more viable then it was previously
The config has changed! See below for information regarding updating your config

Added config option to spawn NPCs at the box site to defend the box
Added basic NPC controller

** The AI for NPC Humans is still in development by FacePunch, therefore the implementation in this plugin is far from perfect. NPCs seem to act fine as long as they are not in some kind of complicated terrain, and I did find that certain areas would cause them to bug out and get stuck or just de-spawn.

Config Changes (1 section)
C#:
{
  "Event Options": {
    "Broadcast the box co-ordinates to chat": false,
    "Minimum players required online to trigger the event": 1,
    "NPC Options": { // Add from this line here
      "Amount of NPCs to spawn": 3,
      "Kits that NPCs can spawn with (chosen at random)": [],
      "Spawn NPCs at the box location": true,
      "The attack distance of a NPC": 40.0,
      "The health of a NPC": 200.0,
      "The maximum distance a NPC can wander from the box": 50.0
    }, // To this line here
    "Show a smoke signal on the box location": true,
    "UI Options": {
      "Enabled the UI display": true,
      "Position - X Dimensions": 0.275,
      "Position - X Start": 0.625,
      "Position - Y Dimensions": 0.05,
      "Position - Y Start": 0.93,
      "UI background color (hex)": "#4C4C4C",
      "UI transparency (0.0 - 1.0)": 0.7,
      "URL of the icon to be used in the UI": "http://www.chaoscode.io/oxide/Images/treasureicon.png"
    },
    "Use a spawn file for box spawn points": "",
    "Use RandomSpawns for box spawn points": true,
    "ZoneManager Options": {
      "Create a temporary zone around the box when it spawns": true,
      "Flags to be applied to the temporary zone": [
        "notp",
        "true",
        "notrade",
        "true",
        "radius",
        "75"
      ],
      "The amount of time the zone will remain active after the event is over (seconds)": 300
    }
  },
  "Event Timers": {
    "Amount of time before the box unlocks (seconds)": 180,
    "Amount of time the box will remain on the map (seconds)": 300,
    "Maximum time between events (seconds)": 1200,
    "Minimum time between events (seconds)": 600
  },
  "Loot Options": {
    "Container skin ID": 0,
    "Loot list": [
      {
        "Item shortname": "metal.refined",
        "Maximum amount of item": 100,
        "Minimum amount of item": 10
      },
      {
        "Item shortname": "explosive.timed",
        "Maximum amount of item": 2,
        "Minimum amount of item": 1
      },
      {
        "Item shortname": "grenade.f1",
        "Maximum amount of item": 3,
        "Minimum amount of item": 1
      },
      {
        "Item shortname": "supply.signal",
        "Maximum amount of item": 1,
        "Minimum amount of item": 1
      },
      {
        "Item shortname": "cctv.camera",
        "Maximum amount of item": 1,
        "Minimum amount of item": 1
      },
      {
        "Item shortname": "targeting.computer",
        "Maximum amount of item": 1,
        "Minimum amount of item": 1
      },
      {
        "Item shortname": "ammo.rifle",
        "Maximum amount of item": 60,
        "Minimum amount of item": 20
      },
      {
        "Item shortname": "ammo.pistol",
        "Maximum amount of item": 60,
        "Minimum amount of item": 20
      }
    ],
    "Maximum amount of items to spawn": 4,
    "Minimum amount of items to spawn": 1
  },
  "Map Options": {
    "Ingame map integration": {
      "Broadcast information about the marker to chat": true,
      "Marker color (hex)": "#ce422b",
      "Marker transparency (0.0 - 1.0)": 0.25,
      "Maximum amount to offset the marker position from the box position": 25.0,
      "Show a radius marker on the map": true,
      "The radius of the marker": 50.0
    },
    "LustyMap intergration": {
      "Show a icon on LustyMap": false,
      "URL of the icon to be used": "http://www.chaoscode.io/oxide/Images/treasureicon.png"
    }
  }
}
The config has changed! Backup your old config and delete it before updating
The language file has changed! For those of you who have translated it you will need to update your lang file

Reworked config
Changed the event start message to not include co-ordinates
Added config option to display box co-ordinates in chat
Added config option to display a radial marker on the ingame map (see below)
Added config options to customise the radial marker
Added config option to broadcast a message regarding the radial marker in chat
Fixed box persisting through restarts

252490_screenshots_20171014181945_1.jpg
Fix for Rust update
  • Like
Reactions: EvilynCorporated
Possible NRE fix on unload
Added chat command "/th unlock" to prematurely unlock the box
  • Like
Reactions: EvilynCorporated
Possible NRE fix on unload
Added chat command "/th unlock" to prematurely unlock the box
  • Like
Reactions: EvilynCorporated
The config has changed! See below for information regarding updating your config

Added ZoneManager support to create zones on the box location

Config Changes
C#:
{
  "LootTable": {
    "ContainerSkin": 0,
    "LootItems": [
      {
        "MaximumAmount": 100,
        "MinimumAmount": 10,
        "Shortname": "metal.refined"
      },
      {
        "MaximumAmount": 2,
        "MinimumAmount": 1,
        "Shortname": "explosive.timed"
      },
      {
        "MaximumAmount": 3,
        "MinimumAmount": 1,
        "Shortname": "grenade.f1"
      },
      {
        "MaximumAmount": 1,
        "MinimumAmount": 1,
        "Shortname": "supply.signal"
      },
      {
        "MaximumAmount": 1,
        "MinimumAmount": 1,
        "Shortname": "cctv.camera"
      },
      {
        "MaximumAmount": 1,
        "MinimumAmount": 1,
        "Shortname": "targeting.computer"
      },
      {
        "MaximumAmount": 60,
        "MinimumAmount": 20,
        "Shortname": "ammo.rifle"
      },
      {
        "MaximumAmount": 60,
        "MinimumAmount": 20,
        "Shortname": "ammo.pistol"
      }
    ],
    "MaximumItems": 4,
    "MinimumItems": 1
  },
  "LustyMap": {
    "MarkerFilename": "http://www.chaoscode.io/oxide/Images/treasureicon.png",
    "ShowOnLustyMap": true
  },
  "Options": {
    "LootSpawnfile": "",
    "MinimumPlayersRequired": 1,
    "ShowSmokeOnLocation": true,
    "UISettings": {
      "IconUrl": "http://www.chaoscode.io/oxide/Images/treasureicon.png",
      "UIBackgroundColor": "#4C4C4C",
      "UIOpacity": 0.7,
      "UseUIDisplay": true,
      "XDimension": 0.275,
      "XPosition": 0.625,
      "YDimension": 0.05,
      "YPosition": 0.93
    },
    "UseSpawnsFromRandomSpawns": true, // Add this comma
    "ZoneSettings": { // Add from this line
      "CreateTemporaryZone": true,
      "ZoneActiveAfter": 300,
      "ZoneFlags": [
        "notp",
        "true",
        "notrade",
        "true",
        "radius",
        "75"
      ] // To this line
    }
  },
  "Timers": {
    "MaximumTimeBetweenEvents": 1200,
    "MinimumTimeBetweenEvents": 600,
    "TimeToLoot": 300,
    "TimeToUnlock": 180
  }
}
Stopped box/cupboard persisting through server restart