ComfyUI Node

D&D5E NPC ABILITY

The tiny node that builds a monster's action list

By OrsoEric·Created 5 months ago·Updated 5 months ago· 1
D&D5E NPC ABILITY
    • abilities_out
    action_nameMaster Alchemist
    action_text(passive) Olivia chooses an effect to add to potion she throws. --Venemous: Poison damage stacks and ticks at the end of the target turn, successfull CON SAVE removes one stack --Volatile: Acid damage affects all adjacent targets and objects --Corrosive: target AC is reduced by 1
    action_flavorThe knowledge that allow Olivia to proficiently heal people with her concoctions, is equally as effective in turning cococtions deadly
    abilities_in

    D&D5E NPC ABILITY does exactly one thing: it takes a single ability or action and appends it to a JSON list. That's the whole job, and it's the most pleasant node in this pack because it's the one with no surprises. If you've used the companion STAT BLOCK node, you know the drill - this is its little brother for the ACTIONS section.

    How it works. It builds a small object with three fields - action_name, action_text, and action_flavor - and appends it to whatever JSON array you hand it in abilities_in. If abilities_in is empty or disconnected, it starts a fresh list. Output is abilities_out, a STRING containing the growing JSON array. There's no model, no rendering, no magic: it's a string-list append that happens to be shaped like a node, which is exactly the right call.

    The chaining pattern. This is a node you'll use many times per card, so the design matters. To give an NPC three actions, drop in three copies and wire them in series:

    ABILITY 1 (claw) ──> abilities_in of ABILITY 2 (bite) ──> abilities_in of ABILITY 3 (trap) ──> final abilities_out
    

    Feed the final output into the STAT BLOCK node's ability input (it's optional, so it won't be obvious at first - it's on the node, not in the defaults), and the whole list lands in the card's ACTIONS. Why bother with chained nodes instead of one big text box? Because each ability is a separate, readable node in the graph. You can see what's in the list at a glance, bypass one to drop an ability from a future card, and leave the flavor text next to the mechanics it belongs to.

    The fields. action_name is the header that renders bold on the card - "Master Alchemist". action_text is the mechanical effect; keep it tight, the card wraps it to fit the box. action_flavor is the lore line that renders as the description. All three are plain strings; the two longer ones are multiline. There are no numbers, no dice fields - the author hardcodes numbers into the text, which is a bit crude (your fireball text reads "8d6" as words, not as a parsed damage value) but perfectly fine for a printed NPC card.

    Gotchas. Two small ones, both grounded in the source. If abilities_in isn't valid JSON, the node doesn't error - it quietly resets to an empty list, so a mistyped chain drops every ability you'd built. And the fields render in the order you chain them, so chain in the order you want them printed. There's no reordering after the fact; want a different order, rewire.

    Install. Nothing special - it ships in the same pack as the other two. Manager search comfyui-orso-character-sheet-generator, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/OrsoEric/comfyui-orso-character-sheet-generator
    

    Restart and it's under dnd5e-orso. No models, no extra dependencies - pure Python string work. If you only print one-action mooks, you can skip this node entirely and let the STAT BLOCK's default ACTIONS stand; this one earns its keep the moment a boss has three things to do a round.

    Categorydnd5e-orso

    Inputs (4)

    NameTypeDefaultDescription
    action_nameSTRINGMaster Alchemist
    action_textSTRING(passive) Olivia chooses an effect to add to potion she throws. --Venemous: Poison damage stacks and ticks at the end of the target turn, successfull CON SAVE removes one stack --Volatile: Acid damage affects all adjacent targets and objects --Corrosive: target AC is reduced by 1
    action_flavorSTRINGThe knowledge that allow Olivia to proficiently heal people with her concoctions, is equally as effective in turning cococtions deadly
    abilities_inoptSTRING

    Outputs (1)

    NameTypeDescription
    abilities_outSTRING