#
General state
Tips
- The SDK ensures that the states are sent from the app to the game serially.
- Repeatable notifications, with no guarantee on the number of notifications.
- After a state notification, the SDK caches the latest data value based on the state value for the MG to proactively obtain it at anytime.
- The app only needs to notify a user of their own state, and the MG will broadcast and synchronize it to all peer users.
- The
ISudFSTAPP void notifyStateChange(String state, String dataJson, ISudListenerNotifyStateChange listener)
API is used.- Need to call it after onGameStarted and before onGameDestroyed.
[TOC]
State transduction description
0. Testing
- state
app_common_hello_fsm
- data
{
"msg": "Hello FSM from APP!"
}
- Description
This state is used for testing.
1. Joining
- Earliest version: V1.1.30.xx
- state
app_common_self_in
- data
{
"isIn": true, // Indicates whether a user joins or exits a game. Valid values: true: join the game; false: exit the game.
"seatIndex": 1, // Seat number of the user in the game. The value can be -1 (random seat) or ranges from 0 to the total number of seats. The default value is -1.
"isSeatRandom": true, // (notice: Use isRandom instead) Indicates whether to allocate a random seat to the user when the seat with the specified number has been occupied. Valid values: true: allocate a random seat; false: not allocate a random seat.
"isRandom": true, // The default is set to true. When there is a game seat (seat number), if the game seat (seat number) is already occupied, whether to randomly assign an empty seat to sit down: if isRandom=true, an empty seat will be randomly assigned; if isRandom=false, it will not randomly assign.
"teamId":1 // Team ID. If the game does not allow users to be grouped into different teams, set this parameter to 1. Otherwise, set this parameter to 1 or 2 (two teams).
}
- Description
Whether a user joins/exits a game.
Correct processes:
1. isIn=true: Join the game => Get ready => Start the game
2. isIn=false: End the game => Cancel the ready state => Exit the game
2. Ready
- Earliest version: V1.1.30.xx
- state
app_common_self_ready
- data
{
"isReady": true // Indicates whether a user gets ready for a game. Valid values: true: get ready; false: cancel the ready state.
}
- Description
Whether a user gets ready for a game or cancels the ready state.
3. Gaming
- Earliest version: V1.1.30.xx
- state
app_common_self_playing
- data
{
"isPlaying": true, // Indicates whether a user starts playing a game. Valid values: true: the user starts playing; false: the user ends playing.
"reportGameInfoExtras": "Transparently passed parameters.", // This parameter is of the string type. The HTTPS service calls back the report_game_info parameter. The maximum value length is 1024 bytes. A longer value will be truncated. (This parameter is available since February 11, 2022.)
"reportGameInfoKey": "Transparently passed parameters key." // String type, with a maximum length of 64 bytes. The server of the access party can query the data of a game according to this field
}
- Description
A user's gaming state. If the user is in the game, you are advised to:
a. Empty the central area of the screen:
Disable the full-screen gift effect.
b. For games that require frequent operations with spaceMax set to true, downsize the native UI and spare as much operation space for the game as possible:
Downsize the public screen.
Downsize the voice chat area.
If the user exits the game, restore the space allocation.
4. Captain
- Earliest version: V1.1.30.xx
- state
app_common_self_captain
- data
{
"curCaptainUID":"" // UID of the captain. This parameter is required.
}
- Description
Whether a user is the captain who is authorized to start the game.
5. Kicking a player
- Earliest version: V1.1.30.xx
- state
app_common_self_kick
- data
{
"kickedUID": "uid" // UID of the player being kicked.
}
- Description
A user who is the captain kicks another player.
Only the captain is authorized to kick other players.
6. Ending a game
- Earliest version: V1.1.30.xx
- state
app_common_self_end
- data
{}
- Description
A user who is the captain ends the current round of game or the game ends in advance as all players exit the game.
7. Room (deprecated since V1.1.30.xx)
- Please use
app_common_self_in
instead. - state
app_common_self_room
- data
{
"isIn": true // Indicates whether a user is in a room. Valid values: true: in a room; false: not in a room.
}
- Description
Whether a user is in a room. You are advised to:
Send a notification when the user enters or leaves the room.
- Description
Whether a user exits the game.
8. Voice chat (depreated since V1.1.30.xx)
- Please use
app_common_self_in
instead. - state
app_common_self_seat
- data
{
"lastSeat": -1, // Previous voice chat seat No. of a user. The value starts from 0. If the user does not start a voice chat before, set this parameter to -1.
"currentSeat": 0 // Current voice chat seat No. of a user. The value starts from 0. If the user does not start a voice chat currently, set this parameter to -1.
}
- Description
Voice chat state of a user. You are advised to:
Send a notification when the user enters the room.
Send a notification each time the user's voice chat state changes, that is, when the user starts a voice chat, ends a voice chat, or changes the voice chat seat.
9. Microphone
- state
app_common_self_microphone
- data
{
"isOn": true, // Indicates whether a user turns on or off the microphone. Valid values: true: the microphone is turned on; false: the microphone is turned off.
"isDisabled": false // Indicates whether a user's voice chat function is disabled. Valid values: true: the voice chat function is disabled; false: the voice chat function is enabled.
}
- Description
The microphone state of a user. You are advised to:
Send a notification when the user enters the room.
Send a notification each time the user's microphone state changes, that is, when the user turns on or off the microphone and when the user's voice chat function is disabled or enabled.
10. Keyword hitting
- state
app_common_self_text_hit
- data
{
"isHit": true, // Indicates whether a keyword is hit. Valid values: true: a keyword is hit; false: no keyword is hit.
"keyWord": "Key", // Keyword.
"text": "This is key" // Chat message.
}
- Description
Whether a keyword is hit in a user's chat message. You are advised to:
Use exact match for keywords.
If a chat message hits a keyword, persist the keyword hitting state for subsequent chat messages.
Restore the keyword hitting state when the keyword in the game is updated.
11. Background music (added on December 27, 2021)
- state
app_common_open_bg_music
- data
{
"isOpen": true // Indicates whether a user turns on or off the background music. Valid values: true: the background music is turned on; false: the background music is turned off.
}
- Description
A user turns on or off the background music.
12. Sound effect (added on December 27, 2021)
- state
app_common_open_sound
- data
{
"isOpen": true // Indicates whether a user turns on or off the sound effect. Valid values: true: the sound effect is turned on; false: the sound effect is turned off.
}
- Description
A user turns on or off the sound effect.
13. Vibration effect (added on December 27, 2021)
- state
app_common_open_vibrate
- data
{
"isOpen": true // Indicates whether a user turns on or off the vibration effect. Valid values: true: the vibration effect is turned on; false: the vibration effect is turned off.
}
- Description
A user turns on or off the vibration effect.
14. Volume level (added on December 31, 2021)
- state
app_common_game_sound_volume
- data
{
"volume": 100 // Volume level. The value ranges from 0 to 100.
}
- Description
A user sets the volume level for a game.
15. setting game mode(Added on May 10, 2022)
- state
app_common_game_setting_select_info
data
ludo
{
"ludo": { // game name
"mode": 0, // mode: rece,0: fast, 1: classic; 2:competitive
"chessNum": 2, // chessNum 2: 2 chess; 4: 4 chess;
"item": 0 // item 1: has prop, 0: no prop
},
}
- whoisspy
{
"whoisspy": { // who is spy
"mode": 0 // 0:classic ;1: Exploding words
}
}
- bumper
{
"bumper":{ // bumper
"userInfos": [
{
"uid": "", // user id
"mass": 10, // Body type default value is 10, and the valid options are 10, 20, 30, 40, 50.
"trail": 1, // Drag tail model options are 1, 2, 3, 4.
},
{
"uid": "", // user id
"mass": 10, // Body type default value is 10, and the valid options are 10, 20, 30, 40, 50.
"trail": 1, // Drag tail model options are 1, 2, 3, 4.
}
]
}
}
- numberbomb
{
"numberbomb": {
"keyNum": 45, // The final answer number set
"range": [1, 99], // Initial display range.
"save": 0, // Save or not: 0 - Not saved, which means the settings take effect only once. If not set next time, it reverts to the default. 1 - Saved, which means the settings persist until the next change.
}
}
- baloot
{
"baloot":{
"mode":0 // 0: Classic ; 1: Fast
}
}
- spot
{
"spot": {
"maxTurn": 15, // Number of game rounds. If less than or equal to 0, do not read this field. Round up non-integer values.
"turnTime": 30, // Turn time limit (seconds). If 0 is passed, do not read this field; -1 indicates unlimited duration.
"modeSelected": { // Mode Options
"Flip": true, // Reverse, false to disable, true to enable
"Classic": true, // Classic Mode, false to disable, true to enable
"Shuffle": true, // Shuffle Mode, false to disable, true to enable
"Spotlight": true // Spotlight Mode, false to disable, true to enable
},
"specifiedLevelIds": [33, 55, 177, 399, 411] // Specify the starting levels, pass an array of integers between 1-535 (the current maximum level number). The length should be consistent with maxTurn; if not, maxTurn takes precedence.
}
}
- Description
setting game mode
16. add AI players in the game(Added on May 11, 2022)
- state
app_common_game_add_ai_players
- data
{
"aiPlayers": [
{
"userId":"",
"avatar":"",
"name":"",
"gender":"male", // 性别 male: male, female: female
"level":1, // bot level 1,2,3
}
],
"isReady": 1 // Is the robot automatically ready after joining 1:aotu preparation, 0: No automatic preparation; The default is 1
}
- Description
add AI players in the game
17. After receiving the game disconnect notification, the app notifies the game to retry the connection (added on June 21, 2022)
- state
app_common_game_reconnect
- data
{
}
- Description
Notify game to retry connection
18. The app returns the player's current score
- state
app_common_game_score
- data
{
"score": 10 // player's current score
}
- Description
The app returns the player's current score
19. The app notifies the game click like (added on November 19, 2022, and currently supports you to draw and guess)
- state
app_common_self_click_good
- data
{
}
- Description
The app notifies the game click like
20. The app notifies the game thrown poop (added on November 19, 2022. Currently, you can draw and guess)
- state
app_common_self_click_poop
- data
{
}
- Description
The app notifies the game thrown poop
21. App Notifies Game to Set FPS
- state
app_common_game_fps
- data
{
"fps": 60
}
- Description
App Notifies Game to Set FPS
22. App Notifies Game of the Result of Order Creation
- state
app_common_game_create_order_result
- data
{
"result": 1 // App Notifies Game of Order Creation Result: 0 for Failure, 1 for Success
}
- Description
App Notifies Game of the Result of Order Creation
23. App Notifies Game to Set Game Mode (Only supports Texas Hold'em Pro and Teen Patti Pro)
- state
app_common_game_settings
- data
{
// Please refer to the following for specific parameters:
}
- Here is an example of the data configuration for setting up Texas Hold'em:
{
smallBlind: number, // 1 Specifies the small blind amount. The big blind is set to twice the value of the small blind. Valid options for the small blind include: 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000.
ante: number, // 0 Specifies the ante amount. Set this value to 0 if there is no ante.
sBuyIn: number, // 100 Specifies the buy-in value or minimum buy-in. Valid options for the buy-in value include: 100, 200, 100, 200, 500, 1000, 2000, 5000, 100000.
bBuyIn: number, // 200 Specifies the maximum buy-in. Set this value to 0 for unlimited maximum buy-in.
isAutoStart: number, // 2 Indicates whether automatic start is enabled. Set this value to 0 to disable automatic start. Other valid options include: 2, 6, 7, 8, 9. [0,2,6,7,8,9]
isStraddle: number, // 0 0: Disabled, 1: Optional, 2: Mandatory
tableDuration: number, // 0.5 Table duration configuration (hours) [0.5, 1, 2, 4, 6, 8]
thinkTime: number, // 20 Think time (seconds) [10, 15, 20]
}
- Teen Patti settings data configuration (example):
{
ante: number, // 10 Ante
darkCard: number, // 2 Number of dark card rounds
isAutoStart: number, // 2 0 indicates auto-start disabled [0, 2, 6, 7, 8, 9]
potLimit: number, // 1000 Pot limit
round: number, // 10 Maximum number of rounds
singleLimit: number, // 32 Single bet limit
tableDuration: number, // 0.5 Table duration configuration (hours) [0.5, 1, 2, 4, 6, 8]
thinkTime: number // 15 Think time (seconds) [10, 15, 20]
}
- Description
App Notifies Game to Set Game Mode
24. App notifies the game to return to the lobby (currently supported for UMO).
- state
app_common_game_back_lobby
- data
{}
- Description
App notifies the game to return to the lobby
25. app notify game custom ui config (ludo, gobang, baloot, monstercrush, eightball)
- state
app_common_game_ui_custom_config
- data
{
// Please refer to the following
}
- ludo
{
"gameBoard01": "https://", // Game board background
"gameBoard02": "https://", // Game board
"diceBg": "https://", // Dice with white background
"diceBgGold": "https://", // Dice with gold background
"dice01": "https://", // Dice 1
"dice02": "https://", // Dice 2
"dice03": "https://", // Dice 3
"dice04": "https://", // Dice 4
"dice05": "https://", // Dice 5
"dice06": "https://", // Dice 6
"diceCrown": "https://", // Crown on the dice
"chessYellow": "https://", // Yellow chess piece
"chessBlue": "https://", // Blue chess piece
"chessGreen": "https://", // Green chess piece
"chessRed": "https://", // Red chess piece
"players": { // Players can create custom maps individually. The key is the player's UID, and the value is the customized UIConfig. If there is none, it can be left blank
"uid_0" : { // user id
"diceBg": "https://", // - Dice with white background
"diceBgGold": "https://", // - Golden dice
"dice01": "https://", // - Dice 1
"dice02": "https://", // - Dice 2
"dice03": "https://", // - Dice 3
"dice04": "https://", // - Dice 4
"dice05": "https://", // - Dice 5
"dice06": "https://", // - Dice 6
"diceCrown": "https://", // - Dice crown
"chessYellow": "https://", // - Yellow game piece
"chessBlue": "https://", // - Blue game piece
"chessGreen": "https://", // - Green game piece
"chessRed": "https://", // - Red game piece
"rollDiceEffect": {
"dragonSkeletonUrl": "https://xxxx/remoteDragonEffect/rundice_ske.json",
"dragonAtlasUrl": "https://xxxx/remoteDragonEffect/rundice_tex.json",
"dragonTextureUrl": "https://xxxx/remoteDragonEffect/rundice_tex.png",
"animatureName": "Armature",
"animationName": "newAnimation"
}
},
"uid_1" : { // user id
"diceBg": "https://", // - Dice with white background
"diceBgGold": "https://", // - Golden dice
"dice01": "https://", // - Dice 1
"dice02": "https://", // - Dice 2
"dice03": "https://", // - Dice 3
"dice04": "https://", // - Dice 4
"dice05": "https://", // - Dice 5
"dice06": "https://", // - Dice 6
"diceCrown": "https://", // - Dice crown
"chessYellow": "https://", // - Yellow game piece
"chessBlue": "https://", // - Blue game piece
"chessGreen": "https://", // - Green game piece
"chessRed": "https://", // - Red game piece
"rollDiceEffect": {
"dragonSkeletonUrl": "https://xxxx/remoteDragonEffect/rundice_ske.json",
"dragonAtlasUrl": "https://xxxx/remoteDragonEffect/rundice_tex.json",
"dragonTextureUrl": "https://xxxx/remoteDragonEffect/rundice_tex.png",
"animatureName": "Armature",
"animationName": "newAnimation"
}
},
...
}
}
gobang
{ "chessBoard": "https://", // chess board background "chessBlack": "https://", // black chess "chessWhite": "https://", // white chess "chessBg": "https://", // chess background "tipsChess": "https://", // tips chess "curChessWhiteBg": "https://", // "curChessBlackBg": "https://", // "players": { "uid_0": { "chessBoard": "", // Chessboard base resource URL address "chessBlack": "", // Black chess piece resource URL address "chessWhite": "", // White chess resource URL address "chessBg": "", // Chess piece background resource URL address "tipsChess": "", // Tip to indicate the move. Resource URL "curChessWhiteBg": "", // Current white chess piece icon resource URL address "curChessBlackBg": "", // The URL of the resource for the current black chess piece marker background }, "uid_1": { // user id "chessBoard": "", // Chessboard base resource URL address "chessBlack": "", // Black chess piece resource URL address "chessWhite": "", // White chess resource URL address "chessBg": "", // Chess piece background resource URL address "tipsChess": "", // Tip to indicate the move. Resource URL "curChessWhiteBg": "", // Current white chess piece icon resource URL address "curChessBlackBg": "", // The URL of the resource for the current black chess piece marker background } } }
baloot
{ "bg": "https://", // table bg "cardBg": "https://" // card bg "players": { "uid_0" : { // user id "popBg": "https://" // popup bg }, "uid_1" : { // user id "popBg": "https://" // popup bg } ... } }
monstercrush
// Note: JSON format, please ensure that the configuration is correct. If there are any configuration errors or loading exceptions, all resources will be used from the game itself (equivalent to having no configuration). { items: [ /** List of 5 elements */ { imageUrls: ["https://", "https://"], // Element image URLs, if there is only one image, there is no animation; if there are multiple images, the frames will switch based on the specified duration. duration: 0.1 // Optional: Element frame animation carousel interval, in seconds, default is 0.1 seconds. }, { imageUrls: ["https://"] // Element image URLs, if there is only one image, there is no animation; if there are multiple images, the frames will switch based on the specified duration. // duration: 0.1 // Optional: Element frame animation carousel interval, default is 0.1 seconds. }, { imageUrls: ["https://", "https://"], duration: 0.5 }, { imageUrls: ["https://", "https://"], duration: 0.1 }, { imageUrls: ["https://"], duration: 0.1 } ], loadingUrl: "https://", // Optional: URL of the animated texture for the loading animation when loading resources at the start of the game. itemGridUrl: "https://", // Optional: URL of the element grid. reconnectAnim: { // Optional: Reconnect loading animation. imageUrls: ["https://", "https://"], // Texture URLs duration: 0.1 // Frame animation time interval, in seconds. }, "players": { "uid_0": { "items": [ /* A list of 5 elements */ { "imageUrls": ["resource url address", "resource url address"], // URLs of element images. If there is only one, there will be no animation. If there are multiple, the frames will switch according to the duration interval for frame animation. "duration": 0.1 // Optional, element frame animation carousel interval, unit: seconds, default is 0.1 seconds }, { "imageUrls": ["resource url address"] // URLs of element images, if there is only one, there will be no animation; if there are multiple, frame animation will switch based on the duration interval // duration: 0.1 // Optional, the interval for element frame animation carousel, default is 0.1 seconds }, { "imageUrls": ["resource url address", "resource url address"], "duration": 0.5 }, { "imageUrls": ["resource url address", "resource url address"], "duration": 0.1 }, { "imageUrls": ["resource url address"], "duration": 0.1 } ], "loadingUrl": "", // Optional, the URL of the loading animation image for loading resources when the game starts "itemGridUrl": "", // Optional, the URL for the item grid "reconnectAnim": { // optional, reconnection loading animation "imageUrls": ["resource url address", "resource url address"], // texture URLs "duration": 0.1 // frame animation time interval, in seconds } } } }
eightball
{ "players": { "uid_0" : { // Player's UID "stick": "", // Cue stick image link "table": "", // Tablecloth image link "table_cushion": "", // table frame image link "table_holes": "", // table hole image url https:// }, "uid_1" : { // Player's UID "stick": "", // Cue stick image link "table": "", // Tablecloth image link "table_cushion": "", // table frame image link "table_holes": "", // table hole image url https:// } ... } }
Jackaroo
{ "players": { "uid_0": { "bg": "", // Game background link https:// "board": "", // Board image link https:// "coloredHoles": "", // Colored area image link on the board https:// "marbles": " ", // Piece image link https:// "cards": " ", // Card image link https:// "pokerLayout": " ", // Card arrangement, 1. Fill in "compact" for compact arrangement; 2. Leave blank or other for loose arrangement "pokerType": " " // Card type, 1. Fill in "simple" for simple form of cards; 2. Leave blank or other for cards with effect images }, "uid_1": { "bg": "", // Game background link https:// "board": "", // Board image link https:// "coloredHoles": "", // Colored area image link on the board https:// "marbles": " ", // Piece image link https:// "cards": " ", // Card image link https:// "pokerLayout": " ", // Card arrangement, 1. Fill in "compact" for compact arrangement; 2. Leave blank or other for loose arrangement "pokerType": " " // Card type, 1. Fill in "simple" for simple form of cards; 2. Leave blank or other for cards with effect images }, "...": "..." // Additional player configurations can be added here, following the same format as above } }
carrom
{
"players":
{
"uid_1": //user id
{
"table":"", // Desktop Style. By default, use custom resources. If custom resources are not configured, use default resources. [URL]
"table_board":"", // Frame around the Desktop. Configured in a set with the Desktop Style. By default, it uses custom resources. If custom resources are not configured, it falls back to using default resources. [URL]
"bar":"", // Slider Bar for Controlling Cue Ball Position at the Bottom of the Desktop. Configured and displayed as a set with the Desktop Style. By default, it uses custom resources. If custom resources are not configured, it falls back to using default resources. [URL]
"cueDisc":"", // Individual Cue Balls for Each Player, along with the Slider Buttons on the Bottom Slider Bar. [URL]
"targetDisc":"", // Only applies in Carrom mode, modifies the player's target ball style. If two players submit the same custom resources, in their own perspectives,
// The player's own target ball adopts custom resources, while the opponent's target ball uses default resources. After setting custom resources, the bottom count UI and game start prompt UI will also change accordingly. [URL]
"queueDisc":"", // Red Ball. [URL]
"banCueLight":"", // Cue Ball Bottom Light Effect, configured as a set with freeCueLight. Displays when the cue ball overlaps with other balls during movement (indicating that the cue ball cannot be placed at that location). [URL]
"freeCueLight":"" // Cue Ball Bottom Light Effect, configured as a set with banCueLight. Displays during normal movement or when the cue ball is stationary. [URL]
},
"uid_2": // user id
{
"table":"",
"table_board":"",
"bar":"",
"cueDisc":"",
"targetDisc":"",
"queueDisc":"",
"banCueLight":"",
"freeCueLight":""
}
...
}
}
twmahjong
{ "logo": "" // logo image url }
dice
{ "logo": "", // logo image url }
26. App notifies the game of the player information list (crazyracing)
- state
app_common_users_info
- data
{
"infos": [
{"uid": "", "avatar": "", "name": ""}, // uid: uid,avatar:avatar url,name:user name
...
]
}
- Description
App notifies the game of the player information list
27. App notifies the game of custom help content (crazyracing)
- state
app_common_custom_help_info
- data
{
"content": [
"content1",
"content2",
"content3"
...
]
}
- Description
App notifies the game of custom help content
28. App actively launches the main interface (crazyracing)
- state
app_common_show_game_scene
- data
{
}
- Description
App actively launches the main interface
29. App actively show the main interface(crazyracing)
- state
app_common_show_game_scene
- data
{
}
- Description
App actively show the main interface
30. app notify hide game scene (crazzy game)
- state
app_common_hide_game_scene
- data
{
}
- Description
app notify hide game scene
31. App notify send burst word to game (who is spy)
- state
app_common_game_send_burst_word
- data
{
"text": "", //
}
- Description
App notify send burst word to game
32. App notifies the game of the player's inventory of item cards (Monopoly)
- state
app_common_game_player_monopoly_cards
- data
{
"reroll_card_count": 0, // The quantity of "Re-roll" cards (Note: can also be represented by the field "paid_events_19").
"free_rent_card_count": 0, // The quantity of "Rent-free" cards (Note: can also be represented by the field "paid_events_18").
"ctrl_dice_card_count": 0, // The quantity of "Buy specific dice value" cards (Note: can also be represented by the field "paid_events_20").
"paid_events_19": 0, // The quantity of "Re-roll" cards (Note: If both "reroll_card_count" and "paid_events_19" exist, "reroll_card_count" will be prioritized).
"paid_events_18": 0, // The quantity of "Rent-free" cards (Note: If both "free_rent_card_count" and "paid_events_18" exist, "free_rent_card_count" will be prioritized).
"paid_events_20": 0, // The quantity of "Buy specific dice value" cards (Note: If both "ctrl_dice_card_count" and "paid_events_20" exist, "ctrl_dice_card_count" will be prioritized).
}
- Description
app通知游戏玩家所持有的道具卡
33. App notifies the game that it has received item cards (Monopoly).
- state
app_common_game_show_monopoly_card_effect
- data
{
"type": 1, // 1: Re-roll card, 2: Rent-free card, 3: Specific value card (Note: The field "paid_events_type" can also be used to represent the type of specific item cards. If both "type" and "paid_events_type" exist, "type" will be prioritized).
"paid_events_type": "paid_events_19", // paid_events_19: Re-roll card, paid_events_18: Rent-free card, paid_events_20: Specific value card (Note: Choose either the "type" field or the "paid_events_type" field. If both "type" and "paid_events_type" exist, "type" will be prioritized).
"fromUid": "", // from user id
"toUid":"", // target user id
"count": 0, // count
}
- Description
App notifies the game that it has received item cards
34. App notifies the game to update the in-game currency (related to probability-based game mechanics).
- state
app_common_update_game_money
- data
{
}
- Description
App notifies the game to update the in-game currency
35. App notifies the game of the player's inventory of item cards (only supported for Ludo).
- state
app_common_game_player_props_cards
- data
{
"props": "json string", // props json string
}
ludo
注:specify_dice_roll {"props": "{\"specify_dice_roll\":0}"}
Description
App notifies the game of the player's inventory of item cards
36. App notifies the game to play the special effects of the item cards obtained by the player (only supported for Ludo).
- state
app_common_game_player_props_cards_effect
- data
{
"paid_events_type": "specify_dice_roll", // prop card name
"fromUid": "", // from user id
"toUid":"", // target user id
"count": 0, // count
}
- ludo
paid_events_type: "specify_dice_roll" // specify dice roll
- Description
App notifies the game to play the special effects of the item cards obtained by the player
### 37. app notify the game's observer to watch the player
- state
app_common_game_observe_player
- data
```json
{
"uid":"", // observer id
}
- Description
app notify the game's observer to watch the player. (monstercrush, matchpairs)
38. Notify game Set the volume level of the game's background music (only modify the background music volume).
- state
app_common_game_music_volume
- data
{
"volume": 100 // game bg music volume 0 ~ 100
}
- Description
Notify game Set the volume level of the game's background music
39. app sends a new avatar URL to the game
- state
app_common_game_avatar
- data
{
"avatars": [
{
"uid": "user id",
"avatar": "user avatar url"
},
{
"uid": "user id",
"avatar": "user avatar url"
}
]
}
- Description
app sends a new avatar URL to the game