CodeForge RPG Starter Kit Cover

CodeForge RPG Starter Kit

Welcome to the documentation for the CodeForge RPG Starter Kit, a C++ based example project for the eponymous UE5 plugin. Created entirely from CodeForge Data Assets, it aims to demonstrate a seamless bridge between architectural design and production-ready game logic.

Zero Boilerplate Proposition CodeForge handles component initialization, networking replication, interface implementation, and console command registration automatically. Focus on design, not syntax.

Core Architecture

The kit utilizes a modular, component-based architecture designed for scalability, network efficiency, and clean decoupling.

Spawns Owns Implements ARPGGameMode ARPGCharacter RPGInventoryComponent IDamageable <Interface>

Class Breakdown

ARPGGameMode Generated

The top-level authority that dictates the rules of the match.

ARPGCharacter Generated Replicated

The centerpiece of the kit. Inherits from ACharacter and implements IDamageable seamlessly.

URPGInventoryComponent Generated

A lightweight UActorComponent for data-driven item management.

bool AddItem(const FRPGItemData& Item);
bool RemoveItem(int32 SlotIndex);

Features weight-based limits and maximum slot constraints, broadcasting OnInventoryChanged and OnItemAdded dynamic multicast delegates when the inventory changes.

IDamageable (Interface) Generated

A native Blueprint-callable interface designed for uniform damage interactions across all susceptible actors.

Data Structures & Enums Generated

The fundamental data definitions driving the item system.

Showcase Console Commands

Test the integrity of the generated C++ logic in real-time using these built-in cheat commands. Press ~ in PIE to open the console.

CheatNuke

Triggers an AoE blast (1000 units) that line-traces and destroys all actors implementing the Damageable interface.

CheatGodMode

Sets Health and Attack Power to 999,999. Proves the robustness of the replicated stats system.

CheatHeal

Instantly restores health to maximum and triggers the OnHealthChanged delegate for UI updates.

CheatAddItem

Injects a "Test Sword" into the inventory component to validate weight and slot logic constraints.

CheatGainXP [Amount]

Adds experience points and tests the automatic level-up logic and its associated broadcast.

CheatAttack

Executes a server-validated line-trace attack against the target the character is currently facing.

Getting Started

Follow these steps to generate and run the kit:

  1. Open the Graph Editor: Navigate to the CodeForge graph editor window.
  2. Verify Nodes: Ensure the RPGCharacter and RPGInventoryComponent nodes are correctly connected.
  3. Generate Code: Click the Generate button in the main toolbar to compile the C++ classes.
  4. Project Settings: Once compiled successfully, set ARPGGameMode as your Default Game Mode.
  5. Play & Test: Press Play (PIE) and open the console with ~ to use the showcase commands.