What will Foxie actually do? Fair question. Here’s the answer.

Foxie is, at its core, a language for customizing the behavior of a pre-built web based game engine designed for role playing games. So, there are a few core functions of such a language, core competencies that have to be established.

First is scripting. Not programming-scripting, but literally scripting, as in a script for a play, the conversations and actions of characters in the game. How do we define those behaviors?

Script by Mel Brooks, absolute legend.

I think there should be a simple graph-like structure, a graph in the mathematical sense of a connected network of nodes, where each node points to other nodes which the conversational nodes point to. How do you define such a thing in code?

Fear not, double-rainbow guy. We'll figure it out.

In Foxie, we’ll have what are called “macro strings”. This is a lot like a "tagged template literal" in JS, which is a horrible name referring to a string wrapped with a function.

This is starting to get ridiculous, with the jargon.

Need an example? You got it.

As you can see, conversation scripting is fairly straightforward. And of course, as you see, conversations can include references to external functions! Where do these functions live?

I imagine they should live within the definition of the macro string code, right?

So how is a macro string defined? Well, I want to give you the power of the compiler to parse code – I want to allow you to reach into the reader and mess with it.

With Foxie, you have the power. Also, I have to admit, I was more of a Thundercats kid.

So, maybe there could be a builtin string macro, one that allows you to define a string macro in the first place! Sorta like this:

Using a regular function that takes a raw input string and returns a function, you can create your own parser!

To an extent. I'm not going to let you execute arbitrary code on my host platform. You don't quite get that privilege. But you will be able to define a grammar which executes any Foxie code you want. I can elaborate on this more later, but let's not get too far down that rabbit hole.

What other sort of responsibilities does the language have? In addition to scripting conversations, we have to be able to script actions. These actions can be as simple as "walk from point A to point B" or they can be as complex as trading items.

Trading items in particular...that sounds like a part of a quest!

I'm afraid you'll have to wait for part 2 of this series, to see how quests are defined. But here's a sneak peek:

You'll be able to define a quest using "quest components", a system I've devised for defining (and even auto-generating!) quests for an RPG. Using common components like "fetch item", "clear dungeon", "escort character", "kill enemy", and so on, you'll be able to define your own events around these common components, and of course, create your own! 🎉

It's your show, I'm just providing the sets. And if you couldn't tell, I'm incredibly excited to share this quest definition syntax as soon as it's ready.

Until next time, I leave you with a folk song my grandfather, born in 1900, used to enjoy: