Stablecoin for Games
A free plugin for Ren’Py, Godot, Unity, RPG Maker MZ and Unreal Engine that takes tips and paid unlocks in USDC and USDT. The player’s wallet pays yours directly. No store, payment processor or JRPG server sits in between.
Four steps, all inside the game
-
01
Pick a network
A payment sheet slides in over the game. The player picks the network their USDC or USDT is on.
-
02
Pay
With a browser wallet like MetaMask or Phantom, a phone wallet QR code, or a manual transfer from an exchange. The player covers the network fee, usually cents on Base, Arbitrum, Polygon, Arc and Solana.
-
03
The game watches the chain
The price gets 4 extra digits for the item and a random number, so 4.99 is sent as 4.993742. The game looks for that exact transfer to your wallet.
-
04
Unlocked
After enough confirmations the receipt is saved. It is re-checked on-chain at each launch, and the unlock works offline.
Running in ten minutes
uvx stablecoin-games-renpy install .
npx stablecoin-games-renpy install .
pipx run stablecoin-games-renpy install .
- Get the pluginUnzip the release into your project. You get
game/scfg/andgame/python-packages/scfg_core/. - Add your wallet and itemsOne
configure()call, and anadd_item()for each thing you sell. - Call
pay()where you sellThen gate the content withowns(). - Test on testnet first
testnet=Trueuses Sepolia, Polygon Amoy and Solana Devnet. Do one full purchase before going live.
init python:
scfg.configure(
wallet="0xYourWallet",
testnet=True)
scfg.add_item(
"chapter2", code=1,
price="4.99", token="USDC",
title="Chapter 2")
label end_of_chapter1:
$ scfg.pay("unlock",
item="chapter2")
if scfg.owns("chapter2"):
jump chapter2
Preview. Tested on Godot 4.3 and 4.7.2, desktop and web exports.
scfg-godot-0.4.0.zip
Download
- Get the addonDownload the Godot zip above. In the editor open the AssetLib tab, click Import... and pick the zip. You get
addons/scfg/. - Enable the pluginIn Project Settings > Plugins, enable Stablecoin for Games (SCFG). That adds the
Scfgautoload. - Add your wallet and itemsOne
Scfg.configure()call, and anScfg.add_item()for each thing you sell. - Await
Scfg.pay()where you sellThen gate the content withScfg.owns(). Keep"testnet": trueuntil one full test purchase works.
func _ready():
Scfg.configure({
"wallet": "0xYourWallet",
"testnet": true})
Scfg.add_item("chapter2", {
"code": 1,
"price": "4.99",
"token": "USDC",
"title": "Chapter 2"})
func _on_unlock_pressed():
await Scfg.pay("unlock",
{"item": "chapter2"})
if Scfg.owns("chapter2"):
start_chapter_two()
Preview. Needs Unity 6.3 LTS or newer. Tested on Unity 6000.6.9f1, in Linux and Windows desktop builds and WebGL. macOS is supported but unverified.
scfg-unity-0.4.0.tgz
Download
- Get the packageDownload the tarball above. In the Package Manager click +, pick Add package from tarball... and choose the file. You get Stablecoin for Games (SCFG), the package
com.repulse.scfg. - Try a sampleUnder the package’s Samples, import Showcase or Demo, set your own testnet wallet on its component and press Play.
- Add your wallet and itemsOne
SCFG.Configure()call, and anSCFG.AddItem()for each thing you sell. Or fill in an SCFG Settings asset, with no code. - Await
SCFG.Pay()where you sellThen gate the content withSCFG.Owns(). KeepTestnet = trueuntil one full test purchase works.
using Scfg;
void Awake()
{
SCFG.Configure(new ScfgOptions {
Wallet = "0xYourWallet",
Testnet = true });
SCFG.AddItem("chapter2",
new ScfgItem {
Code = 1, Price = "4.99",
Token = "USDC",
Title = "Chapter 2" });
}
public async void OnUnlockPressed()
{
await SCFG.Pay(ScfgPayKind.Unlock,
new ScfgPayRequest {
Item = "chapter2" });
if (SCFG.Owns("chapter2"))
StartChapterTwo();
}
Preview. Tested against a stand-in for MZ’s plugin API, not yet inside real RPG Maker MZ. MV is not supported.
scfg-rpgmaker-mz-0.4.0.zip
Download
- Get the pluginUnzip the RPG Maker MZ zip above into your project folder. You get
js/plugins/SCFG.js. - Turn it onIn Tools > Plugin Manager, add SCFG and turn it ON.
- Fill in the parametersYour Wallet, Testnet ON, and one Items entry per unlock, each with its own Owned Switch.
- Sell from an eventThe plugin command SCFG > Unlock Item, then gate the content on the item’s Owned Switch. No code needed.
// Or from your own plugin:
async function unlockChapter2() {
try {
await SCFG.pay("unlock",
{ item: "chapter2" });
if (SCFG.owns("chapter2")) {
// start chapter two
}
} catch (e) {
console.error(e);
}
}
Preview. Tested on UE 5.8.4 only, in Linux desktop builds, and it builds with Visual Studio on Windows. The 5.6 and 5.7 zips hold the same source and are untested. macOS is expected to work but not yet built or tested.
scfg-unreal-0.4.0-ue5.8.zip
Download
scfg-unreal-0.4.0-ue5.7.zip
Download
scfg-unreal-0.4.0-ue5.6.zip
Download
- Get the pluginDownload the zip above for your engine version and copy its
Scfgfolder into your project’sPluginsfolder. - Let the editor build itThe zip holds source code, so the editor compiles the plugin the first time you open the project. That needs the C++ compiler Unreal uses on your platform.
- Add your wallet and itemsIn Project Settings > Plugins > SCFG with no code, or with
Configure()andAddItem()onUScfgSubsystem. - Pay where you sell
PayAsync()in C++ or the Pay (SCFG) node in Blueprint. Then gate the content withOwns(). Keep Testnet on until one full test purchase works.
// In your game instance, after Super::Init()
UScfgSubsystem* Scfg =
GetSubsystem<UScfgSubsystem>();
FScfgOptions Options;
Options.Wallet = TEXT("0xYourWallet");
Options.bTestnet = true;
Scfg->Configure(Options);
FScfgItem Item;
Item.Code = 1;
Item.Price = TEXT("4.99");
Item.Token = TEXT("USDC");
Item.Title = TEXT("Chapter 2");
Scfg->AddItem(TEXT("chapter2"), Item);
// Where you sell
FScfgPayRequest Request;
Request.Item = TEXT("chapter2");
TWeakObjectPtr<UMyGameInstance> Weak(this);
Scfg->PayAsync(EScfgPayKind::Unlock, Request,
[Weak](const FScfgPaymentResult& Result)
{
if (Weak.IsValid() && Result.Status
== EScfgPaymentStatus::Paid)
Weak->StartChapterTwo();
});
Other ways to get it
-
PyPI
v0.4.0stablecoin-games-renpyThe Ren’Py installer, run by uvx or pipx View -
npm
v0.4.0stablecoin-games-renpyThe Ren’Py installer, run by npx View -
GitHub Releases
v0.4.0scfg-<engine>-0.4.0One download per engine: Ren’Py, Godot, Unity, RPG Maker MZ and Unreal Download -
itch.io
repulse-games/stablecoin-for-gamesFree download page for the Ren’Py plugin View -
Source
mainjrpg-stablecoin-gamesBuild any engine’s zip yourself from the repo View
Is it right for your game?
Good fit
- Tips and supporter rewards
- Chapter and bonus unlocks in games sold on itch.io or downloaded directly
- Desktop builds on all five engines, and web builds of Ren’Py, Godot, Unity and RPG Maker MZ games, HTML5 on itch.io included
Not a fit
- Steam, which bans games that use cryptocurrency. Google Play and the App Store require their own billing.
- Valuable content. With no server holding a secret, anyone who patches the game code can get past an unlock. The launch check stops fake receipts, not patched code.
Read the docs
Player guide, setup for Ren’Py, Godot, Unity, RPG Maker MZ and Unreal, API reference and security notes.