SteamLite

The details about including Steam support here are only relevant to Meson. If you are building for macOS, details related to building with Steam are explained in the Xcode section.

For this module to be defined, steamworks_path must be set to the location of the Steamworks API SDK when building.

At the moment, this is primarily just a built-in implementation of achievements, very similar to the SteamUserStatsLite script. Because MKXP is GPL licensed (and therefore isn't actually allowed to directly link to Steamworks, probably even using the aforementioned script), this functionality is implemented through Steamshim.

When built with Steam support, two executables are created instead of one -- the first being Steamshim, and the second (the one ending in _rt) being the game itself. Remember to keep both.

If steam_appid not set when building, the application must be launched directly from Steam unless steam_appid.txt is placed in the same directory containing your App ID. If steam_appid is set, the game will automatically request for Steam to start it (using SteamAPI_RestartAppIfNecessary) if it was not already launched using it.

The only significant differences from SUSL should be:

  • Functions are accessed through the SteamLite module

  • get_stat_float and get_stat_int are now get_stat_f and get_stat_i respectively

  • the is_subscribed , is_dlc_present, update_avg_rate_stat , and get_achievement_display_info methods are not present (yet)

It is a little simpler to use than SteamUserStatsLite due to initialization, shutdown, and updating being handled internally. Using it is as simple as:

SteamLite.set_achievement 'YOUR_ACH_ID_HERE'

# Send changes to server and display achievement notifications
SteamLite.store_stats

Last updated