Tuesday, 5 December 2017

Dev Blog Post 5.12.2017 - Social Engineering and Distracting Noises

We’ve been working with a bit smaller team for this sprint, so this is going to be slightly shorter blog post than usually. And we’ll switch the format slightly as well, so you’ll get a section from both of us telling about what we’ve been up to…

Steve:

My first month has flown by! It’s been great to get started and become acquainted with Unity, which has impressed me. I started off on Off Grid by poking around the existing code, and playing the demo level, which gives an good overview of where the project is. After that I was forced to do some real work; first of all, I exposed the ‘Noise’ system to Lua, meaning modders will be able to play sounds that the AI will investigate. I’ve also fiddled with the camera, with the Lua setup, the wiki, and a fair few under the hood changes that hopefully will help us create new content more quickly. Exciting times ahead!

Pontus:


Character profiling

We had already previously converted the text files we use to describe each character’s personalities and background information from old XML files into Lua. But as we'de designed some of our data mechanics, and especially the social engineering aspect of hacking and privacy bit further, we realised the profile format we had would not do the job.

So, in this sprint I’ve worked on re-designing the character profiles to use a tag-based system that allows us, and the modders, to easily add pretty much any amount of background information about the characters, and tag that data in a way that lets us then attach those tags to different data points, files and whatever inside the game, and hook it into the AI’s behaviours easily.

(and same as with our mission progression system and many other things, the design goals and explanation how it works ended being much more complicated than the actual implementation, so no need to worry, this is really simple system for modders to use and should be very extensible and flexible for all the crazy weird hacking stories and tools modders might come up with which we never even thought about…)

While doing the required changes for this, I also added few quality-of-life improvements, so the levels can now automatically load character profile files, and the image files used for character colour customization, both from the level’s own folders and from the Common folder used for sharing things that might be used in multiple levels. This means that we don’t need to duplicate character files to each separate level where the same character might appear, and also modders will have easy access to some pre-made characters they can use in their own levels without having to even bother with the actual character profile files until they want to create some new characters of their own.

Sending SMS, with Lua

We are then using those character profiles to generate text messages (and eventually e-mails, and other files as well) that get sent to all the characters, and that the player than intercept, read though, and use to learn about the characters (maybe to figure out how to distract a specific guard, or to help guessing someone’s password, and so on).

This is nothing new, the SMS system has been in place for long time already. But the source file we used for the SMS templates was the last remaining XML file in the game, so of course that had to be converted to Lua as well… If nothing else, it’s more consistent and easier for everyone to deal with the same language throughout the project, but it’s much more human-readable syntax as well.

To take things a bit further than that, we thought that maybe the actual code used to generate the messages could also be moved into Lua. This certainly isn’t something you’d want to mess around for every mod you make, as it’s a bit more complicated than the rest of our mission and character files, and the actual content you see in-game can be changed easily by just creating different character profiles anyway. But exposing that code to the modders might open some interesting opportunities, maybe for localizing the message generation to some language with different grammar than what English has, or to build something more complicated than what the base game needs to go with some awesome mod you are making. We’ll see what happens!

Oh, and of course I made sure both the template file and the actual message generator code can be loaded from both the Common folders as well as from the level-specific folders, just like with the character profiles.

Outro

That’s everything for now! We’re not quite sure yet if we’ll have a short sprint (and one more blog post this year) or if we should just make it a long one and return back to you in 2018! Either way, we’ll make sure to let you now when the next blog post is out!

No comments: