How the Space Engineers Vanilla Integration Works

Our integration for Space Engineers Vanilla servers is a little different from most servers. This is to provide the most flexibility possible for server owners who want to provide unique rewards, without the availability of console commands.

TebexSE.dll (the main plugin for Space Engineers) can let your server (and other plugins) know about purchases that have been made in two ways:

  • Via an event, TebexSE.TebexSE.tebexPurchaseEvent.TebexPurchaseReceived that can be subscribed to in other plugins.

  • Via chat messages in the GlobalScripted chat channel that can be listened for and reacted to.

We recommend using the event where possible.

As a way to get started quickly, we also provide a companion plugin for Space Engineers, which provides the following commands. In each command, the {id} placeholder should be used as-is - we automatically replace this with the steam64 id of the purchasing player, but anything in square bracket should be replaced by you

  • !giveitem {id} [parttype] [amount] (e.g. !giveitem {id} Ingot/Iron 10)

  • !givemoney {id} [amount] (e.g. !givemoney {id} 1000)

  • !reserveslot {id}

  • !unreserveslot {id}

  • !rank {id} [rank] (e.g. !rank {id} Scripter)

  • !say [message] (e.g. !say Thanks for your purchase)

If you wish to use the companion plugin, you can download it here.

Custom Plugins

If you wish to provide your own custom rewards for purchases, you can create your own plugin to subscribe to the TebexPurchaseReceived event, or you can extend the companion plugin.

If you are creating your own plugin, you would create a handler function to act when a purchase is made - the 'command' that is entered in the Tebex control panel is sent in it's entirety through the event, so it is up to you to parse this command and perform relevant actions. This might look something like:

//Called by Space Engineers when the server is ready
public void Init(object gameInstance) {
    //Subscribe to the event
    TebexSE.TebexSE.tebexPurchaseEvent.TebexPurchaseReceived += TebexPurchaseEvent_TebexPurchaseReceivedHandler;
}

private void TebexPurchaseEvent_TebexPurchaseReceivedHandler(string details) {
    if (details.StartsWith("!myplugin")) {
        //This is a command that this plugin is responsible for
        //So do something :-)
    }
}

In order to subscribe to the event, you will need to add TebexSE.dll (the main plugin) as a reference to your project.

If you don't wish to create a plugin from scratch, our companion plugin is available on GitHub at https://github.com/tebexio/Tebex-SE-Consumer. You can then add additional actions to this plugin, which already handles subscribing to the event. To extend this plugin, you will need to update some of the references - these are all dlls available from the Space Engineers Vanilla server, and TebexSE.dll which can be downloaded from your control panel.

Modifying the Companion Plugin - Video Guide

This video will show Ted downloading, setting up and modifying the TebexSE companion plugin, to add a new !fulllife command:

Last updated