06-24-2023, 10:59 PM (This post was last modified: 09-01-2024, 11:16 PM by kyonides.
Edit Reason: ACE + VX + XP
)
KItemTeachSkill
XP + VX + ACE
by Kyonides
Introduction
Pick 1 Item and let your hero learn a New Skill based on the Actor ID or Class ID.
Side Note
If you ever want to use a single Item to make the heroes learn more than 1 Skill at a given time, use my KEquipSkills family of scripts for XP and VX. They are not identical!
For XP
Content Hidden
This script will let you teach a Skill to a Hero by consuming an Item!
There are a couple of caveats to keep in mind.
If the item has the FAILURE_ELEM_ID included in its Element Set, the Hero won't learn the Skill!
Or might learn some USELESS_SKILLS instead.
It is also possible to get a Predefined Item as a Byproduct!
You can limit the number of Heroes that can learn that specific Skill, too.
Add a Skill to SKILL_FOR_ACTORS Constant
Code:
# - Learn the Skill - For Everybody!
# [ItemID1] = [SkillID1]
# - Learn the Skill Depending on 1 or more ActorID's
# [ItemID2] = [SkillID2. nil, nil, ActorID1, etc.]
# - Learn the Skill, Earn an Item, Depending on 1 or more ActorID's
# [ItemID3] = [SkillID3, :item, ItemID1, ActorID1, etc.]
# - Learn the Skill, Check a State, Depending on 1 or more ActorID's
# [ItemID4] = [SkillID4, :state, StateID1, ActorID1, etc.]
For VX
Content Hidden
It teaches your hero a brand new skill using a simple item with special note tags!
If the item has the FAILURE_ELEM_ID included in its Element Set, the Hero won't learn the Skill!
Leave a Note in the Item's Note Box for specific Actors: _teach skill 33 actors 2_
Leave a Note in the Item's Note Box for specific Classes: _teach skill 33 classes 2_
Leave a Note in the Item's Note Box for specific States: _teach skill 33 states 2_
Leave a Note in the Item's Note Box to include Useless Skills to be learned if it fails _useless skills 1 2 3_
Obviously, you can add as many actors or classes as deemed necessary.
OR you can use number 0 for All Actors or All Classes!
For VX ACE
Content Hidden
I know very well that both VX ACE allows you to consume an item and automatically teach the target hero some skill. That's what has inspired me to look for a way to limit that ability to only allow certain actors or classes learn such an useful skill.
Leave a Note in the Item's Note Box for specific Actors: _teach skill actors 1_
Leave a Note in the Item's Note Box for specific Classes: _teach skill classes 1_
Leave a Note in the Item's Note Box for specific States: _teach skill states 1_
Obviously, you can add as many actors or classes as deemed necessary.
Free for use in any game as long as you don't mess with this badass!
Due credit is mandatory.
Tell the werewolf and the bounty hunter that tons of spammers are coming their way!
That's it!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
06-25-2023, 08:07 AM (This post was last modified: 06-25-2023, 08:08 AM by kyonides.)
Brand New Port & Small Maintenance Update
Starting now, you can also limit the number of Actors or Classes that can learn a Skill on RMMV!
While I was working on porting the script to RMMV, I made a little mistake in the RMVX and RMVX ACE installments of my script and only used a regex that could just catch a single number.
Now the bug has been smashed to smithereens! The current version catches as many Actor or Class ID's as initially promised.
The RMXP port was unaffected by that issue so it did not require to get an update at all.
Go enjoy making your heroes suffer a huge disappointment!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
I modified the Window_MenuActor class to make it clear who can learn the skill and who can't!
Besides, I had also managed to smash a bug that made the game fail to display that menu window on screen.
Both Aluxes & Ralph will have to wait for another day to get some updates.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
The script now allows you to reverse the process by forgetting the skill and sending the item back to the party.
If you ever need to change the labels displayed on screen, you can go to the KItemTeach module and change the strings or symbol of the 3 or 5 first CONSTANTS you'll find right there.
For RMXP Only: It also includes a bug fix that makes sure you'll get the corresponding byproduct, an item, for consuming the original item as first intended.
4 Screenshots
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.