Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
Passive Skills Script V1.0b
Created by Neon Black



What is it?
This script allows you to apply states to skills to add passive buffs while the skill is learned. This is done in two simple steps as detailed below. These passive buffs work exactly like the states (for the most part as far as I can tell) and allow you to add unique new features to your game.

How can I use it?
Place this script anywhere in the script editor below materials and above main. This script has two simple steps to make a passive skill.

  • Create a state with the buffs or debuffs you would like to apply. Note the skills ID.
  • Add the line "passive[x]" to a skill's notebox where "x" is the ID of the state you want to apply. Note that enemies do not get passive states from skills.
What does it work with?
Once again, should work with pretty much everything. There may be some compatibility issues with extra stat scripts, but there most likely won't be any issues with other scripts.

While this script works with Yanfly's elemental absorb and similar scripts, the passive skills do not get the added features from them.

How can I get the script?
Version 1.0b (base script, 9.5.2012) is available from my pastebin account here.

I would like to use this code.

This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://cphouseset.wo...d-terms-of-use/.

Author's Disclaimer:
I know a little while back some people were looking for a passive skills script. I don't know if one was ever found or created, but I made this one anyway. This has got to be the easiest thing I have ever made. Seriously, look at it. Some of my scripts have instructions sections bigger than this script. Anyway, if you get any issues just let me know. As always, enjoy.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,877
First Language
English
Hmm, so it just adds the specified state's features to the actor.

Or at least, I think it should?

I gave one of my states +1000% MHP but my actor isn't getting the bonus.

EDIT: I see the issue. You're iterating over @skills, which does not include skills that have been added through features.

When I wrote my passive skills script, that was where I got stuck and couldn't progress.
 
Last edited by a moderator:

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
Whoops, didn't realize that. Ha, gimme a few moments, I'll do something about that. Thanks for pointing that out.

EDIT: Okay, just modded a few lines to make it so that it looks at skills learned from states, items, etc. It only does one pass over the skills thought so it will not get passives from skills learned from passives if that makes any sense. Should work. Let me know if there are any other issues.
 
Last edited by a moderator:

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
164
You can probably just use Game_Actor#skills although Game_Enemy doesn't seem to have an equivalent method.
 
Last edited by a moderator:

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
You can probably just use Game_Actor#skills although Game_Enemy doesn't seem to have an equivalent method.
That's pretty much what I did, though I had to have it ignore a second pass so it wouldn't get stuck in an infinite loop. Enemies don't get passives with this script, so I don't have to worry about that.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,877
First Language
English
Wow, how is it actually resetting the passover when I add/remove features?

For example, I have an armor that gives me a passive skill. When I equip the armor, I get the bonuses. When I remove the armor, I lose the bonuses.

It looks like you just added 3 lines to stop the recursion but I don't understand how that actually works.

EDIT: OH, right, the call to `skills` just needs to get a list of skills, which is a one-time thing. So although it is still looping because the game updates constantly, there isn't a recursive loop between passives and feature_objects. I get it. Genius solution.
 
Last edited by a moderator:

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
Correct, added lines 62, 74, and 79 and modified line 75 from "@skills" to "skills". When you change the armour it changes all of the features and stats and whatnot. It then......... ah screw it, I don't know what I'm doing half the time (honestly) I just know the end result works. >_> ;; The passover variable is just there to prevent it from repeating the feature check over and over. Or rather, it just prevents the script from checking the passives for skills while checking the skills for passives. After it's done checking the skills it resets it to false. That's why I said you can't get passives from passives.
 
Last edited by a moderator:

ClubIce

Warper
Member
Joined
Oct 29, 2012
Messages
1
Reaction score
0
First Language
Español
Primarily Uses
I love you script. this script would be more awesome if it has a condition for activate its effect. Example:

- type of weapon used

- a actived switch

- value of a variable
 

Skeppio

Villager
Member
Joined
Oct 15, 2012
Messages
9
Reaction score
0
First Language
English
Primarily Uses
Is there any way for this to work with other script in states? For example, in Yanfly's Element Absorb script, I can get the absorb script working fine, but when I try to make it a passive skill, it doesn't work. I think the problem is that when a state is being used as a passive one, it's not reading anything in the notes section, where the variable for absorbing is written.

Hope that makes sense.
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
It doesn't work because YF's script checks actor/enemy notetags followed by states while my passives script adds these things to features.  One or the other would need to be pretty much completely re-written, which I don't feel like doing at this time.  Does Tsukihime have elemental absorption in his features manager?  My passives (or his passives script) should work work with that.
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
Yanfly has it where actors, classes, equips, enemies, or states can be tagged with a tag such as "<element absorb: x>" and when hit with the element of that ID, the damage is absorbed as HP and heals the target.  He has absorption checked in a few different ways, but the main piece of code that makes it incompatible is this section:

def element_absorb?(element_id)  ## Stuff we're not concerned with here.  for state in states    next if state.nil?    return true if state.element_absorb.include?(element_id)  endend
In other words, elemental absorption is checked from all currently active states, while my passives script just adds states' effects to a battler's features making the two incompatible.  If you wanted to take a look, the page and script in question is this one here.

I'd screw with making them compatible, but I don't have the time.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,877
First Language
English
Right, so passive skills is handling features the same way the rest of the feature system is implemented.

I looked over the absorption code and I can probably toss a feature wrapper around it and expose it with a simple

<ft: element_absorb x>I'm assuming your script doesn't need to know how the features are handled, but just let's the engine know that the actor has some extra features from their skills.
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
Correct.  It just groups passives in with the features like normal.
 

Lionheart

Veteran
Veteran
Joined
Apr 16, 2012
Messages
52
Reaction score
0
First Language
Italiano
Primarily Uses
Is there any way for this to work with other script in states? For example, in Yanfly's Element Absorb script, I can get the absorb script working fine, but when I try to make it a passive skill, it doesn't work. I think the problem is that when a state is being used as a passive one, it's not reading anything in the notes section, where the variable for absorbing is written.

Hope that makes sense.
Great script, however I also noticed this, and to me that would also passive skills would read the notes box ...!
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,877
First Language
English
Rather than supporting an arbitrary number of scripts that could be possibly anything, it would make sense to have other scripts implement their stuff as features if they want it to be treated as passive features.


It would be too much work on Neon's end to have to, for example, parse a note to figure out that a state is supposed to provide absorption features. While it seems trivial to just check whether the state provides absorption or not, what if I ask him to support another dozen scripts that use note-tags?
 
Last edited by a moderator:

Lionheart

Veteran
Veteran
Joined
Apr 16, 2012
Messages
52
Reaction score
0
First Language
Italiano
Primarily Uses
Rather than supporting an arbitrary number of scripts that could be possibly anything, it would make sense to have other scripts implement their stuff as features if they want it to be treated as passive features.

It would be too much work on Neon's end to have to, for example, parse a note to figure out that a state is supposed to provide absorption features. While it seems trivial to just check whether the state provides absorption or not, what if I ask him to support another dozen scripts that use note-tags?
I know, but many scripts Yanfly yield many such status that is triggered by the notes box, but with the passive abilities do not activate!
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
Yes, Yanfly does things a bit funny.  Not badly, just oddly.  Considering passive skills act as skills and features, while Yanfly directly checks states, the noteboxes are not checked by Yanfly's script.  What I would need to do on my end is look at EVERY Yanfly script that works with states and add a line that adds passive skills to the states for the script, since there's not really an easy way to add the passives to states that would work well (if any of that makes any sense).  My recommendation is to look at what features Tsukihime has instead, since as far as I know his feature manager is compatible with my passive script.

In short, making every YF script compatible with this would be too much work and I'm not going to do it.  Use Tsuki's feature manager instead.
 

Lionheart

Veteran
Veteran
Joined
Apr 16, 2012
Messages
52
Reaction score
0
First Language
Italiano
Primarily Uses
Yes, Yanfly does things a bit funny.  Not badly, just oddly.  Considering passive skills act as skills and features, while Yanfly directly checks states, the noteboxes are not checked by Yanfly's script.  What I would need to do on my end is look at EVERY Yanfly script that works with states and add a line that adds passive skills to the states for the script, since there's not really an easy way to add the passives to states that would work well (if any of that makes any sense).  My recommendation is to look at what features Tsukihime has instead, since as far as I know his feature manager is compatible with my passive script.

In short, making every YF script compatible with this would be too much work and I'm not going to do it.  Use Tsuki's feature manager instead.
I understand the fact 'that Yanfly and others have created scrip that I needed ...

Example: "AUTO-"-Note box, "Steal status"-Notes box, "Skill Replace" Note-box,

"Double Cast"-Note box ...

However, what are the scrip of Tsukihime that are compatible with yours?!?
 
Last edited by a moderator:

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
376
First Language
Sarcasm
Primarily Uses
I dunno.  Why don't you check his blog.  It's not my job to find scripts for your game.
 

Latest Threads

Latest Profile Posts

Theydies and gentlethems, presenting Touch the Stars character #1: Anna Smith and her transformed form, Sagittaria!1624568259771.png
Anyone seen Dsiver around?
I wish character bust packs had options for both side-facing and front-facing for the same characters.
Looks like I'm going to have to cancel another game.
For now it is in testing phase: Changing the game icon from Rm2k/2k3 without needing to edit the executable.
Rm2k-DinChangeIcon.png

Forum statistics

Threads
112,528
Messages
1,068,980
Members
146,216
Latest member
WTCraft2003
Top