I'm just having a bit of trouble finding the line of code in the rpg_windows.js where the battle command guard is located. I'm trying to disabled it from view/use of the skill without the use of a plugin.
JavaScript questions that don't deserve their own thread
● ARCHIVED · READ-ONLY
-
-
Not to be snarky, but...how did you look? :guffaw:I'm just having a bit of trouble finding the line of code in the rpg_windows.js where the battle command guard is located.
I open up rpg_windows.js, Ctrl+F to find, type "guard" and the first hit is line 5387 to add the guard command to the actor command window.
So copy that function, paste it into a new document, put // at the beginning of the line to comment it out, save as a *.js file, include as a plugin. -
LOL I was just scrolling and praying I could catch it by eye.Not to be snarky, but...how did you look? :guffaw:
I open up rpg_windows.js, Ctrl+F to find, type "guard" and the first hit is line 5387 to add the guard command to the actor command window.
So copy that function, paste it into a new document, put // at the beginning of the line to comment it out, save as a *.js file, include as a plugin. -
Isn't really a big thing, but if some lost soul is looking how to remove Escape succes message, there's how
-
Is there Fossil/MZ plugin which alters how damage popup is displayed? It usually displayed just as falling numbers, so I think it would be kinda fun to mess around with that a bit
-
That does not appear to be asking a question per the topic of this thread.if some lost soul is looking how to remove Escape succes message, there's how
That's also not a JavaScript question, per the topic of the thread :stickytongue:Is there Fossil/MZ plugin which alters how damage popup is displayed?
That would be better asked as a thread in Plugin Requests (presuming you can't come up with anything by just Googling the words "rpg maker mz damage popup plugin"). -
Oh, I guess so. It's just, well, not that big of deal, so I thought I might ask it here, but the more you know it seemsThat does not appear to be asking a question per the topic of this thread.
That's also not a JavaScript question, per the topic of the thread :stickytongue:
That would be better asked as a thread in Plugin Requests (presuming you can't come up with anything by just Googling the words "rpg maker mz damage popup plugin"). -
I think it's OK. It's basically equivalent to someone asking a question and figuring out the answer for themselves.That does not appear to be asking a question per the topic of this thread.
However, if you don't find anything suitable with your own searching, this would be better as its own thread in Plugin Requests, like Turan says. I'd recommend also describing the specific things you want to change, e.g. any extra popups you want to show (crit, damage element, etc) as well as the font size, colour, movement, etc.Is there Fossil/MZ plugin which alters how damage popup is displayed?
Edit - also, try to avoid double-posting, here's the standard message (no worries):@Jobhob, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.
-
Hello, i need to show turns/counter of a specific state with SDR HUD Maker, but i can't find the correct Javascript Eval to do that. (RMMV)
im working with Buffs & States Core (YEP)
i manage to show an image for the specific state ($gameActors.actor(x).isStateAffected(y))
but that is it.
thanks for your time! -
It's the _stateTurns array.Hello, i need to show turns/counter of a specific state
For example,$gameActors.actor(x)._stateTurns[state ID] -
Hi hi, I have a question (probably dumb but please bear with me).
JavaScript:I tried to overwrite this bit in a separate plugin file. But I think that theWindow_SavefileList.prototype.drawContents = function(info, rect, valid) { var bottom = rect.y + rect.height; if (rect.width >= 420) { this.drawGameTitle(info, rect.x + 192, rect.y, rect.width - 192); if (valid) { this.drawPartyCharacters(info, rect.x + 220, bottom - 4); } } var lineHeight = this.lineHeight(); var y2 = bottom - lineHeight; if (y2 >= lineHeight) { this.drawPlaytime(info, rect.x, y2, rect.width); } };drawGameTitleanddrawPlaytimemethods don't run because I don't see them in the menu. Is it because I don't have them defined in this file? how do I go about this then? Any help is appreciated ^^ -
@Hyouryuu-Na That looks like it's just the original code for that function.
You do not need to (and should not) redefine any existing code in your plugin file. But without seeing what your actual edited code looks like, it's impossible to say what mistake you might have made. -
I didn't think my changes mattered for thi s problem so I showed the original. I just added this part after the drawGameTitle:@Hyouryuu-Na That looks like it's just the original code for that function.
You do not need to (and should not) redefine any existing code in your plugin file. But without seeing what your actual edited code looks like, it's impossible to say what mistake you might have made.
Code:var json = StorageManager.load(fileId); var json2 = JSON.parse(json); saveVersion = json2.variables._data["@a"][versionVarId]; this.drawText("v" + saveVersion, rect.x, rect.y, rect.width, 'right');
I didn't make any other significant changes in here other than this. -
Well, the original function works :stickytongue: So the problem must come from your changes or how you've installed it or something.I didn't think my changes mattered for thi s problem so I showed the original.
I suggest you start an actual thread and post the entire function as you have it in your plugin file.
For what you're showing here, none of that code from your original post should actually be in your plugin. You would overwrite the drawContents() method, use the call() function on it, then just put your new lines afterward.
I also don't understand why you're loading the save file again when that's already what's being passed into this method via theinfoargument.
You're also using aversionVarIdthat would be undefined. -
I'm just trying to show the value of a saved variable in the save/load menu. So I'm just bringing up the value of that variable and drawing it in the window. This stuff works. It's just that gametitle and playtime are not showing up. And versionVarId is not undefined because it's set via plugin parameters. After some testing, I saw that they are run. The values show up in the console. But I just don't see them .___.
The info doesn't have what I need. It only has the info that shows up in the save/load slot like game title, play time, faces, charsets etc. from what I saw. So I loaded the actual save file and just grabbed the variable value I need. There are obviously more convenient ways to do this but I'm not very familiar with the inner workings of mv but I wanted to try. Maybe it's time to look for a plugin that shows different variables in save/load slots.
Could you elaborate this part though please?You would overwrite the drawContents() method, use the call() function on it
Edit: I think I understand what you meant. I'll try it in the morning ^^ -
It would be much more efficient to modify DataManager.loadSaveFileInfo() to parse that additional value than to load every save file on the screen an additional time.I loaded the actual save file and just grabbed the variable value I need.
Could you elaborate this part though please?Code:var Hyo_drawContents = Window_SavefileList.prototype.drawContents; Window_SavefileList.prototype.drawContents = function(info, rect, valid) { // This makes the original code do everything it already does Hyo_drawContents.call(this, info, rect, valid); // Put your additional lines here };
I did it as a variable, but if you're writing a full plugin with parameters and such, you'd be better off creating your own namespace and making the overwritten function a part of that. -
The initial problem was caused by the lines for changing the font size. When I commented them out, everything shows up fine .__. I guess I did something wrong there. Anyways, point is it works and now I can sleep in peace. Thanks ATT_Turan ^^ I didn't know I could leave out original lines like that.
-
At least I hope this doesn't deserve it's own thread:
If I need to change the color of a sprite how I can update it?
I've tried to change the ._colorTone of the sprite but despite it correctly changes in the properties, the sprite on screen doesn't change.
I guess it's because they are rendered once added as children but is there a way to refresh them?
Being dynamic sprites it would be possible for me to create a delete and re-draw function but it would be quite time consuming, if there is an easy way I'm missing (I tried to take a peek to sprites.js and the forum but didn't find an answer) I would be glad to use it, if not I'll get down to write a new function to handle the destruction and recreation of the sprites
EDIT: Nevermind, after some deeper digging in sprites.js I found there is an ._updateColorFilter(); method -
Anything inheriting from Sprite_Base has a _refresh() method.I guess it's because they are rendered once added as children but is there a way to refresh them?
-
Anything inheriting from Sprite_Base has a _refresh() method.
Thanks, I seen they also have a _updateColorFilter(); method
I tried to call it without the () from the debug :aswt: