ink icon indicating copy to clipboard operation
ink copied to clipboard

Nesting Stitches

Open vidocco opened this issue 6 months ago • 0 comments

Hi!

I've been using ink for a while now and have been loving it so far. I'm trying to organize the script for my game in a way that's useful (and can be used in combination with some C# logic for more powerful interactions). So far, I've the following architecture:

CharacterFile.ink -> Character Knot -> Date Stitches (one stitch per in-game day, since time passes and conversations change).

Thing is, I would like to add one further level of nesting to the "Date stitch" so I can reference it using the C# API. Just like I can do use .HasFunction("CharacterKnot.dateStitch") I would like to be able to do .ContentAtPath("CharacterKnot.dateStitch.timeOfDay"). Searching around google and docs hasn't shed much light into the matter (Google said at some point that I can have stitches inside stitches but I can't seem to find a way of doing so). I've tried using gathers but those aren't supported by the C# API.

Any suggestions? I know I could simply create multiple stitches to differentiate the times of day, like:

=== Character ===
= 2025_06_27_morning

= 2025_06_27_evening

= 2025_06_28_morning

= 2025_06_28_evening

Which would allow me to reference them in C# with .ContentAtPath("Character.2025_06_27_morning"), but my ideal scenario is something like

=== Character ===
= 2025_06_27
    = morning
    = evening

= 2025_06_28
    = morning
    = evening

so I could reference it as .ContentAtPath("Character.2026_06_27.morning"). Just wondering if there could be a "cleaner" way of doing this (that avoids having to come up with unique names for everything).

vidocco avatar Jun 27 '25 14:06 vidocco