KEquipSkills VX

KEquipSkills VX
Version 1.1.1

by Kyonides
​


Introduction

It's a scriptlet that allows you to equip skills aka temporarily learn a skill if a piece of equipment like a weapon or an accessory is currently equipped.

There was another scriptlet out there but it sucked 😛 for it used an iterator when I noticed it gotta be simpler. And yes, I was right about that! Take a look for yourselves!

Ruby:
#   v1.1.1 - 2023-06-12

# In order to add new skills whenever you equip a new Weapon or Armor,
# You need to configure a couple of CONSTANTS.

# ACTORS_INIT_BEHAVIOR.default = :direct
# The line of code above means that Any Actor not listed there,
# will be able to learn a single skill from the Weapon or Armor.

# - If ACTORS_INIT_BEHAVIOR for a given Actor is set to :direct

# DIRECT_WEAPONS[WeaponID] = SkillID
# DIRECT_ARMORS[ArmorID] = SkillID

# - If ACTORS_INIT_BEHAVIOR for a given Actor is set to :checks

# CHECK_WEAPONS[WeaponID] = { :skill => [SkillID1, etc.],
#   :class => [ClassID1, etc.], :actor => [ActorID1, etc.] }
# CHECK_ARMORS[ArmorID] = { :skill => [SkillID1, etc.],
#   :class => [ClassID1, etc.], :actor => [ActorID1, etc.] }

# 0 as an ID allows any class or actor to equip the skill!

# * Script Call * #
# - Change a given Actor's Equip Check Type
#   Available Types: :direct or :checks
# game_actors[ActorID].equip_check_type = Type

module KEquipSkills
  ACTORS_INIT_BEHAVIOR = {}
  ACTORS_INIT_BEHAVIOR.default = :direct
  DIRECT_WEAPONS = {}
  DIRECT_ARMORS = {}
  CHECK_WEAPONS = {}
  CHECK_ARMORS = {}
# * Beginning of Customization * #
  DIRECT_ARMORS[43] = 162
  CHECK_ARMORS[43] = { :skill => [162], :class => [], :actor => [] }


Terms & Conditions

Free for use in any game.
Include my nickname in your game credits.
Mention this forum as well.
Don't adopt a stray cat. 😛
That's it!
I ran into a bug when trying to use this scriptlet for the first time.
Line 39:
kyon_ekuip_skills_gm_actor_equip(equip_type, item, test)

Needs to be this instead:
kyon_ekuip_skills_gm_actor_change_equip(equip_type, item, test)
Maintenance Update​

Smashed a little bug that Nobody ever noticed until recently.
I guess that it happened while I was working on the RMXP port simultaneously...
I guess that's pretty much all I had to do here. 😛
Script Update!​

KEquippedSkills has been rebranded as KEquipSkills! 😮

From now on, version 1.1.1 now lets you set 2 different sets of CONSTANTS depending on HOW you want the Equipment Skills to be equipped by your Actors.
  1. Direct Method
  2. Checks Method
What this means is that you can simply tell the game that a specific Actor has a direct equipment skill learning process. OR the Actor needs to pass a few checks before he or she can equip the skills by equipping a weapon or armor based upon the Class ID or the Actor's ID.

By the way, using 0 as an ID allows either any Class or any Actor to learn a given skill.
Version 1.2.1 Has Been Released on Both XP & VX!​

The VX port no longer depends on too many Constants as the XP version. Now it uses custom note tags like the ones below.

It also allows you to learn 1+ skills per equipment piece even while using the Direct Method note tag.

Code:
# - Teach a Skill Immediately using Weapon or Armor or Item
#   Leave a note tag like the following note:
# <equip skills 12 14 16>

# - Or Check if the Class ID or the Actor ID's list against your Notetag's
#   Leave a note tag like the following note:
# <equip skills 2 5 classes 1 2>
# <equip skills 4 8 9 actors 3 6 9>
KEquipSkills XP Has Got a Brand New Add-On!​

Starting from today, the RMVX port includes a simple add-on that might show up during the Item Menu scene.
😅: Why does it even matter?
Well, it happens to feature a new type of Item that will let the Target Actor learn just 1 out of a group of predefined skills.

Let's take a look at the embedded comments for a moment.

Code:
# * KEquipSkills XP - Pick Skills Item Add-On * #
#   Scripter : Kyonides Arkanthes
#   2023-06-15

# This script add-on will allow the parent script to let a given hero learn
# ONE out of a bunch of skills only.

# It depends on the default Scene_Item class to work properly.

# - Create a Pick Skill Item - Leave a note!
#   The number of skills or have skills does not matter here!
# <pick skill 2 4 have 10 11>

Of course, you can leave a note with 6 skills you can learn and have 0 skills as a requirement.
Yeah, you simply write something like...

Ruby:
<pick skill 2 4 6 have 0>

And it will allow anybody to learn one of those skills! 😮

The new script is already included in my demo, but it's not mandatory to implement it in your games at all.

Original thread: https://forums.rpgmakerweb.com/threads/kequipskills-vx.125200/