Thursday 3 March 2022

OFF GRID Devblog "Look who's talking!"

Welcome back to another episode of the OFF GRID DevBlog, lots of interesting interactions to tell you all about, so let's dive right in!



You talkin' to me?

We've recently been working on some levels that have more neutral NPCs around, rather than just guards you'd need to avoid. So it started making sense to add some way of just walking to someone and having a conversation with them. And why limit that to just conversations, when we could just as well allow the level creator (or modder) to script any kind of interaction, in the same way that you can script what MissionObjects do...

Turns out that this was a bit of an awkward addition at this point in development, we hadn't really planned for it when making our interaction system in the first place, it was all set up for targeting and interacting with devices only. To add to that, the setup we'd used for MissionObject scripting wasn't compatible for doing the same with characters either. So what we hoped would have been a week's work, based on everything on the outside looking a lot like what we already had in place, ended taking a full sprint worth of modifying the code and finding ways to fit this all in nicely. But we got there in the end, and luckily it all ended being as simple (and powerful) from the user's point of view as we hoped, so all the headaches trying to fit it in were worth it...

If you remember from the last blog post, we worked on streamlining the way how the player interacts with devices, replacing the old Quickslot system for using an item with a device by a popup menu that opens, if/when needed, as the player tries to interact with something. Well, the same system seemed like it would make sense for interacting with characters, so we just added that at the same time. Now it's possible for the NPCs to request some item from you before they'll talk with you, or whatever the person writing the mission script comes up with. It's all very flexible, and makes for some interesting conditional interactions, task setting, and progress gating.

This means a couple of additions to our Lua API, and some new stuff you can do in your mission scripts, but we'll leave the technicalities out of here, it'll all be in the wiki for anyone interested.

Re-designing Apps

Character interactions are not the only major changes we've been working on, we have a plan for a bit of an overhaul on how the apps are used in the game, aiming to make them more of an active gameplay feature and fixing some of the downsides and oddities with the current setup, as well as adding a bunch of usability improvements and ways to better communicate app states and other things to the player at the same time. But you'll have to wait a bit longer for details on that, it's pretty early on with the changes still...

"I see you over there!"


In the last couple sprints we worked on several new actions for the AI, the raise alarm action, that makes nearby guards investigate a certain point, and two actions related with the aiming phone at player action, to simulate NPCs recording the player with their phone, one action for following the player at the same time, and the other to do it standing still. 

Both of these actions were created out of necessity of having non-guard NPCs reacting to the player when they are in a place that they shouldn’t be: for example walking in the middle of a busy courtroom. So, these actions can make the game somewhat more realistic and also create some different gameplay situations for the player.

The Raise alarm action can directly affect the progression of the player, this action is responsible for emitting a noise that can alert any possible guards around a specific radius, the guards that hear this respective noise are going to investigate the noise source point (as long as their agent profile definition has the investigate action and respective goals to accomplish it). Even if the player is seen, so long as they are quick enough to move from that point without being spotted by a guard, they can continue the level without being followed by that same guard. This is fine in a sparse environment, but doesn't make sense when there are multiple NPCs of varying neutrality or hostility in the same room.

The other actions, that are still in development but very closed to being finalized, are about the reaction of NPCs when they see the player in a unusual place, by aiming a phone to seem that they are recording them. This action is about giving more possible behaviors for NPCs to make the game more diverse and alive, and can be combines with the raise alarm action described above to make for an interesting situation. 

These actions only aim at the player, but in the future we want to create a similar action but for aiming the phone at some objects when they are not behaving normally, for example it’s perfect for when a soda machine is running amok and is firing soda cans. That way unusual occurrences created by the player can form a crowd or distract NPCs for a short time even if they don't have a direct effect on them. With the way NPC AI can be built out and added to by modders there could be lots of room for modders to write dynamic and emergent behaviour.

And that's all for now, look forward to catching you in the next DevBlog!

Change List: 

Gameplay and Mechanics
  • Added Character interactions system, for speaking and swapping items with NPCs
Controls and UX
  • Added localisation for the UIs used for character and device interactions
AI 
  • Added several AI actions for aiming phone at the player to record / take pictures of them
  • Added AI action for NPCs to raise an alarm in such instances (and beyond)
Modding and Lua API additions 
  • Added Lua API calls for checking a character's background profiles
Bugs fixed 
  • Various small bug fixes (profile tags and location data points related)

If you haven’t already - be sure to wishlist Off Grid on Steam - each wishlist makes a big difference to us, and we really appreciate your support!

No comments: