| 赞 | 300 |
| VIP | |
| 好人卡 | |
| 积分 | 242 |
| 经验 | |
| 最后登录 | 2026-10-5 |
| 在线时间 | 9564 小时 |
- 梦石
- 1
- 星屑
- 23246
- 在线时间
- 9564 小时
- 注册时间
- 2012-6-19
- 回帖
- 7018
 
|
发表于 2015-10-1 15:13:33
|
显示全部楼层
本帖最后由 喵呜喵5 于 2015-10-1 17:21 编辑
- $gameParty.gainGold(65535)
复制代码 无比炸裂的加钱代码果然有效……防作弊迫在眉睫
不止Yanfly,Yami、Galenmerth、Neonblack等国外比较有名的脚本都有出现,并且它们写的脚本将作为首波DLC公开
======================
RMVA有的RMMV都有,不如说RMMV的脚本简直就是RMVA脚本的JS化,看着非常眼熟
相比RMVA功能上有变动的地方:
使用 TouchInput.isTriggered() / TouchInput.isPressed() 响应点击事件
Manager
Cache 改名为 ImageManager,然而实际上做的还是Cache的事,图片素材上只增加了SvActor和SvEnemy这两个用在SideView模式的素材文件夹
Vocab 改名为 TextManager,各种改名Manager等,Audio也分出来作为Manager了……
插件脚本作为新节点贴在body上- PluginManager.loadScript = function(name) {
- var url = this._path + name;
- var script = document.createElement('script');
- script.type = 'text/javascript';
- script.src = url;
- script.async = false;
- script.onerror = this.onError.bind(this);
- script._url = url;
- document.body.appendChild(script)
- };
复制代码
Scene
初始界面为Scene_Boot,负责加载并检查资源是否全部加载完毕
SceneManager.run(Scene_Boot);
SceneManager.call 由 push 代替,return由pop代替,goto仍然不变- SceneManager.pop()
- SceneManager.goto(Scene_Gameover)
- SceneManager.push(Scene_Save)
复制代码 存读档界面布局调整
……………………囧- this._rangeWindow.setHandler('cancel', this.popScene.bind(this));
复制代码
Game
某种程度的中文支持?还是说要出官方中文版了?
[pre lang="javascript"]Game_System.prototype.isChinese = function() {
return $dataSystem.locale.match(/^zh/)
};[/pre]
Game_Character支持寻路了,算法为A*,没有使用二叉堆等进行优化,因此为了提高效率默认设置了寻路的限制,突破限制时停止寻路,但是可以去除[pre lang="javascript"]Game_Character.prototype.findDirectionTo = function(goalX, goalY) {
var searchLimit = this.searchLimit();
var mapWidth = $gameMap.width();
var nodeList = [];
var openList = [];
var closedList = [];
var start = {};
var best = start;
if (this.x === goalX && this.y === goalY) {
return 0
}
start.parent = null;
start.x = this.x;
start.y = this.y;
start.g = 0;
start.f = $gameMap.distance(start.x, start.y, goalX, goalY);
nodeList.push(start);
openList.push(start.y * mapWidth + start.x);
while (nodeList.length > 0) {
var bestIndex = 0;
for (var i = 0; i < nodeList.length; i++) {
if (nodeList.f < nodeList[bestIndex].f) {
bestIndex = i
}
}
var current = nodeList[bestIndex];
var x1 = current.x;
var y1 = current.y;
var pos1 = y1 * mapWidth + x1;
var g1 = current.g;
nodeList.splice(bestIndex, 1);
openList.splice(openList.indexOf(pos1), 1);
closedList.push(pos1);
if (current.x === goalX && current.y === goalY) {
best = current;
goaled = true;
break
}
if (g1 >= searchLimit) {
continue
}
for (var j = 0; j < 4; j++) {
var direction = 2 + j * 2;
var x2 = $gameMap.roundXWithDirection(x1, direction);
var y2 = $gameMap.roundYWithDirection(y1, direction);
var pos2 = y2 * mapWidth + x2;
if (closedList.contains(pos2)) {
continue
}
if (!this.canPass(x1, y1, direction)) {
continue
}
var g2 = g1 + 1;
var index2 = openList.indexOf(pos2);
if (index2 < 0 || g2 < nodeList[index2].g) {
var neighbor;
if (index2 >= 0) {
neighbor = nodeList[index2]
} else {
neighbor = {};
nodeList.push(neighbor);
openList.push(pos2)
}
neighbor.parent = current;
neighbor.x = x2;
neighbor.y = y2;
neighbor.g = g2;
neighbor.f = g2 + $gameMap.distance(x2, y2, goalX, goalY);
if (!best || neighbor.f - neighbor.g < best.f - best.g) {
best = neighbor
}
}
}
}
var node = best;
while (node.parent && node.parent !== start) {
node = node.parent
}
var deltaX1 = $gameMap.deltaX(node.x, start.x);
var deltaY1 = $gameMap.deltaY(node.y, start.y);
if (deltaY1 > 0) {
return 2
} else if (deltaX1 < 0) {
return 4
} else if (deltaX1 > 0) {
return 6
} else if (deltaY1 < 0) {
return 8
}
var deltaX2 = this.deltaXFrom(goalX);
var deltaY2 = this.deltaYFrom(goalY);
if (Math.abs(deltaX2) > Math.abs(deltaY2)) {
return deltaX2 > 0 ? 4 : 6
} else if (deltaY2 !== 0) {
return deltaY2 > 0 ? 8 : 2
}
return 0
};
Game_Character.prototype.searchLimit = function() {
return 12
};[/pre]视频格式可以使用webm和mp4了(需设备支持)
[pre lang="javascript"]Game_Interpreter.prototype.videoFileExt = function() {
if (Graphics.canPlayVideoType('video/webm') && !Utils.isMobileDevice()) {
return '.webm'
} else {
return '.mp4'
}
};[/pre]
可以通过事件指令直接获取玩家的战斗胜利和逃跑次数了
用来扩展事件指令功能增加任意个新指令的?
[pre lang="javascript"]Game_Interpreter.prototype.command356 = function() {
var args = this._params[0].split(" ");
var command = args.shift();
this.pluginCommand(command, args);
return true
};
Game_Interpreter.prototype.pluginCommand = function(command, args) {};[/pre]
……
读累了,之后再去看还没读的Window代码吧 |
评分
-
查看全部评分
|