SP Native TML Tweaks Mod - various fixes and tweaks. Fully configurable. For 1.5.4

Users who are viewing this thread

TheMageLord

The Handyman Can
Knight at Arms
Download on Nexus Mods

This mod includes the following options, all disabled by default:

Character Tweaks:

  • Double focus points per level.
  • Set the # of levels per attribute point. 2 = one every two levels.

Smithing Tweaks:
  • New slightly more efficient bulk refining formulas and adds some waste to processing crude iron (Formulas now customizable!)
  • Lets you adjust gain for new smithing parts, or simply craft without unlocking them. Can still unlock parts normally if you later decide to disable this.
  • Lets you craft legendary or masterwork items every time to avoid grind.
  • Infinite crafting stamina (simply uses none).
  • Regenerate stamina anywhere instead of just in settlements. Traveling blacksmiths, go!

Campaign Tweaks:

  • Disable garrison starvation. They still use food. Additional option only allows them to starve during sieges.
  • Optional item value rebalance. Old formula: (3 ^ item tier). New formula: (2 ^ item tier)*(item tier + 1). The result is low tier items are slightly more expensive, tier 4 items are about the same, and higher tier items are cheaper. Top tier items are less than 1/2 the price.
  • Caravan patch. Gives caravans the stewardship troop bonus that other parties get and gives them stewardship XP similar to other parties. Also gives trade XP to the party leader (1/5 of profit made) and the owner (1/25 of profit made). As of 0.2.1, two sliders adjust how much Stewardship increases party size and adjusts trade XP awarded.
  • Workshop limit, base and per clan level. This sets the default #s.
  • Party limit, base and per clan level. This adds to the default #.
  • Companion limit, base and per clan level. This sets the default #s.
  • Player clan party size limit. This adds to all player clan parties, including caravans.
  • Global Troop XP multiplier. This is a percentage bonus from 0 to 900, +900% being 10 times.
  • Global Hero XP multiplier. Percentage bonus from 0 to 900.
  • Global militia bonus. This increases the militia growth from all factors for all settlements (including villages). Other mods do this indirectly by boosting prosperity, but I find prosperity has too many side effects (rampant inflation, for instance).
  • Prosperity patch. This increases negative prosperity by a power of 1.3 (max of 5% of the total town prosperity) and starts reducing prosperity due to a food shortage before starvation actually sets in. Only applies when settlements are not under siege. Helps keep towns out of starvation. Side effect includes slightly lower global demand for items due to prosperity reacting to negative events faster.
  • Enter and exit sieges freely without losing troops.
  • Stop lords from gaining free troops on respawn (by default they get 25% of their party size).
  • Full XP from tournaments and practice option. Just treats them as battles so it's 100% instead of 1/3 or 1/16.
  • Show days remaining instead of total food. Main number shows days remaining instead of total, hover still shows total.

Story Tweak:
  • Disables the power growth of the conspiracy quest. Doesn't affect the quest popping up and going away, it simply won't grow in power or ever trigger the final part of it. The idea being that if the quest is ever fixed, nothing that breaks the save game will have been done.

Combat:
  • Armor patch for those who want to customize how armor works. All the settings start on default values so enabling the patch does nothing by itself. The armor formula works like this:
  • 1.) All damage gets multiplied by a base reduction level. This level is (100 / 100 + armor level). So 50 armor reduces damage by 1/3 on default numbers. This can be changed in Armor Ratio Modifier setting now. A setting of 50 would mean an armor level of 50 would reduce damage by half. A setting of 10 would mean an armor level of 10 would reduce damage by half, and an armor level of 40 would reduce by 3/4.2.) Based on the damage type, armor then offers a flat reduction. By default this is 0.5 per armor for slash, 0.33 per armor for pierce, and 0 for blunt. Then a portion of damage bypasses this reduction so that at least some damage gets through for every hit. By default this is 10% for slash, 25% for pierce, and 100% for blunt. All of these numbers can be changed in the Reduction and Bypass values in settings.

All features must first be enabled by editing the Config.xml file. I will add Mod Configuration Menu back later when it's compatible with 1.5.4. Leaving something disabled or set to the default setting means the code for that particular patch doesn't fire at all and the existing game method won't be touched, so if something is causing an issue or incompatibility it can be safely turned back off. If a patch fails, you should get an error message popup.

New refining recipes:
4 wood -> 2 or 3 charcoal with perk
10 wood -> 5 or 8 charcoal with perk
1 ore + 1 charcoal = 2 or 3 crude iron with perk
10 ore + 8 charcoal = 20 or 30 crude iron with perk
3 crude iron +1 charcoal = 2 wrought iron
20 crude iron + 8 charcoal = 16 wrought iron
2 wrought iron + 1 charcoal = 1 crude iron + 1 iron
20 wrought iron + 8 charcoal = 9 crude iron + 11 iron
The steel recipes are the same as the wrought iron -> recipe.

As of 0.1.8, formulas are now customizable in the options, defaulting to the above.


This mod Harmony patches the following methods:
Postfix overriding result DefaultCharacterDevelopmentModel.get_LevelsPerAttributePoint - TMLLevelsPerAttribute
Postfix overriding result DefaultCharacterDevelopmentModel.get_FocusPointsPerLevel - TMLFocusPerLevel
Postfix overriding result DefaultSmithingModel.GetRefiningFormulas - TMLEnableRefiningFormulas
Postfix dividing result DefaultSmithingModel.ResearchPointsNeedForNewPart - TMLFasterParts
Postfix modifying result DefaultSmithingModel.GetModifierTierForSmithedWeapon - TMLAlwaysCraftBest
Prefix and postfix adding xp in MobileParty.DailyTick - TMLCaravanPatch
Prefix overriding input SecondPhase.IncreaseConspiracyStrength - TMLNoConspiracy
Postfix overriding DefaultSmithingModel.GetEnergyCostForSmelting - TMLNoStamUse
Postfix overriding DefaultSmithingModel.GetEnergyCostForRefining
Postfix overriding DefaultSmithingModel.GetEnergyCostForSmithing
Prefix overriding CraftingCampaignBehavior.HourlyTick -TMLRegenOutside
Prefix overriding DefaultItemValueModel.GetEquipmentValueFromTier - TMLValuePatch
Postfix adding to result of DefaultPartySizeLimitModel.CalculateMobilePartyMemberSizeLimit - TMLCaravanPatch, TMLPartySizeBonus, TMLLordNoRespawnTroops
Postfix overriding DefaultWorkshopModel.GetMaxWorkshopCountForPlayer - TMLBaseWorkshop, TMLWorkshopPerLvl
Postfix adding to DefaultClanTierModel.GetPartyLimitForTier - TMLBaseParty, TMLPartyPerLvl
Postfix overriding DefaultClanTierModel.GetCompanionLimitForTier - TMLBaseCompanion, TMLCompanionPerLvl
Postfix overriding CraftingCampaignBehavior.IsOpened - TMLUnlockParts
Prefix overriding DefaultSettlementMilitiaModel.CalculateMilitiaChange - TMLMilitiaBonus
Prefix multiplying variable in Hero.AddSkillXp - TMLHeroXP
Prefix multiplying variable in TroopRoster.AddXpToTroopAtIndex - TMLTroopXP
Postfix modifying result of DefaultSettlementProsperityModel.CalculateProsperityChange - TMLProsperityPatch
Prefix overriding CombatStatCalculator.ComputeRawDamageNew - TMLArmorPatch
Postfix overriding DefaultTroopSacrificeModel.GetLostTroopCount - TMLSiegeLoss
Prefix changing input for DefaultCombatXPModel.GetXpFromHit - TMLPracticeXP
Postfix modifying variable after MapInfoVM.UpdatePlayerInfo - TMLDailyFood

And Overrides:
DefaultSettlementGarrisonModel - TMLNoStarve

FAQ:

Q. Help! My game crashes on start!

A. Check the following:
1). Did you unblock all the dlls in bin\Win64_Shipping_Client? Not doing this will cause a crash.
2). Have you tried booting with only this mod selected? This will quickly narrow down if it's this mod or another causing the crash.
3). You can try disabling pieces of the mod by changing the values to false or the default number in the xml file. If part of this mod is causing a crash, please let me know!

Q. Help! My game crashes randomly!
A. This mod uses a few DailyTick patches, which could potentially cause a crash to happen while passing time on the world map. If your game is randomly crashing, try running the save with only this mod enabled. If it still crashes, let me know so I can track it down!

Q. Help! Part of this mod isn't working!
A. Did you edit the Config.xml file to enable the parts of the mod that you want? The mod will do absolutely nothing if the Config.xml file hasn't been changed or is missing. If you didn't get an error message and have the Config file set properly, it's likely that another mod is overriding this one.

Q. Help! This mod is breaking another mod!
A. This mod is probably not compatible with mods that replace the methods listed above. If you would prefer the functionality of another mod, use the mod options to disable the part of the mod that is conflicting with the mod in question. Once disabled, the code will not fire and compatibility will be restored. Patches which simply add to the result of something will likely be compatible, but may produce unexpected results.

Q. Can you make a mod that does XYZ?
A. Ask in the discussion section of this mod. If I have the time and inclination, I might add it to this mod. I do this as a hobby with limited free time, so no promises!
 
Last edited:
Thanks! It has been a while. Got busy with life. But being laid off with the Covid thing and Bannerlord being released at the same time is a pretty big incentive to come back, lol. Seems I lost all the little forum thingies they had given me in the old forum, though. Too bad, hah.
 
Q. Help! This mod is breaking another mod!
A. This mod is probably not compatible with mods that replace the methods listed above. If you would prefer the functionality of another mod, use the mod options to disable the part of the mod that is conflicting with the mod in question. Once disabled, the code will not fire and compatibility will be restored. Patches which simply add to the result of something will likely be compatible, but may produce unexpected results.
When I set an option to default the mod says it will disable it. Does this mean that if I wanted to use another mod to make a change to this field that the change will be made correctly? Example: Set TML number of people in hideout to default value and change the value to 90 with another mod (bannerlord tweaks) will it be 90? Only asking because I prefer to use the bandit hideout options with the other mod because it has extra options in addition to the party sizes.

Thanks!
 
One of my biggest frustrations revolves around snowballing, and I had a thought about a good fix being to raise the bonus in autocalc that being behind walls gives. But I have no coding skills. Is this a thing that would interest you in tossing in (Or is even possible)?
 
As of todays update to the 1.3.0 branch I get an error when loading this mod.
I didn't notice the update, so I had been thinking the mods I installed yesterday and which worked fine had some sort of compatibility problem...

The Issue the Fixed Launcher Mod gives me is this:

Failed to load Assemly
A mod assembly "TMLMod, Version=0.2.3.0,Culture=neutral,PublicKeyToken=null" caused a problem while loading types, likely because is references types or assemblies that are not present.

Maybe that helps find the problem.
Btw, thanks for the Mod, it's great and works well even with other, smaller mods. I've been using it for about half my total game time and I honestly don't want to go without it anymore.
Cheers,
Valdarr
 
It is a bit weak, especially against blunt weapons. The tournament arrows (blunt damage) are especially painful for armored troops.

Added a new version with a few new features. Chief among them is a new freeform character creation that lets you assign starting attribute/focus points without regard for what background you set.
 
Last edited:
Are these armour values quite easy to tweak? Iirc Warband just had a couple of lines in the module.ini file but I haven't peeked into Bannerlord's module files yet.
 
It's all in code. It requires a mod like mine to modify them. What I did was copy the ComputeRawDamageNew function from TaleWorlds.Core.CombatStatCalculator and use a Harmony prefix patch to replace the function with my own, which uses the variables that are set in the settings for the mod. It's how most modders are modding Bannerlord, since most of the stuff is in the game's dlls and isn't exposed in an ini or text file. https://github.com/pardeike/Harmony

With my mod it's simple enough to change them, if you're using the standalone version you just change them in the config file. If the MCM version you go into the in-game settings menu and adjust them. It actually doesn't even require a game restart if you adjust them with the MCM.

If someone wanted to do more than what my mod does and rewrite the function completely, they would have to make a similar mod to replace it with their own values. It's not hard, but it does require a bit of knowledge and some tools.
 
Oh my. I had assumed that the official mod tools included something like the old module system from the first games. This does not seem nearly as intuitive.
 
Back
Top Bottom