Is Skookum right for my needs [UE4]?

Sorry, the prologue here is a bit long, but experience has taught me to start with what I’m doing when asking for help before asking what I need.

So, I was working on how to encode levels for my game. All levels are arenas and the player must accomplish a number of goals while a number of enemies spawn around them. At first, I decided to start working on a config language and a data structure which could hold all possible goals and specify what enemies could spawn, where, how often, when to respawn, etc… While this approach still seems viable, I worry that my configs are ballooning in complexity and it’d really be nicer to have a scripting language to where I could write functions which specifying this logic about as easy as configs, but give flexibility for doing more interesting things.

And I need levels to be as easily defined by me as potential players making custom levels on their own.

Features I need:

  • Sandboxing (so users can’t create arbitrary objects or download trojan viruses off the web or access in-game objects that might cause crashes)
  • Libraries that my code for built-in levels can access when I package the game as easily as user levels can include in their own code.
  • Access to the C++ objects I want my scripts to have access to and nothing else.
  • Ability to interact with these objects in only the ways I specify (i.e. to spawn in enemies, but not exit the game), either directly or by passing data back and forth.

Based on these two, I would say no out of the box. :sk: is setup more as a transparent reflection system. It’s feasible you could add a layer in-between that does some kind of access control list for methods but this could be difficult to enumerate since there are 3 ways to do any one thing in UE4 :rofl:

You seem to be diving more into an area where maybe it makes sense to create your own lightweight Virtual Machine. You define the opcodes that it supports and it won’t allow anything outside of that. Then tie that together however makes sense (custom scripting language, custom BP graph editor, etc).

Yeah, not an unexpected answer. It’s what I’ve done in the past, but only for entirely internal scripts and I only ever went as far as the op codes. This might be a bit more… time consuming.

Welp, thanks for your time.