public static void CalculateInventoryCapacity(ref MobileParty mobileParty, ref bool includeDescriptions, ref int additionalTroops, ref int additionalSpareMounts, ref int additionalPackAnimals, ref bool includeFollowers, ref ExplainedNumber __result) { try { if (mobileParty.IsPlayerParty() && BannerlordCheatsSettings.Instance?.ExtraInventoryCapacity > 0) { __result.Add(BannerlordCheatsSettings.Instance.ExtraInventoryCapacity); } } catch (Exception e) { SubModule.LogError(e, typeof(ExtraInventoryCapacity)); } }
public static void HearthChange(ref Village __instance, ref float __result) { try { if (__instance.IsPlayerVillage() && BannerlordCheatsSettings.Instance?.DailyHearthsBonus > 0) { __result += BannerlordCheatsSettings.Instance.DailyHearthsBonus; } } catch (Exception e) { SubModule.LogError(e, typeof(DailyHearthsBonus)); } }
public static void GetRelation(Hero otherHero, ref Hero __instance, ref int __result) { try { if ((__instance.IsPlayer() || otherHero.IsPlayer()) && BannerlordCheatsSettings.Instance?.PerfectRelationships == true) { __result = 100; } } catch (Exception e) { SubModule.LogError(e, typeof(PerfectRelationships)); } }
public static void GetGoldCostForUpgrade(ref PartyBase party, ref CharacterObject characterObject, ref CharacterObject upgradeTarget, ref int __result) { try { if (party.IsPlayerParty() && BannerlordCheatsSettings.Instance?.FreeTroopUpgrades == true) { __result = 0; } } catch (Exception e) { SubModule.LogError(e, typeof(FreeTroopUpgrades)); } }
public static void SimulateHit(ref CharacterObject strikerTroop, ref CharacterObject struckTroop, ref PartyBase strikerParty, ref PartyBase struckParty, ref float strikerAdvantage, ref MapEvent battle, ref int __result) { try { if (struckParty.IsPlayerParty() && BannerlordCheatsSettings.Instance?.AlwaysWinBattleSimulation == true) { __result = 0; } } catch (Exception e) { SubModule.LogError(e, typeof(AlwaysWinBattleSimulation)); } }
public static void GetPartySpottingRange(ref MobileParty party, ref bool includeDescriptions, ref ExplainedNumber __result) { try { if (party.IsPlayerParty() && BannerlordCheatsSettings.Instance?.MapVisibilityMultiplier > 1f) { __result.AddMultiplier(BannerlordCheatsSettings.Instance.MapVisibilityMultiplier); } } catch (Exception e) { SubModule.LogError(e, typeof(MapVisibilityMultiplier)); } }
public static void GetPartyMemberSizeLimit(ref PartyBase party, ref bool includeDescriptions, ref ExplainedNumber __result) { try { if (party.IsPlayerParty() && BannerlordCheatsSettings.Instance?.ExtraPartyMemberSize > 0) { __result.Add(BannerlordCheatsSettings.Instance.ExtraPartyMemberSize); } } catch (Exception e) { SubModule.LogError(e, typeof(ExtraPartyMemberSize)); } }
public static void GetCompanionLimit(ref TaleWorlds.CampaignSystem.Clan clan, ref int __result) { try { if (clan.IsPlayerClan() && BannerlordCheatsSettings.Instance?.ExtraCompanionLimit > 0) { __result += BannerlordCheatsSettings.Instance.ExtraCompanionLimit; } } catch (Exception e) { SubModule.LogError(e, typeof(ExtraCompanionLimit)); } }
public static void CalculateFinalSpeed(ref MobileParty mobileParty, ref ExplainedNumber finalSpeed, ref ExplainedNumber __result) { try { if (mobileParty.IsPlayerParty() && BannerlordCheatsSettings.Instance?.MapSpeedMultiplier > 1f) { __result.AddMultiplier(BannerlordCheatsSettings.Instance.MapSpeedMultiplier); } } catch (Exception e) { SubModule.LogError(e, typeof(MapSpeedMultiplier)); } }
public static void GetXpMultiplier(Hero hero, ref float __result) { try { if (hero.IsPlayer() && BannerlordCheatsSettings.Instance?.ExperienceMultiplier > 1f) { __result *= BannerlordCheatsSettings.Instance.ExperienceMultiplier; } } catch (Exception e) { SubModule.LogError(e, typeof(ExperienceMultiplier)); } }
public static void CalculateFinalSpeed(ref MobileParty mobileParty, ref ExplainedNumber finalSpeed, ref ExplainedNumber __result) { try { if (!mobileParty.IsPlayerParty() && BannerlordCheatsSettings.Instance?.NpcMapSpeedPercentage > 100f) { __result.AddPercentage(BannerlordCheatsSettings.Instance.NpcMapSpeedPercentage); } } catch (Exception e) { SubModule.LogError(e, typeof(NpcMapSpeedPercentage)); } }
public static void GetLostTroopCountForBreakingInBesiegedSettlement(MobileParty party, SiegeEvent siegeEvent, ref int __result) { try { if (party.IsPlayerParty() && BannerlordCheatsSettings.Instance?.NoTroopSacrifice == true) { __result = 0; } } catch (Exception e) { SubModule.LogError(e, typeof(NoTroopSacrificeBreakIn)); } }
public static void ShouldBeIgnored(ref MobileParty __instance, ref bool __result) { try { if (__instance.IsPlayerParty() && BannerlordCheatsSettings.Instance?.PartyInvisibleOnMap == true) { __result = true; } } catch (Exception e) { SubModule.LogError(e, typeof(PartyInvisibleOnMap)); } }
public static void GetTotalWage(ref MobileParty mobileParty, ref bool includeDescriptions, ref ExplainedNumber __result) { try { if (mobileParty.IsPlayerParty() && BannerlordCheatsSettings.Instance?.TroopWagesPercentage < 100f) { __result.AddPercentage(BannerlordCheatsSettings.Instance.TroopWagesPercentage); } } catch (Exception e) { SubModule.LogError(e, typeof(TroopWagesPercentage)); } }
public static void GetDailyHealingForRegulars(ref MobileParty party, ref bool includeDescriptions, ref ExplainedNumber __result) { try { if (party.IsPlayerParty() && BannerlordCheatsSettings.Instance?.PartyHealingMultiplier > 1f) { __result.AddMultiplier(BannerlordCheatsSettings.Instance.PartyHealingMultiplier); } } catch (Exception e) { SubModule.LogError(e, typeof(PartyHealingMultiplierTroops)); } }
public static void CalculateLearningRate(ref Hero hero, SkillObject skill, ref float __result) { try { if (hero.IsPlayer() && BannerlordCheatsSettings.Instance?.LearningRateMultiplier > 1f) { __result *= BannerlordCheatsSettings.Instance.LearningRateMultiplier; } } catch (Exception e) { SubModule.LogError(e, typeof(LearningRateMultiplier)); } }
public static void GetAgentStateProbability(Agent affectorAgent, Agent effectedAgent, DamageTypes damageType, float useSurgeryProbability, ref float __result) { try { if (effectedAgent.IsPlayerEnemy() && BannerlordCheatsSettings.Instance?.EnemyOnlyKnockout == true) { __result = 0f; } } catch (Exception e) { SubModule.LogError(e, typeof(EnemyOnlyKnockout)); } }
public static void GetTroopRecruitmentCost(CharacterObject troop, Hero buyerHero, bool withoutItemCost, ref int __result) { try { if (buyerHero.IsPlayer() && BannerlordCheatsSettings.Instance?.FreeTroopRecruitment == true) { __result = 1; } } catch (Exception e) { SubModule.LogError(e, typeof(FreeTroopRecruitment)); } }
public static void CalculateDailyFoodConsumptionf(ref MobileParty party, ref bool includeDescription, ref ExplainedNumber __result) { try { if (party.IsPlayerParty() && BannerlordCheatsSettings.Instance?.FoodConsumptionPercentage < 100f) { __result.AddPercentage(BannerlordCheatsSettings.Instance.FoodConsumptionPercentage); } } catch (Exception e) { SubModule.LogError(e, typeof(FoodConsumptionPercentage)); } }
public static void Invulnerable(ref Agent __instance, ref bool __result) { try { if (__instance.IsPlayer() && BannerlordCheatsSettings.Instance?.Invincible == true) { __result = true; } } catch (Exception e) { SubModule.LogError(e, typeof(Invincible)); } }
public static void LoyaltyChange(ref Town __instance, ref float __result) { try { if (__instance.IsPlayerTown() && BannerlordCheatsSettings.Instance?.DailyLoyaltyBonus > 0) { __result += BannerlordCheatsSettings.Instance.DailyLoyaltyBonus; } } catch (Exception e) { SubModule.LogError(e, typeof(DailyLoyaltyBonus)); } }
public static void DecideCrushedThrough(Agent attackerAgent, Agent defenderAgent, float totalAttackEnergy, Agent.UsageDirection attackDirection, StrikeType strikeType, WeaponComponentData defendItem, bool isPassiveUsage, ref bool __result) { try { if (attackerAgent.IsPlayer() && BannerlordCheatsSettings.Instance?.AlwaysCrushThroughShields == true) { __result = true; } } catch (Exception e) { SubModule.LogError(e, typeof(AlwaysCrushThroughShields)); } }
public static void CalculateDamage(ref AttackInformation attackInformation, ref AttackCollisionData collisionData, WeaponComponentData weapon, ref float __result) { try { if (attackInformation.AttackerAgentCharacter.IsPlayer() && !attackInformation.IsFriendlyFire && BannerlordCheatsSettings.Instance?.OneHitKill == true) { __result = 10000; } } catch (Exception e) { SubModule.LogError(e, typeof(OneHitKill)); } }
public static void GetUpgradeCost(ref int currentLevel, ref int __result) { try { if (BannerlordCheatsSettings.Instance?.WorkshopUpgradeCostPercentage < 100f) { var factor = BannerlordCheatsSettings.Instance.WorkshopUpgradeCostPercentage / 100f; __result = (int)(__result * factor); } } catch (Exception e) { SubModule.LogError(e, typeof(WorkshopUpgradeCostPercentage)); } }
public static void GetNumberOfTroopsSacrificedForTryingToGetAway(BattleSideEnum battleSide, MapEvent mapEvent, ref int __result) { try { if (mapEvent.IsPlayerMapEvent && battleSide == mapEvent.PlayerSide && BannerlordCheatsSettings.Instance?.NoTroopSacrifice == true) { __result = 0; } } catch (Exception e) { SubModule.LogError(e, typeof(NoTroopSacrificeRunaway)); } }
public static void GetDailyExpense(ref int level, ref int __result) { try { if (BannerlordCheatsSettings.Instance?.WorkshopDailyExpensePercentage < 100f) { var factor = BannerlordCheatsSettings.Instance.WorkshopDailyExpensePercentage / 100f; __result = (int)(__result * factor); } } catch (Exception e) { SubModule.LogError(e, typeof(WorkshopDailyExpensePercentage)); } }
public static void GetMaximumBet(ref int __result) { try { if (BannerlordCheatsSettings.Instance?.TournamentMaximumBetMultiplier > 1) { var newValue = (int)Math.Round(__result * BannerlordCheatsSettings.Instance.TournamentMaximumBetMultiplier); __result = newValue; } } catch (Exception e) { SubModule.LogError(e, typeof(TournamentMaximumBetMultiplier)); } }
public static void GetAgentStateProbability(Agent affectorAgent, Agent effectedAgent, DamageTypes damageType, float useSurgeryProbability, ref float __result) { try { if (effectedAgent.IsHero() && effectedAgent.IsPlayerEnemy() && BannerlordCheatsSettings.Instance?.EnemyLordCombatDeathChanceMultiplier > 1.0f) { __result *= BannerlordCheatsSettings.Instance.EnemyLordCombatDeathChanceMultiplier; } } catch (Exception e) { SubModule.LogError(e, typeof(EnemyLordCombatDeathChanceMultiplier)); } }
public static void GetBuyingCostForPlayer(ref Workshop workshop, ref int __result) { try { if (BannerlordCheatsSettings.Instance?.WorkshopBuyingCostPercentage < 100f) { var factor = BannerlordCheatsSettings.Instance.WorkshopBuyingCostPercentage / 100f; __result = (int)(__result * factor); } } catch (Exception e) { SubModule.LogError(e, typeof(WorkshopBuyingCostPercentage)); } }
public static void CalculateRecruitableNumber(ref PartyBase party, ref CharacterObject character, ref int __result) { try { if (party.IsPlayerParty() && !character.IsHero() && BannerlordCheatsSettings.Instance?.InstantPrisonerRecruitment == true) { __result = party.PrisonRoster.GetTroopCount(character); } } catch (Exception e) { SubModule.LogError(e, typeof(InstantPrisonerRecruitment)); } }