Skip to content

Commit

Permalink
Update 0.1.9.6
Browse files Browse the repository at this point in the history
- Fix the Crash when you die having a few skills disabled.
- Added MaxFallAltitude, higher than this will multiply the amout of meters exceeded as damage.
- Changed the FallDamageDecrese to start based on the MaxRollAltitude. Up to 30m.
- Now the MaxRollAltitude is attached to Jump Skill Level
- Added a Configurable MaxFallAltitude Altitude in (Meters).
- Added a Configurable MaxFallAltitudeIncreaseDamageMultiplier per Meter Exceeded, By Default 2. It Need to be higher than 0.
- Added a Configurable Min and Max Roll Altitude if you are between these 2 values you will roll and not recieve Damage at all.
- Changed the Visual Text when about to tame a Creature to Needed Levels, Novice, Adept and Master Tamer. With a timer of the more or less time it will take to tame at that moment.
- Added a Trials of Odin Levels Compatibility so the drops with Hunting Skill will stick to the Stars Shown by ToO. This need to be Configured at HuntingConfig, with the same values from ToO.
- Another tiny fixed and numbers at Hunting Config as you are a Master Tamer with Everything by the HoverText.
- Some more things I can't remember at the moment.
  • Loading branch information
guiriguy committed Apr 5, 2021
1 parent 5ccefab commit f3f7699
Show file tree
Hide file tree
Showing 10 changed files with 1,195 additions and 692 deletions.
2 changes: 1 addition & 1 deletion Config/AGeneralConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace MoreSkills.Config
{
[BepInPlugin("MoreSkills.AGeneralConfig", "MoreSkills", "0.1.9.2")]
[BepInDependency("com.pipakin.SkillInjectorMod")]
[BepInDependency("com.pipakin.SkillInjectorMod", BepInDependency.DependencyFlags.HardDependency)]
public class MoreSkills_Config : BaseUnityPlugin
{
public void Awake()
Expand Down
23 changes: 17 additions & 6 deletions Config/HuntingConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace MoreSkills.Config
{
[BepInPlugin("MoreSkills.HuntingConfig.GuiriGuyMods", "MoreSkills: Hunting", "0.0.3")]
[BepInPlugin("MoreSkills.HuntingConfig", "MoreSkills: Hunting", "0.0.4")]
[BepInDependency("com.pipakin.SkillInjectorMod")]

public class MoreSkills_HuntingConfig : BaseUnityPlugin
Expand All @@ -30,11 +30,18 @@ public void Awake()
//EnableHuntingTrophyMod = base.Config.Bind<bool>("1. Enablers", "Enable Hunting Trophy Mod", false, "Enables or disables the Hunting Skill Modification to affect Trophies. RECOMMENDED FOR EPIC LOOTS");
//Blob Affect
//EnableHuntingBlobSpawn = base.Config.Bind<bool>("1. Enablers", "Enable Hunting Blob Spawn Mod", false, "Enables or disables the Hunting Skill Modification to affect Blobs to count as ItemDrops from the Blob Elite");
//ToO
EnableTrialsOfOdinCompatibility = base.Config.Bind<bool>("1. Enablers", "Enable Compatibility with Trials of Odin Mod", false, "Enables or disables the Compatibility with Trials of Odin's Levels Mod");
//Hunting
//Skill
HuntingSkillMultiplier = base.Config.Bind<float>("2. Multipliers", "Multiplies the Hunting Skill Increase", 1.0f, "The Skill Increase is based on the max Health of the Mob 1/20, so if the mob is killed and had a max health of 500 you get 50 (If you level up, it will only level you up and loose the rest of exp, to yet be fixed). This allows you to multiply this number.");
//Drops
HuntingDropMultiplier = base.Config.Bind<float>("2. Multipliers", "Multiplies the Hunting Drops", 1.5f, "The based on level 2. Multipliers, so at level 100 you reach such number. At level 100 you recieve x1.5 at default to the amount of Drops from a Mob/Boss. This multiplier changes that number");
//BaseConfigs
//ToO
ToOLowLevelStart = base.Config.Bind<int>("3. BaseConfig", "Set Low Level Start Set at Trials of Odin", 1, "You have to put the number at which you set the low level at Trials of Odin Mod");
ToOMidLevelStart = base.Config.Bind<int>("3. BaseConfig", "Set Mid Level Start Set at Trials of Odin", 5, "You have to put the number at which you set the low level at Trials of Odin Mod");
ToOHighLevelStart = base.Config.Bind<int>("3. BaseConfig", "Set High Level Start Set at Trials of Odin", 8, "You have to put the number at which you set the low level at Trials of Odin Mod");
//5. All Mobs Configs
//Hunting Skill
//Blob
Expand Down Expand Up @@ -530,6 +537,10 @@ public void Awake()
Debug.LogWarning("[MoreSkills]: Hunting/MinMax Mobs Mod Disabled");
else
Debug.Log("[MoreSkills]: Hunting/MinMax Mobs Mod Enabled");
if (!EnableTrialsOfOdinCompatibility.Value)
Debug.LogError("[MoreSkills]: Hunting/If you got Trials of Odin I highly recommend you to activate this. Otherwise don't read me. I know it's red. But it's all ok, don't worry :P");
else
Debug.Log("[MoreSkills]: Hunting/Trials of Odin Compatibility Enabled");
if (!EnableHuntingChanceMod.Value)
Debug.LogWarning("[MoreSkills]: Hunting/Chance Mod Disabled");
else
Expand Down Expand Up @@ -568,13 +579,13 @@ public void Awake()

public static ConfigEntry<bool> EnableHuntingBlobSpawn;

public const int StrengthSkill_Type = 700;

public const int VitalitySkill_Type = 701;
public static ConfigEntry<bool> EnableTrialsOfOdinCompatibility;

public const int SailingSkill_Type = 702;
//BaseConfigs

public const int CraftingSkill_Type = 703;
public static ConfigEntry<int> ToOLowLevelStart;
public static ConfigEntry<int> ToOMidLevelStart;
public static ConfigEntry<int> ToOHighLevelStart;

public const int HuntingSkill_Type = 704;

Expand Down
24 changes: 23 additions & 1 deletion Config/OverhaulsConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace MoreSkills.Config
{
[BepInPlugin("MoreSkills.OverhaulsConfig", "MoreSkills: Overhauls", "0.0.5")]
[BepInPlugin("MoreSkills.OverhaulsConfig", "MoreSkills: Overhauls", "0.0.7")]
[BepInDependency("com.pipakin.SkillInjectorMod")]
public class MoreSkills_OverhaulsConfig : BaseUnityPlugin
{
Expand Down Expand Up @@ -35,6 +35,8 @@ public void Awake()
EnableHigherJump = base.Config.Bind<bool>("1. Enablers: Jump", "Enable Higher Jump Mod", true, "Enables or disables the Higher Jump Modification");
//HaveToShift
EnableHaveToShiftToHigherJump = base.Config.Bind<bool>("1. Enablers: Jump", "Enable Need to Shift for Higher Jump Mod", true, "Enables or disables Need to Shift (or custom key) to make a Higher Jump Modification");
//MaxFallAltitude
EnableMaxFallAltitude = base.Config.Bind<bool>("1. Enablers: Jump", "Enable Max Fall Altitude", true, "Enables or disables the Max Altitude a Character can fall without dying.");
//Multipliers
//Swim
//Stamina
Expand All @@ -45,7 +47,10 @@ public void Awake()
//Drops
WoodCuttingMultiplier = base.Config.Bind<float>("2. Multipliers: WoodCutting", "Multiplier based on WoodCutting Skill", 1.5f, "The based on level multipliers, so at level 100 you reach such number. At level 100 you got default x1.5 times the amount of drops than vanilla. This multiplier changes that number.");
//Jumping
//DamageDecrease
FallDamageDecrease = base.Config.Bind<float>("2. Multipliers: Jump", "Deacrease Multiplier based on Jumping Skill", 2.0f, "Decreases the Damage Recieved by Falling from a High Altitude (4 meters)");
//DamageIncrease
MaxFallDamageIncrease = base.Config.Bind<float>("2. Multipliers: Jump", "Increase Multiplier Per Meter over Max Fall Altitude Skill", 2.0f, "Increses the Damage Recieved per meter exceded from Max Falling Altitude");
//Base Configs
//Sneak
BaseCrouchSpeed = base.Config.Bind<float>("3. BaseConfigs: Sneak", "Base Crouch Speed", 2f, "Change the base Crouch Speed. (Valheim Default is 2)");
Expand All @@ -59,6 +64,9 @@ public void Awake()
BaseJumpForce = base.Config.Bind<float>("3. BaseConfigs: Jump", "Base Jump Force", 8f, "Change the base Jump Force (Valheim Defailt is 8)");
BaseMaxJumpForce = base.Config.Bind<float>("3. BaseConfigs: Jump", "Base Max Jump Force", 12f, "Change the base Max Jump Force at level 100. (Valheim Default is 8)");
HigherJumpKey = base.Config.Bind<KeyCode>("3. BaseConfigs: Jump", "Base Higher Jump Key Force", KeyCode.LeftShift, "Change the button to hold when wanted a Higher Jump. Keys: https://docs.unity3d.com/Manual/class-InputManager.html");
BaseRollAltitude = base.Config.Bind<float>("3. BaseConfigs: Jump", "Base Roll Altitude", 4f, "Change the base altitude you need to reach for the Character roll on fall, not recieving any damage.");
BaseMaxRollAltitude = base.Config.Bind<float>("3. BaseConfigs: Jump", "Base Max Roll Altitude", 8f, "Change the base Max altitude at jump level 100, at which the Character will roll on fall and not recieve any damage.");
BaseMaxFallAltitude = base.Config.Bind<float>("3. BaseConfigs: Jump", "Base Max Fall Altitude", 30f, "Change the base Max fall altitude which if it's higher than that you will directly die. (Valheim Default is 20)");

//--
new Harmony("MoreSkills.OverhaulsConfig.GuiriGuyMods");
Expand Down Expand Up @@ -113,6 +121,10 @@ public void Awake()
Debug.LogWarning("[MoreSkills]: Jump/Roll On Fall Mod Disabled");
else
Debug.Log("[MoreSkills]: Jump/Roll On Fall Mod Enabled");
if (!EnableMaxFallAltitude.Value)
Debug.LogWarning("[MoreSkills]: Jump/Max Fall Altitude Mod Disabled");
else
Debug.Log("[MoreSkills]: Jump/Max Fall Altitude Mod Enabled");

}

Expand All @@ -133,6 +145,12 @@ public void Awake()

public static ConfigEntry<float> BaseMaxJumpForce;

public static ConfigEntry<float> BaseRollAltitude;

public static ConfigEntry<float> BaseMaxRollAltitude;

public static ConfigEntry<float> BaseMaxFallAltitude;

//Multipliers

public static ConfigEntry<float> PickaxeMultiplier;
Expand All @@ -143,6 +161,8 @@ public void Awake()

public static ConfigEntry<float> FallDamageDecrease;

public static ConfigEntry<float> MaxFallDamageIncrease;

//Enables

public static ConfigEntry<bool> EnableCrouchMod;
Expand All @@ -169,6 +189,8 @@ public void Awake()

public static ConfigEntry<bool> EnableHaveToShiftToHigherJump;

public static ConfigEntry<bool> EnableMaxFallAltitude;

public static ConfigEntry<KeyCode> HigherJumpKey;

}
Expand Down
8 changes: 4 additions & 4 deletions Config/TamingConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace MoreSkills.Config
{
[BepInPlugin("MoreSkills.TamingConfig", "MoreSkills: Taming", "0.0.2")]
[BepInPlugin("MoreSkills.TamingConfig", "MoreSkills: Taming", "0.0.4")]
[BepInDependency("com.pipakin.SkillInjectorMod")]
public class MoreSkills_TamingConfig : BaseUnityPlugin
{
Expand All @@ -35,9 +35,9 @@ public void Awake()
if (EnableAllTamableCompatibility.Value)
{
//Boar
BoarLevelUnlock = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Boar Master Level", 0f, "The level at which you know how to tame this creature.");
BoarLevelUnlock = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Boar Unlock Level", 0f, "The level at which you know how to tame this creature.");
BoarLevelTamer = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Boar Tamer Level", 5f, "The level at which you are good at taming this creature. Reduces the amount of time by half");
BoarLevelMaster = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Boar Unlock Level", 15f, "The level at which you are a Master taming this creature. You tame the creature in 2 minutes time.");
BoarLevelMaster = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Boar Master Level", 15f, "The level at which you are a Master taming this creature. You tame the creature in 2 minutes time.");
//Wolf
WolfLevelUnlock = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Wolf Unlock Level", 10f, "The level at which you know how to tame this creature.");
WolfLevelTamer = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Wolf Tamer Level", 20f, "The level at which you are good at taming this creature. Reduces the amount of time by half");
Expand Down Expand Up @@ -141,7 +141,7 @@ public void Awake()
SerpentLevelMaster = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Serpent Master Level", 50f, "NEEDS ALLTAMABLE MOD!. The level at which you are a Master taming this creature. You tame the creature in 2 minutes time");
//Skeleton
SkeletonLevelUnlock = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Skeleton Unlock Level", 10f, "NEEDS ALLTAMABLE MOD!. The level at which you know how to tame this creature.");
SkeletonLevelTamer = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Skeleton Tamer Level", 32f, "NEEDS ALLTAMABLE MOD!. The level at which you are good at taming this creature. Reduces the amount of time by half");
SkeletonLevelTamer = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Skeleton Tamer Level", 20f, "NEEDS ALLTAMABLE MOD!. The level at which you are good at taming this creature. Reduces the amount of time by half");
SkeletonLevelMaster = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Skeleton Master Level", 30f, "NEEDS ALLTAMABLE MOD!. The level at which you are a Master taming this creature. You tame the creature in 2 minutes time");
//Skeleton Poison
SkeletonPoisonLevelUnlock = base.Config.Bind<float>("3. CreatureLevels: AllTamableCompatibility", "Skeleton Poison Unlock Level", 15f, "NEEDS ALLTAMABLE MOD!. The level at which you know how to tame this creature.");
Expand Down
23 changes: 18 additions & 5 deletions ModSkills/NewSkills/Hunting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void Postfix(ref CharacterDrop __instance)
max: drop.m_amountMax,
min: drop.m_amountMin,
chance: drop.m_chance));
Debug.Log("[MoreSkills]: Added Creature to the Temporal Hunting Database");
Debug.Log("[MoreSkills Hunting]: Added Creature to the Temporal Hunting Database");
}

//Debug.Log("Updating mob: " + __instance.name.Replace("(Clone)", "") + " Level: " + __instance.m_character.GetLevel() + " Item: " + drop.m_prefab.name.Replace("(UnityEngine.GameObject)", "") + " Min: " + drop.m_amountMin + " Max: " + drop.m_amountMax + " Chance: " + drop.m_chance);
Expand All @@ -49,21 +49,33 @@ public static void Postfix(ref CharacterDrop __instance)
vMin = (float)(hDrops.Find(hDrop => hDrop.CreaturePrefab == nameprefab).Min);
vMax = (float)(hDrops.Find(hDrop => hDrop.CreaturePrefab == nameprefab).Max);
vChance = (float)(hDrops.Find(hDrop => hDrop.CreaturePrefab == nameprefab).Chance);
if (MoreSkills_HuntingConfig.EnableTrialsOfOdinCompatibility.Value)
{
if (__instance.m_character.GetLevel() >= MoreSkills_HuntingConfig.ToOLowLevelStart.Value && __instance.m_character.GetLevel() < MoreSkills_HuntingConfig.ToOMidLevelStart.Value)
CLevel = 1;
else if (__instance.m_character.GetLevel() >= MoreSkills_HuntingConfig.ToOMidLevelStart.Value && __instance.m_character.GetLevel() < MoreSkills_HuntingConfig.ToOHighLevelStart.Value)
CLevel = 2;
else if (__instance.m_character.GetLevel() >= MoreSkills_HuntingConfig.ToOHighLevelStart.Value)
CLevel = 3;
}
else
CLevel = __instance.m_character.GetLevel();

if (MinMax)
{
if ((level) > 0.5)
{
float maxskill_inc = Mathf.Round(vMax * realmult);
drop.m_amountMax = (int)((vMax + maxskill_inc) * __instance.m_character.GetLevel());
drop.m_amountMax = (int)((vMax + maxskill_inc) * CLevel);
float skill = level * realmult;
float skill_inc = Mathf.Round(vMin * skill);
drop.m_amountMin = (int)((vMin + skill_inc) * __instance.m_character.GetLevel());
drop.m_amountMin = (int)((vMin + skill_inc) * CLevel);
}
else
{
float maxskill = (level * 2) * realmult;
float maxskill_inc = Mathf.Round(vMax * maxskill);
drop.m_amountMax = (int)((vMax + maxskill_inc) * __instance.m_character.GetLevel());
drop.m_amountMax = (int)((vMax + maxskill_inc) * CLevel);
}
}
if (Chance)
Expand All @@ -89,7 +101,7 @@ public static void Postfix(ref CharacterDrop __instance)
{
if (MoreSkills_Instances._CDAttacker == MoreSkills_Instances._player.GetZDOID())
{
HuntIncrease += ((__instance.m_character.GetMaxHealth()) / 20) * __instance.m_character.GetLevel();
HuntIncrease += ((__instance.m_character.GetMaxHealth()) / 20) * CLevel;
//Debug.LogWarning("Vida máx: " + __instance.m_character.GetMaxHealth() + " Nivel: " + __instance.m_character.GetLevel());
}

Expand All @@ -105,6 +117,7 @@ public static void Postfix(ref CharacterDrop __instance)
public static float HuntIncrease;
}

public static int CLevel;
public static List<Helper.HuntingDrops> hDrops = new List<Helper.HuntingDrops>();
}
}
4 changes: 2 additions & 2 deletions ModSkills/NewSkills/Strength.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public static class RaiseSkill_Strength
{
public static void Postfix()
{
if (MoreSkills_StrengthConfig.EnableStrengthMod.Value)
if (MoreSkills_Instances._player != null)
{
if (MoreSkills_Instances._player != null)
if (MoreSkills_StrengthConfig.EnableStrengthMod.Value)
{
bool halfweight = MoreSkills_Instances._player.GetInventory().GetTotalWeight() > (MoreSkills_Instances._player.GetMaxCarryWeight() / 2);
float vel = MoreSkills_Instances._player.m_currentVel.magnitude;
Expand Down
Loading

0 comments on commit f3f7699

Please sign in to comment.