Skip to content

Vanilla StoreClient & Dialogue Classes ​

Building Dialogue Chains & Choices ​

csharp
var cur = sc.mainDialogue
    .SetText(sc.displayName, "First line of dialogue.")
    .NextDialogue()
    .SetText(sc.displayName, "Second line of dialogue.");

var dlgChoiceA = new Dialogue().SetText("PLAYER", "[Option A] Sounds like a deal.");
cur.AddChoice(DirectoryMaster.Item("$", true), "", "", dlgChoiceA, () =>
{
    var d = dlgChoiceA.NextDialogue().SetText(sc.displayName, "Preem! See you around.");
    d.SetEndAction(() => DialogUIManager.Instance?.CurrentClientLeave(1f));
}, null);

Essential StoreClient Finalizers ​

Always call sc.CompleteClientCreation(false) before returning your StoreClient from clientFactory. For Security encounter clients (clientIntent = (StoreClient.ClientIntent)5), also call sc.CompleteSecClient() immediately afterward.

Custom NPC Framework Documentation