GregOrigin - CodeForge: Native Node-based Visual C++ Programming System

Watch it in action.

Read the manual.

Functional open source version available: https://github.com/gregorik/CodeForge. Fab hosts the fully featured Pro version.

CodeForge: Visual C++ Code Generator for Unreal Engine 5

Design classes visually. Generate production-ready C++. Skip the boilerplate.

CodeForge is a node-based editor plugin that lets you define UE5 classes, structs, enums, and interfaces in a visual graph — then generates fully UHT-compliant, compile-ready .h and .cpp files at the click of a button.

Why CodeForge?

Every Unreal C++ class starts with the same ceremony: macro declarations, include chains, replication boilerplate, specifier strings you've typed a thousand times. CodeForge eliminates that friction while keeping you in full control of the output.

Visual Graph ──▶ Template Engine ──▶ .h / .cpp on disk ──▶ Compile

You design the shape of your code visually. CodeForge handles the syntax.

Core Features

◆ Node-Based Class Designer

Build your C++ types by connecting nodes in an intuitive graph editor. Eight node types cover the full UE5 type system:

Class, Struct, Enum, Interface, Property, Function, RPC, Delegate.

Connect member nodes to type nodes via typed pins. The schema enforces correct connections: properties connect to classes and structs, RPCs only to actor-derived classes.

◈ Live Code Preview

A split-pane preview panel shows the generated .h and .cpp in real time as you edit. Every change in the graph instantly reflects in the preview: no guesswork about what the output will look like.

◇ Full Replication Scaffolding

Check a single box and CodeForge generates the entire replication setup:

  • bReplicates = true in the constructor

  • GetLifetimeReplicatedProps() override with per-property DOREPLIFETIME_CONDITION()

  • All 15 UE5 replication conditions (CONDOwnerOnly, COND_InitialOnly, CONDSimulatedOnly, ...)

  • OnRep_ functions for RepNotify properties

  • Server/Client/NetMulticast RPCs with Implementation and Validate stubs

Networking code that normally takes 15 minutes of careful copy-paste: generated correctly in seconds.

◆ Smart Validation with Auto-Fix

Real-time validation runs on every edit and displays errors and warnings directly on graph nodes:

Check Example Duplicate names Two properties both named Health C++ keyword conflicts Property named class or return UE5 naming conventions Bool not prefixed with b, wrong class prefix Type corrections Float ➜ float, String ➜ FString, Vector ➜ FVector Context errors RPC on a non-Actor class, RepNotify without Replicated Enum integrity Duplicate entries, empty enums

Many warnings include one-click auto-fixes — click to correct the b prefix, fix a type name, or add the proper class prefix.

◈ Customizable Template Engine

Code generation is driven by .cft template files using a clean Handlebars-like syntax.

Override any template. Point Custom Template Path in Project Settings to your own .cft files and CodeForge uses them instead — brand your headers, add team conventions, or restructure the output however you like.

◇ Structural Change Detection + Live Coding

CodeForge maintains a generation manifest and classifies each regeneration:

  • Structural change (new properties, renamed functions) ➜ hot reload required

  • Behavioral change (function body edits) ➜ triggers Live Coding automatically

This means editing function bodies through CodeForge and recompiling can happen without leaving the editor.

◆ Custom Thumbnails in Content Browser

Every CodeForge blueprint asset gets a unique, auto-rendered thumbnail:

  • Color-coded by type (blue for classes, green for structs, amber for enums, cyan for interfaces)

  • Shows the kind letter, subtype label, and member count

  • Colors sync with your node color settings — retheme the graph, and the thumbnails follow

◈ Drag-and-Drop Type Assignment

Drag a CodeForge Struct or Enum asset from the Content Browser directly onto a Property node: the property type and include path are filled in automatically. No manual typing of FMyStruct or figuring out include paths.

◇ RPG Starter Kit Examples

Hit the Examples button to generate a complete set of six interconnected assets: each of them fully configured with properties, functions, replication, and cross-references — ready to generate and compile as a starting point for any project.

Supported Class Types

CodeForge covers 11 UE5 base class types out of the box:

AActor | APawn | ACharacter | UActorComponent | USceneComponent | UObject | AGameModeBase | AGameStateBase | APlayerController | APlayerState | AHUD

Plus USTRUCT, UENUM, and UINTERFACE — covering the vast majority of gameplay C++ types.

CodeForge — because life's too short to type GetLifetimeReplicatedProps by hand.

1 Like

0.2.0 Changelog (9 April 2026)

The primary focus of the update was on implementing Advanced Replication and a Structural Change Detection system.

  1. RPC & Advanced Replication System
    The plugin now supports full visual definition of networking logic:
  • New RPC Definitions: Added UCodeForgeRPCDef and CodeForgeNode_RPC to allow visual configuration of Server, Client,
    and NetMulticast functions.
  • RepNotify Support: Enhanced UCodeForgePropertyDef to include RepNotify flags, which automatically generate the
    OnRep_PropertyName boilerplate.
  • Lifetime Replication: Updated templates to automatically override and populate GetLifetimeReplicatedProps.
  1. Structural Change Detection
    Implemented the FCodeForgeChangeDetector system:
  • Generation Manifests: The plugin now saves a JSON manifest of generated classes.
  • Intelligent Classification: It can now differentiate between Structural Changes (new properties, changed function
    signatures) and Behavioral Changes (minor logic tweaks), allowing for smarter hot-reloading and compilation
    strategies.
  1. Handlebars Template Engine v2
    The .cft templates in Content/Templates received a major overhaul:
  • Added support for AdditionalIncludes and complex {{#each}} loops for RPCs and replication.
  • Modularized the copyright_header and rep_notify templates for better maintainability.
  1. RPG Starter Kit & Documentation
    A separate documentation is released, dedicated to the evolved RPG Starter Kit example project (RPGKit_Manual.html), showcasing these new features:
  • New Demo Scenario: A walkthrough for building an Action RPG base, featuring an ARPGCharacter with replicated stats
    and a URPGInventoryComponent with server-validated item logic.
  • Console Commands: Added built-in cheat commands (e.g., CheatNuke, CheatGodMode) to the generated boilerplate for
    instant testing of networked logic.
  1. UI/UX Enhancements
  • Validation Badges: Added a ValidationBadge slot to graph nodes, allowing for real-time visual feedback when a
    node’s configuration is invalid (e.g., missing class name or invalid replication settings).
  • Binary Refresh: The plugin modules were fully rebuilt and verified on Unreal Engine 5.7.0.
1 Like

Added 2 new pages for testing purposes:
:placard: CodeForge Automation Test Summary
:placard: CodeForge RPG Starter Kit Generated Code Samples

I’m also adding a rebuild script for the generated code samples, aimed to facilitate familiarizing yourself with the CodeForge plugin:

New-CodeForgeGeneratedSamples.ps1 (26.4 KB)

0.2.1 changelog (16 April 2026)

Added

Playable RPG Starter Kit Demo

  • Added a playable Unreal RPG demo map:
    • Content/CodeForgeExamples/RPGStarterKit/Maps/RPG_Demo.umap
  • Added generated/runtime RPG demo C++ types:
    • ARPGCharacter
    • ARPGEnemy
    • ARPGGameMode
    • ARPGItemPickup
    • URPGInventoryComponent
    • Damageable
    • EItemRarity
    • FRPGItemData
  • Added a full playable loop:
    • Character movement, turning, camera, and attack input.
    • Enemy damage/death flow through the IDamageable interface.
    • Pickups that add items to the inventory.
    • Inventory slot and weight limits.
    • XP gain and level-up delegates.
    • Demo auto-spawning for enemies and pickups.
  • Added RPG console commands:
    • CheatAttack
    • CheatGainXP
    • CheatAddItem
    • CheatHeal
    • CheatGodMode
    • CheatNuke
  • Added automation coverage for the playable loop:
    • CodeForge.RPGStarterKit.PlayableLoop

CodeForge Generator Features

  • Added Interface as a supported ECodeForgeBlueprintKind.
  • Added delegate generation support through new FCodeForgeDelegateDef.
  • Added ECodeForgeDelegateType with dynamic, multicast, dynamic multicast, and simple delegate variants.
  • Added support for:
    • Interface headers/sources.
    • Class interface inheritance and interface includes.
    • Delegate declaration macros.
    • Delegate UPROPERTY generation.
    • Custom constructor bodies.
    • Custom function bodies.
    • Custom RPC bodies.
    • Custom RepNotify bodies.
    • Exec functions.
    • Native virtual override functions.
    • Const-qualified function declarations and implementations.
    • Server RPC validation stubs.
  • Added class/struct/enum prefix handling to avoid double-prefixing names such as ARPGCharacter, FRPGItemData, and
    EItemRarity.

Editor UX

  • Added an editor toolbar button for creating CodeForge Blueprint assets.
  • Added an Examples button inside the CodeForge asset editor.
  • Added RPG Starter Kit example generation from the editor:
    • Creates example CodeForge assets.
    • Generates or preserves corresponding C++.
    • Creates/saves the playable RPG demo map.
    • Syncs the Content Browser to generated assets.
    • Shows completion notifications.
  • Added graph population from existing blueprint data when opening a CodeForge asset with an empty graph.
  • Added save-time graph-to-blueprint sync.
  • Added graph search UI and auto-layout entry point.
  • Added branded graph/details/preview panels, including:
    • CodeForge headers.
    • Accent strips.
    • Watermark.
    • Live generated-code preview styling.
  • Added custom CodeForge thumbnail rendering for CodeForge Blueprint assets.
  • Added configurable node colors, branding colors, font sizes, and toolbar visibility settings.

Graph Nodes

  • Added Delegate graph node support.
  • Added Interface graph node support.
  • Added delegate pins on class nodes.
  • Added schema support for:
    • Class to delegate connections.
    • Interface to function connections.
    • Delegate pin coloring.
    • Interface node creation.
    • Delegate node creation.
  • Added node autowiring behavior.
  • Added drag-and-drop support for setting property types from CodeForge struct/enum assets.

Templates

  • Added new interface templates:
    • interface_header.cft
    • interface_source.cft
  • Updated class templates to emit:
    • Interface includes.
    • Interface inheritance.
    • Delegate declarations and properties.
    • Constructor bodies.
    • Native event implementations.
    • Regular function implementations.
    • RPC implementations.
    • Server RPC validation.
    • RepNotify bodies.
  • Updated struct and enum templates to use resolved owner names.
  • Updated enum template behavior so UMETA(…) is emitted only when metadata exists.

Documentation and Sample Packaging

  • Added CodeForge documentation resources:
    • Main docs page.
    • RPG Starter Kit manual.
  • Added Tools/New-CodeForgeGeneratedSamples.ps1, which builds a buyer-facing/generated-samples bundle with:
    • Schema JSON.
    • Generated C++ copies.
    • Manifest with hashes.
    • Optional build and automation proof.
    • HTML summary.
    • ZIP archive.
  • Added plugin filter config for packaging docs, templates, source, config, and plugin metadata.

Changed

Runtime Data Model

  • Made validation results Blueprint-visible.
  • Made property/function/RPC/enum definition fields Blueprint-readable/writable with CodeForge categories.
  • Added VisibleAnywhere support to property specifier generation.
  • Added IncludePath, FunctionBody, OnRepBody, bExec, bUFunction, bVirtual, and bOverride fields where relevant.
  • Updated validation so delegates are checked for duplicate names, empty names, invalid names, and Unreal delegate
    parameter limits.
  • Added interface validation for duplicate/empty function names and empty interfaces.
  • Updated empty-class validation so delegates count as class content.

Generator Tests

  • Added tests for:
    • Delegate generation.
    • Interface generation.
    • Class implementing an interface.
    • Native virtual override generation.
  • Existing test files received copyright headers.
1 Like

Video update on 0.2, focused on the RPG Starter Kit example project:

Changelog [0.2.2] - 2026-05-08

Added

  • Code Preview Panel: Added a real-time preview panel showing generated .h and .cpp code alongside the node graph.
  • Asset Creation Wizard: Introduced a new visual setup wizard for asset creation, featuring archetype selection cards for Actors, Components, Structs, Enums, and Interfaces.
  • Real-Time Validation: Validation errors and warnings are now visualized directly on the relevant graph nodes.
  • Custom Graph Nodes: Added SGraphNode_CodeForge to provide color-coded node headers, error badges, and improved pin layouts.
  • Undo/Redo Transactions: Full transaction support added for all graph operations, ensuring safe undo/redo capabilities.
  • IncludePath Support: Added an IncludePath field to Property definitions for automatically handling custom type includes.
  • Two-Way Synchronization: Implemented SyncFromBlueprint to keep graph nodes strictly synchronized with the underlying data asset.
  • Plugin Settings: Added a global CodeForge settings page (in Project Settings) to configure brand colors, default prefixes, and Live Coding behaviors.

Fixed

  • Graph Tab Visibility: Fixed an issue where the Editor’s Graph tab failed to display due to an incorrect layout role.
  • Wizard Interactivity: Fixed the archetype selection cards in the wizard by switching from unresponsive buttons to visually distinct toggle checkboxes.
  • Editor Stability: Hardened editor stability by improving null-safety, handling missing graph commands, and refining output path resolution.
  • UE Build: Addressed various UE5.5, 5.6, 5.7 specific build and compiler errors across the plugin.
1 Like

0.2.2 video update:

1 Like

A comprehensive tutorial of the major 0.5.0 upgrade is available:

[0.5.0] update, 2026-10-05 :hammer_and_wrench: :man_technologist:

Lift to C++ turns existing Blueprints into C++ base classes, every generated type now keeps its definition as text next to its code, and Emberwood, a small action RPG built entirely from CodeForge definitions, joins the samples.
This is the first release since 2026 May, incorporating the internal releases 0.3, 0.4. Thus 0.5.0 is a radical upgrade that is essentially a new product.

Added :woman_mage:

Lift to C++ (Blueprint → C++ base class) :scientist:

  • Right-click a Blueprint (or use the Blueprint editor toolbar) → Lift to C++. CodeForge reads the Blueprint and plans what moves:
    • variables, with their flags, replication, metadata and current values as initializers;
    • functions, as BlueprintNativeEvents with a C++ _Implementation stub to move the logic into, or BlueprintImplementableEvents, chosen per function. Input defaults become C++ default arguments, outputs become reference parameters, and ReturnValue becomes the return value; Pure, Const, category, tooltip and access are kept;
    • event dispatchers, as dynamic multicast delegates;
    • custom events, as BlueprintImplementableEvents;
    • the Blueprint structs and enums they use, as USTRUCTs and enum class UENUMs with the same values and display names.
      Anything that can’t move stays, with the reason shown.
  • Generates the C++ parent class, structs and enums as CodeForge definitions next to the Blueprint, and adds missing module dependencies to the target module’s Build.cs.
  • After a build, Complete Lift reparents the Blueprint onto the class, removes its own copies, and turns lifted custom events and function graphs into overrides of the C++ declarations, keeping their nodes and links. It redirects references in the Blueprint, in other Blueprints, and every use of the replaced Blueprint structs and enums: variables, parameters, Make/Break nodes, split pins, Switch on Enum and Select nodes, enum literals and defaults. Class defaults and per-instance values in maps are kept; values convert by type (struct members by name, enum entries by value).
  • Complete verifies its own work (compiles, pin links, values, function overrides, no remaining struct or enum references) and undoes itself automatically if any check fails. It is one undo transaction (Ctrl+Z works, values included; Blueprints recompile in dependency order) and backs up the affected assets for Restore Pre-Lift Backup.
  • Also from Python (analyze_lift, lift_to_cpp, complete_lift, restore_lift_backup) and the commandlet (-Lift, -CompleteLift); a prompt at editor startup offers to complete lifts whose C++ has been built.
  • Sample: /Game/CodeForgeSamples/Lift (BP_Beacon, BP_BeaconWatcher, S_BeaconStats, E_BeaconMode, LiftDemoMap) to try it on.
  • Scripts/Test-LiftEndToEnd.ps1 proves the flow with real builds and editor restarts; the compile check builds lifted classes, functions and enums from four different Blueprints.

Definition files next to the code

  • Generating a type also writes its definition as <Name>.codeforge.json beside the header, one type per file with deterministic output, so definitions are reviewed, diffed and merged as text with the code they produce. -Schema and -Import accept a folder and read every *.codeforge.json under it, so merged files regenerate the code or update the assets. The files count towards Up to date / Changed, a JSON file CodeForge didn’t write is never overwritten without asking, and the Write Definition Files setting turns them off.

Emberwood sample

  • A small action RPG whose 20 gameplay types are one definition file (Samples/Emberwood/Emberwood.codeforge.json): the Lamplighter (light as health and mana, three spells, an autopilot), shades, the Hollow Keeper, Wayshrines with waves and sanctuaries, embers and levels, relics, falling and waking, a dawn that relights the level, and a save game for the fastest dawn. The HUD is a Slate layer on the game viewport, so Movie Render Queue records it. See docs/emberwood-sample.md in the release.
  • CodeForge.Sample.EmberwoodPlays plays it on autopilot in an automated test; Scripts/BuildEmberwood.py dresses its level from free Fab content.

Editor

  • Graphs are laid out in columns, grouped by kind (properties, functions, RPCs, delegates) next to the type node, so a class with dozens of members fits on screen. Used on first open and by Auto Layout.
  • A member added from the graph’s right-click menu arrives wired to the type node.
  • The graph’s search box selects every member whose name matches and brings the best match into view.
  • A node’s Fix: entries say what they do (Rename to bLit, Make Health replicated); the finding is in the tooltip.

Changed

  • Generating a type that didn’t exist before no longer offers Live Coding, which can’t add a new class safely (it could crash the editor). A notification says a build and an editor restart are needed.
  • New type wizard: wider archetype buttons, and Add starter members (was Add example members) explains what it adds.

Fixed

  • C++ keywords were rejected without regard to case, so names such as For, Default or Class were refused. Keywords are now matched case-sensitively, as C++ does.
  • Definition files (and exported schema files) were written with CRLF line endings on Windows and LF elsewhere. They now use LF everywhere, like the generated code, so the same definition has the same bytes on every platform.
  • A long validation message on a node widened the node; it now wraps.
  • The Blueprint editor’s Lift button kept the label it had when the toolbar was built (Complete Lift after the lift was completed, Lift to C++ after it was undone). It now follows the lift’s state.

Compatibility

  • Builds with zero plugin warnings and passes the full automation suite on UE 5.5, 5.6, 5.7 and 5.8 (fresh-copy test matrix).
  • Automation tests grew from 183 to 222. The compile proof now builds 184 generated files, Emberwood included.

[0.3.0] - 2026-10-03

A large internal release: new type kinds and options, a scripting and automation surface, a sample game built only from generated code, and a correctness pass that makes every generated file compile under UnrealHeaderTool and MSVC.

Added

Language coverage

  • Interfaces: UINTERFACE + I class generation (Blueprintable and C+±only), and classes that implement a CodeForge interface get the include and every override (_Implementation for events, virtual ... override otherwise) with bodies from Interface Function Bodies.
  • Delegates: dynamic multicast, dynamic, multicast and single, 0–9 parameters; signature declarations plus BlueprintAssignable/BlueprintCallable members; Delegate graph node.
  • New parents: DataAsset, PrimaryDataAsset, SaveGame, GameInstance, GameInstance/World/LocalPlayer/Engine subsystems, BlueprintFunctionLibrary, and Custom (any C++ parent with its include and family).
  • Class options: Abstract, Blueprintable/NotBlueprintable, BlueprintType, spawnable components, DisplayName, Config/DefaultConfig.
  • Struct parents (e.g. FTableRowBase for Data Table rows) and bitflag enums (ENUM_CLASS_FLAGS, power-of-two values, Bitflags meta).
  • Functions: BlueprintImplementableEvent, static, CallInEditor, parameter default values, public/protected/private access, meta tags.
  • Properties: Transient, Config, AdvancedDisplay, access levels (with automatic AllowPrivateAccess).
  • Descriptions on types, members and enum entries become /** */ doc comments (and editor tooltips).

Workflow

  • New Type wizard with 23 archetypes, module and sub-folder choice, and optional starter members.
  • JSON definitions (*.codeforge.json): import/export from the editor, a JSON Schema (Schema/codeforge.schema.json) for editor completion, field-named errors for invalid values, and warnings for unknown keys.
  • Commandlet -run=CodeForge with -Import/-Dest, -Schema, -Source, -Validate, -Generate, -ProjectDir, -Overwrite, -Export; exit code 1 on any error.
  • Python / Editor Utility library UCodeForgeEditorLibrary: generate, generate folder, preview, validate, apply auto-fixes, import/export, find definitions. Operations return FCodeForgeScriptResult (success, message, files).
  • Content Browser actions (Generate C++, Validate to the CodeForge Message Log, Export Schema, Open Generated C++) and a Tools → CodeForge menu (Import Schema, Generate All, Import Sample Pack, Documentation).
  • Auto-fix from the editor: Fix: … entries in the node context menu and a Fix All toolbar button (undoable, follows chains of fixes).
  • Plugin modules as targets: modules of project plugins, nested Game Feature plugins included, are listed and generated into.
  • IDE integration: project files refresh when generation creates files, Open C++ button, and an optional “open after generation” setting.
  • Code Preview: C++ syntax colouring and an on-disk status chip (not generated / up to date / changed / hand-written file in the way / module not found / fix errors).
  • Per-file template overrides: a custom template folder only needs the files it changes.
  • Batch generation in dependency order (enums → structs → interfaces → classes).

Samples, tests and tooling

  • Arena sample (Samples/Arena/Arena.codeforge.json): a playable target-range game whose 16 gameplay types are all generated, with a demo map built by Scripts/BuildArenaDemo.py and a still renderer (Scripts/CaptureArenaStill.py).
  • Automation tests grew from 98 to 183, including a UBT compile check of every archetype and the sample (Scripts/Verify-GeneratedCode.ps1), a JSON-Schema/data-model sync test, and a PIE test that plays the Arena.
  • Scripts/New-GeneratedSamplesBundle.ps1 produces a reproducible bundle of real output with its build log, test results and SHA-256 hashes.
  • Documentation: rewritten manual and FAQ, README, and guides for getting started, the JSON format, automation, templates, the sample and a demo video script.

Compatibility

  • Builds with zero plugin warnings and passes the full automation suite on UE 5.5, 5.6, 5.7 and 5.8 (fresh-copy test matrix).

Changed

  • Output formatting is normalised and deterministic: LF line endings, four-space indentation, no trailing whitespace, single blank lines, standalone template tags removed with their lines. Expect a one-time diff when regenerating.
  • Generated code always goes to the module’s Public/ and Private/ folders (flat modules included), and the .cpp includes its header by its path under Public/.
  • Category is written only for properties visible to the editor or Blueprints; meta values are quoted only when needed.
  • Live Coding policy: body-only changes can patch automatically; layout or reflection changes prompt, since they need a rebuild.
  • The editor module loads in the Default phase (the commandlet needs it). Both modules allow Win64, Linux and Android (GregOrigin’s Fab spec; editor modules only build for desktop editors), Fab descriptor URLs follow the spec, and the descriptor no longer claims Installed. Tests are excluded from packaged builds.

Fixed

  • Several UHT errors in generated code: a class-level Replicated specifier, ExposeOnSpawn emitted as a specifier instead of meta, virtual BlueprintNativeEvents, and Category on unexposed properties (an error under -WarningsAsErrors).
  • MSVC C4458 errors from parameters that shadow class, parent or interface members. These are now caught by validation.
  • Graph/asset drift: edits made in Details or through undo no longer get overwritten by the graph, graph-owned fields are hidden from Details, members not wired to the type node are no longer generated, and missing nodes are reconciled when an asset opens.
  • Undo/redo of graph edits (nodes are transactional, including nodes from older assets) now refreshes validation and the preview.
  • Validation markers now land on the node that owns the finding.
  • Specifier tooltips refer to fields that exist.
  • Hand-written files are no longer overwritten silently.
  • JSON export no longer produces an empty file (a dangling range-for over a temporary).
  • Missing includes that only unity/PCH builds hid; the strict non-unity, no-PCH packaging build now passes.
  • UE 5.8 compatibility: FJsonObject key type change, and the deprecated GetObjectsWithOuter(bool) and SNode::ContentScale are version-guarded.

Removed

  • The RPG Starter Kit example content and its setup banner. Its assets didn’t round-trip through the generator, and the Arena sample replaces it.
  • The unused Retarget stub and the welcome-screen settings.