赞 | 32 |
VIP | 0 |
好人卡 | 0 |
积分 | 56 |
经验 | 0 |
最后登录 | 2024-5-21 |
在线时间 | 411 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 5637
- 在线时间
- 411 小时
- 注册时间
- 2021-12-4
- 帖子
- 447
|
https://rpg.blue/forum.php?mod=r ... amp;fromuid=2731820
可以参考我之前给别人的回答,他是通关后改变标题画面背景图片。
(function() {
ConfigManager.makeData = function() {
const config = {};
config.alwaysDash = this.alwaysDash;
config.commandRemember = this.commandRemember;
config.touchUI = this.touchUI;
config.bgmVolume = this.bgmVolume;
config.bgsVolume = this.bgsVolume;
config.meVolume = this.meVolume;
config.seVolume = this.seVolume;
config.newGamePlus = this.newGamePlus; // 本行为新增内容,表示是否已通关一周目
return config;
};
ConfigManager.applyData = function(config) {
this.alwaysDash = this.readFlag(config, "alwaysDash", false);
this.commandRemember = this.readFlag(config, "commandRemember", false);
this.touchUI = this.readFlag(config, "touchUI", true);
this.bgmVolume = this.readVolume(config, "bgmVolume");
this.bgsVolume = this.readVolume(config, "bgsVolume");
this.meVolume = this.readVolume(config, "meVolume");
this.seVolume = this.readVolume(config, "seVolume");
this.newGamePlus = this.readFlag(config, 'newGamePlus'); // 本行为新增内容,表示是否已通关一周目
};
Scene_Title.prototype.playTitleMusic = function() {
if (ConfigManager.newGamePlus) {
$dataSystem.titleBgm = {"name":"Theme4","pan":0,"pitch":100,"volume":90};
} // 以上为新增内容,Theme4为通关后的音乐
AudioManager.playBgm($dataSystem.titleBgm);
AudioManager.stopBgs();
AudioManager.stopMe();
}
})();
然后,在通关事件里,使用如下两行脚本:
ConfigManager.newGamePlus = true; // 标记已完成一周目通关
ConfigManager.save(); // 和四个音量等一起保存到配置文件里 |
|