将 Discord 富媒体状态(Rich Presence)集成至游戏中,使其他玩家能够查看你当前的游戏内活动。

富媒体状态的文本内容可通过 Glass Config API 进行配置,在此处你可以分别设置游戏内和游戏外的不同值。

字符串解析器
字符串解析器用于处理如状态或图片描述等文本值
当前支持的字符串解析器有:
$status - 你是在游戏中还是在界面中
$username - 你的用户名
$world_type - 世界类型是多玩家还是单玩家(或者你处于主菜单)
$dimension - 你当前所在的维度名称
$health - 当前的生命值(以 HP 为单位)
$max_health - 最大生命值(以 HP 为单位)
$hearts - 当前生命值(以心为单位)
$held_item - 当前手持物品的名称
$held_item_count - 当前手持物品堆叠中的物品数量
$held_item_full - 当前手持的物品(格式为 <数量>×<名称>),如果未手持任何物品则显示“Nothing”
$time_value - 当前的游戏内时间。例如:“17564”
$time_of_day - 当前昼夜循环的阶段(日出、白天、正午、日落、夜晚、午夜)
图像解析器
图像解析器用于处理图像,它们输出一个键(key),该键应在应用程序中查找对应的图像。
图像解析器允许你指定回退值,它们会从左到右遍历键名并依次尝试每个键,直到其中一个返回有效的图像键;如果没有任何键成功匹配,则不会显示图像(大图像除外,它将默认使用“默认图像键”配置项中设置的值)。
例如,如果你的图像键设置为 "$status $default",系统将首先尝试获取 $status 的值;若该值未返回任何内容,则会改用 $default。
目前支持的图像解析符包括:
$default – 在“默认图像键”配置项中设置的图像
$status – 部分状态对应的图像键(例如:箱子、熔炉、告示牌)
$dimension – 你当前所在的维度
$time_of_day – 当前昼夜循环阶段(日出、白天、正午、日落、夜晚、午夜)
Adds integration with Discord Rich Presence to the game, allowing others to view what you are doing in the game.

Rich Presence text can be configured thru the Glass Config API configuration, here you can set separate values for both being in game and not being in game.

String Resolves
String resolvers are used for text values like the state or image texts
Currently supported string resolvers are:
$status - Whether you are in-game or in a screen
$username - Your username
$world_type - Whether the world is Multiplayer or Singleplayer (or you are in the Main Menu)
$dimension - The name of the dimension you are currently in
$health - Current health in HP
$max_health - Maximum health in HP
$hearts - Current health in hearts
$held_item - The name of hte currently held item
$held_item_count - The amount of items in a currently held stack
$held_item_full - The currently held item (in a <count>x <name> format) or "Nothing" if nothing is held
$time_value - The current time of the day. For example: "17564"
$time_of_day - The current stage of the daylight cycle (Sunrise, Day, Noon, Sunset, Night, Midnight)
Image Resolvers
Image resolvers are used for images, they output a key to the image that should be looked up in the application.
Image resolvers allow you to specify fallbacks, they will traverse the key from left to right and try each key until one of them returns an image key, if no key does so, the image is not displayed, except for the large image which will default to the value set in "Default Image Key".
So if you have "$status $default" in your image key, it will first try to fetch $status, if that does not return anything then $default will be used
Currently supported image resolves are:
$default - The image set in the "Default Image Key" config value
$status - Some of the statuses as image keys (for example: chest, furnace, sign)
$dimension - The current dimension you are in
$time_of_day - The current stage of the daylight cycle (Sunrise, Day, Noon, Sunset, Night, Midnight)
评论 0
登录后参与评分
还没有评论,来抢沙发吧