Small change in Galv's Magic Shards

Zack Phoenix

Artist
Veteran
Joined
Jun 12, 2013
Messages
187
Reaction score
26
First Language
German
Primarily Uses
RMMV
Hey fellow makers, I need your help with a small code change!

In Galv's Magic Shards plugins, in the menu where you equip the shards, you see all the shards you can equip but also the ones you CAN'T equip - these are greyed out. I, however, need only the equippable ones to be visible and the others to not show up in the first place.

(The reason is that I want to use this menu for setting up the actor's skills but since every actor in my game has a unique skillset, I want to create shards that are specific to them. When you open their magic shard menu then, you only see THEIR skill shards.)

I would be very thankful for your help.

You can get the plugin here:
https://galvs-scripts.com/2015/11/18/mv-magic-shards/
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
591
First Language
English
Primarily Uses
RMMV
I don't really know when people come online or not, but @ Tag him. He might come around.

I think if you add this line to line 960.
PHP:
if(enabled)
So it looks like this.
PHP:
/*line*/
/*944*/    Window_MenuCommand.prototype.addMShardsCommand = function() {
/*945*/       if (this.needsCommand('mshards')) {
/*946*/           switch ($gameSystem.shardMenu) {
/*947*/               case 'enabled':
/*948*/               case 'enable':
/*949*/                   var enabled = true;
/*950*/                   break;
/*951*/               case 'disabled':
/*952*/               case 'disable':
/*953*/                   var enabled = false;
/*954*/                   break;
/*955*/               case 'hidden':
/*956*/               default:
/*957*/                   // Don't add the command
/*958*/                   return;
/*959*/           };
/*960********=> */if(enabled) this.addCommand(Galv.MS.mCommand, 'mshards', enabled);
/*961*/       }
/*962*/   };
hmmm..... I see command, but I don't see setHandler... It must be handled by another one of his things. I didn't try this out, because I honestly don't know what a shard is.
 

Zack Phoenix

Artist
Veteran
Joined
Jun 12, 2013
Messages
187
Reaction score
26
First Language
German
Primarily Uses
RMMV
I contacted Galv beforehand and sadly, he doesn't have the time to look into it himself.

Shards are items, weapon or armors that you define as such via notetags. They can then be equipped into the slots in the magic shards scene.
Since they can teach skills upon equipping (or upon placing certain shards next to each other) I would use them as the main means of learning / equipping skills.

I have seen you helping alot of other people in the requests board lately and I really appreciate your help. If you could guide me through how to implement that change, I'd be very grateful mogwai.
 

Zack Phoenix

Artist
Veteran
Joined
Jun 12, 2013
Messages
187
Reaction score
26
First Language
German
Primarily Uses
RMMV
So unfortunately adding the term in line 960 didn't change anything.
Any other ideas? I would be thankful for anyone's help.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
591
First Language
English
Primarily Uses
RMMV
Oops. It appears that line is for adding the whole shardMenu. It's also redundant because it will return in an earlier line if disabled anyway. Take that edit out.

How do I get shards in the menu to test this? I'll try it out. Is it like an item?
 

Zack Phoenix

Artist
Veteran
Joined
Jun 12, 2013
Messages
187
Reaction score
26
First Language
German
Primarily Uses
RMMV
Maybe it's best to try out the demo that Galv provided. There you can see how they work - they're notetagged armors and weapons. So yeah, they're items that you equip into certain slots.
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,301
Reaction score
1,565
First Language
English
Primarily Uses
RMMZ
Try searching for and changing:
Code:
Window_ShardItem.prototype.includes = function(item) {
    return item && item.isShard;
};
to:

Code:
Window_ShardItem.prototype.includes = function(item) {
    return item && item.isShard && (this._actor && this._actor.canShardEquip(item));
};

EDIT: I also updated my plugin to version 2.2 to include this with a plugin setting.
 
Last edited:

Zack Phoenix

Artist
Veteran
Joined
Jun 12, 2013
Messages
187
Reaction score
26
First Language
German
Primarily Uses
RMMV
You looking into this even though you're quite busy means a lot, thank you very much Galv. This thread can be closed now
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Was stressing about this plugin earlier, but pretty happy with how its looking now! Purple makes it pop more too!! :)
A friend requested me to do a pfp for his twitch channel, so far he approved one of my sketches, so going to digital now. The style he's looking for is quite different from my usual, hopefully I can get it right... :kaoback:
I am so hyped! A new post update and im anxious to see reactions..eeeeeeee
When a youtuber plays your project or game made by you using MAKERs, you will just be awe struck

Forum statistics

Threads
105,478
Messages
1,014,005
Members
137,117
Latest member
Deli
Top