0/0
CRADL // DOCUMENTATION
PORTAL DEV WIKI CLAUDE
UTC 00:00:00
◀ RETURN
CLAUDE.md 566 words ~3 min read Updated 2026-07-03

CRADL — Claude Development Guide

Engine: Unreal Engine 5.4 — do not suggest APIs introduced after 5.4. Authors: A, R, J Module: Single runtime module CRADL in Source/CRADL/.

Background

This is a skilling game based on the fundamentals of OSRS.

Non-Negotiable Rules

  • C++ only for logic. Blueprints are data containers — no Event Graph logic.
  • Always design for replication. This is a P2P multiplayer project. Every new Actor, Component, or system must consider authority, RPCs, and replicated state from the start.
  • Enhanced Input only. Never use the legacy input system.
  • No APIs newer than UE 5.4.
  • UFUNCTION + #if !UE_BUILD_SHIPPING in headers — never combine. UHT does not evaluate the macro; declarations and generated boilerplate get out of sync. Declare unconditionally, guard only the .cpp body.
  • Prefer interfaces over concrete types for cross-system touchpoints. When a new system references an existing one (UI→data, actor→service, ability→component), default to its interface (TScriptInterface<IFoo> or Cast<IFoo>). Concrete references are fine inside a system's own boundary, or when an interface would be pure ceremony for a single implementer. This avoids the churn of re-threading call sites when a second implementer arrives (e.g., UEquipmentComponent alongside UInventoryComponent).
  • Reference architecture decisions when needed If you need to make an architectural decision cross check with ARCHITECTURE.md. Numerical-stat routing — how gear, ship, pilot, and buff contributions reach gameplay code; what is an attribute vs an aggregator vs a direct read — is governed by STAT_PIPELINE.md. Single-use inventory items (food, potions) — action surface, GE delivery, cooldowns, full-HP gate — are governed by CONSUMABLES.md.
  • Theme guidance Thematic aspects of the game should not be reflected in code where reasonable and should be made generic, i.e. "ship" selection is abstracted to "loadout". For details see THEME.md. If you need an exception, ask.
  • Building: compile with the UE: Build Editor (Development) VS Code task to verify changes link. Runtime/PIE testing remains the user's job. Always run this through the PowerShell tool, never the Bash tool — the command leads with PowerShell's call operator (&), which is a parser error in bash (syntax error near unexpected token '&'). Invoke Build.bat via that call operator — never cmd.exe /c, whose quote-parsing silently collapses the command when both the exe path and -Project= are quoted (it just echoes the prompt and runs nothing): powershell & "C:/Program Files/Epic Games/UE_5.4/Engine/Build/BatchFiles/Build.bat" CRADLEditor Win64 Development "-Project=c:/Users/snowl/Unreal/CRADL/CRADL.uproject" -WaitMutex -FromMsBuild
  • Editor-time validators shadow the runtime structs. When changing a struct or DataAsset that has a matching validator under Source/CRADLEditor/Validators/, update the validator in the same change so new fields, sentinels, and field-interaction rules don't silently bypass asset validation. Several definitions and DataTables already have validators — check Source/CRADLEditor/Validators/ for the current set before assuming one does or doesn't exist.

Things to Never Do

  • Name variables with common names, "Slot", "Widget", they will shadow - use SpawnedWidget etc.
  • GetAllActorsOfClass — use subsystems, registries, or overlaps.
  • Synchronous asset loading in gameplay code (LoadObject, StaticLoadObject) — use FStreamableManager or UAssetManager.
  • Replicate cosmetic-only state (sounds, particles, local UI are client-side only)
  • GEngine->AddOnScreenDebugMessage in shipping paths — wrap in #if !UE_BUILD_SHIPPING.
  • Undecorated UObject* members — always UPROPERTY().
  • Never EVER try to analyze code in ./Intermediate, these are generated files for Unreal
  • Never modify code in the Unreal Engine source