Skills change with weapon equip?

Sc0wly

Veteran
Veteran
Joined
Feb 13, 2017
Messages
46
Reaction score
11
First Language
English
Primarily Uses
RMMV
Hello all. I was just wondering if anyone knows of a way to make it so that all the skills currently available to a character automatically update when a different weapon is equipped. Any help would be really appreciated! :D
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
This is actually very easy to do inside the editor, since it is a built-in feature, so I'll let you first explore the features on your own.
 

Sc0wly

Veteran
Veteran
Joined
Feb 13, 2017
Messages
46
Reaction score
11
First Language
English
Primarily Uses
RMMV
If you're referring to the required weapon option I'm afraid it's inadequate to the task. I don't want a character's skill roster to change based on weapon type. I want all skills (and subsequently, their animations) to change automatically based on the individual weapon (the precise item itself, not the type. The reason being that my weapon appearances are included in my spell effect animations in order to bypass the visual limitations of the build-in weapon functionality.

If you have another solution though, I'd be interested in hearing it. I've explored the editor's features quite a bit at this point and I can't seem to find it.

Edit: I should also add that I can't use the required weapon function because the editor limits you to 99 weapons and I'll need more space than that.
 
Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
Weapond and weapon types are two different things. Weapon types are dealt with in types section in database, where you can do nothing about anything but names. Individual weapons are dealt with in the weapons sections and there you have the exact same change privileges as in class window, actor window, item window, armors window and states window. Therefore changing skill based on classes is possible, having individual actor skills is possible, skills based on equipped weapons and armors are possible and even skills learned by consumable items are possible. It is a built-in feature. The only thing that isn't a built-in feature is changing skill animations, for which you will need to use plugins. But you can add or lock individual skills with each weapon, I have done it a dozen times and played games where it has been done.
 

Sc0wly

Veteran
Veteran
Joined
Feb 13, 2017
Messages
46
Reaction score
11
First Language
English
Primarily Uses
RMMV
I know that weapon and weapon type are two different things. As stated I'm referring to individual weapons not types. The skill change based on equipped weapon and armor is what I would need, however even though I've looked for this feature I can't find it. I wouldn't ask if I knew where it was and it's not like I'm too lazy to to look (I've spent quite a bit of time trying to figure this out). If you know where this feature is accessed please convey an answer :)
 

Sc0wly

Veteran
Veteran
Joined
Feb 13, 2017
Messages
46
Reaction score
11
First Language
English
Primarily Uses
RMMV
Nvm. I found it :D

For any other new users wondering about this feature:

1. Click the gear icon at that top of the editor to bring up the database tab.
2. Click the weapon tab on the left.
3. Highlight the weapon you want to adjust
4. Under the "Traits" section on at the top right double click one of the empty blue/white rows in the text field.
5. In the prompt that comes up select the "Skills" tab.
6. Under this tab there are options to add or seal skills that are currently in your project.

:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
In this picture you can even see the proof.
Screenshot_78.png
 

Sc0wly

Veteran
Veteran
Joined
Feb 13, 2017
Messages
46
Reaction score
11
First Language
English
Primarily Uses
RMMV
So I messed around with adding traits to weapons. Unfortunately sealed skills still appear in the skill menu and are grayed out. Is there a way to hide skills entirely when they're sealed?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
Yanfly's skill core should help.
 

Sc0wly

Veteran
Veteran
Joined
Feb 13, 2017
Messages
46
Reaction score
11
First Language
English
Primarily Uses
RMMV
I'm currently using Yanfly's skill core and It's been amazing for a ton of things. I found a little script (Posted by Shockra) that should help:

<Custom Show Eval>
if (user.equips()[0].wtypeId = weaponTypeId) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>

Unfortunately I'm so dense when it comes to the more technical aspects of this that I don't actually know how to find a weapon's individual ID. Most of the info I've found by googling it has admittedly been over my head. :(
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
That's why I only give vague advice to newbies instead of fully fledged answers. They would just use the codes, but they wouldn't really understand what I said, and then another thing appears, so they ask again and again...

Anyway, this is what I have learned throughout the season. The console is your best friend.

If you want to find out weapon's id, then using user.equips() doesn't really help, since this is only a battle matter, so it stores things that are important for battle like weapon type.
You need to access the item directly. And for that you need to use not user.equips(), but user._equips. Since I do this on a world map, I don't use user, but $gameActors, since user would throw undefined.
Screenshot_79.png
There are five items hidden inside. If I click on one of them, it tells me all info about it, since the Game_Item is an object. You can easily see that there is a small triangle next to it, which means it is an object and has these properties.
Screenshot_80.png
So if I want to use the actor's weapon somewhere, I type $gameActors.actor(1)._equips[0]._itemId if I don't have a variable party (which means if I have formation turned off and no new party members).
If I have a variable formation, I can use $gameParty.members()[0]._equips[0]._itemId, which uses the first member of a party.
If I want to use it on the user's weapon id, then simply user._equips[0]._itemId.
It may take a while to find stuff in the console, because you have to type in the right thing.
So for example if I want to find out the element id of a skill, but I'm not sure what syntax to use... Simply use the parent.
I didn't know about the itemId, so I typed $gameActors.actor(1)._equips[0]. However, if you don't know this, then simply type in $gameActors.actor(1) and the game prints you all properties of this actor. All these properties can be worked with.

Wel, that's it for today's lesson :D
 

Sc0wly

Veteran
Veteran
Joined
Feb 13, 2017
Messages
46
Reaction score
11
First Language
English
Primarily Uses
RMMV
Thanks for the information, Poryg. I was able to find the weapon ID using your script :D
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top