Passive Effects V5.0

Passive Effects
Version: 3.6


Introduction

This script is one of my favorites. This script allows you to create skills that increase stats, among other things for the version. This version also allows you to define when the effect will fade (turns, time, attacks, skills, hits, battles, etc.), and from the thread I created about this script back in the .net days added more effects (change encounter rate, move speed, enchant weapon, elemental power, etc.), also in this version setup multiple passive effects, and setup a skill that deals damage and gives a passive effect. The uses for this script is endless: create a Zombified State, Halve Damage, Double the Amount of Hp Healed, etc.

This script also allows you to set up and tag the effects to items, states, weapons, and armors.

Screenshots
None Needed

Demo
http://www.rmxp.org/forums/downloads.php?do=file&id=1 FIRST LINK NEW DOWNLOAD MANAGER :D

Instructions
Add All scripts Above main, including SDK if you don't have it
The Method and class Library goes Below Scene_Debug but above custom scripts

In the Script Setup your first concern is this
module Passive_Setup
  # Time Effect Setup
  #    active -- decreases During other scenes
  #    wait        -- decreases only in Scene_Map and Scene_Battle
  Time_Effect = 'wait'
  # Passive Skills Element ID indentifier
  Element_ID = 17
  # Element Rate Calculation
  # 1: Weakest, 2: Strongest, 3: Average, 4:Multiplitive 5: Geometric Average
  Element_Rate = 4
end
Expand to see the code.
the comments explain themselves but I'll repeat myself

set Time_Effect to 'active' if you want the passive effects to decrease during other scenes (Scene_Menu, Scene_Name, Scene_Whatever), set it to wait to make them only decrease in Scene_Map and Scene_Battle, this setting only affects effects with the time setting.

Element_ID is the element id to active a passive skill from the database system tab

Element_Rate effects how the method elements_correct calculates the elemental damage, the default is multiplitive, which is the best setting for this script, you can change this setting if you want
  1. Weakest -- Returns the Weakest Rate (Used in Default Scripts) ex (200, 150, 100) rate will be 200
  2. Strongest -- Returns the Strongest Rate (Opposite of Weakest) ex (200, -100, 0) rate will be -100
  3. Average -- Averages all the Rates ex (200, -100, 0) rate will be 33
  4. Multiplitive -- Multiplies all the stats and divides by 100 ^ (size - 1) ex (200, 150, 100, 100) rate will be 300
  5. Geometric_Average -- Added this for fun The Geometric Mean of the rates ex (200, 150, 100, 100) rate will be 131
next you will focus on the data structure of the effects which is explained in full and many examples given in the script, reply if you have trouble understanding

See the script RPG::Skill to setup the passive effect the format for that is
hash[id] = {PASSIVE => [passive_type, faded?]}
passive type is from setup the passive effect to give, faded is optional a string that tells when the effect fades

Note: If no fade effect was given the effect lasts indefinately

To Push an effect without using a skill just do
.passive.push(Game_Passive.new(id))
where is an instance of Game_Battler (ex. $game_party.actors[0], $game_actors[2], $game_troop.enemies[4])
id is the id of the passive effect (defined in setup) to give

FAQ
Awaiting Question

Compatibility

Requires SDK
Requires Method and Class Library (included in demo)

Don't know about Compatibility on this one, compatibility issues can range from features not working (giving an error), to the whole script not working.

Should be compatible with an ABS if and only if when a skill is used it calls method skill_effect

The method Game_Battler#elements_correct was unable to be aliased so note this

Will Have to Merge RPG::Skill#extra if using in conjuction with my Skill Effects

Credits and Thanks
Sol_Fury for requesting some of the features

Author's Notes
if you want to know this was my second ever script released (the first was the Steal Script)
Neat, A lot of people will want this. Hopefully a lot of people will search for this instead of filling the request board with already existing scripts
Now this is a script. Very cool addon to any game, nice work. :)
You have fulfill my request before i request it here, you are really something.
I'm surprised I see so few games using Trickster's battle addons. The skill effects, skill scopes, etc. are amazing and would add massive complexity and density to ANY game. For all those people using the default battle system and looking to make it more interesting.. Why haven't you found this?

Anyways great job Trickster, always love your work. I love that you go through and explain all your scripts as well (as they are usually a bit complicated as far as setup goes).
As usual trickster, your immense source of passive skills, skill scopes, etc are always useful for my current side project.

Thanks for the script :D
Wow, this script is really awesome:D! Great great job trickster! As always, your scripts are impressive and, as always, i'll use them.
The current version of the script has been reposted
Thanks, its something that I was looking for :D
This script has been updated to version 3.6

A Few Bugs have been fixed
Code Cleaned up
Finally I can use it!!

I have had to change lot of things in my scripts in order to make my game compatible with your script, but your Passive Skills are priceless :)

I really think that this is one of the most useful script ever, really.


I also have a question (not sure if maybe it is explained, but I have tried to understand the instructions and dont know how to do this):
Can I make that while an especific character is wearing an armor, every other character gains a benefit asociated to that armor?

Ill try to make it clearer. I have two armors. Life Armor and Fire Armor (easy names :P). What I want to do is that if the main character equips Life Armor (he is the only one who can equip it), every character gains +100 max HP. This benefit last as long as the main character has the Life Armor equiped. But when I equip Fire Armor, the maxHP benefit disapear and instead every character gains fire resistance.

Can that be done?

Thanks
Is this SDK 2.1 compatible?
Kururu now it is :p

@SolarisSpell - I hope you created a patch for whatever problem you were having since I just updated the script what was the problem exactly

No this script can't do that right now, but I will consider adding it for a future version
Well, I had a little trouble with this ^^. I had to delete two scripts in order for the passive skill to work.

Then I have a few problems. First one I realiced was that every single event in the game (not only the player) had a different movement speed than what I had established by commands. Then (and I really think this is strange) mi skills from id 82 to id 97, just died :P. Yeah, nothing really happen when I used them. The animation was shown, but no damage, no states... nothing.

So I have rewriten all that skills and copy/pasted Game_Character2 and Game_Player below the PassiveSkills. (Well my save script also crashed, but only needed to be pasted below in order to work once again)

I thought I was unable to use it, but finally I can make good use of this great script!!

And, of course, thanks for your answer ^_^
Is it possible to create effects that target everyone in battle, Enemy and ally alike?

I'm thinking of weather like effects like Pokemon.

Thank you for your time.
@rexxon: ??? what does that have to do with the passive skills script?
Ok I've started work on Version 4.0 and I need ideas

here's what I have so far
Quote:
mod exp earned
regen
-shop price[selling]
+shop price [buying]
mid money earned
reversed movement
random movement
counter
counter magic
disable


NOW IS THE TIME TO GET THAT ONE EFFECT YOU WANTED FOR THIS SCRIPT POST NOW!!!
Not sure if its already in there, but how about passive effects that do multiple things? For example, one that raises strength, but lowers speed? Or ones that amplify critical hit chance, but lower chances of getting an item? How about a skill that amplifies power if everyone uses it?

IDK about that last one though. People would abuse it with their ultimate skills. Just some thoughts
That's already implemented

Didn't you see this in the setup
  Effects[27] = "enchant:Fire,enchant:Light"
  # For 3 turns attack + amount and physical defense - amount
  Effects[28] = "turns:3,atk:+amount,pdef:-amount"
Expand to see the code.


The first Enchants with Fire and Light
and the second for 3 turns adds amount to atk and pdef

I may see about doing multiple amount variables in 4.0 though

I'll see about reimplementing the critical hit one but that would require an edit to attack_effect which may decrease compatibility

increase chances of getting an item added
varying degrees of reflect magic.

x = % magic reflected back at you...

Aluxes casts fire on Kobold.

Kobold Had 150% Reflect on.

Aluxes is damaged by fire at 150% damage.

---------------------

Decreasing Power:

Bob casts Concealment

Round 1 - 100% Evasion
Round 2 - 75% Evasion
Round 3 - 50% Evasion
Round 4 - 25% Evasion
Round 5 - 0% Evasion

Have it so a person can set it for x turns and the effects would decrease y% per turn. And have it so you can use it with different stats like Strength/Dex/Etc
How about passive skills that are always active like a Max HP increase that lasts even while knocked out.

How about passive skills that grow stronger as the user levels up or have a set level or rank.

For Example

Name: RANK LEVEL
Sword Skill S
MAX HP UP 1
Crtical Hit UP 5
Knife Skill C 3
Dagger Skill SSS 10 max level for levels (SSS is max rank)
Axe Skill H

Also i like to see

Evasion UP Ability which increases evasion but lowers other stats.

But i also would like to see some passive skills that were in the PS1 console RPG Maker to be in this script namely.

Treasure Find UP
1/2 MP Cost
First Attack
2x Physical or Magical Damage
Crtical Hit UP
Reflect Attacks
Attack +1
Resist Magic
HP Drain
Battle Heal
Multi Attack (An Enemy Option in RPG Maker)
Double Attack (An Enemy Option in RPG Maker)
well all the passive scripts are probably covered....i just doubt i'll ever be able to work it.......

Effects[27] = "enchant:Fire,enchant:Light"
# For 3 turns attack + amount and physical defense - amount
Effects[28] = "turns:3,atk:+amount,pdef:-amount"

that doesn't even make sense to me.
Shiro;167573 wrote:
varying degrees of reflect magic.

x = % magic reflected back at you...

Aluxes casts fire on Kobold.

Kobold Had 150% Reflect on.

Aluxes is damaged by fire at 150% damage.


I'll see on its implementation

XP Learner;167588 wrote:
How about passive skills that are always active like a Max HP increase that lasts even while knocked out.


that's already been implemented, just let a passive effect have no fade

XP Learner;167588 wrote:
How about passive skills that grow stronger as the user levels up or have a set level or rank.

For Example

Name: RANK LEVEL
Sword Skill S
MAX HP UP 1
Crtical Hit UP 5
Knife Skill C 3
Dagger Skill SSS 10 max level for levels (SSS is max rank)
Axe Skill H


What do you mean by this

XP Learner;167588 wrote:
Evasion UP Ability which increases evasion but lowers other stats.


Already been done just combine them when defining the effect in the setup
See the one where it enchants with fire and light elements and modifies atk and pdef

XP Learner;167588 wrote:
  1. Treasure Find UP
  2. 1/2 MP Cost
  3. First Attack
  4. 2x Physical or Magical Damage
  5. Crtical Hit UP
  6. Reflect Attacks
  7. Attack +1
  8. Resist Magic
  9. HP Drain
  10. Battle Heal
  11. Multi Attack (An Enemy Option in RPG Maker)
  12. Double Attack (An Enemy Option in RPG Maker)


  1. Already on my list
  2. Added
  3. What do you mean
  4. Added
  5. Already on list
  6. Above part already added
  7. What do you mean
  8. See Modifying types of damage A form of 4.
  9. Explain more
  10. Explain more
  11. Explain
  12. Explain
Well for Example

First Attack- Basically the user of this passive skill can attack first before party member regarless of their agility stat. (for example only for the start of the round.) Or another version that allows always first attacks as long as their HP is not above the crtical zone)

Attack +1- Basically this passive skill allows the character to attack one more time during a round as usual. basically like those 2 hit skills on a single target.

HP Drain- Basically the character sometimes steals a percentage of the opponent HP and uses it on self to restore one health. Basically like a vampire like skill.

Battle Healing- Basically like an Auto-Regenerate skill that restores a small percentage of HP or SP each turn.

Multi Attack- Basically in the PS1 Version of RPG Maker basically said enemy gets three attacks per turn. Basically how about a version that attacks from 1to 3 times at random.

Double Attack- Basically the monster gets two attacks per round. basically dangerous.

--------------------------------------------------------------------------

About certain passive skills that have a level or rank.

Basically for example
At rank S Basically the character has a great experiece using sword type weapons. Using an element in the Tab (Sword PE) And it affects the Damage or special effects when using that type of weapon.

But for another skill for example Max HP UP and it has no rank but it's at level 1

Basically the character HP is up by 5%

Basically a short example.

Level
1 5%
2 10%
3 15%
4 20%
5 25%
6 30%
7 35%
8 40%
9 45%
10 50%

Basically at level 10 the character has a 50% Max HP Increase by spending his skill points on it.
Well, From what I've seen of the passive effects, It looks like the best way to use field spell effects (Similar to Pokemon), is through passive effects. So, I'll wait to see if effects that target everyone (enemy and ally alike) are possible.
XP Learner;167677 wrote:
Well for Example

First Attack- Basically the user of this passive skill can attack first before party member regarless of their agility stat. (for example only for the start of the round.) Or another version that allows always first attacks as long as their HP is not above the crtical zone)


Already been done use the speed option

XP Learner;167677 wrote:
Attack +1- Basically this passive skill allows the character to attack one more time during a round as usual. basically like those 2 hit skills on a single target.


We will see but don't get your hopes up on this one

XP Learner;167677 wrote:
HP Drain- Basically the character sometimes steals a percentage of the opponent HP and uses it on self to restore one health. Basically like a vampire like skill.


Added

XP Learner;167677 wrote:
Battle Healing- Basically like an Auto-Regenerate skill that restores a small percentage of HP or SP each turn.


Already in the list

XP Learner;167677 wrote:
Multi Attack- Basically in the PS1 Version of RPG Maker basically said enemy gets three attacks per turn. Basically how about a version that attacks from 1to 3 times at random.


We will see about this

XP Learner;167677 wrote:
Double Attack- Basically the monster gets two attacks per round. basically dangerous.

We will see about this

XP Learner;167677 wrote:
About certain passive skills that have a level or rank.

Basically for example
At rank S Basically the character has a great experiece using sword type weapons. Using an element in the Tab (Sword PE) And it affects the Damage or special effects when using that type of weapon.

But for another skill for example Max HP UP and it has no rank but it's at level 1

Basically the character HP is up by 5%

Basically a short example.

Level
1 5%
2 10%
3 15%
4 20%
5 25%
6 30%
7 35%
8 40%
9 45%
10 50%

Basically at level 10 the character has a 50% Max HP Increase by spending his skill points on it.


We will see about this thanks for the explanation

[QUOTE=Rexxon;167686]Well, From what I've seen of the passive effects, It looks like the best way to use field spell effects (Similar to Pokemon), is through passive effects. So, I'll wait to see if effects that target everyone (enemy and ally alike) are possible.[/QUOTE]

well you can script it in by just doing this

$game_party.actors.each {|actor| actor.passive.push(Game_Passive.new(id))}
$game_troop.enemies.each {|enemy| enemy.passive.push(Game_Passive.new(id))}
Expand to see the code.


where id is the id of the effect to add
I've got a few addons that might be nice.

- Geomancy stats - this adds to characters stats based on map_id/battleback

ex. the character is on map_id 1, he has 100 more hp, battleback_id 2, he has +10 str, etc...

- Break restrictions - this passive skill enables characters to use skills/weapons they were restricted from using before, such as a warrior not being able to use a rod at first but is able to when he has this passive skill.
With skills, it would add to the character's skill list in the path of learning them. This could be divided in a number of ways, like this:

Step 1: examples of break restrictions

Break Restrictions (rods) - enables the use of rods
Break Restrictions (fire magic) - enables the ability to learn fire spells. This would mean that the character now has fire skills in his/her learning path, like:

Fire 1 will now be learned at level 10. it wouldn't have been learned at all before. If the character is passed level 10, he/she will just gain the skill Fire.

Break Restrictions (water magic) - enables water magic to be learned.
Break Restrictions (Helmets) - enables the use of helmets

Step 2: levels of break restrictions

Break Restrictions (fire magic) lv.1 - enables only the ability to learn Fire at lv. 10.
Break Restrictions (fire magic) lv.2 - enables the ability to learn Greater Fire at lv. 20.
Break Restrictions (fire magic) lv.3 - enables the ability to learn Mass Fire at lv. 40.

Break Restrictions (rods) lv.1 - enables the ability to use Bronze Rod.
Break Restrictions (rods) lv.3 - enables the ability to use Mithril Rod.

These are some examples of Break Restrictions. I don't know if it's even possible, but it would make a great passive skill.
[QUOTE=RMdude333;167727]I've got a few addons that might be nice.

- Geomancy stats - this adds to characters stats based on map_id/battleback

ex. the character is on map_id 1, he has 100 more hp, battleback_id 2, he has +10 str, etc...
[/QUOTE]

Great Idea added to the list

Quote:
- Break restrictions - this passive skill enables characters to use skills/weapons they were restricted from using before, such as a warrior not being able to use a rod at first but is able to when he has this passive skill.
With skills, it would add to the character's skill list in the path of learning them. This could be divided in a number of ways, like this:

Step 1: examples of break restrictions

Break Restrictions (rods) - enables the use of rods
Break Restrictions (fire magic) - enables the ability to learn fire spells. This would mean that the character now has fire skills in his/her learning path, like:

Fire 1 will now be learned at level 10. it wouldn't have been learned at all before. If the character is passed level 10, he/she will just gain the skill Fire.

Break Restrictions (water magic) - enables water magic to be learned.
Break Restrictions (Helmets) - enables the use of helmets

Step 2: levels of break restrictions

Break Restrictions (fire magic) lv.1 - enables only the ability to learn Fire at lv. 10.
Break Restrictions (fire magic) lv.2 - enables the ability to learn Greater Fire at lv. 20.
Break Restrictions (fire magic) lv.3 - enables the ability to learn Mass Fire at lv. 40.

Break Restrictions (rods) lv.1 - enables the ability to use Bronze Rod.
Break Restrictions (rods) lv.3 - enables the ability to use Mithril Rod.

These are some examples of Break Restrictions. I don't know if it's even possible, but it would make a great passive skill.


Well I don't think this will fit with the script sounds like a whole different script to me :-/
[QUOTE=Trickster;167785]Great Idea added to the list



Well I don't think this will fit with the script sounds like a whole different script to me :-/[/QUOTE]

yeah, i suppose the break restrictions are a bit "out there". I have some other simpler ideas though, like these.

skill amplify/divide - this passive skill changes the skill scope of the skill, such as making the skill hit two enemies instead of one or makes the skill target all allies. When the skill is amplified, the damage of the skill is divided among the targets. So, for example, if Cross Cut, which originally hits one enemy for 500 damage is amplified to hit all enemies(5 for ex.), the skill deals 100 damage to each of the enemies.

Weapon - Skill linking - this passive skill grants an effect to the user of the weapon that connects the skill list to the weapon so when the person uses his/her weapon, he/she has a chance of using a random skill from their skill list instead of attacking. You have made weapon-specials, but maybe that could be used to connect to a passive skill.

thnk you, i hope these are a little better. i'll come up with more later^_^
I also have a couple of more ideas inspired by playing certain RPG Games.


How about Anti Status Skills. Basically prevents certain bad status from occuring for example an Anti-Poison which completely prevents Poison.

Or a Poison Resist basically decreses the chance to be hit by the poison abnormal status. by 10% up to a total of 50%


Also how about level up bonus skill

Basically for example Bonus STR which allows extra +1 STR when the character levels up.

Also how about monster slayer type passive skills. which allows the user to do more damage, or reduce the damage from a certain type of monster.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=9411