世界地图格式
此頁面為技術型隱藏頁面 |
- 本頁保持孤立!
閱前提示
本頁面記載的是Arcaea移動版服務器中存放的世界模式地圖的格式。
每張地圖均為JSON文檔,建議在編寫前學習基本的JSON文檔語法。
代碼解析
框架
一張地圖的總體框架如下。
{
// map data
}
在地圖中,也保存着地圖台階的信息,每個台階的編寫框架如下:
{
"steps": [
{
// step 1
},
{
// step 2
}, ...
]
}
細節解析
- 地圖信息內可能會出現眾多數據,可能會出現的數據格式如下:
- string -- 字符串 例:
"this is a string"
- int -- 整數 例:
616
- float -- 浮點數 例:
123.456
- boolean -- 布爾值 例:
true
(是),false
(否) - array -- 數組 例:
[4, 2, 2]
- object -- 對象 例:
{"info": "helloworld"}
- string -- 字符串 例:
一張地圖內可以填寫的所有信息如下。(地圖信息可以亂序排放,無排序要求)
{ "map_id": string, "is_legacy": boolean, "is_repeatable": boolean, "is_beyond": boolean, "beyond_health": int, "character_affinity": [ int, ... ], "affinity_multiplier": [ float, ... ], "is_breached": boolean, "disable_over": boolean, "new_law": string, "chapter": int, "available_from": int, "available_to": int, "require_type": string, "require_id": string, "require_value": int, "requires": [ { "type": string, "id": string, "value": int }, ... ], "requires_any": [ { "type": string, "id": string, "value": int }, ... ], "require_localunlock_songid": string, "require_localunlock_challengeid": string, "coordinate": string (x,y), "step_count": int, "custom_bg": string, "stamina": int, "chain_info": { "id": string, "index": int }, "steps": [ { "position": int, "capture": int, "items": [ { "type": string, "id": string, "amount": int }, ... ], "restrict_id": string, "restrict_ids": [ string, ... ], "restrict_type": string, "restrict_difficulty": int, "step_type": [ string, ... ], "speed_limit_value": int, "plus_stamina_value": int }, ... ] }
地圖信息
普通地圖:
{
"map_id": "example",
//地图ID string 必需字段
//请确保输入的map_id与地图文件名相同
"is_legacy": false,
//是否启用Legacy地图的机制 boolean
//于1.7.0新增
"is_repeatable": true,
//是否启用无限地图的机制 boolean
"is_beyond": false,
//是否启用Beyond地图的机制 boolean
//于3.0.0新增
"beyond_health": 100,
//Beyond/Breach地图的总百分比 int
//于3.0.0新增
"character_affinity": [
],
//Beyond地图的相性契合搭档 array[int]
//填写格式: [CharacterID]
//于3.0.0新增
"affinity_multiplier": [
],
//Beyond地图的相性契合加成 array[float]
//于3.0.0新增
//character_affinity与affinity_multiplier的照应关系:
//设character_affinity为[0, 1],character_affinity为[1.0, 1.5]
//那么该地图的相性契合信息为: {0: 1.0, 1: 1.5}
"is_breached": false,
//是否启用Breach地图的机制 boolean
//于5.3.0新增
"disable_over": false,
//是否禁止搭档超量加成参与进度计算 boolean
//于5.3.0新增
"new_law": "",
//Breach地图的法则 string
//于5.3.0新增
//开启Breach地图的机制时,请注意Beyond地图的机制也要开启
//因为Breach地图中不存在相性契合,因此character_affinity与affinity_multiplier理应均为空数组
//法则类型(5.3.0):
// over100_step50: PROG = OVER + STEP/2
// frag50: PROG x= FRAG
// lowlevel: PROG x= max(1.0, 2.0 - 0.1 x LEVEL)
// antiheroism: PROG = OVER - ||OVER-FRAG|-|OVER-STEP||
"chapter": 0,
//地图章节 int 必需字段
//章节列表:
// 0: 活动 Event
// 1001: Beyond
// 普通章节:
// 1: 第一章
// 2: 第二章
// 往后的章节以此类推
// 陷落章节:
// 1: 陷落第一章
"available_from": -1,
//该地图从X时开始可用 int 必需字段
//填写10位/16位时间戳,-1表示地图永远可用
//于1.5.2新增
"available_to": -1,
//该地图从X时开始关闭 int 必需字段
//填写10位/16位时间戳,-1表示地图永不关闭
//于1.5.2新增
"require_type": "",
//解锁地图时所需物品的类型 string
//解锁类型(5.3.0):
// pack 曲包(配合require_id使用)
// character 角色(616没用过,配合require_id使用)
// single 单曲(配合require_id使用)
// fragment 残片(配合require_value使用)
// chart_unlock 解锁谱面(配合require_id使用,格式为SongID+ratingClass)
// chapter_step 章节内达到一定步数(配合require_value使用)
// chapter_maps 完成章节内数张地图(配合require_value使用,目前只出现在Beyond背景的地图中)
"require_id": "",
//解锁地图时需要解锁的物品ID string / array[string]
//格式 array[string, ...] 于3.10.0新增
"require_value": 0,
//解锁地图时需要花费的对应物品的数量 int
"requires": [
{
"type": "",
"id": "",
"value": 0
}
],
//解锁地图时需要解锁的多个物品 array[object]
//type, id, value三键效果与require_type, require_id, require_value效果相同
//于4.2.0新增
"requires_any": [
{
"type": "",
"id": "",
"value": 0
}
],
//解锁地图时需要解锁其中之一的多个物品 array[object]
//格式与requires相同
//于5.9.0新增
//require各键的优先级:
// require三键: 即require_type, require_id, require_value
// 存在requires时,优先使用requires中的条件
// 不存在requires,存在require三键时,使用require三键中的条件
// 不存在requires,也不存在require三键时,使用requires_any中的条件
// 如果requires,requires三键,requires_any均不存在,则不设置解锁条件
"require_localunlock_songid": "",
//解锁地图前需要解锁的曲目 string
//填写格式: SongID
//于1.5.0新增
"require_localunlock_challengeid": "",
//解锁地图前需要通过的曲目异象 string
//填写格式: SongID
//于1.6.0新增
//require_localunlock_challengeid的判断方式:
// 寻找本地"un"文件中SongID_challenge|0|102解锁条件,判断"complete"是否为通过值
// 如果"complete"被设定为0或条件不存在,默认锁定地图
"coordinate": "0,0",
//地图在对应章节应用的X/Y坐标 string 必需字段
//前者代表X,后者代表Y
// X: 负则左移,正则右移
// Y: 负则下移,正则上移
"step_count": 25,
//地图总步数 int 必需字段
"custom_bg": "",
//地图的自定义背景 string
//填写格式: FilePath
//填写后,游戏会使用img/world/FilePath来代替世界模式中显示的章节背景
// 如果不填写,则默认使用章节背景
// is_beyond为true时无效果
//于1.8.3新增
"stamina_cost": 2,
//在地图内游玩一次所需要的体力 int
"chain_info": {
"id": "",
"index": 0
},
//声明该地图所在的链式解锁 object{string: string / int}
//填写格式:
// id: ChainID
// index: UnlockIndex
//于3.10.0新增
"steps": [
//该地图的台阶设置 array[object] 必需字段
{
"position": 0,
//台阶的位置 int 必需字段
"capture": 5
//台阶的步数 int 必需字段
},
{
"position": 1,
"capture": 5,
"items": [
{
"type": "",
"id": "",
"amount": 0
}
],
//台阶的奖励 array[object]
//填写格式:
// type: string
// id: string
// amount: int
//奖励类型(6.0.0):
// character: 搭档,id格式为CharacterID
// world_song: 世界解锁类型的曲目/难度,id格式为SongID(曲目) / SongID+ratingClass(难度)
// single: 单曲,id格式为SongID
// fragment: 残片
// memory: 记忆源点
// core: 核心,id格式为CoreID
// pack: 曲包,id格式为PackID
// world_unlock: 世界解锁相关奖励,目前只有背景
"restrict_type": ""
//限制游玩的类型 string
//填写格式:
// song_id: 限制游玩曲目
// pack_id: 限制游玩曲包
"restrict_id": "",
//限制游玩指定的曲目/曲包 string
//填写格式:SongID/PackID
"restrict_ids": [
],
//限制游玩指定的多首曲目 array[string]
//填写格式:[SongID]
//restrict_type为pack_id时无效果
"restrict_difficulty": 0,
//限制游玩指定难度 int
//填写格式:ratingClass
"step_type": [
],
//台阶的类型 array[string]
//台阶类型(6.0.0):
// randomsong: 随机曲目台阶
// speedlimit: 限速台阶
// plusstamina: 体力奖励台阶
// wall_nell: 假哀寂地图的灰色台阶
// wall_impossible: 假哀寂地图的破裂灰色台阶
// special_lament_rain: 假哀寂地图的Lament Rain异象台阶
"speed_limit_value": 0,
//限速台阶限制的最大流速 int
//填写格式:对应流速x10后的数字
//仅当step_type中存在speedlimit时有效
"plus_stamina_value": 0,
//体力奖励台阶奖励的体力数量 int
//仅当step_type中存在plusstamina时有效
},
//下列台阶为奖励总览
{
"position": 2,
"capture": 5,
"items": [
{
"type": "character"
"id": "0"
//搭档奖励
//id: CharacterID
}
]
},
{
"position": 3,
"capture": 5,
"items": [
{
"type": "world_song",
"id": "shadesoflight"
//世界解锁类型的曲目/难度奖励
//id: SongID(曲目) / SongID+ratingClass(难度)
}
]
},
{
"position": 4,
"capture": 5,
"items": [
{
"type": "single",
"id": "auxesia"
//单曲奖励
//id: SongID
}
]
},
{
"position": 5,
"capture": 5,
"items": [
{
"type": "fragment",
"amount": 616
//残片
}
]
},
{
"position": 6,
"capture": 5,
"items": [
{
"type": "memory",
"amount": 616
//记忆源点
//616没用过,但存在
}
]
},
{
"position": 7,
"capture": 5,
"items": [
{
"type": "core",
"id": "core_generic",
"amount": 1
//核心奖励
//id: CoreID
//核心种类(5.2.6):
// core_generic: 以太之滴 Ether Drop
// core_hollow: 中空核心 Hollow Core
// core_desolate: 荒芜核心 Desolate Core
// core_chunithm: CHUNITHM 核心 CHUNITHM Core
// core_crimson: 深红核心 Crimson Core
// core_ambivalent: 悖异核心 Ambivalent Core
// core_scarlet: 绯红核心 Scarlet Core
// core_groove: 音炫核心 Groove Core
// core_binary: 双生核心 Binary Core
// core_colorful: 缤纷核心 Colorful Core
// core_course_skip_purchase: 次元结晶 Warped Shard
// core_umbral: 暗影核心 Umbral Core
// core_sunset: 暮色核心 Sunset Core
}
]
},
{
"position": 8,
"capture": 5,
"items": [
{
"type": "pack",
"id": "base"
//曲包奖励
//id: PackID
//NS端专属,在移动端也存在,但使用移动端显示时会崩溃
}
]
},
{
"position": 9,
"capture": 5,
"items": [
{
"type": "world_unlock",
"id": "scenery_chap1"
//世界解锁相关奖励
//于3.0.0新增
//章节背景(4.4.4):
// scenery_chap1: 失落的世界 Lost World
// scenery_chap2: 谜域的界外 Outer Reaches
// scenery_chap3: 聚合的塔尖 Spire of Convergence
// scenery_chap4: 沉眠的回声 Dormant Echoes
// scenery_chap5: 无央的决裂 Boundless Divide
// scenery_chap6: 遗忘的构念 Forgotten Construct
// scenery_chap7: 回首的天际 Horizon of Anamnesis
// scenery_beyond: Beyond
}
]
},
{
"position": 10,
"capture": 5,
"items": [
{
"type": "anni5tix",
"amount": 1
//五周年兑换券奖励
//于3.12.2新增
}
]
},
//下列台阶为限制条件总览
{
"position": 11,
"capture": 5,
"restrict_id": "shadesoflight",
"restrict_type": "song_id"
//限制游玩指定曲目
//restrict_id: SongID
},
{
"position": 12,
"capture": 5,
"restrict_ids": [
"shadesoflight",
"sayonarahatsukoi"
],
"restrict_type": "song_id"
//限制游玩指定的多首曲目
//restrict_ids: [SongID]
},
{
"position": 13,
"capture": 5,
"restrict_id": "base",
"restrict_type": "pack_id"
//限制游玩指定曲包
//restrict_id: PackID
},
{
"position": 14,
"capture": 5,
"restrict_difficulty": 2
//限制游玩指定难度
//restrict_difficulty: ratingClass
//于3.10.0新增
},
//下列台阶为各台阶类型总览
{
"position": 15,
"capture": 5,
"step_type": [
"randomsong"
]
//随机曲目
},
{
"position": 16,
"capture": 5,
"step_type": [
"speedlimit"
],
"speed_limit_value": 65
//流速限制
//speed_limit_value: 对应流速x10
},
{
"position": 17,
"capture": 5,
"step_type": [
"plusstamina"
],
"plus_stamina_value": 12
//体力奖励
//plus_stamina_value: 体力数量
},
{
"position": 18,
"capture": 5,
"step_type": [
"wall_nell"
]
//假哀寂地图的灰色台阶
},
{
"position": 19,
"capture": 5,
"step_type": [
"wall_impossible"
]
//假哀寂地图的破裂灰色台阶
},
{
"position": 20,
"capture": 5,
"step_type": [
"special_lament_rain"
]
//假哀寂地图的Lament Rain异象台阶
},
//下列台阶为一些特殊的台阶示例
{
"position": 21,
"capture": 5,
"items": [
{
"type": "fragment",
"amount": 616
},
{
"type": "memory",
"amount": 616
}
]
//设置多个奖励
//在游戏内显示时,只会显示第一个奖励
},
{
"position": 22,
"capture": 5,
"restrict_id": "base",
"restrict_type": "pack_id",
"step_type": [
"randomsong"
]
//限制曲包 + 随机曲目
},
{
"position": 23,
"capture": 5,
"restrict_ids": [
"tempestissimo",
"testify"
],
"restrict_type": "song_id",
"step_type": [
"randomsong",
"plusstamina",
"speedlimit"
],
"restrict_difficulty": 3,
"plus_stamina_value": 2,
"speed_limit_value": 25,
"items": [
{
"type": "fragment",
"amount": 2000
}
]
//限制曲目 + 限制难度 + 随机曲目 + 体力奖励 + 流速限制 + 残片奖励
},
{
"position": 24,
"capture": 0,
"items": [
{
"type": "core",
"id": "core_generic",
"amount": 5
//最后一格必须设置至少一个奖励
}
]
}
]
}
Beyond地圖的台階排列與普通地圖不同:
{
"map_id": "example",
"is_beyond": true,
"beyond_health": 150,
"character_affinity": [
0,
1
],
"affinity_multiplier": [
1.0,
1.5
],
"chapter": 1001,
"available_from": -1,
"available_to": -1,
"require_id": "shadesoflight2",
"require_type": "chart_unlock",
"coordinate": "0,0",
"step_count": 5,
"stamina_cost": 3,
"curr_position": 0,
"curr_capture": 0,
"is_locked": false,
"steps": [
{
//配置台阶时,请从下至上进行配置
"position": 0,
//台阶最低点,用于标记开头
"capture": 50
//确保全部capture的值相加起来等于beyond_health的值
},
{
"position": 1,
"capture": 25,
"items": [
{
"type": "fragment",
"amount": 616
}
]
//剩余点的计算原理与二点相同
},
{
"position": 2,
//二点
"capture": 25,
//以一点得出的百分比为被减数,capture的值为减数,相减后的差为本点百分比
//一点从100%开始,与capture的值相减后得到结果75,则本点从75%开始
"items": [
{
"type": "core",
"id": "core_generic",
"amount": 1
}
]
//奖励只会在到达本点时领取
},
{
"position": 3,
//一点
"capture": 50,
//以beyond_health的值为被减数,capture的值为减数,相减后的差为本点百分比
//此地图的beyond_health为150,与capture的值相减后得到结果100,则本点从100%开始
"restrict_id": "shadesoflight",
"restrict_type": "song_id"
//限制条件会在到达下一点前一直有效
},
{
"position": 4,
//地图最高点,用于标记奖励
"capture": 0,
//确保capture为0
"items": [
{
"type": "world_song",
"id": "shadesoflight3"
}
]
}
]
}
Breached地圖的台階排列與普通地圖不同:
{
"map_id": "example",
"is_beyond": true,
"beyond_health": 200,
"character_affinity": [
],
"affinity_multiplier": [
],
"is_breached": true,
"disable_over": true,
"new_law": "over100_step50",
"chapter": 2001,
"available_from": -1,
"available_to": -1,
"require_type": "chart_unlock",
"require_id": "inkarusi2",
"coordinate": "0,0",
"step_count": 6,
"stamina_cost": 3,
"curr_position": 0,
"curr_capture": 0,
"is_locked": false,
"steps": [
// 打印出每个点百分比的Python代码示例:
// current_health = 0
// steps = [dict, ...] # 即为地图的steps
// for step in steps:
// current_health += step['capture']
// print(f"Position {step['position']}: {current_health}%")
{
"position": 0,
//一点
"capture": 50
//以下一点的百分比为被减数,此点的百分比为减数,相减后的差则为capture的值
//因为此点为地图的起始点,所以此点百分比固定为0%,已知下一点的百分比为50%,50 - 0 = 50
},
{
"position": 1
//二点
"capture": 50,
//以此点的百分比为减数,下一点的百分比为被减数,相减后的差则为capture的值
//已知此点的capture为50%,下一点的百分比为100%,100 - 50 = 50
"items": [
{
"type": "core",
"id": "core_generic",
"amount": 2
}
]
//奖励只会在本点开始时领取
},
{
"position": 2,
//三点
"capture": 50,
//以此点的百分比为减数,下一点的百分比为被减数,相减后的差则为capture的值
//已知此点的capture为150%,下一点的百分比为100%,150 - 100 = 50
"items": [
{
"type": "fragment",
"amount": 500
}
],
"restrict_ids": [
"memoryfactory",
"lumia",
"pragmatism",
"paradise",
"flashback",
"flyburg",
"partyvinyl",
"nirvluce",
"blossoms",
"romancewars",
"moonheart",
"syro",
"nexttoyou",
"memoryforest",
"guardina",
"inkarusi",
"mazenine",
"themessage",
"sulfur",
"etherstrike",
"fractureray",
"solitarydream"
],
"restrict_type": "song_id",
"restrict_difficulty": 2
//限制条件会在到达下一点前一直有效
},
{
"position": 4,
//四点
"capture": 50
//以此点的百分比为减数,下一点的百分比为被减数,相减后的差则为capture的值
//已知此点的capture为200%,下一点的百分比为150%,200 - 150 = 50
"items": [
{
"type": "core",
"id": "core_generic",
"amount": 2
}
],
"restrict_ids": [
"memoryfactory",
"lumia",
"pragmatism",
"paradise",
"flashback",
"flyburg",
"partyvinyl",
"nirvluce",
"blossoms",
"romancewars",
"moonheart",
"syro",
"nexttoyou",
"memoryforest",
"guardina",
"inkarusi",
"mazenine",
"themessage",
"sulfur",
"etherstrike",
"fractureray",
"solitarydream"
],
"restrict_type": "song_id",
"restrict_difficulty": 2
},
{
"position": 5,
//终点,用于标记奖励
"capture": 0,
//capture必须为0
"items": [
{
"type": "world_song",
"id": "inkarusi3"
}
]
}
]
}