Important note: This is the BmSDK for Arkham Knight repository.
The scripthook is also available for Batman: Arkham City.
A powerful, easy-to-use scripting platform for Batman: Arkham Knight that lets you integrate custom C# code for gameplay mods and more.
The scripthook gives you access to a full SDK for working with the game, world and engine. The SDK exposes Unreal Engine 3's own UnrealScript API to C# scripts. Modders get to work with the same types, properties and functions as the original developers did. There are also many useful life-cycle events (e.g. tick and game enter) and helpers provided. Below is an example mod that shows off some of BmSDK's capabilities:
Script to spawn in Joker near the player
using BmSDK;
using BmSDK.BmGame;
using BmSDK.BmScript;
[Script]
public class DemoScript : Script
{
public override void OnKeyDown(Keys key)
{
if (key != Keys.J) return;
var player = Game.GetPlayerPawn();
var population = Game.GetPopulationManager();
// Spawn Joker combat enemy
var define = Game.FindObject<RCharacterDefine>("MainCharacterDefines.Villain.JokerHealthy");
var joker = population.SpawnPawn(
RPawnVillainThug.StaticClass(),
define,
RCharacter_Thug.StaticClass(),
player.Location
);
// Move Joker in front of the player
var dir = player.Rotation.ToDirection() with { Z = 0 };
joker.Move(dir * 100);
}
}Check out the documentation for more info!
If you want to play script mods, getting started is simple:
- Download the latest release from releases and open the ZIP file.
- Inside you'll see two folders:
BinariesandBmGame. Copy both to your game folder (likelyC:\Program Files (x86)\Steam\steamapps\common\Batman Arkham Knight). There should already be 2 folders in there with the same names. - BmSDK is now installed! To play script mods, simply drop any .cs files into your
BmGame\Scriptsfolder and start the game.
Keep in mind that script mods can potentially harm your computer. Make sure you only download and install scripts from trusted sources.
Only Steam copies of Arkham Knight are supported currently. EGS/GOG support is being considered, but BmSDK unfortunately does not work on these platforms for the time being.
Follow these steps to set up your environment for building, running, and debugging script mods:
- Install BmSDK
- Go to visualstudio.microsoft.com/downloads and run the Visual Studio Installer.
- In the Visual Studio Installer, select ".NET desktop development" from the Workloads tab.
- Start Visual Studio and open the solution in
%GameDir%\BmGame\ScriptsDev. - Write your code in any C# source file in
%GameDir%\BmGame\Scripts. - Run your code by pressing F5 in Visual Studio.
- Follow the docs to write your first script.
To get started contributing to BmSDK, see the docs for instructions: Building from source
BmSDK is published under the MIT licence.
BmSDK is not associated with Warner Bros. Games or Rocksteady Studios. All product and company names are trademarks or registered trademarks of their respective holders. Use of these names does not imply any affiliation or endorsement by them.