赞 | 3 |
VIP | 21 |
好人卡 | 10 |
积分 | 2 |
经验 | 32573 |
最后登录 | 2024-6-13 |
在线时间 | 332 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 155
- 在线时间
- 332 小时
- 注册时间
- 2013-7-6
- 帖子
- 356
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 wolves 于 2017-5-12 18:09 编辑
接触mv发现这方面文档挺少的,诸如事件场景等等基础运行结构f1里面几乎没有- -
所以准备在这里挖坑往里填。
首先挖的是rpg_core.js,F1中没提到几个细节
Number类
对象方法:
方法名:
clamp(min, max);
功能:返回min,max,对象三者中居中的数字
用法:(new Number(4)).clamp(5,6);//返回5
方法名:
mod(n);
功能:返回对象除以n的余数的数值
用法:(new Number(4)).mod(3);//返回1
方法名:
padZero(length);
功能:见String同名对象方法,返回字符串。
用法:(new Number(4)).padZero(3);//返回"004"
String类
对象方法:
方法名:
format(...);
功能:将参数按/%([0-9]+)/g正则匹配的数字顺序逐个嵌入到对象字符串中并返回这个字符串。
用法:"%1呵呵%2呵呵%3".format(3,5,4);//返回"3呵呵5呵呵4"
方法名:
padZero(length);
功能:对于不足length位的对象字符串在其前面补0直至补够length位,然后返回补0后的字符串。
用法:"4".padZero(3);//返回"004"
Array类
对象方法:
方法名:
equals(array);
功能:判断对象数组与array是否相等,相等返回true,否则返回false
用法:[].equals([]);//返回true
方法名:
clone();
功能:复制对象数组为新数组并返回新数组
用法:var n = [1,2,3].clone();
方法名:
contains(element);
功能:判断对象数组是否包含element元素,包含返回true,否则返回false
用法:[1,2,3].contains(1);//返回true
Math类
类方法:
方法名:
Math.randomInt(num);
功能:返回一个0~num之间的任意整数。
用法:Math.randomInt(50);//返回0~49间随机数(没有50)
之后是rpg_managers.js
这个文件定义了一些全局变量:
var $dataActors = null; var $dataClasses = null; var $dataSkills = null; var $dataItems = null; var $dataWeapons = null; var $dataArmors = null; var $dataEnemies = null; var $dataTroops = null; var $dataStates = null; var $dataAnimations = null; var $dataTilesets = null; var $dataCommonEvents = null; var $dataSystem = null; var $dataMapInfos = null; var $dataMap = null; var $gameTemp = null; var $gameSystem = null; var $gameScreen = null; var $gameTimer = null; var $gameMessage = null; var $gameSwitches = null; var $gameVariables = null; var $gameSelfSwitches = null; var $gameActors = null; var $gameParty = null; var $gameTroop = null; var $gameMap = null; var $gamePlayer = null; var $testEvent = null;
var $dataActors = null;
var $dataClasses = null;
var $dataSkills = null;
var $dataItems = null;
var $dataWeapons = null;
var $dataArmors = null;
var $dataEnemies = null;
var $dataTroops = null;
var $dataStates = null;
var $dataAnimations = null;
var $dataTilesets = null;
var $dataCommonEvents = null;
var $dataSystem = null;
var $dataMapInfos = null;
var $dataMap = null;
var $gameTemp = null;
var $gameSystem = null;
var $gameScreen = null;
var $gameTimer = null;
var $gameMessage = null;
var $gameSwitches = null;
var $gameVariables = null;
var $gameSelfSwitches = null;
var $gameActors = null;
var $gameParty = null;
var $gameTroop = null;
var $gameMap = null;
var $gamePlayer = null;
var $testEvent = null;
这个是加载数据库的内容:
DataManager._databaseFiles = [ { name: '$dataActors', src: 'Actors.json' }, { name: '$dataClasses', src: 'Classes.json' }, { name: '$dataSkills', src: 'Skills.json' }, { name: '$dataItems', src: 'Items.json' }, { name: '$dataWeapons', src: 'Weapons.json' }, { name: '$dataArmors', src: 'Armors.json' }, { name: '$dataEnemies', src: 'Enemies.json' }, { name: '$dataTroops', src: 'Troops.json' }, { name: '$dataStates', src: 'States.json' }, { name: '$dataAnimations', src: 'Animations.json' }, { name: '$dataTilesets', src: 'Tilesets.json' }, { name: '$dataCommonEvents', src: 'CommonEvents.json' }, { name: '$dataSystem', src: 'System.json' }, { name: '$dataMapInfos', src: 'MapInfos.json' } ];
DataManager._databaseFiles = [
{ name: '$dataActors', src: 'Actors.json' },
{ name: '$dataClasses', src: 'Classes.json' },
{ name: '$dataSkills', src: 'Skills.json' },
{ name: '$dataItems', src: 'Items.json' },
{ name: '$dataWeapons', src: 'Weapons.json' },
{ name: '$dataArmors', src: 'Armors.json' },
{ name: '$dataEnemies', src: 'Enemies.json' },
{ name: '$dataTroops', src: 'Troops.json' },
{ name: '$dataStates', src: 'States.json' },
{ name: '$dataAnimations', src: 'Animations.json' },
{ name: '$dataTilesets', src: 'Tilesets.json' },
{ name: '$dataCommonEvents', src: 'CommonEvents.json' },
{ name: '$dataSystem', src: 'System.json' },
{ name: '$dataMapInfos', src: 'MapInfos.json' }
];
赋值以后是这样(假设上述所有全局变量都是一个大json的key,对json适当的进行了精简,方便参阅):
{
"$dataActors":[
null,
{
"id": 1,
"battlerName": "Actor1_7",
"characterIndex": 6,
"characterName": "Actor1",
"classId": 1,
"equips": [1,1,2,3,0],
"faceIndex": 6,
"faceName": "Actor1",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "哈罗尔德",
"nickname": "",
"note": "",
"profile": ""
}
],
"$dataClasses":[
null,
{
"id": 1,
"expParams": [30,20,30,30],
"traits": [
{
"code": 23,
"dataId": 0,
"value": 1
},
{
"code": 22,
"dataId": 0,
"value": 0.95
}
],
"learnings": [
{
"level": 1,
"note": "",
"skillId": 8
},
{
"level": 1,
"note": "",
"skillId": 10
}
],
"name": "勇者",
"note": "",
"params": [[1,450],[0,90],[1,16],[0,16],[0,16],[0,16],[0,32],[0,32]]
}
],
"$dataSkills":[
null,
{
"id": 1,
"animationId": -1,
"damage": {
"critical": true,
"elementId": -1,
"formula": "a.atk * 4 - b.def * 2",
"type": 1,
"variance": 20
},
"description": "",
"effects": [
{
"code": 21,
"dataId": 0,
"value1": 1,
"value2": 0
}
],
"hitType": 1,
"iconIndex": 76,
"message1": "的攻击!",
"message2": "",
"mpCost": 0,
"name": "攻击",
"note": "当选择[攻击]指令时,\n将使用1号技能。",
"occasion": 1,
"repeats": 1,
"requiredWtypeId1": 0,
"requiredWtypeId2": 0,
"scope": 1,
"speed": 0,
"stypeId": 0,
"successRate": 100,
"tpCost": 0,
"tpGain": 10
}
],
"$dataItems":[
null,
{
"id": 1,
"animationId": 41,
"consumable": true,
"damage": {
"critical": false,
"elementId": 0,
"formula": "0",
"type": 0,
"variance": 20
},
"description": "",
"effects": [
{
"code": 11,
"dataId": 0,
"value1": 0,
"value2": 500
}
],
"hitType": 0,
"iconIndex": 176,
"itypeId": 1,
"name": "恢复药水",
"note": "",
"occasion": 0,
"price": 50,
"repeats": 1,
"scope": 7,
"speed": 0,
"successRate": 100,
"tpGain": 0
}
],
"$dataWeapons":[
null,
{
"id": 1,
"animationId": 6,
"description": "",
"etypeId": 1,
"traits": [
{
"code": 31,
"dataId": 1,
"value": 0
},
{
"code": 22,
"dataId": 0,
"value": 0
}
],
"iconIndex": 97,
"name": "剑",
"note": "",
"params": [0,0,10,0,0,0,0,0],
"price": 500,
"wtypeId": 2
}
],
"$dataArmors":[
null,
{
"id": 1,
"atypeId": 5,
"description": "",
"etypeId": 2,
"traits": [
{
"code": 22,
"dataId": 1,
"value": 0
}
],
"iconIndex": 128,
"name": "盾",
"note": "",
"params": [0,0,0,10,0,0,0,0],
"price": 300
}
],
"$dataEnemies":[
null,
{
"id": 1,
"actions": [
{
"conditionParam1": 0,
"conditionParam2": 0,
"conditionType": 0,
"rating": 5,
"skillId": 1
}
],
"battlerHue": 0,
"battlerName": "Bat",
"dropItems": [
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
}
],
"exp": 0,
"traits": [
{
"code": 22,
"dataId": 0,
"value": 0.95
},
{
"code": 22,
"dataId": 1,
"value": 0.05
},
{
"code": 31,
"dataId": 1,
"value": 0
}
],
"gold": 0,
"name": "蝙蝠",
"note": "",
"params": [200,0,30,30,30,30,30,30]
}
],
"$dataTroops":[
null,
{
"id": 1,
"members": [
{
"enemyId": 1,
"x": 336,
"y": 436,
"hidden": false
},
{
"enemyId": 1,
"x": 480,
"y": 436,
"hidden": false
}
],
"name": "蝙蝠*2",
"pages": [
{
"conditions": {
"actorHp": 50,
"actorId": 1,
"actorValid": false,
"enemyHp": 50,
"enemyIndex": 0,
"enemyValid": false,
"switchId": 1,
"switchValid": false,
"turnA": 0,
"turnB": 0,
"turnEnding": false,
"turnValid": false
},
"list": [
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"span": 0
}
]
}
],
"$dataStates":[
null,
{
"id": 1,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"iconIndex": 1,
"maxTurns": 1,
"message1": "倒下了!",
"message2": "倒下了!",
"message3": "",
"message4": "站了起来!",
"minTurns": 1,
"motion": 3,
"name": "战斗不能",
"note": "当HP为0时,\n将会自动附加1号状态。",
"overlay": 0,
"priority": 100,
"releaseByDamage": false,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 4,
"stepsToRemove": 100,
"traits": [
{
"code": 23,
"dataId": 9,
"value": 0
}
]
}
],
"$dataAnimations":[
null,
{
"id": 1,
"animation1Hue": 0,
"animation1Name": "Hit1",
"animation2Hue": 0,
"animation2Name": "",
"frames": [
[],
[
[0,0,0,250,0,0,255,1],
[-1,0,0,0,0,0,0,0],
[-1,0,0,0,0,0,0,0],
[-1,0,0,0,0,0,0,0]
]
],
"name": "打击/物理",
"position": 1,
"timings": [
{
"flashColor": [255,255,255,255],
"flashDuration": 2,
"flashScope": 1,
"frame": 0,
"se": {
"name": "Blow3",
"pan": 0,
"pitch": 100,
"volume": 90
}
}
]
}
],
"$dataTilesets":[
null,
{
"id": 1,
"flags": [
16,
1551,
1551
],
"mode": 0,
"name": "世界地图",
"note": "",
"tilesetNames": [
"World_A1",
"World_A2",
"",
"",
"",
"World_B",
"World_C",
"",
""
]
}
],
"$dataCommonEvents":[
null,
{
"id": 1,
"list": [
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"name": "",
"switchId": 1,
"trigger": 0
}
],
"$dataSystem":{
"airship": {
"bgm": {
"name": "Ship3",
"pan": 0,
"pitch": 100,
"volume": 90
},
"characterIndex": 3,
"characterName": "Vehicle",
"startMapId": 0,
"startX": 0,
"startY": 0
},
"armorTypes": [
"",
"一般防具",
"魔法防具",
"轻装防具",
"重装防具",
"小型盾",
"大型盾"
],
"attackMotions": [
{
"type": 0,
"weaponImageId": 0
}
],
"battleBgm": {
"name": "Battle1",
"pan": 0,
"pitch": 100,
"volume": 90
},
"battleback1Name": "Grassland",
"battleback2Name": "Grassland",
"battlerHue": 0,
"battlerName": "Dragon",
"boat": {
"bgm": {
"name": "Ship1",
"pan": 0,
"pitch": 100,
"volume": 90
},
"characterIndex": 0,
"characterName": "Vehicle",
"startMapId": 0,
"startX": 0,
"startY": 0
},
"currencyUnit": "G",
"defeatMe": {
"name": "Defeat1",
"pan": 0,
"pitch": 100,
"volume": 90
},
"editMapId": 1,
"elements": ["","物理","炎","冰","雷","水","土","风","光","暗"],
"equipTypes": ["","武器","盾","头部","身体","饰品"],
"gameTitle": "Project1",
"gameoverMe": {
"name": "Gameover1",
"pan": 0,
"pitch": 100,
"volume": 90
},
"locale": "en_US",
"magicSkills": [1],
"menuCommands": [true,true,true,true,true,true],
"optDisplayTp": true,
"optDrawTitle": true,
"optExtraExp": false,
"optFloorDeath": false,
"optFollowers": true,
"optSideView": false,
"optSlipDeath": false,
"optTransparent": false,
"partyMembers": [1,2,3,4],
"ship": {
"bgm": {
"name": "Ship2",
"pan": 0,
"pitch": 100,
"volume": 90
},
"characterIndex": 1,
"characterName": "Vehicle",
"startMapId": 0,
"startX": 0,
"startY": 0
},
"skillTypes": ["","魔法","必杀技"],
"sounds": [
{
"name": "Cursor2",
"pan": 0,
"pitch": 100,
"volume": 90
}
],
"startMapId": 1,
"startX": 8,
"startY": 5,
"switches": ["","","","","","","","","","","","","","","","","","","","",""],
"terms": {
"basic": ["等级","Lv","HP","HP","MP","MP","TP","TP","经验值","EXP"],
"commands": ["战斗","逃跑","攻击","防御","道具","技能","装备","状态","队形","保存","游戏结束","选项","武器","防具","关键道具","装备","最强装备","清除","新游戏","继续",null,"回到标题","取消",null,"购买","出售"],
"params": ["最大HP","最大MP","攻击力","防御力","魔法力","魔法防御","敏捷性","幸运","命中率","闪避率"],
"messages": {
"actionFailure": "对%1没有效果!",
"actorDamage": "%1受到了%2点伤害!",
"actorDrain": "%1的%2被夺去了%3!",
"actorGain": "%1的%2增加了%3!",
"actorLoss": "%1的%2减少了%3!",
"actorNoDamage": "%1没有受到伤害!",
"actorNoHit": "未击中!%1没有受到伤害!",
"actorRecovery": "%1的%2恢复了%3!",
"alwaysDash": "始终冲刺",
"bgmVolume": "BGM 音量",
"bgsVolume": "BGS 音量",
"buffAdd": "%1的%2上升了!",
"buffRemove": "%1的%2恢复正常!",
"commandRemember": "指令记忆",
"counterAttack": "%1的反击!",
"criticalToActor": "痛恨的一击!!",
"criticalToEnemy": "会心的一击!!",
"debuffAdd": "%1的%2下降了!",
"defeat": "%1战斗失败了。",
"emerge": "%1出现!",
"enemyDamage": "%1受到了%2点伤害!",
"enemyDrain": "%1的%2被夺走了%3!",
"enemyGain": "%1的%2增长了%3!",
"enemyLoss": "%1的%2减少了%3!",
"enemyNoDamage": "%1没有受到伤害!",
"enemyNoHit": "未击中!%1没有受到伤害!",
"enemyRecovery": "%1的%2恢复了%3!",
"escapeFailure": "然而无法逃跑!",
"escapeStart": "%1开始逃跑!",
"evasion": "%1闪避了攻击!",
"expNext": "到下个%1",
"expTotal": "当前%1",
"file": "文件",
"levelUp": "%1的%2上升了%3!",
"loadMessage": "读取哪个文件?",
"magicEvasion": "%1将魔法消除了!",
"magicReflection": "%1反射了魔法!",
"meVolume": "ME 音量",
"obtainExp": "获得了%1的%2!",
"obtainGold": "金钱入手%1\\G!",
"obtainItem": "入手了%1!",
"obtainSkill": "学会了%1!",
"partyName": "%1的队伍",
"possession": "持有数",
"preemptive": "%1获得了先手!",
"saveMessage": "保存到哪个文件?",
"seVolume": "SE 音量",
"substitute": "%1保护了%2!",
"surprise": "%1被突然袭击!",
"useItem": "%1使用了%2!",
"victory": "%1的胜利!"
}
},
"testBattlers": [
{
"actorId": 1,
"equips": [1,1,2,3,0],
"level": 1
},
{
"actorId": 2,
"equips": [2,1,2,3,0],
"level": 1
},
{
"actorId": 3,
"equips": [3,0,2,3,4],
"level": 1
},
{
"actorId": 4,
"equips": [4,0,2,3,4],
"level": 1
}
],
"testTroopId": 4,
"title1Name": "Castle",
"title2Name": "",
"titleBgm": {
"name": "Theme6",
"pan": 0,
"pitch": 100,
"volume": 90
},
"variables": ["","","","","","","","","","","","","","","","","","","","",""],
"versionId": 24097415,
"victoryMe": {
"name": "Victory1",
"pan": 0,
"pitch": 100,
"volume": 90
},
"weaponTypes": ["","匕首","剑","连枷","斧","鞭","杖","弓","弩","枪","爪","手套","矛"],
"windowTone": [0,0,0,0]
},
"$dataMapInfos":[
null,
{
"id": 1,
"expanded": false,
"name": "MAP001",
"order": 1,
"parentId": 0,
"scrollX": 718.6666666666666,
"scrollY": 406
}
]
}
{
"$dataActors":[
null,
{
"id": 1,
"battlerName": "Actor1_7",
"characterIndex": 6,
"characterName": "Actor1",
"classId": 1,
"equips": [1,1,2,3,0],
"faceIndex": 6,
"faceName": "Actor1",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "哈罗尔德",
"nickname": "",
"note": "",
"profile": ""
}
],
"$dataClasses":[
null,
{
"id": 1,
"expParams": [30,20,30,30],
"traits": [
{
"code": 23,
"dataId": 0,
"value": 1
},
{
"code": 22,
"dataId": 0,
"value": 0.95
}
],
"learnings": [
{
"level": 1,
"note": "",
"skillId": 8
},
{
"level": 1,
"note": "",
"skillId": 10
}
],
"name": "勇者",
"note": "",
"params": [[1,450],[0,90],[1,16],[0,16],[0,16],[0,16],[0,32],[0,32]]
}
],
"$dataSkills":[
null,
{
"id": 1,
"animationId": -1,
"damage": {
"critical": true,
"elementId": -1,
"formula": "a.atk * 4 - b.def * 2",
"type": 1,
"variance": 20
},
"description": "",
"effects": [
{
"code": 21,
"dataId": 0,
"value1": 1,
"value2": 0
}
],
"hitType": 1,
"iconIndex": 76,
"message1": "的攻击!",
"message2": "",
"mpCost": 0,
"name": "攻击",
"note": "当选择[攻击]指令时,\n将使用1号技能。",
"occasion": 1,
"repeats": 1,
"requiredWtypeId1": 0,
"requiredWtypeId2": 0,
"scope": 1,
"speed": 0,
"stypeId": 0,
"successRate": 100,
"tpCost": 0,
"tpGain": 10
}
],
"$dataItems":[
null,
{
"id": 1,
"animationId": 41,
"consumable": true,
"damage": {
"critical": false,
"elementId": 0,
"formula": "0",
"type": 0,
"variance": 20
},
"description": "",
"effects": [
{
"code": 11,
"dataId": 0,
"value1": 0,
"value2": 500
}
],
"hitType": 0,
"iconIndex": 176,
"itypeId": 1,
"name": "恢复药水",
"note": "",
"occasion": 0,
"price": 50,
"repeats": 1,
"scope": 7,
"speed": 0,
"successRate": 100,
"tpGain": 0
}
],
"$dataWeapons":[
null,
{
"id": 1,
"animationId": 6,
"description": "",
"etypeId": 1,
"traits": [
{
"code": 31,
"dataId": 1,
"value": 0
},
{
"code": 22,
"dataId": 0,
"value": 0
}
],
"iconIndex": 97,
"name": "剑",
"note": "",
"params": [0,0,10,0,0,0,0,0],
"price": 500,
"wtypeId": 2
}
],
"$dataArmors":[
null,
{
"id": 1,
"atypeId": 5,
"description": "",
"etypeId": 2,
"traits": [
{
"code": 22,
"dataId": 1,
"value": 0
}
],
"iconIndex": 128,
"name": "盾",
"note": "",
"params": [0,0,0,10,0,0,0,0],
"price": 300
}
],
"$dataEnemies":[
null,
{
"id": 1,
"actions": [
{
"conditionParam1": 0,
"conditionParam2": 0,
"conditionType": 0,
"rating": 5,
"skillId": 1
}
],
"battlerHue": 0,
"battlerName": "Bat",
"dropItems": [
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
},
{
"dataId": 1,
"denominator": 1,
"kind": 0
}
],
"exp": 0,
"traits": [
{
"code": 22,
"dataId": 0,
"value": 0.95
},
{
"code": 22,
"dataId": 1,
"value": 0.05
},
{
"code": 31,
"dataId": 1,
"value": 0
}
],
"gold": 0,
"name": "蝙蝠",
"note": "",
"params": [200,0,30,30,30,30,30,30]
}
],
"$dataTroops":[
null,
{
"id": 1,
"members": [
{
"enemyId": 1,
"x": 336,
"y": 436,
"hidden": false
},
{
"enemyId": 1,
"x": 480,
"y": 436,
"hidden": false
}
],
"name": "蝙蝠*2",
"pages": [
{
"conditions": {
"actorHp": 50,
"actorId": 1,
"actorValid": false,
"enemyHp": 50,
"enemyIndex": 0,
"enemyValid": false,
"switchId": 1,
"switchValid": false,
"turnA": 0,
"turnB": 0,
"turnEnding": false,
"turnValid": false
},
"list": [
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"span": 0
}
]
}
],
"$dataStates":[
null,
{
"id": 1,
"autoRemovalTiming": 0,
"chanceByDamage": 100,
"iconIndex": 1,
"maxTurns": 1,
"message1": "倒下了!",
"message2": "倒下了!",
"message3": "",
"message4": "站了起来!",
"minTurns": 1,
"motion": 3,
"name": "战斗不能",
"note": "当HP为0时,\n将会自动附加1号状态。",
"overlay": 0,
"priority": 100,
"releaseByDamage": false,
"removeAtBattleEnd": false,
"removeByDamage": false,
"removeByRestriction": false,
"removeByWalking": false,
"restriction": 4,
"stepsToRemove": 100,
"traits": [
{
"code": 23,
"dataId": 9,
"value": 0
}
]
}
],
"$dataAnimations":[
null,
{
"id": 1,
"animation1Hue": 0,
"animation1Name": "Hit1",
"animation2Hue": 0,
"animation2Name": "",
"frames": [
[],
[
[0,0,0,250,0,0,255,1],
[-1,0,0,0,0,0,0,0],
[-1,0,0,0,0,0,0,0],
[-1,0,0,0,0,0,0,0]
]
],
"name": "打击/物理",
"position": 1,
"timings": [
{
"flashColor": [255,255,255,255],
"flashDuration": 2,
"flashScope": 1,
"frame": 0,
"se": {
"name": "Blow3",
"pan": 0,
"pitch": 100,
"volume": 90
}
}
]
}
],
"$dataTilesets":[
null,
{
"id": 1,
"flags": [
16,
1551,
1551
],
"mode": 0,
"name": "世界地图",
"note": "",
"tilesetNames": [
"World_A1",
"World_A2",
"",
"",
"",
"World_B",
"World_C",
"",
""
]
}
],
"$dataCommonEvents":[
null,
{
"id": 1,
"list": [
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"name": "",
"switchId": 1,
"trigger": 0
}
],
"$dataSystem":{
"airship": {
"bgm": {
"name": "Ship3",
"pan": 0,
"pitch": 100,
"volume": 90
},
"characterIndex": 3,
"characterName": "Vehicle",
"startMapId": 0,
"startX": 0,
"startY": 0
},
"armorTypes": [
"",
"一般防具",
"魔法防具",
"轻装防具",
"重装防具",
"小型盾",
"大型盾"
],
"attackMotions": [
{
"type": 0,
"weaponImageId": 0
}
],
"battleBgm": {
"name": "Battle1",
"pan": 0,
"pitch": 100,
"volume": 90
},
"battleback1Name": "Grassland",
"battleback2Name": "Grassland",
"battlerHue": 0,
"battlerName": "Dragon",
"boat": {
"bgm": {
"name": "Ship1",
"pan": 0,
"pitch": 100,
"volume": 90
},
"characterIndex": 0,
"characterName": "Vehicle",
"startMapId": 0,
"startX": 0,
"startY": 0
},
"currencyUnit": "G",
"defeatMe": {
"name": "Defeat1",
"pan": 0,
"pitch": 100,
"volume": 90
},
"editMapId": 1,
"elements": ["","物理","炎","冰","雷","水","土","风","光","暗"],
"equipTypes": ["","武器","盾","头部","身体","饰品"],
"gameTitle": "Project1",
"gameoverMe": {
"name": "Gameover1",
"pan": 0,
"pitch": 100,
"volume": 90
},
"locale": "en_US",
"magicSkills": [1],
"menuCommands": [true,true,true,true,true,true],
"optDisplayTp": true,
"optDrawTitle": true,
"optExtraExp": false,
"optFloorDeath": false,
"optFollowers": true,
"optSideView": false,
"optSlipDeath": false,
"optTransparent": false,
"partyMembers": [1,2,3,4],
"ship": {
"bgm": {
"name": "Ship2",
"pan": 0,
"pitch": 100,
"volume": 90
},
"characterIndex": 1,
"characterName": "Vehicle",
"startMapId": 0,
"startX": 0,
"startY": 0
},
"skillTypes": ["","魔法","必杀技"],
"sounds": [
{
"name": "Cursor2",
"pan": 0,
"pitch": 100,
"volume": 90
}
],
"startMapId": 1,
"startX": 8,
"startY": 5,
"switches": ["","","","","","","","","","","","","","","","","","","","",""],
"terms": {
"basic": ["等级","Lv","HP","HP","MP","MP","TP","TP","经验值","EXP"],
"commands": ["战斗","逃跑","攻击","防御","道具","技能","装备","状态","队形","保存","游戏结束","选项","武器","防具","关键道具","装备","最强装备","清除","新游戏","继续",null,"回到标题","取消",null,"购买","出售"],
"params": ["最大HP","最大MP","攻击力","防御力","魔法力","魔法防御","敏捷性","幸运","命中率","闪避率"],
"messages": {
"actionFailure": "对%1没有效果!",
"actorDamage": "%1受到了%2点伤害!",
"actorDrain": "%1的%2被夺去了%3!",
"actorGain": "%1的%2增加了%3!",
"actorLoss": "%1的%2减少了%3!",
"actorNoDamage": "%1没有受到伤害!",
"actorNoHit": "未击中!%1没有受到伤害!",
"actorRecovery": "%1的%2恢复了%3!",
"alwaysDash": "始终冲刺",
"bgmVolume": "BGM 音量",
"bgsVolume": "BGS 音量",
"buffAdd": "%1的%2上升了!",
"buffRemove": "%1的%2恢复正常!",
"commandRemember": "指令记忆",
"counterAttack": "%1的反击!",
"criticalToActor": "痛恨的一击!!",
"criticalToEnemy": "会心的一击!!",
"debuffAdd": "%1的%2下降了!",
"defeat": "%1战斗失败了。",
"emerge": "%1出现!",
"enemyDamage": "%1受到了%2点伤害!",
"enemyDrain": "%1的%2被夺走了%3!",
"enemyGain": "%1的%2增长了%3!",
"enemyLoss": "%1的%2减少了%3!",
"enemyNoDamage": "%1没有受到伤害!",
"enemyNoHit": "未击中!%1没有受到伤害!",
"enemyRecovery": "%1的%2恢复了%3!",
"escapeFailure": "然而无法逃跑!",
"escapeStart": "%1开始逃跑!",
"evasion": "%1闪避了攻击!",
"expNext": "到下个%1",
"expTotal": "当前%1",
"file": "文件",
"levelUp": "%1的%2上升了%3!",
"loadMessage": "读取哪个文件?",
"magicEvasion": "%1将魔法消除了!",
"magicReflection": "%1反射了魔法!",
"meVolume": "ME 音量",
"obtainExp": "获得了%1的%2!",
"obtainGold": "金钱入手%1\\G!",
"obtainItem": "入手了%1!",
"obtainSkill": "学会了%1!",
"partyName": "%1的队伍",
"possession": "持有数",
"preemptive": "%1获得了先手!",
"saveMessage": "保存到哪个文件?",
"seVolume": "SE 音量",
"substitute": "%1保护了%2!",
"surprise": "%1被突然袭击!",
"useItem": "%1使用了%2!",
"victory": "%1的胜利!"
}
},
"testBattlers": [
{
"actorId": 1,
"equips": [1,1,2,3,0],
"level": 1
},
{
"actorId": 2,
"equips": [2,1,2,3,0],
"level": 1
},
{
"actorId": 3,
"equips": [3,0,2,3,4],
"level": 1
},
{
"actorId": 4,
"equips": [4,0,2,3,4],
"level": 1
}
],
"testTroopId": 4,
"title1Name": "Castle",
"title2Name": "",
"titleBgm": {
"name": "Theme6",
"pan": 0,
"pitch": 100,
"volume": 90
},
"variables": ["","","","","","","","","","","","","","","","","","","","",""],
"versionId": 24097415,
"victoryMe": {
"name": "Victory1",
"pan": 0,
"pitch": 100,
"volume": 90
},
"weaponTypes": ["","匕首","剑","连枷","斧","鞭","杖","弓","弩","枪","爪","手套","矛"],
"windowTone": [0,0,0,0]
},
"$dataMapInfos":[
null,
{
"id": 1,
"expanded": false,
"name": "MAP001",
"order": 1,
"parentId": 0,
"scrollX": 718.6666666666666,
"scrollY": 406
}
]
}
推荐把json复制后粘贴到json在线解析下方便折叠查看=v=
之后DataManager.loadMapData会把$dataMap赋值为MapXXX.json的内容。其中data是地图图块的数组,每个数字都是tilemap图块的id。我数了一下我的大概有1326个数字,也就是17列*26行*3层。按从左往右,从上到下,从底层到高层的顺序排列(为神马不用数组分开- -)。运行时可以通过$dataMap.data来更改
{
"autoplayBgm": false,
"autoplayBgs": false,
"battleback1Name": "",
"battleback2Name": "",
"bgm": {
"name": "",
"pan": 0,
"pitch": 100,
"volume": 90
},
"bgs": {
"name": "",
"pan": 0,
"pitch": 100,
"volume": 90
},
"disableDashing": false,
"displayName": "",
"encounterList": [],
"encounterStep": 30,
"height": 13,
"note": "",
"parallaxLoopX": false,
"parallaxLoopY": false,
"parallaxName": "",
"parallaxShow": true,
"parallaxSx": 0,
"parallaxSy": 0,
"scrollType": 0,
"specifyBattleback": false,
"tilesetId": 1,
"width": 17,
"data": [2816,2816,2816,0,0,0],
"events": [
null,
{
"id": 1,
"name": "EV001",
"note": "",
"pages": [
{
"conditions": {
"actorId": 1,
"actorValid": false,
"itemId": 1,
"itemValid": false,
"selfSwitchCh": "A",
"selfSwitchValid": false,
"switch1Id": 1,
"switch1Valid": false,
"switch2Id": 1,
"switch2Valid": false,
"variableId": 1,
"variableValid": false,
"variableValue": 0
},
"directionFix": false,
"image": {
"characterIndex": 0,
"characterName": "",
"direction": 2,
"pattern": 0,
"tileId": 0
},
"list": [
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"moveFrequency": 3,
"moveRoute": {
"list": [
{
"code": 0,
"parameters": []
}
],
"repeat": true,
"skippable": false,
"wait": false
},
"moveSpeed": 3,
"moveType": 0,
"priorityType": 0,
"stepAnime": false,
"through": false,
"trigger": 0,
"walkAnime": true
}
],
"x": 8,
"y": 6
},
null
]
}
{
"autoplayBgm": false,
"autoplayBgs": false,
"battleback1Name": "",
"battleback2Name": "",
"bgm": {
"name": "",
"pan": 0,
"pitch": 100,
"volume": 90
},
"bgs": {
"name": "",
"pan": 0,
"pitch": 100,
"volume": 90
},
"disableDashing": false,
"displayName": "",
"encounterList": [],
"encounterStep": 30,
"height": 13,
"note": "",
"parallaxLoopX": false,
"parallaxLoopY": false,
"parallaxName": "",
"parallaxShow": true,
"parallaxSx": 0,
"parallaxSy": 0,
"scrollType": 0,
"specifyBattleback": false,
"tilesetId": 1,
"width": 17,
"data": [2816,2816,2816,0,0,0],
"events": [
null,
{
"id": 1,
"name": "EV001",
"note": "",
"pages": [
{
"conditions": {
"actorId": 1,
"actorValid": false,
"itemId": 1,
"itemValid": false,
"selfSwitchCh": "A",
"selfSwitchValid": false,
"switch1Id": 1,
"switch1Valid": false,
"switch2Id": 1,
"switch2Valid": false,
"variableId": 1,
"variableValid": false,
"variableValue": 0
},
"directionFix": false,
"image": {
"characterIndex": 0,
"characterName": "",
"direction": 2,
"pattern": 0,
"tileId": 0
},
"list": [
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"moveFrequency": 3,
"moveRoute": {
"list": [
{
"code": 0,
"parameters": []
}
],
"repeat": true,
"skippable": false,
"wait": false
},
"moveSpeed": 3,
"moveType": 0,
"priorityType": 0,
"stepAnime": false,
"through": false,
"trigger": 0,
"walkAnime": true
}
],
"x": 8,
"y": 6
},
null
]
}
|
|