Hello, is there a way through a plugin or otherwise to assign multiple Weapon Types to a single weapon? For example I would like the weapon "Greatsword" to have both the "Sword" and "Heavy" Weapon Types that I've made in the Database Types section. Thank you.
Assigning Multiple Weapon Types to a Weapon
RPG Maker MZ SupportI Googled "rpg maker mz multiple weapon types plugin" and this came up:
nijikokun.itch.io
I'm sure it's also in the VisuStella Items and Equips Core, if you are using their products.
Edit: Nope, I was thinking about this the wrong way.
Equip Slot Core for RPG Maker MZ by Niji
Control equipment slots dynamically during runtime! Add, remove, lock!
nijikokun.itch.io
I'm sure it's also in the VisuStella Items and Equips Core, if you are using their products.
Edit: Nope, I was thinking about this the wrong way.
Thank you, although I do not think either of these plugins can do what I am looking for. I'd like a weapon to have more than one Weapon Type, not Equipment type. Normally on the Weapon page you can assign one Weapon Type, but I'd like to be able to assign more than 1 through note tags or otherwise. This way a character wielding the Greatsword can use any skill that requires a "Sword" as well as any skill that requires a "Heavy" weapon.
Niji's should be able to achieve what you're looking for.
Equip Slot Core for RPG Maker MZ by Niji
Control equipment slots dynamically during runtime! Add, remove, lock!
nijikokun.itch.io
Code:
Plugin commands to control equip slots
Add multiple equip slots to characters regardless of type
Add multiple equip types to weapons / armors
Add equip requirements to weapons / armors
Dynamically add or remove slots during playthrough
Dynamically lock / unlock slots during playthrough
No, dan is right, everything you quoted there says equip type.
The easy thing to do would be to use VisuStella's Skills & States Core, remove any weapon type requirements from the skill in the database, and add them as requirements via notetag.
For example:
Code:
<JS Skill Enable>
enabled = user.weapons().some(weapon => {weapon.wtypeId == 2 || wtypeId == 5});
</JS Skill Enable>
That will make the skill enabled if the user has equipped weapon type 2 or 5.
Turan, thank you so much, that note tag will definitely open up a lot of possibilities for me. After playing around I *think* the below code as its own plugin combined with the <JS Skill Enable> note tag will give me the desired effect.
[S](() => {[/S] const _DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; DataManager.isDatabaseLoaded = function() { if (!_DataManager_isDatabaseLoaded.call(this)) return false; if (!this._multiWeaponTypeLoaded) { this.processMultiWeaponTypes($dataWeapons); this._multiWeaponTypeLoaded = true; } return true;[S][S] };[/S][/S] DataManager.processMultiWeaponTypes = function(group) { for (let i = 1; i < group.length; i++) { const obj = group[i]; const notedata = obj.note.split(/[\r\n]+/); obj.multiWeaponTypes = []; for (let j = 0; j < notedata.length; j++) { const line = notedata[j]; if (line.match(/<WeaponTypes:\s*(.*)>/i)) { obj.multiWeaponTypes = JSON.parse('[' + RegExp.$1.match(/\d+/g) + ']'); } } } }; Game_Actor.prototype.hasWeaponType = function(wtypeId) { return this.weapons().some(weapon => weapon.wtypeId === wtypeId || (weapon.multiWeaponTypes && weapon.multiWeaponTypes.includes(wtypeId))); };[S]})();[/S]...that doesn't look like it would do anything. Did you write that code?
Edit: You're right, it does not work. Going to go back to trying to write something myself. Thanks again.
Really not a good idea. AI generators generate material - they make it up. There are entire functions in the code you have there which just don't exist in RPG Maker, they've been made up.
If AI bots can't write above a grade school level or consistently solve grade level math the correct way, I don't know why it would seem like a good idea to ask it to write code 😛
Yes - the first two thirds are completely unnecessary, and the bottom is made up and won't ever run.
But it's against forum rules to troubleshoot AI-generated code.
Why wouldn't you learn from an actual source that knows things? Like tutorials or classes or even books?
If there's some terrible reason you don't want to use the existing plugin that does what you want, you could simply ask for the short modification I said would be needed, along with an explanation of it.
Gotcha, thanks. Didn't really know what I expected to be honest but thought it couldn't hurt to try. I appreciate your help. Still learning.
Original thread: https://forums.rpgmakerweb.com/threads/assigning-multiple-weapon-types-to-a-weapon.170638/