Bannerlord mechanics

Wanderer generation

Bannerlord v1.4.8 · checked 2026-11-10 · updated 2026-11-12

How a wanderer is spawned and built, at full precision for game v1.4.8 with the modules Native, SandBoxCore, SandBox, StoryMode, NavalDLC and BirthAndDeath active. For a plain-language version, see the companions guide. The workbook ratings are in Spreadsheet ratings.

The rules are in CompanionsCampaignBehavior, DefaultHeroCreationModel, HeroDeveloper and DefaultCharacterDevelopmentModel (see Game code). NavalDLC overrides the character development model with NavalCharacterDevelopmentModel: its FocusPointsAtStart returns the base model's value + 6, and every other member delegates to the base model (DefaultCharacterDevelopmentModel). NavalDLC also adds the naval skills Mariner, Boatswain and Shipmaster, and its templates. SandBoxCore and SandBox both define skill sets with the same ids; the SandBox values are used (see Skills). The snippet tables and the Scholar example are computed by the Python model in src/bannerlord/wanderers/.

At a glance

A wanderer is a template from XML plus a small amount of randomness. Everything else follows from the skills.

What Random? Rule
Skills yes template value +5..+9 per skill, rolled independently; 0 stays 0
Level follows from skills Σ 2·skill^2.2 − 2000 XP, looked up in the level table
Attributes follows from skills 15 + (level−1)/4 points, spent greedily on the attributes of the strongest skills
Focus follows from skills 5 + (level−1) points (+6 with NavalDLC), spent greedily on the strongest skills, at most 5 per skill
Age yes template age +0..4
Traits no copied from the template
Perks yes every perk the skill allows; 50/50 between a perk and its alternative
Equipment no template equipment with companion_armor / companion_weapon / companion_horse modifiers

The only randomness that changes the build is the skill noise. It moves the level by at most 1 and shifts a few attribute or focus points.

Templates: 78 in total, 67 default (SandBox) and 11 naval (NavalDLC).

Pipeline

  1. CompanionsCampaignBehavior: when and where; which template.
  2. HeroCreator.CreateSpecialHero:
    1. HeroCreationModel.GetBirthAndDeathDay: age.
    2. HeroCreationModel.GetDefaultSkillsForHero: skills + noise.
    3. HeroDeveloper.InitializeHeroDeveloper: level → attributes → focus → perks.
  3. AdjustEquipments (in CompanionsCampaignBehavior): companion item modifiers.

Six steps left to right with the Scholar's values. Step 1: pick a template, the Scholar, Empire. Step 2: roll age, 25 to 29. Step 3: roll skills, template value +5 to +9 each. Step 4: work out level, 16. Step 5: spend attribute points, 18 points. Step 6: spend focus points, 26 points.

How a wanderer is built, with the Scholar's values at each step.

Step What happens The Scholar
1 Pick a template the Scholar, Empire
2 Roll age 25 to 29
3 Roll skills template value +5 to +9 each
4 Work out level 16
5 Spend attribute points 18
6 Spend focus points 26

Age is the template age plus a random 0 to 4. Each skill above zero gets a random +5 to +9.

Spawning

Target: desired = 0.6 × number of towns.

Type

Each template has a type (GetTemplateTypeOfCompanion):

  1. mariner if it has the trait NavalSoldier (level > 0).
  2. Otherwise, its highest non-combat skill above 20, from: Engineering → engineer, Tactics → tactician, Leadership → leader, Steward → steward, Trade → trader, Roguery → rogue, Medicine → physician, Crafting (Smithing) → smith, Scouting → scout.
  3. If no such skill is above 20, fighter.

Choosing the type to spawn

Among types that still have a template not alive, the spawn picks the one furthest below its weight. For each such type:

score(type) = (w − alive_of_type / desired) / w; the highest score wins.

type w templates type w templates
scout 5/38 21 physician 3/38 4
fighter 5/38 0 steward 3/38 2
tactician 4/38 12 trader 3/38 1
rogue 4/38 16 engineer 2/38 2
mariner 4/38 11 smith 2/38 2
leader 3/38 7

The weights sum to 1. The IL holds them as float32 values. No current template is a fighter, so that weight is never used. A random not-alive template of the chosen type spawns. Its birthplace is a town of its culture, but it appears in the spawn town.

The same weights with reduced fractions and percentages, as the guide shows them:

The world aims for 0.6 wanderers per town. Every day there is a 10% chance that a random living wanderer is removed (your companions and anyone in your current settlement are spared).

Weight of each type when a new wanderer spawns, with the number of templates of that type (of 78).

Type Weight Share Templates
Scout 5/38 13.2% 21
Fighter 5/38 13.2% 0
Tactician 2/19 10.5% 12
Rogue 2/19 10.5% 16
Mariner 2/19 10.5% 11
Leader 3/38 7.9% 7
Physician 3/38 7.9% 4
Steward 3/38 7.9% 2
Trader 3/38 7.9% 1
Engineer 1/19 5.3% 2
Smith 1/19 5.3% 2

Worked example, 50 towns, 4 scouts and 1 smith alive:

  1. desired = 0.6 × 50 = 30.
  2. Scout: (5/38 − 4/30) / (5/38) = (0.13158 − 0.13333) / 0.13158 = −0.013.
  3. Smith: (2/38 − 1/30) / (2/38) = (0.05263 − 0.03333) / 0.05263 = 0.367.
  4. Smith scores higher; if no other type scores higher still, a smith spawns.

Age

  1. age = template_age + RandomInt(0..4) (both bounds included).
  2. If age < 20: age = max(age, 12 + 4 · trait_level) for every trait of the template.

CreateCompanionAndAddToSettlement passes its own age (23..34), but wanderers ignore it.

The Scholar: template_age 25, no age below 20, so 25..29.

Skills

skill = template > 0 ? template + RandomInt(5..9) : 0 (both bounds included), rolled independently per skill.

The template values are the SkillSet named in skill_template. SandBoxCore and SandBox both define sets with the same id; the SandBox values are used, and they match compendium/wanderers.xlsx.

The Scholar's template (spc_wanderer_empire_0) and his middle roll (+7 on every skill):

Skill Template Range Middle roll
Engineering 130 135..139 137
Steward 120 125..129 127
Charm 110 115..119 117
Medicine 90 95..99 97
Tactics 60 65..69 67
Leadership 50 55..59 57
Trade 45 50..54 52
Smithing (Crafting) 40 45..49 47
Scouting 35 40..44 42
Riding 30 35..39 37
Athletics 25 30..34 32
Crossbow 20 25..29 27
One Handed 15 20..24 22
Two Handed, Polearm, Bow, Throwing, Roguery 10 15..19 17
Mariner, Boatswain, Shipmaster 0 0 0

Level

T[L] is the experience needed for level L. The table is generated by T[0]=0, T[1]=1, step=1000; T[L] = T[L−1] + step; step += 1000 + step/5 (integer division).

Line chart of experience needed against level, from level 1 (1 experience) to level 20 (833,261 experience), y axis 0 to 900,000. Three dots at level 16 mark the Scholar: 366,001 experience with the lowest roll (+5 each, skill total 910), 385,115 with the middle roll (+7 each, skill total 946) and 405,035 with the highest roll (+9 each, skill total 982).

Experience needed to reach each level.

Level Experience needed
1 1
2 1,001
3 3,201
4 6,841
5 12,209
6 19,650
7 29,579
8 42,493
9 58,989
10 79,784
11 105,738
12 137,882
13 177,454
14 225,940
15 285,123
16 357,142
17 444,564
18 550,470
19 678,557
20 833,261

The Scholar's skills turn into experience as twice each skill to the power 2.2, added up, minus 2,000.

Skill rolls Sum of skills Experience Level
Lowest roll 910 366,001 16
Middle roll 946 385,115 16
Highest roll 982 405,035 16

Worked example, the Scholar's lowest roll:

  1. Skills sum to 910; Σ 2 · skill^2.2 = 368,001.
  2. xp = 368,001 − 2,000 = 366,001.
  3. T[16] = 357,142 ≤ 366,001 < T[17] = 444,564, so level 16.

The highest roll gives 405,035, also level 16; without noise the template is level 15 (level_at_base_skills).

Points budget

Constant Value Source
AttributePointsAtStart 15 DefaultCharacterDevelopmentModel
LevelsPerAttributePoint 4 DefaultCharacterDevelopmentModel
FocusPointsAtStart 5, +6 with NavalDLC DefaultCharacterDevelopmentModel, NavalCharacterDevelopmentModel
FocusPointsPerLevel 1 DefaultCharacterDevelopmentModel
MaxAttribute 10 DefaultCharacterDevelopmentModel
MaxFocusPerSkill 5 DefaultCharacterDevelopmentModel

All six attributes start at 0 and are first set to 1, which costs 6 points.

Attributes

Each skill belongs to one attribute; naval skills belong to two:

Attribute Skills
Vigor One Handed, Two Handed, Polearm
Control Bow, Crossbow, Throwing
Endurance Riding, Athletics, Smithing (Crafting)
Cunning Tactics, Scouting, Roguery
Social Charm, Trade, Leadership
Intelligence Steward, Medicine, Engineering
(naval) Mariner = Endurance+Cunning, Boatswain = Control+Social, Shipmaster = Vigor+Intelligence

The learning limit of a skill is the level above which it learns slowly:

LL(skill) = max(0, (attribute − 1) · 10) + 30 · focus

All attribute points are spent before any focus point. After the six initial points, each point goes to the attribute with the highest score, capped at 10 per attribute:

score(attribute) = average over its skills of max(0, 75 + skill − LL(skill)) / √attribute

The /√attribute term means each extra point in the same attribute is worth less.

The Scholar's middle roll spends the 12 points after the initial 6 in this order: Intelligence, Social, Intelligence, Cunning, Endurance, Control, Vigor, Social, Intelligence, Intelligence, Cunning, Endurance. Result: Vigor 2, Control 2, Endurance 3, Cunning 3, Social 3, Intelligence 5.

Focus

Each focus point goes to the skill with the highest skill − LL(skill), capped at 5 per skill. The comparison is a strict > in the game's skill order (One Handed … Engineering, then Mariner, Boatswain, Shipmaster), so a tie goes to the earlier skill. A point of focus raises LL by 30, so focus spreads across the strongest skills instead of piling onto one.

The Scholar's middle roll, with the final attributes and no focus, sorted by skill − LL (ties in skill order). Charm and Engineering tie at 97; Charm comes first in skill order and takes the first point, Engineering the second:

Skill Value LL skill − LL LL after 1 focus skill − LL after 1 focus Final focus
Charm 117 20 97 50 67 4
Engineering 137 40 97 70 67 3
Steward 127 40 87 70 57 3
Medicine 97 40 57 70 27 2
Tactics 67 20 47 50 17 2
Leadership 57 20 37 50 7 1
Trade 52 20 32 50 2 1
Smithing (Crafting) 47 20 27 50 −3 1
Scouting 42 20 22 50 −8 1
Crossbow 27 10 17 40 −13 1
Riding 37 20 17 50 −13 1
One Handed 22 10 12 40 −18 1
Athletics 32 20 12 50 −18 1
Two Handed, Polearm, Bow, Throwing 17 10 7 40 −23 1 each
Roguery 17 20 −3 50 −33 0

The 26 points: 6 in Social skills, 8 in Intelligence skills, 3 in each of the other four groups, 0 in naval skills.

Example: Empire, the Scholar

Template: Engineering 130, Steward 120, Charm 110, Medicine 90, Tactics 60, Leadership 50, and so on. data/wanderers/summary.csv gives:

Result
Type engineer (Engineering 130 is the highest non-combat skill)
Age 25..29
Level 16 every time (15 without noise)
Attributes 15 + 15/4 = 18 points: VIG 2, CTR 2, END 2–3, CNG 3, SOC 3–4, INT 5
Focus 5 + 15 + 6 = 26 points: INT 8.7, SOC 6.0, END 3.1, CNG 3.0, VIG 2.7, CTR 2.6

Grouped bar chart of the Scholar's average attribute points and focus points per attribute, y axis 0 to 10. Vigor: attribute 2, focus 2.67. Control: attribute 2, focus 2.55. Endurance: attribute 2.82, focus 3.11. Cunning: attribute 3, focus 3. Social: attribute 3.18, focus 6.02. Intelligence: attribute 5, focus 8.65. Totals: 18 attribute points (15 at start, 3 from levels) and 26 focus points (5 at start, 15 from levels, 6 from NavalDLC).

Simulated results for the Scholar (Empire), template type: engineer, base age 25.

What Result
Age 25 to 29
Level 16 every time (15 without skill rolls)
Attribute points 15 + 15 / 4 = 18
Focus points 5 + 15 + 6 = 26
Attribute Lowest Average Highest
Vigor 2 2 2
Control 2 2 2
Endurance 2 2.82 3
Cunning 3 3 3
Social 3 3.18 4
Intelligence 5 5 5
Focus group Average points
Vigor 2.67
Control 2.55
Endurance 3.11
Cunning 3
Social 6.02
Intelligence 8.65
Naval 0

Focus groups sum the focus of the 3 skills of each attribute, plus naval for the 3 naval skills.

Game code

Recovered from CIL of TaleWorlds.CampaignSystem.dll, TaleWorlds.Core.dll and NavalDLC.dll, using rea inspect-managed-members and scripts/reversing/ildump.py. Every decoded method matched rea's il_sha256.

Rule Method
Spawning, type CompanionsCampaignBehavior
Age, skills, traits DefaultHeroCreationModel
Level, budget, distribution order HeroDeveloper
Constants, learning limit, greedy choices DefaultCharacterDevelopmentModel
+6 focus NavalCharacterDevelopmentModel.get_FocusPointsAtStart
Naval skill attributes NavalSkills.InitializeAll
Mariner flag CharacterObject.CreateFrom (NavalSoldier trait > 0)
RandomInt(a, b) is [a, b) MBFastRandom.Next

IL decoded from game v1.4.8:

NavalSkills.InitializeAll, CharacterObject.CreateFrom and MBFastRandom.Next have no dump in the folder.

Changelog