Passive Effects
#1
Passive Effects
Version: 5.0


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
Download Here
(Includes The Passive Effects Engine)


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
Code:
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

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
  • Weakest -- Returns the Weakest Rate (Used in Default Scripts) ex (200, 150, 100) rate will be 200
  • Strongest -- Returns the Strongest Rate (Opposite of Weakest) ex (200, -100, 0) rate will be -100
  • Average -- Averages all the Rates ex (200, -100, 0) rate will be 33
  • Multiplitive -- Multiplies all the stats and divides by 100 ^ (size - 1) ex (200, 150, 100, 100) rate will be 300
  • 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
Note: Permission granted by Trickster to post:
Quote:And if you post what you have now of my stuff then you don't have the latest versions. I'm too lazy/busy to post stuff.
As this is his material, it is deletable upon his request. Due to his current absense, no support is available. Please do not PM or eMail him for support.


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)


Terms and Conditions
Hey, I posted this publicly. You can use it. What do you expect? But if you do use it, I do expect you to spell my name correctly in your game. And yes you can use it in commercial games too.
Reply }
#2
Sorry for necroposting, but I really liked this script cause of the various effect it give and the possibility of adding strategy, however I found an error, upon obtaining perfume, I was an idiot to use it instantly via menu.
Here's the error

Script 'Part 3 - Damage Mods' line 150: NoMethodError occurred.
undefined method 'passive' for nil:NilClass

I also used it when my SP is low via menu, but during battle, the item function just fine.
Reply }
#3
Yep I believe I fixed that before and had it in my set of updates, though its on my other laptop so the official fix will have to wait.

but I went and fixed it again so...

in script Damage mods around line 96

replace this
Code:
# If In Battle
      if $game_temp.in_battle
        # Get Active Battler
        battler = $scene.active_battler
      # If in Scene_Skill or Scene_Item
      elsif $scene.is_a?(Scene_Skill) or $scene.is_a?(Scene_Item)
        # Get Battler using skill/item
        battler = $scene.actor
      end

with this
Code:
# If In Battle
      if $game_temp.in_battle
        # Get Active Battler
        battler = $scene.active_battler
      # If in Scene_Skill or Scene_Item
      elsif $scene.is_a?(Scene_Skill)
        # Get Battler using skill/item
        battler = $scene.actor
      elsif $scene.is_a?(Scene_Item)
        battler = self
      end


also in Script Part 1 Base
line 546-547 needs to be this
Code:
user = $game_temp.in_battle ? $scene.active_battler :
      $scene.is_a?(Scene_Item) ? self : nil

and in Script Passive Effects
lines 146-147 needs to be this
Code:
user = $game_temp.in_battle ? $scene.active_battler :
      $scene.is_a?(Scene_Item) ? self : nil

Meh its been like two years and no one has complained to me about that......

also DVV I will have to smack you for including this line in this repost
Quote:As this is his material, it is deletable upon his request. Due to his current absense, no support is available. Please do not PM or eMail him for support.

I'll have you know that I do answer email if it is directed to tricksterguy@hotmail.com haha
Reply }
#4
I got an error, this time I implemented in my game then in playin with the demo. Can we chat over something to fix this error together?

I got this error from the script and I get this error when I start the game

Script 'Passive Effect' line 22: NoMethodError occurred
undefined method 'each_pair' for ["maxhp","+amount"]:Array
Reply }
#5
Looks as if you are missing a part of the script specifically MACL.
Reply }
#6
Oh, I got part of the MACL 2.3, I found the complete version thanks >.<
Reply }
#7
No prob!
Reply }
#8
Hey trickster, how about making some VX scripts now and then?
Reply }
#9
computerwizoo7: When you get 250 post counts, Trick will code something in VX
Reply }
#10
Trickster, there's another problem. When I go to the battle scene, when I try to damage the enemy and vice-versa, all damages equals to 0, do you know any short-quick solutions?
I made a back up with the script and deleted all the script except this one, I dunno why the damage output is 0 on every weapon, attack, skill, and item.

If it helps very much.
http://www.mediafire.com/?jtynz2l21mi
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Passive Skills DVV DerVVulfman 12 24,230 08-03-2011, 03:53 AM
Last Post: DerVVulfman
   Light Effects Near Fantastica 1 11,257 05-28-2010, 03:48 PM
Last Post: sakhawat21
   States Activation System aka State-Based Passive Augments, Version 0.2 Charlie Fleed 7 12,943 03-06-2010, 09:26 PM
Last Post: fgsfds
   Trickster's Bag Of Skill Effects Trickster 5 15,264 02-23-2010, 06:32 AM
Last Post: fgsfds
   Custom Skill Effects Lowell 0 5,052 03-06-2008, 06:16 AM
Last Post: Lowell
   Passive Effects Engine Trickster 0 5,112 03-02-2008, 06:24 AM
Last Post: Trickster



Users browsing this thread: 1 Guest(s)