Skip to content

Commit

Permalink
[SiegeGolemTweaker] Initial version of the Siege Golem Tweaker VMod
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteFang5 committed Aug 11, 2022
1 parent d34cc81 commit c2f1513
Show file tree
Hide file tree
Showing 10 changed files with 742 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@
## PvE Leaderboard
### v1.0.0
* Initial release

## Siege Golem Tweaker
### v1.0.0
* Initial release
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,26 @@ The Lvl Kills leaderboards can also be browsed using a command (By default: `!pv
* Change the amount of time the highest gear score is remembered/tracked

</details>

## Siege Golem Tweaker
A server-side only mod that allows you to tweak the stats (Power, Resists, (Move)Speed, Max HP) of Siege Golems.

<details>
<summary>Configuration Options</summary>

* Siege Power Multiplier
* Physical Power Multiplier
* Spell Power Multiplier
* Movement Speed Multiplier
* Attack Speed Multiplier
* Max Health Multiplier
* Passive Health Regen
* Physical Resistance
* Spell Resistance
* Fire Resistance
* Holy Resistance
* Sun Resistance
* Silver Resistance
* Garlic Resistance

</details>
3 changes: 3 additions & 0 deletions Shared/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public static class Utils

public static readonly PrefabGUID BloodPotion = new(828432508);

public static readonly PrefabGUID SiegeGolemT01 = new(-148535031);
public static readonly PrefabGUID SiegeGolemT02 = new(914043867);

#endregion

#region Variables
Expand Down
51 changes: 51 additions & 0 deletions SiegeGolemTweaker/Configs/SiegeGolemTweakerConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using BepInEx.Configuration;

namespace VMods.SiegeGolemTweaker
{
public static class SiegeGolemTweakerConfig
{
#region Properties

public static ConfigEntry<bool> SiegeGolemTweakerEnabled { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerSiegePowerMultiplier { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerPhysicalPowerMultiplier { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerSpellPowerMultiplier { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerMovementSpeedMultiplier { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerAttackSpeedMultiplier { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerMaxHealthMultiplier { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerPassiveHealthRegen { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerPhysicalResistance { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerSpellResistance { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerFireResistance { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerHolyResistance { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerSunResistance { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerSilverResistance { get; private set; }
public static ConfigEntry<float> SiegeGolemTweakerGarlicResistance { get; private set; }

#endregion

#region Public Methods

public static void Initialize(ConfigFile config)
{
SiegeGolemTweakerEnabled = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerEnabled), false, "Enabled/disable the Siege Golem Tweaker system.");

SiegeGolemTweakerSiegePowerMultiplier = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerSiegePowerMultiplier), 100f, "The percentage of Siege Power a Siege Golem has.");
SiegeGolemTweakerPhysicalPowerMultiplier = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerPhysicalPowerMultiplier), 100f, "The percentage of Physical Power a Siege Golem has.");
SiegeGolemTweakerSpellPowerMultiplier = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerSpellPowerMultiplier), 100f, "The percentage of Spell Power a Siege Golem has.");
SiegeGolemTweakerMovementSpeedMultiplier = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerMovementSpeedMultiplier), 100f, "The percentage of Movement Speed a Siege Golem has.");
SiegeGolemTweakerAttackSpeedMultiplier = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerAttackSpeedMultiplier), 100f, "The percentage of Attack Speed a Siege Golem has.");
SiegeGolemTweakerMaxHealthMultiplier = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerMaxHealthMultiplier), 100f, "The percentage of Max Health a Siege Golem has.");
SiegeGolemTweakerPassiveHealthRegen = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerPassiveHealthRegen), float.NaN, "The (absolute) amount of Passive Health Regen a Siege Golem has. - Use NaN to disable");
SiegeGolemTweakerPhysicalResistance = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerPhysicalResistance), 0.5f, "The (absolute) amount of Physical Resistance a Siege Golem has. - Use NaN to disable");
SiegeGolemTweakerSpellResistance = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerPhysicalResistance), 0.5f, "The (absolute) amount of Spell Resistance a Siege Golem has. - Use NaN to disable");
SiegeGolemTweakerFireResistance = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerFireResistance), float.NaN, "The (absolute) amount of Fire Resistance a Siege Golem has. - Use NaN to disable");
SiegeGolemTweakerHolyResistance = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerHolyResistance), float.NaN, "The (absolute) amount of Holy Resistance a Siege Golem has. - Use NaN to disable");
SiegeGolemTweakerSunResistance = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerSunResistance), float.NaN, "The (absolute) amount of Sun Resistance a Siege Golem has. - Use NaN to disable");
SiegeGolemTweakerSilverResistance = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerSilverResistance), float.NaN, "The (absolute) amount of Silver Resistance a Siege Golem has. - Use NaN to disable");
SiegeGolemTweakerGarlicResistance = config.Bind(nameof(SiegeGolemTweakerConfig), nameof(SiegeGolemTweakerGarlicResistance), float.NaN, "The (absolute) amount of Garlic Resistance a Siege Golem has. - Use NaN to disable");
}

#endregion
}
}
56 changes: 56 additions & 0 deletions SiegeGolemTweaker/Plugin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
using BepInEx;
using BepInEx.IL2CPP;
using HarmonyLib;
using System.Reflection;
using VMods.Shared;
using Wetstone.API;

namespace VMods.SiegeGolemTweaker
{
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
[BepInDependency("xyz.molenzwiebel.wetstone")]
[Reloadable]
public class Plugin : BasePlugin
{
#region Variables

private Harmony _hooks;

#endregion

#region Public Methods

public sealed override void Load()
{
if(VWorld.IsClient)
{
Log.LogMessage($"{PluginInfo.PLUGIN_NAME} only needs to be installed server side.");
return;
}
Utils.Initialize(Log, PluginInfo.PLUGIN_NAME);

SiegeGolemTweakerConfig.Initialize(Config);

SiegeGolemTweakerSystem.Initialize();

_hooks = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly());

Log.LogInfo($"Plugin {PluginInfo.PLUGIN_NAME} (v{PluginInfo.PLUGIN_VERSION}) is loaded!");
}

public sealed override bool Unload()
{
if(VWorld.IsClient)
{
return true;
}
_hooks?.UnpatchSelf();
SiegeGolemTweakerSystem.Deinitialize();
Config.Clear();
Utils.Deinitialize();
return true;
}

#endregion
}
}
Loading

0 comments on commit c2f1513

Please sign in to comment.