Item Properties

How to use class names, spawn codes, and technical identifiers from the item database in C++.

Every item in ARDEM has a set of modding properties — low-level technical identifiers used by the engine. These are set by admins in the Wiki Item Database and exposed under the Properties accordion on each item page.

Common Property Keys

KeyExample ValueDescription
classNameArdemGame.Items.Weapons.DMR_01Fully-qualified UClass path for asset loading
spawnCodespawn_item_dmr_01String identifier used by the spawn system
networkIdnet_dmr_01Stable net ID for replication lookups
lootTableIdlt_military_rifleWhich loot table this item belongs to
itemFlagWEAPON|RANGED|MILITARYPipe-separated bitfield flags for filtering

Reading Properties in C++

Use UArdemItemRegistry to look up any item by its wiki slug and read its properties at runtime.

cpp
#include "ArdemItemRegistry.h"
#include "ArdemItemData.h"

UArdemItemRegistry* Registry = IArdemModAPI::Get().GetItemRegistry();

// Look up an item by its wiki slug
const UArdemItemData* DMR = Registry->FindItemBySlug(TEXT("dmr"));

if (DMR)
{
    FString ClassName  = DMR->GetProperty(TEXT("className"));
    FString SpawnCode  = DMR->GetProperty(TEXT("spawnCode"));
    FString ItemFlags  = DMR->GetProperty(TEXT("itemFlag"));

    UE_LOG(LogMyMod, Log, TEXT("Class: %s"), *ClassName);
    UE_LOG(LogMyMod, Log, TEXT("Spawn: %s"), *SpawnCode);
}

Loading an Asset by Class Name

cpp
// Load the UClass from the className property at runtime
FString ClassName = DMR->GetProperty(TEXT("className"));

// Convert to a soft class path and load synchronously
TSoftClassPtr<AArdemItemActor> SoftClass(FSoftObjectPath(ClassName));
UClass* LoadedClass = SoftClass.LoadSynchronous();

if (LoadedClass)
{
    // Spawn the item actor in the world
    FActorSpawnParameters Params;
    AArdemItemActor* Spawned = GetWorld()->SpawnActor<AArdemItemActor>(
        LoadedClass,
        SpawnLocation,
        FRotator::ZeroRotator,
        Params
    );
}

Prefer Slug-Based API

Whenever possible use GiveItemBySlug() rather than loading classes manually. Class names and asset paths may change when game content is reorganised. Slugs (e.g. "dmr") are stable across updates.

Filtering Items by Flags

cpp
// Find all military weapons using item flags
TArray<const UArdemItemData*> Results = Registry->FindItemsWhere(
    [](const UArdemItemData* Item) -> bool
    {
        const FString Flags = Item->GetProperty(TEXT("itemFlag"));
        return Flags.Contains(TEXT("MILITARY")) && Flags.Contains(TEXT("WEAPON"));
    }
);

for (const UArdemItemData* Item : Results)
{
    UE_LOG(LogMyMod, Log, TEXT("Military weapon: %s (%s)"),
        *Item->GetName(),
        *Item->GetProperty(TEXT("spawnCode"))
    );
}