【筆記】VisuStella's Options core與NekoGakuen MulitLanguage

2023/06/17閱讀時間約 4 分鐘
  本次測試 VisuStella's Options core 與 NekoGakuen MulitLanguage的適配性筆記。
【NekoGakuen MulitLanguage】 Itch.io :
https://rabbitteaparty.itch.io/nekogakuen-mulitlanguage

【VisuStella's Options core】 Itch.io :
https://visustella.itch.io/visumz-sample
  其實在 VS 的插件裡已經有設定的相關範例,我是使用他提供的字體參數(Text Font)來進行參考修改。
  每個設定都有自己單獨的 symbol ,在 NekoGakuen MulitLanguage 有提供關於多語言的 symbol ,於程式碼的 1581 行。
        Window_Options.prototype.isLanguageSymbol = function (symbol) {
            return symbol.contains('language');
        };
  在 VisuStella's Options core 裡面新增一個類別,然後輸入 language 在symbol 欄位。
VisuStella's Options core 的設定
  設定完後,Options core 就會有 NekoGakuen MulitLanguage 的設定,接著要替換他顯示的文字。
  在 JS:Draw Option 裡將 TextManager. 後面的指定更換。
JS:Draw Option
  這個 args_Lan2b 的參數是在 NekoGakuen MulitLanguage 的1014行指定語言名稱。
  更改後的 Options core 似乎沒有辦法他本身的排列設定,因此文字列的部分會跟一般選項一樣只顯示單個位子,目前還不確定如何處理讓文字列展開。
  但如果只是要將語言命令置中的話,要更改 Window_Options.prototype.drawItem 這部份的設定,腳本是 rmmz_windows 裡約3014行左右。
  將 const statusWidth 的設定寫成 rect.width / 2,並把下方指定的部分給註解掉,然後將 drawText status 的部份最後對齊部分更改為 'center'。
Window_Options.prototype.drawItem = function(index) {
    const title = this.commandName(index);
    const status = this.statusText(index);
    const rect = this.itemLineRect(index);
	
    const statusWidth = rect.width / 2;
    const titleWidth = rect.width - statusWidth;
    this.resetTextColor();
    this.changePaintOpacity(this.isCommandEnabled(index));
    this.drawText(title, rect.x, rect.y, titleWidth, "left");
    this.drawText(status, rect.x + titleWidth, rect.y, statusWidth, "center");
};
//Window_Options.prototype.statusWidth = function() {
//    return 120;
//};
  本次更改就結束了,這個筆記我有空研究出文字列的話可能會在更新。
92會員
118內容數
關於遊戲心得、遊戲創作等等相關的各種紀錄。
留言0
查看全部
發表第一個留言支持創作者!