@Doktor_Q Oh! When I had initially read through the last few messages I'd seen your .zip along with LeCode's github links, but when I came back to try to see about using the plugin I apparently combined the two in my head and thought Lecode's github link *was* the plugin download. Then I promptly got confused about what exactly I was supposed to download or how to use it since it wasn't just a single .js file lol.. In short, I was inattentive and forgot there were two posts with relevant links rather than just the one. '😀 Thanks for pointing your plugin/.zip for me though!
And that's cool to hear, Psychronic! Also, I've downloaded your demo and am gonna take a look at it, just the artwork and cohesion is impressive so far (currently watching the video). Keep it up! Hopefully I'll have something worth showing y'all too, eventually. 🙂
Oh, and sorry for the confusion Kes! As Doktro Q said, I was meaning to refer to the add-on/plugin-fix/helpful-doodad that (s)he'd posted earlier up the thread. It didn't occur to me to clarify that. My bad! Thanks for being super civil/friendly about it, though!
*Edit: Update on the Scan_Command issue!
I had two problems that needed fixing, and while I'm not 100% sure I understand them (in fact, I'm 100% sure I don't- at least not fully anyway), I got around them anyway! So in case anyone else is having the issue, here's the symptoms:
1. Scanning an enemy/actor sometimes crashes. Note where the actor is when this occurs; if the problem is anything like my own, it's at or near the top of whichever given map.
2. Even if the game doesn't crash upon scanning an entity, no window actually appears, despite having text, show_stats, or picture options set up in the actor/enemy notes box. Note this time where the screen is positioned when this is occurring. Again, if it's anything like mine, you're using a wide map (mine for example is 90x25 tiles).
Now, onto the solutions!
1. This one's actually pretty simple. I think. Maybe. Anyway what seems to be going on is the plugin attempts to draw the window a certain height above the actor/enemy/event that's being scanned, and if that entity happens to be near the top of the map, the plugin attempts to draw the map in a negative coordinate, at which point it implodes and crashes your game.
That little nubbin at the bottom, --- while ((this.x + this.width) > Graphics.width) this.x--; ---, is our culprit. Now, I'm no rocket scientist (by which I mean I can't actually read javascript), so I'm sure it's entirely possible that these two lines tacked onto the end here are really, desperately important for something, somewhere, to someone. Buuuuut I commented that sucker out of there
and bam! Problem solved!
For what it's worth, I followed the logic of that, ahh, paragraph(?) of java down to that point and figured out that it was the limiting factor that was keeping the plugin from drawing the menu beyond a specific point (about x=28 or so), but I honestly have no idea why that bit is there in the first place. I'm not sure what it's preventing. Maybe it's there to stop the plugin from trying to draw the window off the map (to the right)? But given the lack of a 'safety measure' to prevent the same thing happening on the y axis I don't feel like that's the case. If anyone could point out the utility of that last 'while' bit I'd be curious to hear it.
Also, I just realized how long this post is... sorry about that.. '😀
And that's cool to hear, Psychronic! Also, I've downloaded your demo and am gonna take a look at it, just the artwork and cohesion is impressive so far (currently watching the video). Keep it up! Hopefully I'll have something worth showing y'all too, eventually. 🙂
Oh, and sorry for the confusion Kes! As Doktro Q said, I was meaning to refer to the add-on/plugin-fix/helpful-doodad that (s)he'd posted earlier up the thread. It didn't occur to me to clarify that. My bad! Thanks for being super civil/friendly about it, though!
*Edit: Update on the Scan_Command issue!
I had two problems that needed fixing, and while I'm not 100% sure I understand them (in fact, I'm 100% sure I don't- at least not fully anyway), I got around them anyway! So in case anyone else is having the issue, here's the symptoms:
1. Scanning an enemy/actor sometimes crashes. Note where the actor is when this occurs; if the problem is anything like my own, it's at or near the top of whichever given map.
2. Even if the game doesn't crash upon scanning an entity, no window actually appears, despite having text, show_stats, or picture options set up in the actor/enemy notes box. Note this time where the screen is positioned when this is occurring. Again, if it's anything like mine, you're using a wide map (mine for example is 90x25 tiles).
Now, onto the solutions!
1. This one's actually pretty simple. I think. Maybe. Anyway what seems to be going on is the plugin attempts to draw the window a certain height above the actor/enemy/event that's being scanned, and if that entity happens to be near the top of the map, the plugin attempts to draw the map in a negative coordinate, at which point it implodes and crashes your game.
The answer to this problem is to create a buffer at the top of your map, five tiles should be plenty, though depending on the image you use it might need to be slightly higher. I added a buffer at the bottom as well, and while I now realize that it's completely unnecessary the lack of symmetry messes with screen panning and looks really bad, or at least it does in my opinion, anyway.
2. It actually turns out that it is drawing the window! The problem lies in that it's drawing the window waaaaaayyy to the left, which isn't particularly helpful given that it was completely off-screen for me. In fact, it was two-ish screen widths away. So I dug through the LeTBS_ScanCommand, LeTBSWindows, and LeUtilities files to figure out what did what where and how and why, and [literally] many hours later I found this:Window_TBSScan.prototype.update = function () {
Window_Base.prototype.update.call(this);
this._commandWindow.x = this.x;
this._commandWindow.y = this.y + this.height - this._commandWindow.height + 6;
if (!this._obj) return;
var x, y, w;
if (this._scanData.isEntity) {
x = this._obj._posX;
y = this._obj._posY;
w = this._obj.width();
} else {
x = this._obj.screenX();
y = this._obj.screenY();
w = $gameMap.tileWidth();
}
x -= this.width / 2;
y -= this.height;
this.x = x + w / 2;
this.y = y;
if (this.y < 0)
this.y += this.windowHeight();
while (this.x < 0)
this.x++;
while ((this.x + this.width) > Graphics.width)
this.x--;
};
Window_Base.prototype.update.call(this);
this._commandWindow.x = this.x;
this._commandWindow.y = this.y + this.height - this._commandWindow.height + 6;
if (!this._obj) return;
var x, y, w;
if (this._scanData.isEntity) {
x = this._obj._posX;
y = this._obj._posY;
w = this._obj.width();
} else {
x = this._obj.screenX();
y = this._obj.screenY();
w = $gameMap.tileWidth();
}
x -= this.width / 2;
y -= this.height;
this.x = x + w / 2;
this.y = y;
if (this.y < 0)
this.y += this.windowHeight();
while (this.x < 0)
this.x++;
while ((this.x + this.width) > Graphics.width)
this.x--;
};
/* while ((this.x + this.width) > Graphics.width)
this.x--;*/
this.x--;*/
For what it's worth, I followed the logic of that, ahh, paragraph(?) of java down to that point and figured out that it was the limiting factor that was keeping the plugin from drawing the menu beyond a specific point (about x=28 or so), but I honestly have no idea why that bit is there in the first place. I'm not sure what it's preventing. Maybe it's there to stop the plugin from trying to draw the window off the map (to the right)? But given the lack of a 'safety measure' to prevent the same thing happening on the y axis I don't feel like that's the case. If anyone could point out the utility of that last 'while' bit I'd be curious to hear it.
Also, I just realized how long this post is... sorry about that.. '😀