C#:
// Все права принадлежат дискорд сообществу https://discord.gg/VgNHPpNrz6
// Reference: 0Harmony
using Facepunch;
#if CARBON
using HarmonyLib;
#else
using Harmony;
#endif
using Mono.Cecil;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Oxide.Core;
using Oxide.Core.Configuration;
using Oxide.Core.Libraries.Covalence;
using Oxide.Core.Plugins;
using Oxide.Game.Rust.Cui;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using UnityEngine;
using WebSocketSharp;
/* Ideas
* Vehiclular combatant - more damage to vehicles (maybe including bradley and heli?)
* Add heli as XP source.* Add CUI option to enable/disable components that are shredded by the shredder perk.* Add an XP cap for certain sources (quests, building etc).-
* Colour the pump bar based on xp progression for the level
* Possible buff for healing percentage when using medical deviucs with whitelist or blacklist
* - Add option to disable BotRespawn
* - Reach out to Steen and ask him to add support natively for xp
* Add a dictionary to override the yield for certain ore types.* Check the HV rockets update to see why it's causing issues.*/
/* 1.4.12
* Fixed an issue with boat speeds slowing down once the turbo perk was disabled.* Added lang support for custom skills.* Updated the implementation of buff descriptions.This will allow buffs with more involved descriptions to display their descriptions if used as an ultimate.* Updated SkillTreeXPEvent integration so it will only call on the plugin if an event is running (Requires SkillTreeXPEvent 1.0.1+).* Updated an error with the AnimalBuffFinishedMsg lang entry.* Added support for Gingerbread NPCs.* Added support for a Roguelike mode in the config.This will reset players data on death (defalt: disabled).* Fixed an issue where the Track command would locate deployed animals from DeployableNature.*/
namespace Oxide.Plugins {
[Info("Skill Tree", "imthenewguy", "1.4.12")]
[Description("Skills on a tree!")]
class SkillTree : RustPlugin {
#region Config
private Configuration config;
public class Configuration {
[JsonProperty("General settings")]
public GeneralSettings general_settings = new GeneralSettings();
public class GeneralSettings {
[JsonProperty("Skill points per level")]
public int points_per_level = 2;
[JsonProperty("Maximum points a player can spend [default]")]
public int max_skill_points = 200;
[JsonProperty("Modified max skill points based on permissions [must be higher than default]")]
public Dictionary<string, int> max_skill_points_override = new Dictionary<string, int>();
[JsonProperty("Maximum level a player can get to")]
public int max_player_level = 100;
[JsonProperty("Allow players to respec their skill points")]
public bool allow_respecs = true;
[JsonProperty("Cost per point to respec [default]")]
public double respec_cost = 30;
[JsonProperty("Cost per point to respec based on permissions [must be lower than default]")]
public Dictionary<string, double> respec_cost_override = new Dictionary<string, double>();
[JsonProperty("Permission based level requirement override")]
public Dictionary<string, PermOverride> level_requirement_override = new Dictionary<string, PermOverride>(StringComparer.InvariantCultureIgnoreCase);
[JsonProperty("Permission based point requirement override")]
public Dictionary<string, PermOverride> point_requirement_override = new Dictionary<string, PermOverride>(StringComparer.InvariantCultureIgnoreCase);
[JsonProperty("Currency type to respec [scrap, economics, srp, custom]")]
public string respec_currency = "scrap";
[JsonProperty("If currency is set to custom, what are the details of the item")]
public CustomCurrency respec_currency_custom = new CustomCurrency();
[JsonProperty("Multiplier increase after each respec [0.2 = a 20% increase in the cost to respec each time.0 = no increase] [resets on wipe or data reset]")]
public float respec_multiplier = 0;
[JsonProperty("Maximum value that the respec multiplier can get to [0 = no limit]")]
public float respec_multiplier_max = 0;
[JsonProperty("List of rewards the player receives based on level")]
public Dictionary<int, LevelReward> level_rewards = new Dictionary<int, LevelReward>();
[JsonProperty("Require players to have specific tree permissions to open them")]
public bool require_tree_perms = false;
[JsonProperty("Show the quick navigation buttons to the player")]
public bool show_navigation_buttons = true;
[JsonProperty("Drop bag on death")]
public bool drop_bag_on_death = true;
[JsonProperty("XP pump bar settings")]
public PumpBar pump_bar_settings = new PumpBar();
[JsonProperty("Cache images using skinid or url? [skinid, url]")]
public string image_cache_source = "skinid";
[JsonProperty("Redownload all images when the plugin reloads if using URL?")]
public bool replace_on_reload = false;
}
[JsonProperty("Base yield settings")]
public BaseYieldSettings base_yield_settings = new BaseYieldSettings();
public class BaseYieldSettings {
[JsonProperty("Allow Skill Tree to adjust the base amount of resource received? Buffs will base their modifiers off of the amended base amount.")]
public bool adjust_base_yield = false;
[JsonProperty("Yield types multipliers [1.0 = vanilla]")]
public Dictionary<YieldTypes, float> multipliers = new Dictionary<YieldTypes, float>();
}
[JsonProperty("Buff settings")]
public BuffSettings buff_settings = new BuffSettings();
public class BuffSettings {
[JsonProperty("Minimum components for the component perk")]
public int min_components = 1;
[JsonProperty("Maximum components for the component perk")]
public int max_components = 1;
[JsonProperty("Minimum electrical components for the electrical component perk")]
public int min_electrical_components = 1;
[JsonProperty("Maximum electrical components for the electrical component perk")]
public int max_electrical_components = 1;
[JsonProperty("Minimum additional scrap to be added to crates and barrels")]
public int min_extra_scrap = 1;
[JsonProperty("Maximum additional scrap to be added to crates and barrels")]
public int max_extra_scrap = 2;
[JsonProperty("PVP Buff Critical damage modifier.Picks a random value between 0 and the declared value, and += the damage% onto the hit")]
public float pvp_critical_modifier = 0.3f;
[JsonProperty("Should the LootPickup buff only work with melee weapons?")]
public bool lootPickupBuffMeleeOnly = false;
[JsonProperty("Should we have a maximum distance for the loot pickup buff [0 = unlimited]?")]
public float loot_pickup_buff_max_distance = 0;
[JsonProperty("Allow the LootPickup buff to work with road-side signs?")]
public bool allow_roadsigns = false;
[JsonProperty("List of animals for animal resist ability", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> animals = new List<string>();
[JsonProperty("Details of a horse to change when a player mounts a horse with the relevant perk unlocked")]
public HorseStats horse_buff_info = new HorseStats();
[JsonProperty("Delay for HealthRegen perk after taking damage")]
public float health_regen_combat_delay = 5f;
[JsonProperty("Delay between attempts at tracking animals")]
public float track_delay = 10f;
[JsonProperty("List of skins that the rationer perk will not refund")]
public List<ulong> no_refund_item_skins = new List<ulong>();
[JsonProperty("Bag cooldown time")]
public float bag_cooldown_time = 10f;
[JsonProperty("Bag prefab")]
public string bag_prefab = "assets/prefabs/deployable/large wood storage/box.wooden.large.prefab";
[JsonProperty("Allow the Harvest Grown Yield to increase the amount of clones a player receives?")]
public bool clone_yield = true;
[JsonProperty("Primitive weapons for the primitive weapons ability", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> primitive_weapons = new List<string>();
[JsonProperty("Harvesting yield blacklist [items listed here will not be affected by the harvesting yield perks]")]
public List<string> harvest_yield_blacklist = new List<string>();
[JsonProperty("List of items that the Durability perk will not work with")]
public List<string> durability_blacklist = new List<string>();
[JsonProperty("Force all modified extended weapons to unload their ammo when the plugin unloads/hook all users with the buff log off?")]
public bool force_unload_extended_mag_weapons_unload = false;
[JsonProperty("Prevent flyhack kicks when a player lands?")]
public bool prevent_flyhack_kick_fall_damage = false;
[JsonProperty("Automatically apply the boat turbo when a player mounts the boat? [Disables the turbo command]")]
public bool boat_turbo_on_mount = false;
[JsonProperty("Forager settings")]
public ForagerSettings forager_settings = new ForagerSettings();
public class ForagerSettings {
[JsonProperty("Command to use the ability")]
public string command = "forage";
[JsonProperty("Distance to search for map collectibles")]
public float distance = 100f;
[JsonProperty("Time that the locations are displayed on the screen")]
public float time_on_screen = 60f;
[JsonProperty("Usage cooldown")]
public float cooldown = 60f;
[JsonProperty("Black list of shortnames for collecibles that won't be displayed")]
public List<string> blacklist = new List<string>();
[JsonProperty("Display colours")]
public Dictionary<string, float[]> displayColours = new Dictionary<string, float[]>();
}
[JsonProperty("Tea looter settings")]
public TeaLooterSettings tea_looter_settings = new TeaLooterSettings();
public class TeaLooterSettings {
[JsonProperty("Minimum stack of tea that the player will receive when the Tea Looter buff procs?")]
public int min_tea = 1;
[JsonProperty("Maximum stack of tea that the player will receive when the Tea Looter buff procs?")]
public int max_tea = 1;
[JsonProperty("Tea looter table [shortname : drop weight]")]
public Dictionary<string, int> TeaDropTable = new Dictionary<string, int>(StringComparer.InvariantCultureIgnoreCase);
[JsonProperty("Containers that tea can be found in")]
public List<string> containers = new List<string>();
}
[JsonProperty("Sonar settings")]
public SonarSettings sonar_settings = new SonarSettings();
public class SonarSettings {
[JsonProperty("Command to use the ability")]
public string command = "sonar";
[JsonProperty("Distance to search for underwater entities")]
public float distance = 300f;
[JsonProperty("Time that the locations are displayed on the screen")]
public float time_on_screen = 10f;
[JsonProperty("Usage cooldown")]
public float cooldown = 10f;
public bool show_tugboats = true;
public bool show_dive_sites = true;
public bool show_sharks = true;
public bool show_scientists = true;
public bool show_players = false;
}
[JsonProperty("Raid perk settings")]
public RaidTreeSettings raid_perk_settings = new RaidTreeSettings();
public class RaidTreeSettings {
[JsonProperty("Settings for trap_damage_reduction")]
public TrapDamageReductionSettings trap_damage_reduction_settings = new TrapDamageReductionSettings();
public class TrapDamageReductionSettings {
[JsonProperty("Traps blacklist - will ignore the buff")]
public List<string> blacklist = new List<string>();
[JsonProperty("Only allow this buff to work with raidable base traps")]
public bool raidable_bases_only = false;
}
[JsonProperty("Settings for trap_damage_increase")]
public TrapDamageIncreaseSettings trap_damage_increase_settings = new TrapDamageIncreaseSettings();
public class TrapDamageIncreaseSettings {
[JsonProperty("Traps blacklist - will ignore the buff")]
public List<string> blacklist = new List<string>();
[JsonProperty("Only allow this buff to work with raidable base traps")]
public bool raidable_bases_only = false;
}
[JsonProperty("Settings for Personal_Explosive_Reduction")]
public PersonalExplosiveReductionSettings personal_explosive_reduction_settings = new PersonalExplosiveReductionSettings();
public class PersonalExplosiveReductionSettings {
[JsonProperty("Prefabs blacklist - will ignore the buff")]
public List<string> blacklist = new List<string>();
[JsonProperty("Work with fire explosives such as molotov's and incin rockets?")]
public bool fire_damage_reduction = true;
}
[JsonProperty("Settings for Double_Explosion_chance")]
public DoubleExplosionChanceSettings Double_Explosion_chance_settings = new DoubleExplosionChanceSettings();
public class DoubleExplosionChanceSettings {
[JsonProperty("Prefabs black - will not trigger with items listed here")]
public List<string> blacklist = new List<string>();
[JsonProperty("Only allow this buff to work with raidable base?")]
public bool raidable_bases_only = false;
}
[JsonProperty("Settings for Explosion_Radius")]
public ExpolosionRadiusSettings Explosion_Radius_settings = new ExpolosionRadiusSettings();
public class ExpolosionRadiusSettings {
[JsonProperty("Prefabs blacklist - will ignore the buff")]
public List<string> blacklist = new List<string>();
[JsonProperty("Add the difference to the minimum explosion radius")]
public bool add_to_minimum = true;
[JsonProperty("Only allow this buff to work with raidable base?")]
public bool raidable_bases_only = false;
}
[JsonProperty("Settings for Lock_Picker")]
public LockPickerSettings Lock_Picker_settings = new LockPickerSettings();
public class LockPickerSettings {
[JsonProperty("Command required for the player to activate their lockpick ability")]
public string pick_command = "picklock";
[JsonProperty("Time after the command has been used before the ability use expires [seconds]")]
public float time = 30;
[JsonProperty("Delay before the Lock_Picker ability can be used again [seconds]")]
public float use_delay = 600;
[JsonProperty("Only allow this buff to work with raidable base?")]
public bool raidable_bases_only = false;
[JsonProperty("Damage the player receives when they fail an attempt")]
public float damage_per_fail = 0;
[JsonProperty("Show the pick lock timer when activating the ability")]
public bool show_timer = true;
[JsonProperty("How often should the timer update")]
public int timer_tick_rate = 1;
[JsonProperty("Set the lock to unlocked when successfully picking a lock? [false will open the entity but keep it locked]")]
public bool unlock_entity = false;
}
[JsonProperty("Settings for Dudless_Explosive")]
public DudlessExplosiveSettings Dudless_Explosiv_settings = new DudlessExplosiveSettings();
public class DudlessExplosiveSettings {
[JsonProperty("Only allow this buff to work with raidable base?")]
public bool raidable_bases_only = false;
}
[JsonProperty("Settings for Trap_Spotter")]
public TrapSpotterSettings Trap_Spotter_settings = new TrapSpotterSettings();
public class TrapSpotterSettings {
[JsonProperty("Max distance from the player to search for traps")]
public float distance = 20f;
[JsonProperty("Cooldown between uses [seconds]")]
public float cooldown = 60f;
[JsonProperty("Time that the traps will be displayed for [seconds]")]
public float time_on_screen = 60f;
[JsonProperty("Show the names of each trap prefab")]
public bool show_names = true;
[JsonProperty("Command to perform the search")]
public string command = "traps";
[JsonProperty("Only allow this buff to work with raidable base?")]
public bool raidable_bases_only = false;
[JsonProperty("Colours that the traps will be displayed in")]
public Dictionary<string, float[]> trap_colours = new Dictionary<string, float[]>();
}
}
[JsonProperty("Underwater Breathing settings")]
public UnderwaterBreathingSettings underwaterSettings = new UnderwaterBreathingSettings();
public class UnderwaterBreathingSettings {
public string anchor_min = "1 1";
public string anchor_max = "1 1";
public string offset_min = "-48 -48";
public string offset_max = "-12 -12";
}
[JsonProperty("Allow the UnderwaterDamageBonus to function in PVP")]
public bool UnderwaterDamageBonus_pvp = true;
[JsonProperty("Base the crafting xp on the time it takes to craft the item? [false will use blueprint craft time]")]
public bool timeBasedCraftingXP = true;
}
[JsonProperty("Chat command settings")]
public ChatCommands chat_commands = new ChatCommands();
public class ChatCommands {
[JsonProperty("Use mouse 3 to toggle the boat turbo (performance heavy on high pop servers).Set false to use a chat command instead")]
public bool use_input_key_boat = false;
[JsonProperty("Chat command for turbo")]
public string turbo_cmd = "turbo";
[JsonProperty("Chat commands to open the skill tree", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> chat_cmd = new List<string>() {
"st", "skilltree", "skills"
}
;
[JsonProperty("Chat/console commands to open the score board", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> score_chat_cmd = new List<string>() {
"score", "scoreboard"
}
;
[JsonProperty("Chat command for tracking an animal with the AnimalTracker buff")]
public string track_animal_cmd = "track";
}
[JsonProperty("XP settings")]
public XPSettings xp_settings = new XPSettings();
public class XPSettings {
[JsonProperty("XP Loss settings")]
public XPLossSettings xp_loss_settings = new XPLossSettings();
public class XPLossSettings {
[JsonProperty("Allow players to go into xp debt if they lose more xp than their level would allow?")]
public bool allow_xp_debt = true;
[JsonProperty("Use the players xp (not the level xp) to calculate loss")]
public bool percentage_of_current_xp = false;
[JsonProperty("Death penalty grace period - players won't lose xp if they die again within the specified time [seconds]")]
public float no_xp_loss_time = 0;
[JsonProperty("Percentage of xp into their current level that players lose when killed in PVP")]
public double pvp_death_penalty = 20;
[JsonProperty("Percentage of xp into their current level that players lose when killed in PVE")]
public double pve_death_penalty = 20;
[JsonProperty("Percentage of xp into their current level that players lose when they suicide")]
public double suicide_death_penalty = 0;
[JsonProperty("Prevent xp loss when a player is offline?")]
public bool prevent_offline_xp_loss = true;
[JsonProperty("Permission based modifiers [1.0 = no reduced amount]")]
public Dictionary<string, double> xp_loss_override = new Dictionary<string, double>();
}
[JsonProperty("Permissions to adjust xp gain modifiers (skilltree.<perm>) [1.0 is default modifier]")]
public Dictionary<string, double> xp_perm_modifier = new Dictionary<string, double>();
[JsonProperty("How long should the xp be displayed for")]
public float xp_display_time = 1f;
[JsonProperty("Colour of the xp text when unmodified")]
public string xp_display_col_unmodified = "FFFFFF";
[JsonProperty("Colour of the xp text when modified")]
public string xp_display_col_modified = "00b6ff";
[JsonProperty("Prevent XP loss when dying at an event hosted by EventManager")]
public bool prevent_xp_loss = true;
[JsonProperty("Enable xp drop hud for players by default")]
public bool enable_xp_drop_by_default = true;
[JsonProperty("Restrict XP gain to the tools listed in their respective tools list?")]
public bool white_listed_tools_only = false;
[JsonProperty("Require grown plants to be ripe to provide xp")]
public bool ripe_required = true;
[JsonProperty("Give xp for crafting ingredients? [Requires Cooking.cs]")]
public bool cooking_award_xp_ingredients = false;
[JsonProperty("Whitelist - List of items to award crafting xp")]
public List<string> craft_xp_whitelist = new List<string>();
[JsonProperty("Blacklist - List of items that will not award crafting xp")]
public List<string> craft_xp_blacklist = new List<string>();
[JsonProperty("Use LootDefender to handle the XP for BradleyAPC")]
public bool UseLootDefender = true;
[JsonProperty("Allow players with god mode to receive xp?")]
public bool allow_godemode_xp = true;
[JsonProperty("Cooldown for awarding xp after using a swipe card")]
public float swipe_card_xp_cooldown = 0;
[JsonProperty("Decimal places for the xp to be rounded to")]
public int xp_rounding = 2;
[JsonProperty("List of meals that will not provide xp [Requires Cooking.cs]")]
public List<string> cooking_black_list = new List<string>();
[JsonProperty("Experience sources - Set xp value to 0 to disable for that type", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public XPSources xp_sources = new XPSources();
[JsonProperty("Night time settings")]
public NightTimeGains night_settings = new NightTimeGains();
public class NightTimeGains {
[JsonProperty("Modifier for xp gained at night [1.0 = standard]")]
public float night_xp_gain_modifier = 1f;
[JsonProperty("Modifier for woodcutting yield at night [1.0 = standard]")]
public float night_woodcutting_yield_modifier = 1f;
[JsonProperty("Modifier for mining yield at night [1.0 = standard]")]
public float night_mining_yield_modifier = 1f;
[JsonProperty("Modifier for skinning yield at night [1.0 = standard]")]
public float night_skinning_yield_modifier = 1f;
[JsonProperty("Modifier for harvesting yield at night [1.0 = standard]")]
public float night_harvesting_yield_modifier = 1f;
[JsonProperty("Should the harvesting yield increase include player-grown plants?")]
public bool include_grown_harvesting = false;
}
[JsonProperty("Allow players to move their XP bar?")]
public bool allow_move_xp_bar = true;
}
[JsonProperty("Wipe and plugin update settings")]
public WipeUpdate wipe_update_settings = new WipeUpdate();
public class WipeUpdate {
[JsonProperty("Erase all data on wipe - wipes everything")]
public bool erase_data_on_wipe = false;
[JsonProperty("Erase ExtraPockets storage on wipe")]
public bool erase_ExtraPockets_on_wipe = true;
[JsonProperty("Refund skill points on server wipe")]
public bool refund_sp_on_wipe = true;
[JsonProperty("Give the player with the highest xp bonus skill points next wipe")]
public bool bonus_skill_points = false;
[JsonProperty("How many skill points should they receive for winning?")]
public int bonus_skill_points_amount = 5;
[JsonProperty("Automatically add new trees from the default config?")]
public bool auto_update_trees = true;
[JsonProperty("Automatically add new nodes from the default config?")]
public bool auto_update_nodes = true;
[JsonProperty("Starting skill points")]
public int starting_skill_points = 0;
[JsonProperty("Dictionary of permission based overrides for starting skill points")]
public Dictionary<string, int> starting_skill_point_overrides = new Dictionary<string, int>();
}
[JsonProperty("Rested XP Settings")]
public RestXPSettings rested_xp_settings = new RestXPSettings();
public class RestXPSettings {
[JsonProperty("Give players who have been offline a bonus to xp gain when they log in next?")]
public bool rested_xp_enabled = true;
[JsonProperty("Rested xp pool to accumulate per hour offline")]
public double rested_xp_per_hour = 1000;
[JsonProperty("Bonus xp rate while rested (until the rested xp pool is depleted) [0.25 = 25% bonus]")]
public double rested_xp_rate = 0.25;
[JsonProperty("Maximum xp a player can have in their rested pool [0 = no limit]")]
public double rested_xp_pool_max = 25000;
[JsonProperty("Reset rested xp pools on wipe?")]
public bool rested_xp_reset_on_wipe = false;
[JsonProperty("Modifiers based on permissions to adjust the rested xp value [1.0 = 100% increase.0.0 = no increase]")]
public Dictionary<string, float> rested_xp_modifier_perm_mod = new Dictionary<string, float>();
}
[JsonProperty("Tools and Black list/White list settings")]
public ToolAndListSettings tools_black_white_list_settings = new ToolAndListSettings();
public class ToolAndListSettings {
[JsonProperty("Global black list - these items will not gain xp and benefits at all")]
public List<string> black_listed_gather_items = new List<string>();
[JsonProperty("Black listed parts for component and electrical luck abilities", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> comp_blacklist = new List<string>();
[JsonProperty("Power tool modifiers (chainsaw and jackhammer).1 = full xp/buffs.0 = off.0.5 = half xp/buffs.")]
public PowerTools power_tool_modifier = new PowerTools() {
mining_yield_modifier = 0.25f, mining_xp_modifier = 0.25f, mining_luck_modifier = 0.25f, skinning_yield_modifier = 0.25f, skinning_xp_modifier = 0.25f, skinning_luck_modifier = 0.25f, woodcutting_yield_modifier = 0.25f, woodcutting_xp_modifier = 0.25f, woodcutting_luck_modifier = 0.25f
}
;
[JsonProperty("Extra Pockets black list - disallows items that match")]
public List<string> black_list = new List<string>();
[JsonProperty("Extra Pockets white list - will only allow items that match")]
public List<string> white_list = new List<string>();
[JsonProperty("Extra pockets button anchors")]
public ExtraPocketsButtonAnchors extra_pockets_button_anchor = new ExtraPocketsButtonAnchors();
[JsonProperty("A black list of items that will not be refunded when using the thrifty tinkerer buff", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> craft_refund_blacklist = new List<string>() {
"gunpowder", "explosives", "sulfur"
}
;
[JsonProperty("A black list of items that will not be duplicated while using the thirfty duplicator buff", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> craft_duplicate_blacklist = new List<string>() {
"gunpowder", "explosives", "sulfur"
}
;
[JsonProperty("Woodcutting tools - Tools that meet whitelist requirements and work with the reduced durability ability", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> wc_tools = new List<string>();
[JsonProperty("Mining tools - Tools that meet whitelist requirements and work with the reduced durability ability", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> mining_tools = new List<string>();
[JsonProperty("Skinning tools - Tools that meet whitelist requirements and work with the reduced durability ability", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> skinning_tools = new List<string>();
[JsonProperty("Blacklist of weapon prefab shortnames that cannot benefit from the Extended Mag buff")]
public List<string> extendedMag_weapon_blacklist = new List<string>();
[JsonProperty("Blacklist of ammo item shortnames that cannot benefit from the Extended Mag buff")]
public List<string> extendedMag_ammotype_blacklist = new List<string>();
}
[JsonProperty("Effect settings")]
public EffectSettings effect_settings = new EffectSettings();
public class EffectSettings {
[JsonProperty("Instant repair effect")]
public string repair_effect = "assets/bundled/prefabs/fx/build/repair_full_metal.prefab";
[JsonProperty("Level up effect")]
public string level_effect = "assets/prefabs/misc/halloween/lootbag/effects/gold_open.prefab";
[JsonProperty("Node unlock effect")]
public string skill_point_unlock_effect = "assets/prefabs/misc/halloween/lootbag/effects/loot_bag_upgrade.prefab";
[JsonProperty("Node level effect")]
public string skill_point_level_effect = "assets/prefabs/misc/easter/painted eggs/effects/eggpickup.prefab";
[JsonProperty("Lock pick fail attempt")]
public string lockpick_fail_effect = "assets/prefabs/deployable/bear trap/effects/bear-trap-deploy.prefab";
[JsonProperty("Lock pick success attempt")]
public string lockpick_success_effect = "assets/prefabs/deployable/locker/effects/locker-deploy.prefab";
}
[JsonProperty("Better Chat settings")]
public BetterChatSettings betterchat_settings = new BetterChatSettings();
public class BetterChatSettings {
[JsonProperty("Format for BetterChat title showing the playeres level.Set to null to disable.{0} is the colour value and {1} is the player level value")]
public string better_title_format = "<color=#{0}>[Lv.{1}]</color>";
[JsonProperty("Default colour for BetterChat xp titles")]
public string better_title_default_col = "0cb072";
[JsonProperty("Colour for BetterChat xp titles for players who are max level")]
public string better_title_max_col = "32ff00";
}
[JsonProperty("Loot settings")]
public LootTables loot_settings = new LootTables();
public class LootTables {
[JsonProperty("Mining luck loot table", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<LootItems> mining_loot_table = new List<LootItems>();
[JsonProperty("Woodcutting luck loot table", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<LootItems> wc_loot_table = new List<LootItems>();
[JsonProperty("Skinning luck loot table", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<LootItems> skinning_loot_table = new List<LootItems>();
[JsonProperty("Fishing luck loot table", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<LootItems> fishing_loot_table = new List<LootItems>();
[JsonProperty("Whitelist of loot crates to trigger the spawn chance for components, electronics and scrap.Set to null to not use the whitelist.", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public List<string> loot_crate_whitelist = new List<string>();
}
[JsonProperty("Ultimate settings")]
public UltimateSettings ultimate_settings = new UltimateSettings();
public class UltimateSettings {
[JsonProperty("Background colour for the ultimate node")]
public string ultimate_node_background_col = "1 0.8741453 0 1";
[JsonProperty("Ultimate settings for woodcutting")]
public WoodcuttingUltimate ultimate_woodcutting = new WoodcuttingUltimate();
[JsonProperty("Ultimate settings for mining")]
public MiningUltimate ultimate_mining = new MiningUltimate();
[JsonProperty("Ultimate settings for vehicle")]
public VehicleUltimate ultimate_vehicle = new VehicleUltimate();
[JsonProperty("Ultimate settings for medical")]
public MedicalUltimate ultimate_medical = new MedicalUltimate();
[JsonProperty("Ultimate settings for harvesting")]
public HarvesterUltimate ultimate_harvesting = new HarvesterUltimate();
[JsonProperty("Ultimate settings for scavenger")]
public Scav_Ultimate ultimate_scavenger = new Scav_Ultimate();
[JsonProperty("Ultimate settings for combat")]
public CombatUltimate ultimate_combat = new CombatUltimate();
[JsonProperty("Ultimate settings for skinning")]
public SkinningUltimate ultimate_skinning = new SkinningUltimate();
[JsonProperty("Ultimate settings for build craft")]
public BuildCraftUltimate ultimate_buildCraft = new BuildCraftUltimate();
[JsonProperty("Ultimate settings for raiding")]
public RaidingUltimate ultimate_raiding = new RaidingUltimate();
[JsonProperty("Ultimate settings for cooking")]
public CookingUltimate ultimate_cooking = new CookingUltimate();
}
[JsonProperty("Misc settings")]
public MiscSettings misc_settings = new MiscSettings();
public class MiscSettings {
[JsonProperty("BotRespawn settings")]
public BotRespawnSettings botRespawnSettings = new BotRespawnSettings();
public class BotRespawnSettings {
[JsonProperty("Enable botrespawn profile tracking and xp")]
public bool enabled = true;
[JsonProperty("BotReSpawn profile and xp list", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public Dictionary<string, double> botrespawn_profiles = new Dictionary<string, double>();
}
[JsonProperty("Human NPC's name that can be used to open the skill tree")]
public string npc_name = "";
[JsonProperty("Should we add a button to the pump bar to open SkillTree?")]
public bool button_to_pump_bar = true;
[JsonProperty("Should SkillTree call out to other plugins before it starts modifying the value of the items? [required for plugins that need pre-modified item amounts]")]
public bool call_HandleDispenser = false;
[JsonProperty("Log all xp that players gain [Will create a very large log file]?")]
public bool log_player_xp_gain = false;
[JsonProperty("Allow the rationer perk to work with cooking meals?")]
public bool ration_cooking_meals = true;
[JsonProperty("Steam64 ID to use when sending a message to a player [0 is the default rust icon]")]
public ulong ChatID = 76561199514393612;
[JsonProperty("Anchor points for time left UI")]
public AnchorSettings timeLeft_anchor = new AnchorSettings("0.5 0", "0.5 0", "-69.664 87.1", "70.336 103.1");
[JsonProperty("Update skin IDs from the default config if they are set to 0?")]
public bool update_skinIDs_from_default = false;
}
[JsonProperty("NpcSpawn (by KpucTaji) settings")]
public BetterNPC betternpc_settings = new BetterNPC();
public class BetterNPC {
[JsonProperty("Give xp based on the name of a NpcSpawn, rather than the scientist type?")]
public bool betternpc_give_xp = true;
[JsonProperty("Dictionary of NPC names and the value that they provide")]
public Dictionary<string, double> NPC_xp_table = new Dictionary<string, double>(StringComparer.InvariantCultureIgnoreCase);
}
[JsonProperty("Skill tree", ObjectCreationHandling = ObjectCreationHandling.Replace)]
public Dictionary<string, Configuration.TreeInfo> trees = new Dictionary<string, Configuration.TreeInfo>();
[JsonProperty("Leveling information.Y value must be set to 2 or 3")]
public ExperienceInfo level = new ExperienceInfo();
[JsonProperty("Notification settings")]
public NotificationSettings notification_settings = new NotificationSettings();
[JsonProperty("Third-party plugin settings")]
public ThirdPartyPluginSettings thirdPartyPluginSettings = new ThirdPartyPluginSettings();
public class ThirdPartyPluginSettings {
[JsonProperty("SurvivalArena Settings")]
public SurvivalArenaSettings survivalArenaSettings = new SurvivalArenaSettings();
public class SurvivalArenaSettings {
[JsonProperty("Disable the skinning ultimate buff when the player joins the game?")]
public bool disable_skinning_ultimate_buff_on_join = true;
}
[JsonProperty("Paintball Settings")]
public PaintballSettings paintballSettings = new PaintballSettings();
public class PaintballSettings {
[JsonProperty("Disable the skinning ultimate buff when the player joins the game?")]
public bool disable_skinning_ultimate_buff_on_join = true;
}
}
[JsonProperty("Roguelike settings")]
public RoguelikeSettings roguelikeSettings = new RoguelikeSettings();
public class RoguelikeSettings {
[JsonProperty("Roguelike - Completely wipe a players progress when they die?")]
public bool enabled = false;
[JsonProperty("If the Roguelike setting is enabled, trigger when a player dies in PVE?")]
public bool wipeOnPVEDeath = true;
[JsonProperty("If the Roguelike setting is enabled, trigger when a player dies in PVP?")]
public bool wipeOnPVPDeath = true;
[JsonProperty("If the Roguelike setting is enabled, trigger when a player dies from suicide?")]
public bool wipeOnSuicideDeath = true;
[JsonProperty("If the Roguelike setting is enabled, trigger when a player dies from fall damage?")]
public bool wipeOnFallDeath = true;
[JsonProperty("Require the player to be connected to the service when they die and lose XP?")]
public bool requireConnection = true;
}
public class ExtraPocketsButtonAnchors {
public string x_min = "185.4";
public string y_min = "25.4";
public string x_max = "227.4";
public string y_max = "67.4";
}
public class HorseStats {
public bool Increase_Horse_RunSpeed = true;
public bool Increase_Horse_MaxSpeed = true;
public bool Increase_Horse_TrotSpeed = false;
public bool Increase_Horse_TurnSpeed = false;
public bool Increase_Horse_WalkSpeed = false;
}
public class NotificationSettings {
[JsonProperty("Settings for Notify plugin")]
public NotifySettings notifySettings = new NotifySettings();
[JsonProperty("Settings for Discord plugin")]
public DiscordSettings discordSettings = new DiscordSettings();
}
public class DiscordSettings {
[JsonProperty("Webhook URL")]
public string webhook;
[JsonProperty("Send a discord notification when a player levels up?")]
public bool send_level_up = true;
}
public class NotifySettings {
[JsonProperty("Language key and message type to display when a player gains a level")]
public KeyValuePair<string, int> level_up_notification = new KeyValuePair<string, int>("NotifyLevelGained", 0);
}
public class CustomCurrency {
public string displayName = "";
public string shortname = "";
public ulong skin = 0;
}
public class TreeInfo {
public bool enabled = true;
[JsonProperty("Minimum level to unlock")]
public int min_level = 0;
[JsonProperty("Minimum points to unlock")]
public int min_points = 0;
[JsonProperty("Points required to unlock tier 2 nodes")]
public int level_2_point_requirement = 5;
[JsonProperty("Points required to unlock tier 3 nodes")]
public int level_3_point_requirement = 10;
[JsonProperty("Points required to unlock the ultimate")]
public int level_4_point_requirement = 25;
public Dictionary<string, NodeInfo> nodes = new Dictionary<string, NodeInfo>();
public TreeInfo(Dictionary<string, NodeInfo> nodes, bool enabled = true) {
this.nodes = nodes;
this.enabled = enabled;
}
public class NodeInfo {
[JsonProperty("Permission required to show this node")]
public string required_permission;
public bool enabled;
public int max_level;
public int tier;
public float value_per_buff;
public KeyValuePair<Buff, BuffType> buff_
// ... [Code preview truncated due to length. Full source in attached file] ...