C#:
// Все права принадлежат дискорд сообществу https://discord.gg/VgNHPpNrz6
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Oxide.Core;
using Oxide.Core.Plugins;
using System;
using System.Collections.Generic;
using UnityEngine;
using Facepunch;
using UnityEngine.AI;
using System.Collections;
using Oxide.Game.Rust.Cui;
using System.IO;
using Rust;
using Oxide.Plugins.DefendableHomesExtensionMethods;
namespace Oxide.Plugins {
[Info("DefendableHomes", "KpucTaJl", "1.1.3")]
internal class DefendableHomes : RustPlugin {
#region Config
private const bool En = true;
private PluginConfig _config;
protected override void LoadDefaultConfig() {
Puts("Creating a default config...");
_config = PluginConfig.DefaultConfig();
_config.PluginVersion = Version;
SaveConfig();
Puts("Creation of the default config completed!");
}
protected override void LoadConfig() {
base.LoadConfig();
_config = Config.ReadObject<PluginConfig>();
if (_config.PluginVersion < Version) UpdateConfigValues();
}
private void UpdateConfigValues() {
Puts("Config update detected! Updating config values...");
if (_config.PluginVersion < new VersionNumber(1, 0, 1)) {
_config.DamageNpc = true;
_config.TargetNpc = true;
}
if (_config.PluginVersion < new VersionNumber(1, 1, 0)) {
foreach (DifficultyLevelConfig difficultyLevel in _config.DifficultyLevels) {
if (difficultyLevel.Name == "EASY") {
difficultyLevel.MaxTurrets = 3;
difficultyLevel.MaxFoundations = 9;
}
else if (difficultyLevel.Name == "MEDIUM") {
difficultyLevel.MaxTurrets = 6;
difficultyLevel.MaxFoundations = 16;
}
else if (difficultyLevel.Name == "HARD") {
difficultyLevel.MaxTurrets = 9;
difficultyLevel.MaxFoundations = 25;
}
else {
difficultyLevel.MaxTurrets = 6;
difficultyLevel.MaxFoundations = 16;
}
difficultyLevel.Cooldown = 21600;
}
}
if (_config.PluginVersion < new VersionNumber(1, 1, 1)) {
_config.Bomber = new BomberConfig {
WearItems = new HashSet<NpcWear> {
new NpcWear {
ShortName = "scarecrow.suit", SkinId = 0
}
, new NpcWear {
ShortName = "metal.plate.torso", SkinId = 860210174
}
,
}
, Health = 100f, AttackRangeMultiplier = 1f, Speed = 5.5f, DamageFoundation = 150f, DamageConstruction = 150f, DamagePlayer = 60f
}
;
}
if (_config.PluginVersion < new VersionNumber(1, 1, 2)) {
foreach (DifficultyLevelConfig level in _config.DifficultyLevels) level.MaxCount = 3;
_config.Gui = new GuiConfig {
IsGui = true, OffsetMinY = "-56"
}
;
_config.GameTip = new GameTipConfig {
IsGameTip = false, Style = 2
}
;
_config.OnItemSplit = true;
}
_config.PluginVersion = Version;
Puts("Config update completed!");
SaveConfig();
}
protected override void SaveConfig() => Config.WriteObject(_config);
public class ItemConfig {
[JsonProperty("ShortName")]
public string ShortName {
get;
set;
}
[JsonProperty(En ? "Minimum" : "Минимальное кол-во")]
public int MinAmount {
get;
set;
}
[JsonProperty(En ? "Maximum" : "Максимальное кол-во")]
public int MaxAmount {
get;
set;
}
[JsonProperty(En ? "Chance probability [0.0-100.0]" : "Шанс выпадения предмета [0.0-100.0]")]
public float Chance {
get;
set;
}
[JsonProperty(En ? "Is this a blueprint? [true/false]" : "Это чертеж? [true/false]")]
public bool IsBluePrint {
get;
set;
}
[JsonProperty("SkinID (0 - default)")]
public ulong SkinId {
get;
set;
}
[JsonProperty(En ? "Name (empty - default)" : "Название (empty - default)")]
public string Name {
get;
set;
}
}
public class LootTableConfig {
[JsonProperty(En ? "Minimum number of items" : "Минимальное кол-во элементов")]
public int Min {
get;
set;
}
[JsonProperty(En ? "Maximum number of items" : "Максимальное кол-во элементов")]
public int Max {
get;
set;
}
[JsonProperty(En ? "Use minimum and maximum values? [true/false]" : "Использовать минимальное и максимальное значение? [true/false]")]
public bool UseCount {
get;
set;
}
[JsonProperty(En ? "List of items" : "Список предметов")]
public List<ItemConfig> Items {
get;
set;
}
}
public class PrefabConfig {
[JsonProperty(En ? "Chance probability [0.0-100.0]" : "Шанс выпадения [0.0-100.0]")]
public float Chance {
get;
set;
}
[JsonProperty(En ? "Prefab path" : "Путь к prefab-у")]
public string PrefabDefinition {
get;
set;
}
}
public class PrefabLootTableConfig {
[JsonProperty(En ? "Minimum number of prefabs" : "Минимальное кол-во prefab-ов")]
public int Min {
get;
set;
}
[JsonProperty(En ? "Maximum number of prefabs" : "Максимальное кол-во prefab-ов")]
public int Max {
get;
set;
}
[JsonProperty(En ? "Use minimum and maximum values? [true/false]" : "Использовать минимальное и максимальное значение? [true/false]")]
public bool UseCount {
get;
set;
}
[JsonProperty(En ? "List of prefabs" : "Список prefab-ов")]
public List<PrefabConfig> Prefabs {
get;
set;
}
}
public class HackCrateConfig {
[JsonProperty(En ? "Time to unlock Crates [sec.]" : "Время разблокировки ящиков [sec.]")]
public float UnlockTime {
get;
set;
}
[JsonProperty(En ? "Which loot table should the plugin use? (0 - default; 1 - own; 2 - AlphaLoot; 3 - CustomLoot; 4 - loot table of the Rust objects; 5 - combine the 1 and 4 methods)" : "Какую таблицу лута необходимо использовать? (0 - стандартную; 1 - собственную; 2 - AlphaLoot; 3 - CustomLoot; 4 - таблица предметов объектов Rust; 5 - совместить 1 и 4 методы)")]
public int TypeLootTable {
get;
set;
}
[JsonProperty(En ? "Loot table from prefabs (if the loot table type is 4 or 5)" : "Таблица предметов из prefab-ов (если тип таблицы предметов - 4 или 5)")]
public PrefabLootTableConfig PrefabLootTable {
get;
set;
}
[JsonProperty(En ? "Own loot table (if the loot table type is 1 or 5)" : "Собственная таблица предметов (если тип таблицы предметов - 1 или 5)")]
public LootTableConfig OwnLootTable {
get;
set;
}
}
public class GuiConfig {
[JsonProperty(En ? "Use the GUI? [true/false]" : "Использовать ли GUI? [true/false]")]
public bool IsGui {
get;
set;
}
[JsonProperty("OffsetMin Y")]
public string OffsetMinY {
get;
set;
}
}
public class GameTipConfig {
[JsonProperty(En ? "Use Facepunch Game Tips (notification bar above hotbar)? [true/false]" : "Использовать ли Facepunch Game Tip (оповещения над слотами быстрого доступа игрока)? [true/false]")]
public bool IsGameTip {
get;
set;
}
[JsonProperty(En ? "Style (0 - Blue Normal, 1 - Red Normal, 2 - Blue Long, 3 - Blue Short, 4 - Server Event)" : "Стиль (0 - Blue Normal, 1 - Red Normal, 2 - Blue Long, 3 - Blue Short, 4 - Server Event)")]
public int Style {
get;
set;
}
}
public class GuiAnnouncementsConfig {
[JsonProperty(En ? "Do you use the GUI Announcements plugin? [true/false]" : "Использовать ли плагин GUI Announcements? [true/false]")]
public bool IsGuiAnnouncements {
get;
set;
}
[JsonProperty(En ? "Banner color" : "Цвет баннера")]
public string BannerColor {
get;
set;
}
[JsonProperty(En ? "Text color" : "Цвет текста")]
public string TextColor {
get;
set;
}
[JsonProperty(En ? "Adjust Vertical Position" : "Отступ от верхнего края")]
public float ApiAdjustVPosition {
get;
set;
}
}
public class NotifyConfig {
[JsonProperty(En ? "Do you use the Notify plugin? [true/false]" : "Использовать ли плагин Notify? [true/false]")]
public bool IsNotify {
get;
set;
}
[JsonProperty(En ? "Type" : "Тип")]
public string Type {
get;
set;
}
}
public class NpcWear {
[JsonProperty("ShortName")]
public string ShortName {
get;
set;
}
[JsonProperty("SkinID (0 - default)")]
public ulong SkinId {
get;
set;
}
}
public class SledgeBelt {
[JsonProperty("ShortName")]
public string ShortName {
get;
set;
}
[JsonProperty("SkinID (0 - default)")]
public ulong SkinId {
get;
set;
}
[JsonProperty(En ? "Probability Percent [0.0-100.0]" : "Вероятность [0.0-100.0]")]
public float Chance {
get;
set;
}
}
public class JuggernautBelt {
[JsonProperty("ShortName")]
public string ShortName {
get;
set;
}
[JsonProperty("SkinID (0 - default)")]
public ulong SkinId {
get;
set;
}
[JsonProperty(En ? "Mods" : "Модификации на оружие")]
public HashSet<string> Mods {
get;
set;
}
[JsonProperty(En ? "Ammo" : "Боеприпасы")]
public string Ammo {
get;
set;
}
[JsonProperty(En ? "Probability Percent [0.0-100.0]" : "Вероятность [0.0-100.0]")]
public float Chance {
get;
set;
}
[JsonProperty(En ? "Damage Scale" : "Множитель урона")]
public float DamageScale {
get;
set;
}
}
public class RocketmanBelt {
[JsonProperty("ShortName")]
public string ShortName {
get;
set;
}
[JsonProperty("SkinID (0 - default)")]
public ulong SkinId {
get;
set;
}
[JsonProperty(En ? "Mods" : "Модификации на оружие")]
public HashSet<string> Mods {
get;
set;
}
[JsonProperty(En ? "Ammo" : "Боеприпасы")]
public string Ammo {
get;
set;
}
[JsonProperty(En ? "Probability Percent [0.0-100.0]" : "Вероятность [0.0-100.0]")]
public float Chance {
get;
set;
}
}
public class SledgeConfig {
[JsonProperty(En ? "Worn items" : "Одежда")]
public HashSet<NpcWear> WearItems {
get;
set;
}
[JsonProperty(En ? "Weapons" : "Оружие")]
public HashSet<SledgeBelt> Weapons {
get;
set;
}
[JsonProperty(En ? "The probability of Beancan Grenade appearance" : "Вероятность появления бобовой гранаты")]
public float BeancanGrenade {
get;
set;
}
[JsonProperty(En ? "Health Points" : "Кол-во ХП")]
public float Health {
get;
set;
}
[JsonProperty(En ? "Damage Scale" : "Множитель урона")]
public float DamageScale {
get;
set;
}
[JsonProperty(En ? "Turret damage scale" : "Множитель урона от турелей")]
public float TurretDamageScale {
get;
set;
}
[JsonProperty(En ? "Speed" : "Скорость")]
public float Speed {
get;
set;
}
}
public class JuggernautConfig {
[JsonProperty(En ? "Worn items" : "Одежда")]
public HashSet<NpcWear> WearItems {
get;
set;
}
[JsonProperty(En ? "Weapons" : "Оружие")]
public HashSet<JuggernautBelt> Weapons {
get;
set;
}
[JsonProperty(En ? "The probability of Beancan Grenade appearance" : "Вероятность появления бобовой гранаты")]
public float BeancanGrenade {
get;
set;
}
[JsonProperty(En ? "Health Points" : "Кол-во ХП")]
public float Health {
get;
set;
}
[JsonProperty(En ? "Turret damage scale" : "Множитель урона от турелей")]
public float TurretDamageScale {
get;
set;
}
[JsonProperty(En ? "Aim Cone Scale" : "Множитель разброса")]
public float AimConeScale {
get;
set;
}
[JsonProperty(En ? "Speed" : "Скорость")]
public float Speed {
get;
set;
}
[JsonProperty(En ? "Attack Range Multiplier" : "Множитель радиуса атаки")]
public float AttackRangeMultiplier {
get;
set;
}
}
public class RocketmanConfig {
[JsonProperty(En ? "Worn items" : "Одежда")]
public HashSet<NpcWear> WearItems {
get;
set;
}
[JsonProperty(En ? "Weapons" : "Оружие")]
public HashSet<RocketmanBelt> Weapons {
get;
set;
}
[JsonProperty(En ? "The probability of F1 Grenade appearance" : "Вероятность появления гранаты F1")]
public float GrenadeF1 {
get;
set;
}
[JsonProperty(En ? "Health Points" : "Кол-во ХП")]
public float Health {
get;
set;
}
[JsonProperty(En ? "Damage Scale" : "Множитель урона")]
public float DamageScale {
get;
set;
}
[JsonProperty(En ? "Turret damage scale" : "Множитель урона от турелей")]
public float TurretDamageScale {
get;
set;
}
[JsonProperty(En ? "Aim Cone Scale" : "Множитель разброса")]
public float AimConeScale {
get;
set;
}
[JsonProperty(En ? "Speed" : "Скорость")]
public float Speed {
get;
set;
}
[JsonProperty(En ? "Attack Range Multiplier" : "Множитель радиуса атаки")]
public float AttackRangeMultiplier {
get;
set;
}
}
public class BomberConfig {
[JsonProperty(En ? "Worn items" : "Одежда")]
public HashSet<NpcWear> WearItems {
get;
set;
}
[JsonProperty(En ? "Health Points" : "Кол-во ХП")]
public float Health {
get;
set;
}
[JsonProperty(En ? "Attack Range Multiplier" : "Множитель радиуса атаки")]
public float AttackRangeMultiplier {
get;
set;
}
[JsonProperty(En ? "Speed" : "Скорость")]
public float Speed {
get;
set;
}
[JsonProperty(En ? "NPC damage to foundation" : "Кол-во урона, которое наносит NPC по фундаменту")]
public float DamageFoundation {
get;
set;
}
[JsonProperty(En ? "NPC damage to сonstruction" : "Кол-во урона, которое наносит NPC по строительному объекту")]
public float DamageConstruction {
get;
set;
}
[JsonProperty(En ? "NPC damage to player" : "Кол-во урона, которое наносит NPC по игроку")]
public float DamagePlayer {
get;
set;
}
}
public class AmountConfig {
[JsonProperty(En ? "Chance probability [0.0-100.0]" : "Шанс [0.0-100.0]")]
public float Chance {
get;
set;
}
[JsonProperty(En ? "Count" : "Кол-во")]
public int Count {
get;
set;
}
}
public class PresetConfig {
[JsonProperty(En ? "Type of NPC" : "Тип NPC")]
public string ShortName {
get;
set;
}
[JsonProperty(En ? "Setting the number of NPCs depending on the probability" : "Настройка кол-ва NPC в зависимoсти от вероятности")]
public HashSet<AmountConfig> Config {
get;
set;
}
}
public class WaveConfig {
[JsonProperty(En ? "Level" : "Уровень")]
public int Level {
get;
set;
}
[JsonProperty(En ? "Preparation time [sec.]" : "Время подготовки [sec.]")]
public int TimeToStart {
get;
set;
}
[JsonProperty(En ? "Duration [sec.]" : "Длительность [sec.]")]
public int Duration {
get;
set;
}
[JsonProperty(En ? "Time until appearance of new NPCs [sec.]" : "Время появления новых NPC [sec.]")]
public int TimerNpc {
get;
set;
}
[JsonProperty(En ? "NPC Sets" : "Наборы NPC")]
public HashSet<PresetConfig> Presets {
get;
set;
}
}
public class DifficultyLevelConfig {
[JsonProperty(En ? "Name" : "Название")]
public string Name {
get;
set;
}
[JsonProperty(En ? "The maximum number of Auto Turrets in the house to start the event" : "Максимальное кол-во турелей в доме для запуска ивента")]
public int MaxTurrets {
get;
set;
}
[JsonProperty(En ? "The maximum number of foundations in the house to start the event" : "Максимальное кол-во фундаментов в доме для запуска ивента")]
public int MaxFoundations {
get;
set;
}
[JsonProperty(En ? "Amount of time that a player will have to wait to launch an event at the same level once an event has finished" : "Время, которое игрок не сможет запускать ивент этого уровня, после того как ивент был окончен [sec.]")]
public double Cooldown {
get;
set;
}
[JsonProperty(En ? "The maximum number of events allowed simultaneously for this difficulty" : "Максимальное кол-во ивентов этого уровня одновременно на сервере")]
public int MaxCount {
get;
set;
}
[JsonProperty(En ? "List of attack waves" : "Список волн атаки")]
public HashSet<WaveConfig> Waves {
get;
set;
}
[JsonProperty(En ? "Locked crate setting" : "Настройка заблокированного ящика")]
public HackCrateConfig HackCrate {
get;
set;
}
}
public class CrateConfig {
[JsonProperty("Prefab")]
public string Prefab {
get;
set;
}
[JsonProperty(En ? "Chance [0.0-100.0]" : "Шанс выпадения предмета [0.0-100.0]")]
public float Chance {
get;
set;
}
}
public class FlareConfig {
[JsonProperty(En ? "Name" : "Название")]
public string Name {
get;
set;
}
[JsonProperty("SkinID")]
public ulong SkinId {
get;
set;
}
[JsonProperty(En ? "Name of difficulty level" : "Название уровня сложности")]
public string NameDifficultyLevel {
get;
set;
}
[JsonProperty(En ? "Crate appearance settings" : "Настройка появления в ящиках")]
public HashSet<CrateConfig> Crates {
get;
set;
}
}
private class PluginConfig {
[JsonProperty(En ? "NPC Configuration - Sledge" : "Конфигурация NPC - Sledge")]
public SledgeConfig Sledge {
get;
set;
}
[JsonProperty(En ? "NPC Configuration - Juggernaut" : "Конфигурация NPC - Juggernaut")]
public JuggernautConfig Juggernaut {
get;
set;
}
[JsonProperty(En ? "NPC Configuration - Rocketman" : "Конфигурация NPC - Rocketman")]
public RocketmanConfig Rocketman {
get;
set;
}
[JsonProperty(En ? "NPC Configuration - Bomber" : "Конфигурация NPC - Bomber")]
public BomberConfig Bomber {
get;
set;
}
[JsonProperty(En ? "NPC damage multipliers depending on the attacker's weapon" : "Множители урона по NPC в зависимости от оружия атакующего")]
public Dictionary<string, float> WeaponToScaleDamageNpc {
get;
set;
}
[JsonProperty(En ? "Difficulty levels setting" : "Настройка уровней сложности")]
public HashSet<DifficultyLevelConfig> DifficultyLevels {
get;
set;
}
[JsonProperty(En ? "Flares setting" : "Настройка сигнальных шашек")]
public HashSet<FlareConfig> Flares {
get;
set;
}
[JsonProperty(En ? "GUI setting" : "Настройки GUI")]
public GuiConfig Gui {
get;
set;
}
[JsonProperty(En ? "Prefix of chat messages" : "Префикс сообщений в чате")]
public string Prefix {
get;
set;
}
[JsonProperty(En ? "Do you use global chat? [true/false]" : "Использовать ли чат? [true/false]")]
public bool IsChat {
get;
set;
}
[JsonProperty(En ? "Facepunch Game Tips setting" : "Настройка сообщений Facepunch Game Tip")]
public GameTipConfig GameTip {
get;
set;
}
[JsonProperty(En ? "GUI Announcements setting" : "Настройка GUI Announcements")]
public GuiAnnouncementsConfig GuiAnnouncements {
get;
set;
}
[JsonProperty(En ? "Notify setting" : "Настройка Notify")]
public NotifyConfig Notify {
get;
set;
}
[JsonProperty(En ? "Can the non-owner of the event loot the locked crate? [true/false]" : "Может ли не владелец ивента грабить заблокированный ящик? [true/false]")]
public bool CanLootCrateNonOwner {
get;
set;
}
[JsonProperty(En ? "Can the non-owner of the event deal damage to the NPC? [true/false]" : "Может ли не владелец ивента наносить урон по NPC? [true/false]")]
public bool DamageNpc {
get;
set;
}
[JsonProperty(En ? "Can an Npc attack a non-owner of the event? [true/false]" : "Может ли Npc атаковать не владельца ивента? [true/false]")]
public bool TargetNpc {
get;
set;
}
[JsonProperty(En ? "List of prefabs that you can build in the event area" : "Список prefab-ов, которые вы можете строить в зоне ивента")]
public HashSet<string> Prefabs {
get;
set;
}
[JsonProperty(En ? "Allow OnItemSplit hook to work? [true/false]" : "Должен ли работать хук OnItemSplit? [true/false]")]
public bool OnItemSplit {
get;
set;
}
[JsonProperty(En ? "Configuration version" : "Версия конфигурации")]
public VersionNumber PluginVersion {
get;
set;
}
public static PluginConfig DefaultConfig() {
return new PluginConfig {
Sledge = new SledgeConfig {
WearItems = new HashSet<NpcWear> {
new NpcWear {
ShortName = "frankensteins.monster.01.head", SkinId = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.01.torso", SkinId = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.01.legs", SkinId = 0
}
}
, Weapons = new HashSet<SledgeBelt> {
new SledgeBelt {
ShortName = "paddle", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "spear.stone", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "bone.club", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "knife.combat", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "longsword", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "pitchfork", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "knife.bone", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "mace", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "salvaged.cleaver", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "knife.butcher", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "machete", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "salvaged.sword", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "spear.wooden", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "stone.pickaxe", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "torch", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "axe.salvaged", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "pickaxe", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "hammer.salvaged", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "hatchet", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "stonehatchet", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "icepick.salvaged", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "sickle", SkinId = 0, Chance = 100f
}
, new SledgeBelt {
ShortName = "mace.baseballbat", SkinId = 0, Chance = 100f
}
}
, BeancanGrenade = 7.5f, Health = 50f, DamageScale = 0.4f, TurretDamageScale = 0.25f, Speed = 8f
}
, Juggernaut = new JuggernautConfig {
WearItems = new HashSet<NpcWear> {
new NpcWear {
ShortName = "frankensteins.monster.03.head", SkinId = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.03.torso", SkinId = 0
}
, new NpcWear {
ShortName = "frankensteins.monster.03.legs", SkinId = 0
}
}
, Weapons = new HashSet<JuggernautBelt> {
new JuggernautBelt {
ShortName = "hmlmg", SkinId = 0, Ammo = string.Empty, Mods = new HashSet<string> {
"weapon.mod.holosight", "weapon.mod.flashlight"
}
, Chance = 100f, DamageScale = 0.2f
}
}
, BeancanGrenade = 0f, Health = 300f, TurretDamageScale = 0.25f, AimConeScale = 1.1f, Speed = 5f, AttackRangeMultiplier = 1f
}
, Rocketman = new RocketmanConfig {
WearItems = new HashSet<NpcWear> {
new NpcWear {
ShortName = "hazmatsuit.lumberjack", SkinId = 0
}
}
, Weapons = new HashSet<RocketmanBelt> {
new RocketmanBelt {
ShortName = "rifle.lr300", SkinId = 0, Mods = new HashSet<string> {
"weapon.mod.holosight", "weapon.mod.flashlight"
}
, Ammo = string.Empty, Chance = 100f
}
}
, GrenadeF1 = 15f, Health = 175f, DamageScale = 0.4f, TurretDamageScale = 0.25f, AimConeScale = 1.5f, Speed = 7.5f, AttackRangeMultiplier = 0.5f
}
, Bomber = new BomberConfig {
WearItems = new HashSet<NpcWear> {
new NpcWear {
ShortName = "scarecrow.suit", SkinId = 0
}
, new NpcWear {
ShortName = "metal.plate.torso", SkinId = 860210174
}
,
}
, Health = 100f, AttackRangeMultiplier = 1f, Speed = 5.5f, DamageFoundation = 150f, DamageConstruction = 150f, DamagePlayer = 60f
}
, WeaponToScaleDamageNpc = new Dictionary<string, float> {
["grenade.beancan.deployed"]
= 0.5f, ["grenade.f1.deployed"] = 0.5f, ["explosive.satchel.deployed"] = 0.5f, ["explosive.timed.deployed"] = 0.5f, ["rocket_hv"] = 0.5f, ["rocket_basic"] = 0.5f, ["40mm_grenade_he"] = 0.5f
}
, DifficultyLevels = new HashSet<DifficultyLevelConfig> {
new DifficultyLevelConfig {
Name = "EASY", MaxTurrets = 3, MaxFoundations = 9, Cooldown = 21600, MaxCount = 5, Waves = new HashSet<WaveConfig> {
new WaveConfig {
Level = 1, TimeToStart = 30, Duration = 90, TimerNpc = 15, Presets = new HashSet<PresetConfig> {
new PresetConfig {
ShortName = "Sledge", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 6
}
}
}
}
}
, new WaveConfig {
Level = 2, TimeToStart = 30, Duration = 120, TimerNpc = 15, Presets = new HashSet<PresetConfig> {
new PresetConfig {
ShortName = "Sledge", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 6
}
}
}
, new PresetConfig {
ShortName = "Bomber", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 1
}
}
}
}
}
, new WaveConfig {
Level = 3, TimeToStart = 30, Duration = 120, TimerNpc = 15, Presets = new HashSet<PresetConfig> {
new PresetConfig {
ShortName = "Sledge", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 6
}
}
}
, new PresetConfig {
ShortName = "Bomber", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 1
}
}
}
, new PresetConfig {
ShortName = "Juggernaut", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 75f, Count = 1
}
}
}
}
}
}
, HackCrate = new HackCrateConfig {
UnlockTime = 10f, TypeLootTable = 5, PrefabLootTable = new PrefabLootTableConfig {
Min = 3, Max = 3, UseCount = true, Prefabs = new List<PrefabConfig> {
new PrefabConfig {
Chance = 100f, PrefabDefinition = "assets/prefabs/deployable/chinooklockedcrate/codelockedhackablecrate.prefab"
}
, new PrefabConfig {
Chance = 100f, PrefabDefinition = "assets/rust.ai/agents/npcplayer/humannpc/scientist/scientistnpc_heavy.prefab"
}
, new PrefabConfig {
Chance = 100f, PrefabDefinition = "assets/bundled/prefabs/radtown/crate_normal.prefab"
}
}
}
, OwnLootTable = new LootTableConfig {
Min = 1, Max = 1, UseCount = false, Items = new List<ItemConfig> {
new ItemConfig {
ShortName = "scrap", MinAmount = 500, MaxAmount = 1000, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = string.Empty
}
, new ItemConfig {
ShortName = "ammo.rifle", MinAmount = 500, MaxAmount = 750, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = string.Empty
}
, new ItemConfig {
ShortName = "ammo.pistol", MinAmount = 500, MaxAmount = 750, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = string.Empty
}
, new ItemConfig {
ShortName = "syringe.medical", MinAmount = 30, MaxAmount = 60, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = string.Empty
}
, new ItemConfig {
ShortName = "largemedkit", MinAmount = 5, MaxAmount = 10, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = string.Empty
}
, new ItemConfig {
ShortName = "grenade.f1", MinAmount = 5, MaxAmount = 10, Chance = 100f, IsBluePrint = false, SkinId = 0, Name = string.Empty
}
, new ItemConfig {
ShortName = "flare", MinAmount = 1, MaxAmount = 1, Chance = 100f, IsBluePrint = false, SkinId = 2888602942, Name = "Flare for MEDIUM"
}
}
}
}
}
, new DifficultyLevelConfig {
Name = "MEDIUM", MaxTurrets = 6, MaxFoundations = 16, Cooldown = 21600, MaxCount = 3, Waves = new HashSet<WaveConfig> {
new WaveConfig {
Level = 1, TimeToStart = 30, Duration = 90, TimerNpc = 10, Presets = new HashSet<PresetConfig> {
new PresetConfig {
ShortName = "Sledge", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 8
}
}
}
, new PresetConfig {
ShortName = "Bomber", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 1
}
}
}
}
}
, new WaveConfig {
Level = 2, TimeToStart = 30, Duration = 120, TimerNpc = 10, Presets = new HashSet<PresetConfig> {
new PresetConfig {
ShortName = "Sledge", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 8
}
}
}
, new PresetConfig {
ShortName = "Bomber", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 1
}
}
}
, new PresetConfig {
ShortName = "Juggernaut", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 50f, Count = 1
}
}
}
, new PresetConfig {
ShortName = "Rocketman", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 2
}
}
}
}
}
, new WaveConfig {
Level = 3, TimeToStart = 30, Duration = 120, TimerNpc = 15, Presets = new HashSet<PresetConfig> {
new PresetConfig {
ShortName = "Sledge", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 8
}
}
}
, new PresetConfig {
ShortName = "Bomber", Config = new HashSet<AmountConfig> {
new AmountConfig {
Chance = 100f, Count = 1
}
}
}
, new PresetConfig {
ShortName = "Juggernaut", Config = new HashSet<AmountConfig> {
// ... [Code preview truncated due to length. Full source in attached file] ...