[RMMV] SAVE FILE DESCRIPTION
Posts
Pages:
1
ive tried searching the entire internet for this and tried asking in the rpg maker forums from the website. ill link the original thread here. just to make it quick im using the AltSaveScreen plugin by Yoji to make it look the way it does right now:
the idea is to have text in the window below; the one with file number, game name and playtime. this text is supposed to show character names and then their status, being either alive or dead with it being controlled with a switch. and obviously, like the playtime, it would change dependent on the save file.
to give a visual: (if switch 36 is off)
Anzu: Alive
Ranmaru: Alive
Alice: Alive
(if switch 36 is on)
Anzu: Dead
Ranmaru: Alive
Alice: Alive
ive tried going to rpg_windows.js and adding a script to add text although when moving it to the window below it started getting cut off.
is there some plugin that can help here or a script i can add to the code, its been very frustrating trying to do this.

the idea is to have text in the window below; the one with file number, game name and playtime. this text is supposed to show character names and then their status, being either alive or dead with it being controlled with a switch. and obviously, like the playtime, it would change dependent on the save file.
to give a visual: (if switch 36 is off)
Anzu: Alive
Ranmaru: Alive
Alice: Alive
(if switch 36 is on)
Anzu: Dead
Ranmaru: Alive
Alice: Alive
ive tried going to rpg_windows.js and adding a script to add text although when moving it to the window below it started getting cut off.
is there some plugin that can help here or a script i can add to the code, its been very frustrating trying to do this.
I personally wouldn't edit `rpg_winsdows.js` directly. I'd put together a small plug-in, or put it into a plug-in collection.
Either way, the save-file description that includes time elapsed I think is part of the header? That's defined in `DataManager`, as defined in `rpg_managers.js`.
The sub-thought in my head is that you could do something like...
...to be able to refer to the save file's particular instance of `$gameSwitches`. `Window_SavefileList` uses the lines...
...to read the info that is does read, so, I image that whatever instance of `Window_Base` that you are using for the text box at the bottom of the screen would get that data in a similar fashion through `Scene_Load`.
Either way, the save-file description that includes time elapsed I think is part of the header? That's defined in `DataManager`, as defined in `rpg_managers.js`.
DataManager.makeSavefileInfo = function() { var info = {}; info.globalId = this._globalId; info.title = $dataSystem.gameTitle; info.characters = $gameParty.charactersForSavefile(); info.faces = $gameParty.facesForSavefile(); info.playtime = $gameSystem.playtimeText(); info.timestamp = Date.now(); return info; };
The sub-thought in my head is that you could do something like...
DataManager.makeSavefileInfo = function() { var info = {}; info.globalId = this._globalId; info.title = $dataSystem.gameTitle; info.characters = $gameParty.charactersForSavefile(); info.faces = $gameParty.facesForSavefile(); info.playtime = $gameSystem.playtimeText(); info.timestamp = Date.now(); info.switches = $gameSwitches; return info; };
...to be able to refer to the save file's particular instance of `$gameSwitches`. `Window_SavefileList` uses the lines...
var id = index + 1; var info = DataManager.loadSavefileInfo(id);
...to read the info that is does read, so, I image that whatever instance of `Window_Base` that you are using for the text box at the bottom of the screen would get that data in a similar fashion through `Scene_Load`.
author=Marrend
The sub-thought in my head is that you could do something like...
DataManager.makeSavefileInfo = function() { var info = {}; info.globalId = this._globalId; info.title = $dataSystem.gameTitle; info.characters = $gameParty.charactersForSavefile(); info.faces = $gameParty.facesForSavefile(); info.playtime = $gameSystem.playtimeText(); info.timestamp = Date.now(); info.switches = $gameSwitches; return info; };
would this work with the following code in rpg_windows.js? (just asking because its something me and someone off the forum have made up on.)
Window_SavefileList.prototype.drawItem = function(index) { var id = index + 1; var valid = DataManager.isThisGameFile(id); var info = DataManager.loadSavefileInfo(id); var rect = this.itemRectForText(index); this.resetTextColor(); if (this._mode === 'load') { this.changePaintOpacity(valid); } this.drawFileId(id, rect.x, rect.y); if (info) { this.changePaintOpacity(valid); this.drawContents(info, rect, valid); this.changePaintOpacity(true); } if ($gameSwitches.value(36)) { "Anzu" } else { "Anzu" } };
also im sorry but i have 0 idea on how to make plugins and i couldn't find anything off the internet.
maybe there's a game out there that does something similar?
The function `Window_SavefileList.drawItem` creates the list of files to load/save. The information we want to display would probably go into an instance of `Window_Base`. I'm not entirely prepared to write out the entire thing, but...
...here's a basic idea of what I had in mind, based on what you wrote, and certain assumptions.
DataManager.makeSavefileInfo = function() { var info = {}; info.globalId = this._globalId; info.title = $dataSystem.gameTitle; info.characters = $gameParty.charactersForSavefile(); info.faces = $gameParty.facesForSavefile(); info.playtime = $gameSystem.playtimeText(); info.timestamp = Date.now(); info.switches = $gameSwitches; return info; }; Window_SaveInfo.prototype.drawItem = function(index) { id = index + 1; info = DataManager.loadSavefileInfo(id); this.drawText("Anzu:", 0, 0, this.contents().width); this.drawText("Ranmaru:", 0, this.lineHeight(), this.contents().width); this.drawText("Alice:", 0, this.lineHeight()*2, this.contents().width); if (info.switches(36) { this.deathColor(); this.drawText("Dead", 0, 0, this.contents().width, 'right'); } else { this.normalColor(); this.drawText("Alive", 0, 0, this.contents().width, 'right'); }; if (info.switches(37) { this.deathColor(); this.drawText("Dead", 0, 0, this.contents().width, 'right'); } else { this.normalColor(); this.drawText("Alive", 0, 0, this.contents().width, 'right'); }; if (info.switches(38) { this.deathColor(); this.drawText("Dead", 0, 0, this.contents().width, 'right'); } else { this.normalColor(); this.drawText("Alive", 0, 0, this.contents().width, 'right'); }; };
...here's a basic idea of what I had in mind, based on what you wrote, and certain assumptions.
author=MarrendDataManager.makeSavefileInfo = function() { var info = {}; info.globalId = this._globalId; info.title = $dataSystem.gameTitle; info.characters = $gameParty.charactersForSavefile(); info.faces = $gameParty.facesForSavefile(); info.playtime = $gameSystem.playtimeText(); info.timestamp = Date.now(); info.switches = $gameSwitches; return info; }; Window_SaveInfo.prototype.drawItem = function(index) { id = index + 1; info = DataManager.loadSavefileInfo(id); this.drawText("Anzu:", 0, 0, this.contents().width); this.drawText("Ranmaru:", 0, this.lineHeight(), this.contents().width); this.drawText("Alice:", 0, this.lineHeight()*2, this.contents().width); if (info.switches(36) { this.deathColor(); this.drawText("Dead", 0, 0, this.contents().width, 'right'); } else { this.normalColor(); this.drawText("Alive", 0, 0, this.contents().width, 'right'); }; if (info.switches(37) { this.deathColor(); this.drawText("Dead", 0, 0, this.contents().width, 'right'); } else { this.normalColor(); this.drawText("Alive", 0, 0, this.contents().width, 'right'); }; if (info.switches(38) { this.deathColor(); this.drawText("Dead", 0, 0, this.contents().width, 'right'); } else { this.normalColor(); this.drawText("Alive", 0, 0, this.contents().width, 'right'); }; };
i assume this is all in rpg_windows.js? is there any specific line it has to be under or do i just plop it anywhere?
also there's a total of 10 characters, i assume that for i just need to repeat the code of each of them? also for the code:
this.drawText("Ranmaru:", 0, this.lineHeight(), this.contents().width); this.drawText("Alice:", 0, this.lineHeight()*2, this.contents().width);
is there only supposed to be one 0 followed by "this.lineHeight"?
I assume this is all in rpg_windows.js? is there any specific line it has to be under or do i just plop it anywhere?
Well, if I want to be honest, I'd suggest making a new JS file, and add the resulting file into the project with the plug-in manager. That way, the default programming still exists. In the worst-case scenario where you'd end up removing the snippet, you'd still have that original programming in case something goes amiss.
And to be fair, it's not a complete code, so a copy-paste shouldn't necessarily work to begin with, even if you did write it into rpg_windows.js.
Also, there's a total of 10 characters. I assume for that, I just need to repeat the code of each of them?
You could write a for loop based on the Actor ID? Off the top of my head, it might look like...
for (let i=0; i<$dataActors.length; i++) { actor = @dataActors[i+1] this.drawText(actor.name, 0, this.lineHeight()*i, this.contents().width); };
...so. Though, writing that, I'm not 100% sure if the object `@dataActors` would contain the values that it should have at the point of the title screen. Anywhere else, absolutely.
Also, for the code...
this.drawText("Ranmaru:", 0, this.lineHeight(), this.contents().width); this.drawText("Alice:", 0, this.lineHeight()*2, this.contents().width);
...is there only supposed to be one 0 followed by "this.lineHeight"?
Yes. The `drawText` function needs at least four parameters to be passed into it. The first parameter represents the text to write. The next two parameters are the initial x/y coordinates of where the text starts to write. The fourth parameter represents the maximum width that is utilized for the text. There is a fifth optional parameter that determines the alignment of the text. The default behavior is for the text to be left-aligned, but can be set to right-aligned (as per the example in my previous post) or centered.
author=Marrend
Well, if I want to be honest, I'd suggest making a new JS file, and add the resulting file into the project with the plug-in manager. That way, the default programming still exists. In the worst-case scenario where you'd end up removing the snippet, you'd still have that original programming in case something goes amiss.
And to be fair, it's not a complete code, so a copy-paste shouldn't necessarily work to begin with, even if you did write it into rpg_windows.js.
how exactly would i put the code into a plugin? i have 0 knowledge on it so i have no idea on where to start.
Like, how to make a plugin at all? You can use NotePad, WordPad, or like software. I've seen plugins that just plow right into the code, and no fluff. I've also seen plugins with headers (out of lack of a better term to use) that look something like...
...this. Writing a header might be useful to identify the plugin in your project's plugin manager, but, it might also depend on how many other plugins you have as well. If you do have a header, the code would be after it. If not, well, you just... write the code?
/* * @plugindesc Save File Description * @author Marrend * @help * Makes save files relay more information when selected. */
...this. Writing a header might be useful to identify the plugin in your project's plugin manager, but, it might also depend on how many other plugins you have as well. If you do have a header, the code would be after it. If not, well, you just... write the code?
author=Marrend
Like, how to make a plugin at all? You can use NotePad, WordPad, or like software. I've seen plugins that just plow right into the code, and no fluff. I've also seen plugins with headers (out of lack of a better term to use) that look something like...
/* * @plugindesc Save File Description * @author Marrend * @help * Makes save files relay more information when selected. */
...this. Writing a header might be useful to identify the plugin in your project's plugin manager, but, it might also depend on how many other plugins you have as well. If you do have a header, the code would be after it. If not, well, you just... write the code?
i know the pure basics of the @help, @plugindesc, etc but that's my only extent in the matter of plugins.
when starting off with the plugin would i know i just can't plop it in. shouldn't there be something saying it can only edit the save screen? (unless im wrong and the "DataManager.makeSavefileInfo = function() {" and "Window_SaveInfo.prototype.drawItem = function(index) {" already say that.)
The functions within the plugin would focus on only editing the contents of the save, and load screens. These functions would include DataManager.makeSavefileInfo(), Window_SaveInfo.drawItem() (or whatever object that exists that makes the window on the lower part of...
...this screen), among other functions.
At any rate, I'm not sure how much further assistance I can be. Like, I don't actually own/have RPG Maker MV to be able to test anything. What I've been doing so far is looking stuff up in a game made with MV that I happen to have on-hand, and using my knowledge from working with Ace and MZ.

...this screen), among other functions.
At any rate, I'm not sure how much further assistance I can be. Like, I don't actually own/have RPG Maker MV to be able to test anything. What I've been doing so far is looking stuff up in a game made with MV that I happen to have on-hand, and using my knowledge from working with Ace and MZ.
Pages:
1














