unfurl

Cheats

A registry of debug cheats with a built-in window for Unreal Engine.

A registry of debug cheats with a built-in window for Unreal Engine.

👀 Summary

NsCheats is a registry of debug cheats with a built-in window. Game systems register buttons, toggles, number fields, text fields, pickers, and debug text. A developer opens the window during play and uses the cheats.

NsCheats is for development builds. In a Shipping build, the registry, the window, and the console commands compile out. NsCheats does not replicate, and it does not give an in-game UMG widget.

📦 Features

⚙️ Requirements

Unreal Engine 5.7+

🛠️ Installation

  1. Clone or download this repository.
  2. Copy the NsCheats folder into the Plugins folder of your project.
  3. For C++, add "NsCheatsRuntime" to the module dependencies in Build.cs.
  4. Generate the project files and enable the plugin.

🚀 Getting Started

Implement INsCheatProviderInterface on the object that owns the cheats:

#include "NsCheatsSubsystem.h"

void UMyEconomySubsystem::RegisterCheats_Implementation(UNsCheatsSubsystem* CheatsSubsystem)
{
    CheatsSubsystem->ForProvider(this, TEXT("Economy"))
        .Section(TEXT("Coins"))
        .Button(TEXT("Economy.AddCoins"), INVTEXT("Add 1000 coins"),
            FNsCheatExecuteDelegate::CreateUObject(this, &UMyEconomySubsystem::AddDebugCoins))
        .Toggle(TEXT("Economy.FreePlay"), INVTEXT("Free play"),
            FNsCheatGetBoolDelegate::CreateLambda([this]() { return bFreePlay; }),
            FNsCheatSetBoolDelegate::CreateLambda([this](bool bValue) { bFreePlay = bValue; }));
}

Then call RegisterProvider(this) on the UNsCheatsSubsystem of the game instance. Do this in BeginPlay for an actor or a component, and call UnregisterProvider(this) in EndPlay.

Run ns.Cheats.Toggle in the console to open the window.

🧩 Entry Types

Builder call Blueprint call Row in the window
Button Register Button Cheat A Run button
Toggle Register Toggle Cheat A check box
Float Register Float Cheat A number field
Text Register Text Cheat A text field, with a Run button if an action is bound
Picker Register Picker Cheat A dropdown, with a Run button if an action is bound
DebugText Register Debug Text Cheat Read-only text
ButtonRow None A row of buttons

🔧 API

🚧 Limits

📚 Documentation


Contact