-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SiegeGolemTweaker] Initial version of the Siege Golem Tweaker VMod
- Loading branch information
1 parent
d34cc81
commit c2f1513
Showing
10 changed files
with
742 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,3 +67,7 @@ | |
## PvE Leaderboard | ||
### v1.0.0 | ||
* Initial release | ||
|
||
## Siege Golem Tweaker | ||
### v1.0.0 | ||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
Oops, something went wrong.