I'm not able to replicate the quest complete crash, but I had to make my own demo project and it's possible I did something differently.
I think the problem with the text formatting is because
Code:
var textW = this.contents.measureTextWidth(current_text + " " + word);
Code:
var textW = this.questBitmap.measureTextWidth(current_text + " " + word);
Since this a free-to edit plugin that's a lot easier to fix as just an edit within the plugin itself (along with increasing the font size). Since I'm not including any plugin code in the main branch FOSSIL, just use this as a little nonfossil add-on if you want.
Code:
if(GameusScripts && GameusScripts["QuestSystem"])
{
//update this to use an edited version of MZ's script
fixWindowQuestInfoTinyTextInitialize= Window_QuestInfo.prototype.initialize
Window_QuestInfo.prototype.initialize = function() {
fixWindowQuestInfoTinyTextInitialize.apply(this,arguments)
this.questBitmap.fontSize=28;
}
Window_Base.prototype.sliceText = function(text, width) {
var words = text.split(" ");
if (words.length === 1)
return words;
var result = [];
var current_text = words.shift();
for (var i = 0; i < words.length; i += 1) {
var word = words[i];
var textW = this.questBitmap.measureTextWidth(current_text + " " + word);
if (textW > width) {
result.push(current_text);
current_text = word;
} else {
current_text += " " + word;
}
if (i >= words.length - 1)
result.push(current_text)
}
return result
}
}
If other people are interested in using this plugin I can come up with some workaround to have it as a nonmodified fossil plugin (probably inject something into measuretextwidth to check who's calling it, and adjust params appropriately). As is I don't want to list something as supported if it has some lurking crash bugs.