MV Skill type named after equipped weapon?

Hey all, not sure where to put this question. But I have a bunch of Yanfly mods installed, so I thought maybe those would work. So far MessageCore and EvalText don't seem to work on this part of the UI.

Basically my game works by giving the player skills based on what weapon they have equipped. So if you equip a revolver, you get skills to shoot and reload the revolver. While an AR gives a different skill for shooting an AR, and so on. At the moment, these skills just go into a general "Combat" skill type. But I've been thinking about adding its own skill type so that it's easier (more obvious?) to access.

I could call this something basic like "Gun." But then I had a thought, "Is it possible to show the equipped weapon's name?" So it would say "Revolver" or "AR" in the above examples.

Not super necessary, but seemed like a cool piece of polish if it can be done!
So basically you want to rename the skill category based on the weapon?
I suppose you could do that by just having as many skill categories as you have weapon types. Then have a common even check what weapon the character has, remove all unused skill categories and add the one needed...

Not gonna say it's worth it as I think it's needless fluff. The player is gonna know if he accessed "Gun" that they will use the skill of their current gun.

Never heard of any plugin solution for that.
I have something like this, the Honkmother. When equipped it gives you a skill that requires you to have the weapon equipped called Honk.

No plugins required!
Do you just want to change a skill type's name to match the equipped weapon's name? For MV, you can try:

JavaScript:
const woootbm_addCommand = Window_Command.prototype.addCommand;
Window_Command.prototype.addCommand = function(name, symbol, enabled, ext) {
    // the id of the skill name to replace, e.g. 1 = Magic
    const id = 1;
    if (ext === id && this._actor && this._actor.weapons()[0]) {
        const name = this._actor.weapons()[0].name;
        this._list.push({ name: name, symbol: symbol, enabled: enabled, ext: ext});
    } else {
        woootbm_addCommand.call(this, name, symbol, enabled, ext);
    }
}

Running on low sleep right now, so not sure if I understood you entirely.
Hey all, not sure where to put this question. But I have a bunch of Yanfly mods installed, so I thought maybe those would work. So far MessageCore and EvalText don't seem to work on this part of the UI.

Basically my game works by giving the player skills based on what weapon they have equipped. So if you equip a revolver, you get skills to shoot and reload the revolver. While an AR gives a different skill for shooting an AR, and so on. At the moment, these skills just go into a general "Combat" skill type. But I've been thinking about adding its own skill type so that it's easier (more obvious?) to access.

I could call this something basic like "Gun." But then I had a thought, "Is it possible to show the equipped weapon's name?" So it would say "Revolver" or "AR" in the above examples.

Not super necessary, but seemed like a cool piece of polish if it can be done!

Made this for you 🙂

CTB_CommandWeaponNameMV Plugin: Click Here to Download

Spoiler
1666915953563.png

1666915909495.png

Setup & How that looks in game:

Edit:
Made a better version of the plugin. Now any command windows that use an actor can use this.
Also aliased now instead of an overwrite to maximize compatibility 😉

So now can also do something like this for example:
Damn, I wish people would make plugins for me just like that lol.
Damn, I wish people would make plugins for me just like that lol.
lol :hswt:
Anything particular in mind?
lol :hswt:
Anything particular in mind?
All good 😀 I'm already paying people for my plugins since I mostly don't need small snippets, but rather full fledged stuff 😀 Appreciate the offer though!
I suppose you could do that by just having as many skill categories as you have weapon types. Then have a common even check what weapon the character has, remove all unused skill categories and add the one needed...
It's simpler than that. You can have a weapon (or armor) add a skill type in the editor. The menu is added and removed when equipping and unequipping the weapon. This is a thought... but considering some other skill-type-based interactions I have in the game, this would get really messy because I would have to call like 70 skill types every time :hswt:
I have something like this, the Honkmother. When equipped it gives you a skill that requires you to have the weapon equipped called Honk.

No plugins required!
Yeah, this is easy to do when it's only one weapon. As there are a lot of guns in my game, this comes up a lot!
Do you just want to change a skill type's name to match the equipped weapon's name? For MV, you can try:
Thanks for the effort! But it looks like you're replacing all skill type names with the weapon? I still have other skill types unrelated to weapon equipped, so I can't go this route.

@ct_bolt This works perfectly! And the replace for attack is brilliant, but I've already set the game up in a way where I have to replace the actual attack skill so I'm good there, heh. You're amazing! Thanks so much! <3

Original thread: https://forums.rpgmakerweb.com/threads/skill-type-named-after-equipped-weapon.152283/