• Register
Post news RSS Devlog #1: Scripting, Dialog and Quests

The first devlog for Ardenfall, an open-ended fantasy RPG! In this log, I go through what I've been working on recently, which includes a scripting system, a new dialog format and quests!

Posted by on

I decided it was time to begin a devlog series – my current schedule is going to be roughly bi-weekly, we’ll see how it goes. At some point I may start posting video devlogs as well!

This post was originally posted here.

Modeling A Face

I decided it was time to model the basemesh for the face of the characters, and streamed some of it as well. I am no modeler, so it was slow work, but so far I am quite happy with it!

I also plan on adding “tweak bones” to this new body – this will allow faces / bodies to be morphed, making characters able to be short, fat, muscular, and so on. I’m hoping this won’t lead to too much complication, since these tweak bones will also need to be applied to all clothing we will be modeling… and speaking of clothing, I threw together some clothes just for fun.


SnekScript

A month ago, I replaced my old scripting engine in Ardenfall. Originally, “ArdenScript” was a clunky javascript engine based on Jurassic. It relied on a lot of generated code to hook into C#, which was frustrating. Thus, when I found IronPython, I was instantly hooked. Thus, SnekScript was born. It used the same format as ArdenScript, but required absolutely no generated code whatsoever.

SnekScript allowed me to quickly write scripts that would hook into the engine, and this eventually led to me creating a simple modding system. Now custom mods can be added to Ardenfall, which hook into engine events. I also created support for multiple mod folders, and this evolved into an “internal” mod folder – this allows us to easily create “mods” of our own, which of course are just features built into Ardenfall.


Not only does this force me to make a good modding API, it also makes debugging incredibly easy, since now I can essentially write *any* C# code without recompiling (Or even in a build). Alongside that, there is a console for quick function calling and debugging.

TLDR: I wrote a new Scripting Engine that makes it easier to develop Ardenfall, and also implemented a simple Modding feature

Dialog

I was quickly realizing that this format was quite powerful! I wanted MORE. And when my thoughts turned to dialog, I grew interested in the concept. Could I write dialog entirely in a text file, as opposed to a node editor? (The current work flow)

The old Dialog Editor: pretty, but…


Thus, I started looking into different formats, and quickly found YAML. It seemed perfect, since it’s focus is human-readability, and uses tabs just like Python does. Thus, I started converting the SnekScript format into something that could handle multiple formats at once…

And developed MLF. The Multi Language Format is a very simple human readable format that allows for multiple languages to be packed into a single file, with “Blocks” and “Flags”. I’ll explain the intricacies of MLF at a later time, since I believe devlogs are supposed to be semi short.

I then implemented MLF into the Dialog system, and it’s beautiful! I quickly wrote a questline, adding new features as I needed them. I’m incredibly happy with this. :) This should allow for us to quickly write complex dialog without too much trouble, deeply mixing with SnekScript in a fantastic way, without any direct ties to Unity, since it’s simply a text file.

TLDR: The new dialog system allows us to write complex quests quickly, without relying on the Unity Editor. I quickly wrote the questline that is the introduction to the mages guild, as well as a fun character I’ve been meaning to add.

Random Name Generator

One thing I believe in is that in my game, all characters matter, to an extent. This includes a random merchant or even a randomly spawned npc. Every character should have *something* to say, and have a name to give them character.

Thus, I decided to make a random name generator using Markov Chains. This generates words based on source words. After starting to write my own, I figured it would make more sense to simply use someone else‘s library, which of course made it incredibly easy to implement.


Some example generated names


Now we can use the generator to create random names during edit time, and if a NPC has a blank name the engine will generate a random name during runtime. Simple, and it works! I use names from various sources, such as Kate Monk. (Although her original site is now down). Luckily I don’t need to worry about the integrity of the sources, since this is for a fantasy game of course.


The editor tool


TLDR: A random name generator was added, which is used for non important characters. Now everyone will have a name, no matter how small!

End Log

Well, that’s it for me. Usually devlogs will be a bit shorter I think, since this was the first one I had to explain a bit of backstory. Also, I may start doing video devlogs at some point. Of course, I don’t put everything into the log. For more updates, add me on Twitter, and follow me on Twitch.Thanks for reading!

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.