Mount & Blade II: Bannerlord

Mount & Blade II: Bannerlord

511 ratings
Developer Console Commands
By Sjurdur
I was writing down console commands for my own use. Might as well post my notes here.
9
6
27
2
2
2
2
3
2
   
Award
Favorite
Favorited
Unfavorite
How to activate the Developer Console
As of e1.4.2, you can just press ALT + tilde to open the console. No mod required.


This may vary, depending on your keyboard layout.

If you are playing an earlier version, you're gonna need this:
https://www.nexusmods.com/mountandblade2bannerlord/mods/4
Activating Cheat Mode
If you want to cheat, you will have to activate cheat mode.

The command is config.cheat_mode 1. Press Enter to activate.



You can deactivate cheat mode by entering the command again, but with a 0 instead of a 1.
Things to do in Cheat Mode
While cheat mode is active, the left side of the inventory screen contains 10 units of every item in the game. Just open the inventory and start filling you pockets.

There are also some hotkeys that have various effects.

On the world map:
Ctrl + left click
Teleports you to pointer location.
Ctrl + Alt + T
Reveals all units on the map. May be laggy.
Push again to disable.

In battle:
Ctrl + H
Heals you.
Ctrl + Shift + H
Heals your horse.
Ctrl + F4
Knocks out a random enemy.
This is good to know, if an enemy glitches through a wall and can't be hit.
Ctrl + Alt + F4
Knocks out all enemies. May be laggy, if there are many enemies.
Ctrl + F2
Knocks out one of your own troops.
Ctrl + F3
Knocks you out.
Ctrl + Shift + F3
Knocks out your horse.
Spawning Items
You can spawn items with the campaign.give_item_to_main_party command.
The syntax is campaign.give_item_to_main_party [ItemName] [Amount].



While you can also spawn items in the inventory screen, you can only get 10 units at a time. If you need 1000 units of something, using the console is much faster.
Spawning Troops
You can spawn troops with the campaign.give_troops command.
The syntax is campaign.give_troops [TroopId] [Number].

Type campaign.give_troops help to get a list of all available troops.
This does not show all troops in the game, though.

List of tested commands
Remember that you can type a question mark at the end of any command, to get more information about that command. Obsoive:



Hero:
campaign.add_gold_to_hero [Number] [HeroName]
Gives [Number] gold to [HeroName].
If nothing is entered, gives 1000 gold to your character.
campaign.add_focus_points_to_hero [Number] [HeroName]
Gives [Number] focus points to [HeroName]. Gives to your character, if no name is entered.
campaign.add_attribute_points_to_hero [Number] [HeroName]
Gives [Number] attribute points to [HeroName]. Gives to your character, if no name is entered.
campaign.set_all_skills_main_hero [Value]
Sets all of your characters skills to [Value]
campaign.set_skills_of_hero [Level] [HeroName]
Sets all of chosen characters skills to [Level]
campaign.set_skill_main_hero [LevelValue] [SkillName]
Set one of your characters skills to [Value]
campaign.add_influence [Number]
Gives [Number] influence.

Party:
campaign.set_skill_companion [LevelValue] [SkillName]
Sets chosen skill of all your companions to [Value]
campaign.give_troops_xp [Number]
Gives [Number] xp to all your troops.
campaign.add_companion
Adds a companion with 0 in all stats.
Not recommended. They're dumbasses.
campaign.add_renown [Number] [ClanName]
Gives [Number] renown to [ClanName]. If no name is entered, it gives renown to your clan.

Relations:
campaign.declare_war [Faction1] [Faction2]
[Faction1] and [Faction2] declare war on each other.

Write faction names without spaces. Thusly:
campaign.declare_war northernempire westernempire
campaign.start_world_war

Settlements:
campaign.add_progress_to_current_building [SettlementName] [0-100]
E.g.:
campaign.add_progress_to_current_building lycaron 100

Sets progress of current project in Lycaron to 100%. One day still needs to pass, before work is started on the next project.

Misc:
campaign.add_gold_to_all_heroes [Number]
Gives [Number] gold to everyone.

campaign.take_hero_prisoner [PrisonerName] [CaptorName]
[PrisonerName] is taken captive by [CaptorName].
If a characters name contains multiple words, use underscores instead of spaces.
Thusly:
campaign.take_hero_prisoner sir_butterworth biggus_dickus
Result:
Sir Butterworth is taken prisoner by Biggus Dickus.
If you want to cheat more
Questions
Does anyone know how to spawn peasants as troops?
90 Comments
hansy.hurtado Feb 18 @ 1:45am 
Hello, when I activate cheat mode I replace 0 with 1, I go to the console it tells me that cheat mode is disabled, I have mods activated via Nexus mod, does that work?
Zzoddy Jan 31 @ 4:26pm 
I wonder if there's a command to make the game good.
SlothyS Jul 22, 2024 @ 3:08pm 
you can add troops by turning on cheats then open up the part icon on the bottom left or press "P" should have all troops even modded in ones
JayWalkin Jun 29, 2024 @ 7:56pm 
Can't add troops. Even with the new console command.
The Apex in Latex Apr 8, 2024 @ 12:32am 
Hey, hi, Hello!

For any and all who managed to stumble upon this place again I found a solution (with the help of the Taleworld forums of course) to the issue reagrding the console command "campaign.add_Modified_item"

Rather than using the item IDs like we have in times past, you must instead use the actual name of the item you're trying to spawn along with the modifier

ex, campaign.add_Modified_item Mastercrafted Southern Scale over Cbain Hauberk | Lordly

It's important to add the pipe symbol ( | <-- that symbol, it's just above your enter key, same key as /) when adding the modifiers to the gear you want spawned and modified. I really hope I helped y'all, I'll credit this finding to the link as soon as i'm able to find it. Have fun! :steamhappy:
Sjurdur  [author] Feb 14, 2024 @ 8:06am 
Sorry guys. I've completely lost interest in Bannerlord for now. It will probably be a long time before I update this.
Katyusha Feb 13, 2024 @ 4:16pm 
sooo did give commands still broken it looks like but I'm not sure maybe they changed it
kustoff68 Jan 16, 2024 @ 2:49pm 
all this no longer works, the game does not understand the names of skills. v.1.2.6
Sjurdur  [author] Jan 13, 2024 @ 12:09am 
Sorry, I'm too busy with Elden Ring to update this right now.
Rooster1024 Jan 13, 2024 @ 12:06am 
Newest patch seems to have broken the syntax of some of the commands. Addmodifieditem doesnt work anymore