2

Expose core game operations through strongly typed API methods for scripting

Suggested by
on May 13, '26
Open

Many operations are currently available only through in-game commands. This creates unnecessary friction for scripters, as they must invoke these features indirectly through IGame.RunCommand(string command) instead of using dedicated, strongly typed API methods.

Relying on command strings for core functionality has several drawbacks:

  • Scripts must manually construct and format command strings.
  • Errors such as typos or invalid arguments are only detected at runtime.
  • Scripts depend on text-based command syntax rather than a stable programming interface.
  • Functionality that should be part of the API is hidden behind string parsing.
  • The same string-building logic is often duplicated across multiple scripts.

This approach is less robust and less maintainable than exposing the underlying functionality directly through methods.

This is particularly important because many scripts need to perform these operations programmatically. Requiring command strings turns the scripting API into a thin wrapper around the console rather than a fully featured programming interface.

IGame.RunCommand() remains useful for executing custom or user-defined commands, but it should not be the only way to access built-in game functionality.

Watchers

No comments yet.
Loading comments...
Loading comments...
0 comments loaded

Sign in to comment on this suggestion. Sign In