choko_matte
New member
- Joined
- Jan 12, 2020
- Messages
- 3
- Reputation score
- 0
Text-hooking seems very possible since this is a RPGMaker MV game? You can unpack the game and then write a few scripts that copy texts from the message box, battle log and help windows as well as choices to the clipboard. It's not even that difficult since the RPGMaker MV source is just lying around in good ol' Javascript.
In www/js/main.js you could do something like adding this to the top of the file:
With this, you could then just append a couple of one-liners to a few select RPGMaker functions like the following in:
www/js/rpg_windows.js:
in www/js/rpg_objects.js:
In www/js/main.js you could do something like adding this to the top of the file:
JavaScript:
const PLAYER_NAME = "Player";
clipboard_queue = [];
window.setInterval(() => {
let str = clipboard_queue.shift();
if (str !== undefined) {
navigator.clipboard.writeText(str).catch(e => {
console.error(e);
clipboard_queue.unshift(str)
});
}
}, 300)
const parseGameText = (text) => text.replace(/\\N\[1\]/gi, PLAYER_NAME);
const pushToClipboardQueue = (text) => clipboard_queue.push(parseGameText(text));
With this, you could then just append a couple of one-liners to a few select RPGMaker functions like the following in:
www/js/rpg_windows.js:
JavaScript:
// --snip--
Window_Help.prototype.refresh = function() {
if (this._text.length != 0) pushToClipboardQueue(text);
this.contents.clear();
this.drawTextEx(this._text, this.textPadding(), 0);
};
// --snip--
Window_ChoiceList.prototype.textWidthEx = function(text) {
pushToClipboardQueue(text);
return this.drawTextEx(text, 0, this.contents.height);
};
in www/js/rpg_objects.js:
JavaScript:
// --snip--
Game_Message.prototype.add = function(text) {
pushToClipboardQueue(text);
this._texts.push(text);
};
Last edited: