지원 / Support
home
디스코드 / Discord
home

GameMaker Integration

Basic Integration

1.
Download the file below.
com.smilegate.stovepcsdk.yymps
2.7 MB
2.
Launch GameMaker.
3.
Click Tools > Import Local Package, then select the downloaded file.
4.
Click Add All to select all resources, then click Import.
5.
Double-click Extensions > StovePCSDK.
6.
Double-click StovePCSDKGM.dll, then click Macros.
7.
Enter the required information in the Macros window that appears.
비고
STOVE_ENV
“Live”
This is an environment variable. Keep it set to "Live".
STOVE_APP_KEY
“”
Enter the product's Application Key.
STOVE_APP_SECRET
“”
Enter the Application Secret for the product.
STOVE_GAME_ID
“”
Enter the game ID of the product.
STOVE_LOG_LEVEL
2
This is the log level. Set it to 4 for debugging, otherwise keep it at 2.
STOVE_LOG_PATH
“”
This is the log file creation path. Typically, leave it blank.
8.
Add obj_StovePCSDK to the first room the game enters (e.g., splash screen).
9.
The basic setup is now complete.

Ownership Disposition

If you wish to automatically terminate the game in case of abnormal execution, please replace the code below in the obj_StovePCSDK > Async - Social area.
var m = async_load; if (m[? "event_type"] == "stove_on_init_complete") { stove_get_user() } if (m[? "event_type"] == "stove_on_error") { var function_type = m[? "function_type"] switch (function_type) { case StoveFunctionType.Init: case StoveFunctionType.GetUser: case StoveFunctionType.GetOwnership: game_end(); break; } } if (m[? "event_type"] == "stove_on_user") { stove_get_ownership() } if (m[? "event_type"] == "stove_on_ownership") { var owned = false; var entries = m[? "entries"] for (var i = 0; i < array_length(entries); i += 1){ var entry = entries[i] // Owned: 1, Refunded: 2 if (entry[$ "ownership_code"] != 1) { continue; } // Base Game: 3, Demo: 4, DLC: 5 if (entry[$ "game_id"] == STOVE_GAME_ID && entry[$ "game_code"] != 5) { owned = true; } } if (!owned) { game_end() } }
C++
복사

Achievement Unlock

If you wish to unlock an achievement, please insert the code below in the desired section.
stove_set_stat("STAT_NAME",1)
C++
복사
Note: You must enter the stat ID, not the achievement ID!