| 
 
| 赞 | 36 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 96 |  
| 经验 | 0 |  
| 最后登录 | 2025-10-26 |  
| 在线时间 | 462 小时 |  
 Lv4.逐梦者 
	梦石2 星屑7638 在线时间462 小时注册时间2021-12-4帖子492 
 | 
| 对话日志啊……核心思路是在command101(对话指令)里把401(至多四行对话正文)的内容存起来(还要注意上限),然后再通过另一个公共事件显示出来。 不过mv的对话指令不能指定说话人的名字(如果专门用一行来写就只能再写三行正文了),日志里看不到脸图的话可能会比较迷茫。
 
 复制代码// Show Text,位于rpg_objects.js第9060行
Game_Interpreter.prototype.command101 = function() {
    if (!$gameMessage.isBusy()) {
        $gameMessage.setFaceImage(this._params[0], this._params[1]);
        $gameMessage.setBackground(this._params[2]);
        $gameMessage.setPositionType(this._params[3]);
        while (this.nextEventCode() === 401) {  // Text data
            this._index++;
            ($gameTemp.backLog || ($gameTemp.backLog = [])).unshift(this.currentCommand().parameters[0]); // 本行为新增内容
            $gameMessage.add(this.currentCommand().parameters[0]);
        }
        switch (this.nextEventCode()) {
        case 102:  // Show Choices
            this._index++;
            this.setupChoices(this.currentCommand().parameters);
            break;
        case 103:  // Input Number
            this._index++;
            this.setupNumInput(this.currentCommand().parameters);
            break;
        case 104:  // Select Item
            this._index++;
            this.setupItemChoice(this.currentCommand().parameters);
            break;
        }
        this._index++;
        this.setWaitMode('message');
    }
    return false;
};
比如上面的代码会将所有最近对话的正文【逆序记录】在$gameTemp.backLog数组中,然后你可以在任何公共事件里用循环来显示这个数组的前多少项,并且这个数组不会进入存档因此不用担心记录太多存不下。
 | 
 |