MV [Resolved] Extra Script Call for SRD's Bust Menu, to change Bust

Hi all,

I'm looking for someone to add a plugin command or script call to SRD_AltMenuScreen_BustIcons.js, so that I can change the bust for a character mid-game (well technically, it only needs to happen once lol). In the baseline script, it is set with note-tags on the actor in question.

That's fine for most of the characters, but my game will have the option for the player to choose from three different sets of parents as part of their backstory, which will change their appearance and stats. So it'll change the one time.

I'm already using Hime's Placeholder Message Faces to get around the conversation issues (as I have Eli_AnimatedFaces); and I also have MoreHUDFaces extension to change my battle MOG BattleHud faces. Yanfly's Biography already has a plugin command to change that image. And of course, the baseline event commands can change the normal face-set for the menus (i.e. the equip menu is fine).

But I can't see a way to alter my menu busts. It just needs to change from one filename to another, overriding the original note-tag. Any help would be greatly appreciated. :LZSsmile:

Just one note: I have very slightly amended my version of the menu plugin so it draws images from /img/pictures/, which is line 494, so it now reads:
Code:
            return this.loadBitmap('img/pictures/', filename, hue, true);
instead of using the weird SRD directory, since I'm not using any of their other plugins. Otherwise, it's identical to the one linked above.
while it take it from actor's note, can you try to initialize something like:

<bust: \v[4]> or $gameVariables.value(4) (change 4 as test)
and set a value of "yourBustName" and see if it triggers?

if this works, that you can really use any variable and use the fileName there.

if it doesn't work, maybe there is a way to implement that as I don't know
if there is a way to change actors notetag dynamically.

but I might be able to make a change with my base involved so it can parse
it directly like I did with the item amount to carry.

so I could change your bust to it as well probably if that works out.
I think this should work (you could paste it at the bottom of the plugin or load it as a separate plugin):

JavaScript:
(function() {
	Object.defineProperty(Game_Actor.prototype, 'ams_bs_bust', {
		get() {
			return this._ams_bs_bust || this.actor().ams_bs_bust;
		},
		set(value) {
			this._ams_bs_bust = value;
		},
	});
})();

Then replace the three instances of actor.actor().ams_bs_bust in the plugin with actor.ams_bs_bust. To change the bust, use the following script call:

JavaScript:
var actor = $gameActors.actor(1);
actor.ams_bs_bust = "filename"

Just one note: I have very slightly amended my version of the menu plugin so it draws images from /img/pictures/, which is line 494, so it now reads:
Code:
return this.loadBitmap('img/pictures/', filename, hue, true);
instead of using the weird SRD directory, since I'm not using any of their other plugins. Otherwise, it's identical to the one linked above.
It might not make any difference, but if it were me, I'd instead write that as this.loadPicture(filename). (I think loadPicture does the exact call you wrote, so it probably does make no difference.)
I think this should work (you could paste it at the bottom of the plugin or load it as a separate plugin):

JavaScript:
(function() {
    Object.defineProperty(Game_Actor.prototype, 'ams_bs_bust', {
        get() {
            return this._ams_bs_bust || this.actor().ams_bs_bust;
        },
        set(value) {
            this._ams_bs_bust = value;
        },
    });
})();

Then replace the three instances of actor.actor().ams_bs_bust in the plugin with actor.ams_bs_bust. To change the bust, use the following script call:

JavaScript:
var actor = $gameActors.actor(1);
actor.ams_bs_bust = "filename"


It might not make any difference, but if it were me, I'd instead write that as this.loadPicture(filename). (I think loadPicture does the exact call you wrote, so it probably does make no difference.)
Marvellous, it works perfectly. You are amazing Solar_Flare, and I'll defo credit you in the game. Have all my internet cookies. :LZSgrin:

The LoadBitmap was actually SRD's original code, all I changed was the directory in that little bit, I just mentioned it in case that change was important.

Also, thanks for the attempt Shadowdragon; to my knowledge escape codes don't work in Notetags so that probably wouldn't have worked I don't think?

The topic can be closed as resolved. 🤘
to my knowledge escape codes don't work in Notetags
That's entirely up to the plugin that handles the note tag. Some note tags will support escape tags, some won't. It doesn't look like the ones in that particular plugin support them though.

Original thread: https://forums.rpgmakerweb.com/threads/resolved-extra-script-call-for-srds-bust-menu-to-change-bust.182032/