AwfullyBritish

Villager
Member
Joined
Feb 7, 2021
Messages
17
Reaction score
7
First Language
English
Primarily Uses
N/A
How do you rename the window while playing the game, by that I mean the text displayed at the top right of the window with the rpgmaker icon.
 

rexie09

Villager
Member
Joined
Apr 4, 2021
Messages
26
Reaction score
10
First Language
English
Primarily Uses
RMMZ
You could just do an event that has a script where inside you would put
Code:
window.document.title  = "apples";
but instead of apples you would put whatever you want.
 
Last edited:

AwfullyBritish

Villager
Member
Joined
Feb 7, 2021
Messages
17
Reaction score
7
First Language
English
Primarily Uses
N/A
You could just do an event that has a script where inside you would put
Code:
window.document.title  = "apples";
bu insted of apples you would put whatever you want.
thanks!
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,792
Reaction score
2,943
First Language
English
Primarily Uses
RMMZ
Edit: I stand corrected.
 

Nolonar

Veteran
Veteran
Joined
Feb 18, 2018
Messages
276
Reaction score
379
First Language
French, German
Primarily Uses
RMMZ
Just one thing: if the player saves the game, then exits, launches the game again, and loads their previous save, the title will not remain.

If you intend to change the window title to reflect the player's progress, like adding "Chapter 3" when the player reaches chapter 3, for example, then that "chapter 3" will only remain until the player exits the game.

So you'll probably want a Parallel Process Common Event that keeps setting the title to whatever you want. For a more efficient solution, you might even need a (simple) plugin that can detect when the player loads a save.

In fact, I've written one such plugin before (note: I wrote this plugin for MV and never ported it to MZ, so I can't guarantee it'll work for MZ)
JavaScript:
//=============================================================================
// N_OnResume
//=============================================================================
/*:
 * @plugindesc Triggers a specified Common Event whenever the player loads a save game.
 * @author Nolonar
 *
 * @param Common Event ID
 * @desc The ID of the Common Event that will be called when loading the game.
 * @type common_event
 * @default 1
 *
 * @help This plugin does not provide plugin commands.
 */
(function () {
    //=========================================================================
    // Settings
    //=========================================================================
    let Parameters = PluginManager.parameters('N_OnResume');
    let Param = {
        EventId: Number(Parameters['Common Event ID'])
    }
    //=========================================================================
    // Scene_Load
    //=========================================================================
    let Scene_Load_onLoadSuccess = Scene_Load.prototype.onLoadSuccess;
    Scene_Load.prototype.onLoadSuccess = function () {
        Scene_Load_onLoadSuccess.call(this);
        $gameTemp.reserveCommonEvent(Param.EventId);
    };
})();

Simply paste the code in a file named "N_OnResume.js" and place the file in your js/plugins folder.

Feel free to use it in your project, commercial or not. No attribution needed.

To use this plugin, just create a Common Event (no trigger) that sets your window title to whatever you need it to, and configure the plugin to choose that Common Event. It'll execute the event as soon as the player loads a save game.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,792
Reaction score
2,943
First Language
English
Primarily Uses
RMMZ
It'll work in MZ, onLoadSuccess and reserveCommonEvent work the same way.
 

Latest Threads

Latest Profile Posts

Posted some halloween freebies! Grab them while on season :kaopride:
hallow_cat.png
So my birthday was about a week ago! Just forgot to post it. I went to a Golden Corral, and it was soooooo good! :kaojoy: I also got some Animal Crossing in my life! Yay, Animal Crossing!
At this point, "unique and diverse cast of characters" might as well be slang for Every Character is a Human-Sue.
I found an absolutely brilliant lifehack on the internet today.

Screenshot_760.jpg

Forum statistics

Threads
116,141
Messages
1,096,127
Members
151,570
Latest member
grungewitch
Top