[SOLVED]Galv's Custom Title; Plugin command request.

Status
Not open for further replies.

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
266
Reaction score
61
First Language
Not English
Primarily Uses
RMMV
Galv has made a nice plugin here, which allows you to make a unique title screen for your project.

I would like to request an additional feature(s) for this plugin.

A plugin command(s) that can (1)modify "fileName,xMove,yMove,opacity,z" during gameplay
and (2)remove Layer Graphics.

I want to be able to have a dynamic Layer Graphics as the game goes on (for plot reveals, etc.) similar to what Yanfly’s Dynamic Title Images does. I've tested the two and the two are compatible, YEP_DynamicTitleImages.js must be below GALV_CustomTitle.js

Below is a video of the game I'm making and what I've managed to do and hope to further achieve using Galv's Custom Title plugins and Yanfly's Dynamic Title Images.

As you can see at 0:51, Did you notice the Background Image change in the Title Screen?(That was done using Yanfly's DynamicTitleImages.js) However, for Character Carousel image which was achieved using GALV_CustomTitle.js, It would've been nice if I could change/turn off the Layer Graphics midway into the game for some plot reveal or to just fully show the new Landscape background image. But to do this I would need a plugin command for GALV_CustomTitle.js that can change/remove the Layer Graphics during gameplay.


3WMhLem.png
 
Last edited:

Magnus0808

Software Developer
Veteran
Joined
Feb 2, 2019
Messages
157
Reaction score
184
First Language
Danish
Primarily Uses
RMMV
Here you go :) To remove the layer graphics just use the plugin command:
Code:
LayerGraphics
or you can set the graphics layer just like normal:
Code:
LayerGraphics fileName xMove yMove opacity z

even supports multiple layer graphics

E.g. LayerGraphics Mountains5 0 0 255 1 | DarkSpace1 0 0 100 2

Code:
//=============================================================================
// GALV Custom Title PlugIn Commands Extension
// MRP_GALV_CustomTitle_PlugInCommands_Extension.js
// By Magnus0808 || Magnus Rubin Peterson
//=============================================================================

/*:
 * @plugindesc Extension to GALV_CustomTitle. Add plugincommand for layer graphics.
 * @author Magnus0808
 *
 * @help Place this after GALV_CustomTitle.
 *
 * If Persistant Change is enabled then the layer graphics change will be persistant
 * trough restarts of the game.
 *
 * [PLUGIN COMMAND]
 * LayerGraphics fileName xMove yMove opacity z
 *
 * And just like with GALV_CustomTitle you can add multiple layers by adding a |
 * symbol after each layer graphic data set before adding the next layer graphic
 * set.
 *
 * E.g. LayerGraphics Mountains5 0 0 255 1 | DarkSpace1 0 0 100 2
 *
 * @param Persistant Change
 * @type Boolean
 * @desc If true then the layer graphics change will be persistant.
 * @default true
 */

(function(){
    MRP_CustomTitle_PlugInCommands = {};
    MRP_CustomTitle_PlugInCommands.Parameters = PluginManager.parameters('MRP_GALV_CustomTitle_PlugInCommands_Extension');
    MRP_CustomTitle_PlugInCommands.persistant = (String(MRP_CustomTitle_PlugInCommands.Parameters['Persistant Change']) == 'true');
 
    var MRP_GALVCTPLUGINCOMMAND_GI_PLUGINCOMMAND_OLD = Game_Interpreter.prototype.pluginCommand;
    Game_Interpreter.prototype.pluginCommand = function(command, args) {
        MRP_GALVCTPLUGINCOMMAND_GI_PLUGINCOMMAND_OLD.call(this, command, args)
        if (command === 'LayerGraphics'){
            Galv.TITLE.layerData = [];
            Galv.TITLE.layerData.push([]);
            var k = 0;
            for(var i = 0; i < args.length; i++){
                if(args[i] == "|"){
                    Galv.TITLE.layerData.push([]);
                    k++;
                } else {
                    Galv.TITLE.layerData[k].push(args[i]);
                }        
            }
            if(MRP_CustomTitle_PlugInCommands.persistant){
                ConfigManager.layerGraphics = Galv.TITLE.layerData;
                ConfigManager.save();
            }
        }
    };
 
    //=============================================================================
    // ConfigManager (Inspired by Yanfly Engine Plugins - Dynamic Title Images)
    //=============================================================================  
    ConfigManager.layerGraphics = [];  
    MRP_GALVCTPLUGINCOMMAND_CM_MAKEDATA = ConfigManager.makeData;
    ConfigManager.makeData = function() {
      var config = MRP_GALVCTPLUGINCOMMAND_CM_MAKEDATA.call(this);
      config.layerGraphics = this.layerGraphics;
      return config;
    };
 
    MRP_GALVCTPLUGINCOMMAND_CM_APPLYDATA = ConfigManager.applyData;
    ConfigManager.applyData = function(config) {
      MRP_GALVCTPLUGINCOMMAND_CM_APPLYDATA.call(this, config);
      this.layerGraphics = config.layerGraphics || [];
    };
 
    // Apply persistant layer graphics
    MRP_GALVCTPLUGINCOMMAND_ST_CREATELAYERS = Scene_Title.prototype.createLayers;
    Scene_Title.prototype.createLayers = function() {
        if(MRP_CustomTitle_PlugInCommands.persistant && ConfigManager.layerGraphics != []){
            Galv.TITLE.layerData = ConfigManager.layerGraphics;
        }
        MRP_GALVCTPLUGINCOMMAND_ST_CREATELAYERS.call(this);
    };
 
})();
 

Attachments

  • MRP_GALV_CustomTitle_PlugInCommands_Extension.js
    3.1 KB · Views: 3
Last edited:

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
266
Reaction score
61
First Language
Not English
Primarily Uses
RMMV
Somehow I was kinda expecting you'd fill out this request to, haha.
Well thanks again, and I've tried it and yes it's working as intended without a hitch.

But if I may, can I ask a feature to be added for this? Can you make the change made by your add-on plugin persistent?

What I mean is, only whenever the player restarts the game, the LayerGraphics will revert back to whatever you have set originally in Galv's GALV_CustomTitle.js.

If it helps, I'm thinking it's very similar to what Yanfly's plugin; YEP_DynamicTitleImages.js that I mentioned earlier does. Any modifications done by this plugin to the title image using it's built in plugin command, persists even if the player; does not save, loads another savefile, closes the game.
 
Last edited:

Magnus0808

Software Developer
Veteran
Joined
Feb 2, 2019
Messages
157
Reaction score
184
First Language
Danish
Primarily Uses
RMMV
Done. I made a plugin parameter so you can choose if you want persistant layer graphic changes on or off.
I have edited my original reply.
 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
266
Reaction score
61
First Language
Not English
Primarily Uses
RMMV
Thanks for the quick reply, and for two threads in a row. :D
I tried it however, I am getting this error:

Nuk67pM.png
VLCQ0IN.png
ijEkVrj.png

I have tried turning off all other plugins and only keeping these four on in this order. Still, the error occurs.
If it helps, i'm using Olivia's Olivia_AntiPlayerStress.js plugin, that's why the error screen looks different from usual. What it does is just displays more details into the error screen.

Edit: woops forgot to include the error screen itself, fixed.
 
Last edited:

Magnus0808

Software Developer
Veteran
Joined
Feb 2, 2019
Messages
157
Reaction score
184
First Language
Danish
Primarily Uses
RMMV
Sorry, that was a stupid mistake from me. No idea how I did not catch that. Should be fixed now. :)
 

cedr777

Veteran
Veteran
Joined
Feb 22, 2018
Messages
266
Reaction score
61
First Language
Not English
Primarily Uses
RMMV
Thank you once again, I tested it and everything is perfect.
That's two threads in one day you helped me in my request, you are a saint!
Will also inform Galv about it.
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,140
Reaction score
5,376
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

I just lost an hour plus of time to trying to modify the _battlefield sprite... when in reality MZ calls it _battleField ;_;

Even when debugging for the "undefined value", it looked exactly the same to my 20/60 eyesight.

I really prefer this_naming_convention rather than thisNamingConvention !!
hmm... I just solved one of the more annoying sideview battler problems in MV.. Passive States and Visual States can make it so when your character is in crisis HP, they don't go back to normal walk/wait when it's their turn. they stay in the crisis motion... neat.
Apparently all of LGBT reddit hates me. I posted a simple question and only got hate mail. What's the deal? The doompost was literally 6 months ago and I've changed my views since then and apologized.
MOD NOTE: See second response before replying to this. - Wavelength
Amazing. Simply amazing...

JRPG Browser - Playlist:

Forum statistics

Threads
109,107
Messages
1,042,125
Members
141,593
Latest member
Padouch
Top