August 2024 - Campaign Screen and Data Model

Oops, it’s August 31st. I’m sneaking this post in under the buzzer. I want to show two things I’ve been working on.

Campaign Screen

The first is a new campaign screen that offers a cleaner and clearer way to navigate among the stories. I haven’t gotten far in coding them, here’s the mobile design

And here’s the desktop version.

PC Data Model

The second is a cleaner, revised data model for the player character. You won’t notice this, but over time what defined the player has changed. My business partner, Andrew, encouraged me to clean up the model to make it easier to reference everywhere. My understanding of ink has also evolved since I started coding the original model. Rather than showing you the old, messy one, I’ll just show you what a player character today looks like, on a code level.

~ traits += (male, elf, outlander)
~ known_languages += elvish
~ str = -2
~ agi = 0
~ int = 6
~ cha = 4
~ fai =  2
~ best_attribute = intelligence
~ worst_attribute = strength
~ birthmoon = 5

PC Traits

Of note is the traits list. These are qualitative descriptors of the player character, which I can easily reference when writing. For example, here’s two alternate bits based on a trait.

{
	- traits ? male: What up, bro?
	- traits ? female: Hello, madam.
}

Or we could show special content only if pc has some combo of traits:

{traits ? (female, elf): The guard obviously has a thing for elf girls. He'll be easy to persuade.}

As of now, the list of possible traits is as follows. They also have categories if we want to check what the signify.

LIST traits = male, female, human, elf, dwarf, demon, coldblood, royal, orphan, nomad, hermit, outlander
VAR races = (human, elf, dwarf, coldblood, demon)
VAR sexes = (male, female)
VAR origins = (royal, orphan, nomad, hermit, outlander)

Thus, we can fetch a trait of a particular type with intersecting lists.

You are a {races ^ traits}.

This would look for values present in both the list of PC traits and the list of races, and therefore resolve to something like dwarf.

What’s nice about this is having a single source of truth. If we want to know how to describe the player character or how others react to them, we can just check the list of traits and go from there.

Attributes

There’s a stat for each attribute, which is used in dice rolls.

We also keep note of which attribute is their best and worst. These are sometimes checked to emphasize their stand-out qualities. Here we don’t care about the number, but the overall persona. The player chose these as their highest and lowest stats, after all. For example, the story could characterize the following character as a frail, scholarly person.

best_attribute = intelligence
worst_attribute = strength

Why Data Is Beautiful

Part of the motivation here is to make it easy for other people in the future to write stories for the platform. A writer shouldn’t have to be a programming expert or be familiar with every quirk of Veiled Age. They can just look at the PC’s traits and reference one or more of them if they want to.