SkookumScript is the superpowered scripting solution and cutting-edge command console for UE4. It is powerful and feature-rich, yet simple and easy to learn. It has native game concepts and deep integration with UE4 Blueprints and C++. SkookumScript allows the live creation of sophisticated gameplay with surprisingly few lines of code. It has been lovingly crafted over more than a decade, battle-tested on major game titles and supports all platforms. SkookumScript is made for games.
Please see the Wiki for a list of learning resources for SkookumScript.
If you'd like to have SkookumScript see your C++ defined UFUNCTION
s and UPROPERTY
s then follow the steps below. Be sure to replace any instances of YourProjectNameHere
with the name of your project as defined in your project's implementation of the primary game module. For instance, in the CExample.cpp
below we can see that the project name is CExample
, yours will differ:
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, CExample, "CExample" );
- In
YourProjectNameHere.cpp
, add the include:
#include <SkUEProjectGeneratedBindings.generated.inl>
- In
YourProjectNameHere.Build.cs
add the 3 code sections delimited in the example below, you don't need to change any names for this one, just copy/paste the sections that are marked asAdd this
to the appropriate place:
using UnrealBuildTool;
/***** Add this *****/
using System.IO;
using System.Collections.Generic;
using Tools.DotNETCommon;
/*********************/
public class CExample : ModuleRules
{
public CExample(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string[] { });
/***** Add this *****/
// Load SkookumScript.ini and add any ScriptSupportedModules specified to the list of PrivateDependencyModuleNames
PrivateDependencyModuleNames.AddRange(GetSkookumScriptModuleNames(Path.Combine(ModuleDirectory, "../..")));
/********************/
}
/***** Add this *****/
// Load SkookumScript.ini and return any ScriptSupportedModules specified
public static List<string> GetSkookumScriptModuleNames(string PluginOrProjectRootDirectory, bool AddSkookumScriptRuntime = true)
{
List<string> moduleList = null;
// Load SkookumScript.ini and get ScriptSupportedModules
string iniFilePath = Path.Combine(PluginOrProjectRootDirectory, "Config/SkookumScript.ini");
if (File.Exists(iniFilePath))
{
ConfigFile iniFile = new ConfigFile(new FileReference(iniFilePath), ConfigLineAction.Add);
var skookumConfig = new ConfigHierarchy(new ConfigFile[] { iniFile });
skookumConfig.GetArray("CommonSettings", "ScriptSupportedModules", out moduleList);
}
if (moduleList == null)
{
moduleList = new List<string>();
}
// Add additional modules needed for SkookumScript to function
moduleList.Add("AgogCore");
moduleList.Add("SkookumScript");
if (AddSkookumScriptRuntime)
{
moduleList.Add("SkookumScriptRuntime");
}
return moduleList;
}
/*********************************************/
}
- In your project's
Config
folder, create the fileSkookumScript.ini
and set the contents as below, be sure to replace the name of your project:
[CommonSettings]
+ScriptSupportedModules=YourProjectNameHere
- Clean your Game project in VS and build. You should now see all your functions and properties.
To use the source version of SkookumScript, you will also need he SkookumIDE binaries. The easiest way to acquire these is to download the latest release and overwrite the SkookumIDE
folder in this repo with the one from the release. You can also build the IDE from source by following these instructions. Note that to access the SkookumIDE repo, you need to have access to the Unreal Engine 4 repository.
Place the SkookumScript plugin into your project's plugin folder. Example: MyProject/Plugins/SkookumScript
.
You can choose whether to place the SkookumScript plugin into the engine's Runtime/Plugins
folder or in your project's plugin folder.
- Build the SkookumIDE
- Copy the built SkookumIDE folder from the SkookumIDE project folder
Engine/Plugins/SkookumScript/SkookumIDE
to the SkookumScript Plugin folderPlugins/SkookumScript
. Note that this will overwrite the existingSkookumIDE
folder. - Regenerate project files. If you placed the plugin into the engine folder then run
GenerateProjectFiles.bat
otherwise right-click your.uproject
and select Generate Visual Studio Project Files. - Build your project/engine as usual.