moymo,Docs
Skip to content
Games: the Moymo SDK

Unreal Engine ​

Unreal Engine 5 on Windows, in a C++ project. If your project is Blueprint only, give it C++ once with Tools > New C++ Class. After that, the Blueprint nodes work too.

The plugin ships as source and builds with your project. It is built against Unreal Engine 5.5.

  1. Add the plugin. In your game's Setup tab in the Developer Portal, pick Unreal Engine and download Moymo plugin for Unreal Engine (moymo-sdk-unreal-<version>.zip). Unzip it into your project's folder. The Moymo folder goes into Plugins (make the folder if there is none), and moymo.exe goes next to your .uproject.
  2. Depend on it. In Source/<YourGame>/<YourGame>.Build.cs, add the module:
    csharp
    PublicDependencyModuleNames.Add("Moymo");
  3. Create moymo.toml and push it. Open a terminal in the project's folder. In File Explorer, click the address bar, type powershell and press Enter. Then run one command at a time:
    bash
    ./moymo login
    ./moymo init --app <your app key>
    ./moymo push
    moymo init sees the .uproject and points the generated code at Source/<YourGame>/Moymo.g.h. moymo push writes that header and uploads moymo.toml to your sandbox. Push again after every change to moymo.toml.
  4. Start it. Once, for example in your GameInstance's Init():
    cpp
    #include "Moymo.g.h"
    #include "MoymoSubsystem.h"
    
    moymo::game::Start(moymo::Environment::Sandbox, UMoymoSubsystem::DefaultConnection());

The plugin pumps the SDK every frame and stops it when the game ends. You do not need to do either.

From C++ ​

cpp
moymo::Emit(moymo::game::Ev::LevelFinished{3});      // its moment, and the clip, follow from moymo.toml
moymo::Presence::Set(moymo::game::Rp::Playing(3));   // when it changes, not every frame
moymo::Presence::Clear();
moymo::Moments::Mark(moymo::game::Moment::LevelFinished(3));
moymo::Achievements::Unlock(moymo::game::Ach::FirstBanner);
moymo::Stats::PutInt(moymo::game::Stat::Population, 14);

This is the same API as in C and C++. The plugin's log category is LogMoymo: refusals and the SDK's own lines go there.

From Blueprints ​

The Moymo category has a node for each call. Each node takes names exactly as written in moymo.toml:

NodeWhat it does
Emit EventAn event by name, with its fields in three maps: whole numbers, decimals and flags. An event with an enum field has to be emitted from C++.
Set Presence / Clear PresenceA presence line by name. Whole numbers go in one map, list symbols (enum(@list)) in another.
Mark MomentA moment by name, with whole-number fields.
Unlock AchievementBy name.
Put Stat Int / Put Stat Float / Put Stat Flag / Add To StatA stat by name. Add To Stat adds a member to a set.
Is RunningWhether the SDK has started.

A node returns false and writes the reason to LogMoymo in three cases: the name is not in moymo.toml, a field is missing, or Start was not called from the generated header.

Editor and packaged game ​

  • In the editor (Play In Editor), UMoymoSubsystem::DefaultConnection() is the emulator. Run ./moymo dev first, and it prints everything the game sends.
  • A packaged game talks to Moymo for Windows. The first time it starts, the player is asked what to allow. The build copies moymo.dll next to the game's executable. If the DLL is missing, the plugin logs one warning and every call does nothing.

Steam ​

The Unreal plugin does not unlock achievements on Steam yet. Unlock them on Steam yourself, as you do today (for example through the Online Subsystem Steam). Plain C++ engines have a built-in Steam mirror; see C and C++.

Going live ​

Run ./moymo push --env live, have the release build start with moymo::Environment::Live, then follow the Go live tab in the portal. See Sandbox, testers and going live.

The wiki is for Moymo's members and developers. Something wrong or missing? Use "Suggest a change" on any page.