Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Falcon

21
New Projects / Re: [XP] Crystals (Working Title)
September 07, 2008, 12:31:43 pm
I'm definatly going to check this out once the jets game is over, this looks nice.
22
RMXP Script Database / [XP] Luck
September 07, 2008, 12:24:19 pm
Luck
Authors: Falcon
Version: 1.0
Type: Actor/Battle Add-on
Key Term: Misc System



Introduction

This Script allows each actor to have luck, a hidden stat which affect critical hit chance, item gained chance, and gold gained chance.


Features


  • The party's average luck effects the percent of getting an item in battle
  • The party's average luck effects the amount of gold gained in battle
  • Each actor's luck effects their critical hit chance



Demo

http://www.mediafire.com/?32b2dylwemj


Script
http://falcon.rmrk.net/luck.txt
Spoiler: ShowHide
#==============================================================================
# Luck Script 1.0
#------------------------------------------------------------------------------
# By The_Falcon
#==============================================================================

#==============================================================================
# Instructions
#------------------------------------------------------------------------------
# To use this script, go down to line 64 and define each actor's luck
# Luck can also be altered in game with the following call script command:
# $game_actors[X].luck = Y
# With X being the actor id number and Y beeing the luck value.
# It's worth noting you can have unlucky characters by assign a negative value
#==============================================================================

#==============================================================================
# The following default methods are rewritten:
# Scene_Battle : start_phase5
# Game_Battler : attack_effect
#------------------------------------------------------------------------------
# The following default methods are aliased
# Scene_Title  : command_new_game
#==============================================================================

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
attr_reader   :luck # luck
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias luckinitialize initialize
  def initialize
luckinitialize
@luck = 0
  end
  #--------------------------------------------------------------------------
  # * Change Luck
  # newluck : new luck
  #--------------------------------------------------------------------------
  def luck=(newluck)
# Change luck
@luck = newluck
  end
end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================

class Scene_Title
  alias new_game_luck command_new_game
  def command_new_game
new_game_luck
#==============================================================================
# Set the actor's luck here!
#==============================================================================
$game_actors[1].luck = 50
$game_actors[2].luck = 30
$game_actors[3].luck = -30
$game_actors[4].luck = 10
$game_actors[5].luck = 30
$game_actors[6].luck = 40
$game_actors[7].luck = 100
$game_actors[8].luck = 70
#==============================================================================
  end
end
#==============================================================================
# ** Scene_Battle (part 2)
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Start After Battle Phase
  #--------------------------------------------------------------------------
  def start_phase5
# Shift to phase 5
@phase = 5
# Play battle end ME
$game_system.me_play($game_system.battle_end_me)
# Return to BGM before battle started
$game_system.bgm_play($game_temp.map_bgm)
# Initialize EXP, amount of gold, and treasure
exp = 0
gold = 0
treasures = []
# Initialize the variable while the party's combined luck will be stored
partyluck = 0
# Calculate the party's combined luck
for i in 0...$game_party.actors.size
  partyluckold = partyluck
  partyluck = $game_party.actors[i].luck + partyluckold
end
# Loop
for enemy in $game_troop.enemies
  # If enemy is not hidden
  unless enemy.hidden
# Add EXP and amount of gold obtained
exp += enemy.exp
gold += enemy.gold
# Increase/decrease the chance of getting an item based on luck
random = (rand(100) - (Integer(Float(partyluck/$game_party.actors.size))/10))
# Determine if treasure appears
if random < enemy.treasure_prob
  if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
  end
  if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
  end
  if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
  end
end
  end
end
# Treasure is limited to a maximum of 6 items
treasures = treasures[0..5]
# Obtaining EXP
for i in 0...$game_party.actors.size
  actor = $game_party.actors[i]
  if actor.cant_get_exp? == false
last_level = actor.level
actor.exp += ((exp * $game_party.actors[i].luck/10) + exp)
if actor.level > last_level
  @status_window.level_up(i)
end
  end
end
# Calculate the extra gold the party will recieve
extragold = Integer(gold * ((Float(partyluck/$game_party.actors.size))/1000))
# Obtaining gold
$game_party.gain_gold(extragold + gold)
# Obtaining treasure
for item in treasures
  case item
  when RPG::Item
$game_party.gain_item(item.id, 1)
  when RPG::Weapon
$game_party.gain_weapon(item.id, 1)
  when RPG::Armor
$game_party.gain_armor(item.id, 1)
  end
end
# Make battle result window
@result_window = Window_BattleResult.new(exp, extragold + gold, treasures)
# Set wait count
@phase5_wait_count = 100
  end
end
#==============================================================================
# ** Game_Battler (part 3)
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass for the Game_Actor
#  and Game_Enemy classes.
#==============================================================================
class Game_Battler 
  #--------------------------------------------------------------------------
  # * Applying Normal Attack Effects
  # attacker : battler
  #--------------------------------------------------------------------------
  def attack_effect(attacker)
# Clear critical flag
self.critical = false
# First hit detection
hit_result = (rand(100) < attacker.hit)
# If hit occurs
if hit_result == true
  # Calculate basic damage
  atk = [attacker.atk - self.pdef / 2, 0].max
  self.damage = atk * (20 + attacker.str) / 20
  # Element correction
  self.damage *= elements_correct(attacker.element_set)
  self.damage /= 100
  # If damage value is strictly positive
  if self.damage > 0
# Critical correction
random = (rand(100) - (Integer(attacker.luck/10)))
if random < 4 * attacker.dex / self.agi
  self.damage *= 2
  self.critical = true
end
# Guard correction
if self.guarding?
  self.damage /= 2
end
  end
  # Dispersion
  if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
  end
  # Second hit detection
  eva = 8 * self.agi / attacker.dex + self.eva
  hit = self.damage < 0 ? 100 : 100 - eva
  hit = self.cant_evade? ? 100 : hit
  hit_result = (rand(100) < hit)
end
# If hit occurs
if hit_result == true
  # State Removed by Shock
  remove_states_shock
  # Substract damage from HP
  self.hp -= self.damage
  # State change
  @state_changed = false
  states_plus(attacker.plus_state_set)
  states_minus(attacker.minus_state_set)
# When missing
else
  # Set damage to "Miss"
  self.damage = "Miss"
  # Clear critical flag
  self.critical = false
end
# End Method
return true
  end
end



Instructions

As long as you've defined the actor's luck around line 64, put this above main, below the default scripts, and it should work fine.


Compatibility

Probably incompatible with SDK and most other Battle Systems, I rewrite too many methods.


Credits and Thanks

Give credit to Falcon.
Thanks to DragoonNouman and Ancient Algebra for the testing.

23
RMXP Script Database / Re: [XP] Tax
September 07, 2008, 11:59:50 am
I think someone built it in to their own script at .org, I think this is the only one for the default system though.
24
RMXP Script Database / [XP] Tax
September 07, 2008, 09:44:11 am
Tax
Authors: Falcon
Version: 2.0
Type: Shop Add-on
Key Term: Custom Shop System



Introduction

This Script allows the user to add a sales tax to items that are sold in a shop.
In addition, the user may use negative taxes, for discount shops.
The user can easily change the tax rate using call script.



Features


  • Change the tax rate to anything you want. (Even negative for discounts!)




Screenshots

Spoiler: ShowHide




Script

Spoiler: ShowHide
#============================================================================
# Tax Script 2.0
#----------------------------------------------------------------------------
# By Falcon
# Thanks to Blizzard for the idea that triggered version 2.0
#----------------------------------------------------------------------------
# This system should be compatible with all shop systems, but the
# Shop Status window will only show the tax/discount rate for the default
#============================================================================

# setup the variable that will hold the tax rate
class Game_System
 attr_accessor :tax
 alias init_tax initialize
 def initialize
   init_tax
   @tax = 0
 end
end

# increase the price of the following items by the tax rate
module RPG
 class Item
   alias price_tax price
   def price() (price_tax + price_tax*($game_system.tax || 0) / 100).to_i end
 end
 
 class Weapon
   alias price_tax price
   def price() (price_tax + price_tax*($game_system.tax || 0) / 100).to_i end
 end
 
 class Armor
   alias price_tax price
   def price() (price_tax + price_tax*($game_system.tax || 0) / 100).to_i end
 end
end

class Window_ShopStatus < Window_Base
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   return if @item == nil
   case @item
   when RPG::Item
     number = $game_party.item_number(@item.id)
   when RPG::Weapon
     number = $game_party.weapon_number(@item.id)
   when RPG::Armor
     number = $game_party.armor_number(@item.id)
   end
   self.contents.font.color = system_color
   self.contents.draw_text(4, 0, 200, 32, "Number in Possession")
   self.contents.font.color = normal_color
   self.contents.draw_text(204, 0, 32, 32, number.to_s, 2)
   self.contents.font.color = system_color
   # If there is tax, then let the player know about it
   tax = $game_system.tax || 0
   if tax > 0 # If there is tax
     self.contents.draw_text(4, 0, 200, 86, "Current Tax Rate")
     self.contents.font.color = normal_color
     self.contents.draw_text(132, 0, 104, 86, tax.to_s + "%", 2)
   elsif tax < 0 # If there is a discount rate
     self.contents.draw_text(4, 0, 200, 86, "Discount Rate")
     self.contents.font.color = normal_color
     self.contents.draw_text(122, 0, 124, 86, tax.to_s + "%", 2)
   end
   return if @item.is_a?(RPG::Item)
   # Equipment adding information
   for i in 0...$game_party.actors.size
     # Get actor
     actor = $game_party.actors[i]
     # If equippable, then set to normal text color. If not, set to
     # invalid text color.
     if actor.equippable?(@item)
       self.contents.font.color = normal_color
     else
       self.contents.font.color = disabled_color
     end
     # Draw actor's name
     self.contents.draw_text(4, 64 + 64 * i, 120, 32, actor.name)
     # Get current equipment
     if @item.is_a?(RPG::Weapon)
       item1 = $data_weapons[actor.weapon_id]
     elsif @item.kind == 0
       item1 = $data_armors[actor.armor1_id]
     elsif @item.kind == 1
       item1 = $data_armors[actor.armor2_id]
     elsif @item.kind == 2
       item1 = $data_armors[actor.armor3_id]
     else
       item1 = $data_armors[actor.armor4_id]
     end
     # If equippable
     if actor.equippable?(@item)
       # If weapon
       if @item.is_a?(RPG::Weapon)
         atk1 = item1 != nil ? item1.atk : 0
         atk2 = @item != nil ? @item.atk : 0
         change = atk2 - atk1
       end
       # If armor
       if @item.is_a?(RPG::Armor)
         pdef1 = item1 != nil ? item1.pdef : 0
         mdef1 = item1 != nil ? item1.mdef : 0
         pdef2 = @item != nil ? @item.pdef : 0
         mdef2 = @item != nil ? @item.mdef : 0
         change = pdef2 - pdef1 + mdef2 - mdef1
       end
       # Draw parameter change values
       self.contents.draw_text(124, 64 + 64 * i, 112, 32,
         sprintf("%+d", change), 2)
     end
     # Draw item
     if item1 != nil
       x = 4
       y = 64 + 64 * i + 32
       bitmap = RPG::Cache.icon(item1.icon_name)
       opacity = self.contents.font.color == normal_color ? 255 : 128
       self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
       self.contents.draw_text(x + 28, y, 212, 32, item1.name)
     end
   end
 end
end




Instructions

Place this above main, below everything else and it should work fine :)
To use the sales tax:
call script:
$game_system.tax = TAXRATE



Compatibility

Should work with all custom shop systems, however the window that displays the tax/discount rate will probably not appear.



Credits and Thanks

Thanks to Mega Flare for requesting this, and thanks to SephirothSpawn for helping me with an error!

Special thanks goes to Blizzard, who motivated me to write version 2.0
25
Thanks.

Y'all may have seen the layout before, many idiots just copy the layout and don't bother to fill the rest of the shop up. I've seen like five projects use the exact shop layout XD
26
Quote from: Diokatsu on September 07, 2008, 01:47:02 am
I would love to comment on how this is a cool script but you seem to lack the energy to copy and paste so I'll start to lack the energy to care. No matter what the other forums do you have no excuse to not follow the rules. If we're following the rules of other sites then why not go 4chan on this site. I'm sure you'd be happy with that, right -.-?

Also, good script, i like the idea at least.


You must have the energy to care, considering you posted.

I make rules on other sites, I've been on many sites posting scripts, this forum surprised me with rules that I thought were stupid; Blizzard has explained to me why these rules were made (it's not just to make us work more). If I had known that before, then I wouldn't have bothered to start all this.
27
I've never seen a RM forum that requires their template be used for scripts; usually they're happy to see any script put up. Whatever though.
28
Tutorial Database / Falcon's Interior Mapping Tutorials
September 06, 2008, 04:29:14 pm
Reading this, I am assuming you know the basics of mapping, if you don't then other tutorials may help you.

Tutorial One: The Shop
Well, instead of doing a house (there are other tutorials for that) I'm going to show you how to make a shop.

Step One

Alright, to start lets fill the first layer with a wood flooring.

Spoiler: ShowHide


Step Two

Next, lets use the wall autotile to make the outline of the building.

Spoiler: ShowHide


Step Three

Now, let's make rooms. Let's make half of the shop a weapon shop, and the other half an item shop.

Spoiler: ShowHide


Step Four

Alright, now it's time to add some walls, go to the first layer and add the walls.
Tip: Use layers effectively, if something can go on the first layer, put it on the first layer, this opens a lot more possibilities for your map

Spoiler: ShowHide


Step Five

Lets now add counters for the shopkeepers to be behind.

Spoiler: ShowHide


Step Six

Okay, now we need to add some objects, let's add a table and a shelf in the item shop, and lets put some weapons behind the counter of the weapon/armor shop. Let's also put some boxes and other things in the item shop, and let's plan on making a row of armor in the weapon/armor shop.

Spoiler: ShowHide


Step Seven

Hold on though, we can't make a row of armor, we only have three layers, and only two would work! And two armors isn't really a row.
Wrong!
To make a row of armor, put half of the armor on the second layer, and the other half on the top layer. This will allow you to make an row of armor ;)

Spoiler: ShowHide


Step Eight

Tip: Never leave too much empty space on a map
Let's add some things to that wall in the middle of the shop.

Spoiler: ShowHide


Step Nine

Alright, now we need to put some more items in the shop, and we should put items on the table.

Spoiler: ShowHide


Step Ten: The Final Step!

Now that the mapping is done, we need to do one more thing, add shopkeepers and other events!
Tip: The eventing layer is your "fourth" layer. The eventing layer can be used as a fourth layer, in addition, people are part of the map as much as a table is. Remember, your hero isn't the only one in the inn or in the shop!

Spoiler: ShowHide


The final product!

A very nice map, would look good in a large forest town :)

Spoiler: ShowHide


Now, here's a view of all the layers.

Spoiler: ShowHide



29
Strikes are for idiots who can't make a script request.

I won't bother to post the rest of my scripts if it's this hard, it's not worth it.
30
Leave it.
31
RMXP Script Database / [XP] Experience Boosting Potions
September 06, 2008, 04:03:23 pm
Experience Boosting Potions
Authors: Falcon
Version: 1.0
Type: Misc
Key Term: Misc Add-on



Introduction

An actor uses a potion, then the potion increases the exp gained.


Features


  • Determine how much exp is boosted and for how many battles.




Demo

http://www.mediafire.com/?6yxlyzyxi43


Script

Spoiler: ShowHide

Paste this above main:
#==============================================================================
# Experience Boosting Potions
#------------------------------------------------------------------------------
# By The_Falcon
# Requested by doodley at rmrk.net
#------------------------------------------------------------------------------
# This script should only be found at the following places:
# rmrk.net
# rmrevolution.rmrk.net
# rmxp.org
# chaos-project.com
#==============================================================================
class Game_System
  attr_accessor   :experience_boost      # how much the exp increases
  attr_accessor   :exp_boost_turns       # how many battles the boost will last
  # Alias the initialize method
  alias exp_boost_initialize initialize
  def initialize
    # Use the old method
    exp_boost_initialize
    # Set both new variables
    @experience_boost = 0.0
    @exp_boost_turns = 0
  end
end

Now, replace this in Scene_Battle 2:
    # Obtaining EXP
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if actor.cant_get_exp? == false
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
        end
      end
    end
With this:
    #-----------------------------------------
    # Experience Potion Additions
    #-----------------------------------------
    if $game_system.exp_boost_turns > 0
      exp += Integer(exp * $game_system.experience_boost)
      exp.round
      $game_system.exp_boost_turns -= 1
    end
    # Obtaining EXP
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if actor.cant_get_exp? == false
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
        end
      end
    end
Then make common events which the experience potions call. The common events should have the following:
$game_system.experience_boost = X
$game_system.exp_boost_turns = Y




Instructions

In the script section.


Compatibility

Probably won't work with other battle systems.


Credits and Thanks

Free to use in any project as long as I get credit.


32
Generally, if anyone reposts a tutorial they're expected to ask permission to repost it.

I of course don't mind if it's here, I'm just ticked off that I wasn't asked for permission :P
33
Why the hell is this here? I was never asked for permission to post this.
34
Welcome! / Re: 'Sup
September 05, 2008, 10:40:23 pm
Quote from: Blizzard on September 05, 2008, 06:49:35 pm
Falcon was one of the people that left RMRK but returned. I am one of the guys that didn't return.


Blame Nouman.
35
RMXP Script Database / Re: [XP] Power Word Shield
September 05, 2008, 10:36:50 pm
There's a difference :P

All I see is some lines XD
36
New Projects / Re: Deira
September 05, 2008, 10:35:32 pm
My curse, everyone ignores my projects mostly :P

The mission is just the start, I assure you, they won't be running from the law for more than an hour.

And no, we haven't won PotM.

Here's how the battle system works:

Well, I may as well explain a bit about the battle system.

Unlike some RPGs, where you can just hammer the enter key to attack, you'll need to think a bit for our system. Nearly ALL skills are on cooldowns, you can't have the mage spam their best attack skill every turn; you'll need to use more than one skill every now and then.

Skill names can be in white (usable), red (needs X turns before you can use it again), or blue (need more EP/RP).

Also, since Tyrius and Dane are unable to use magic, we decided not to give them mana. Instead, they each have a unique way of using their skills. Anyone whose played WoW should feel right at home.

Tyrius, will use Energy, he starts at 100, and recovers a bit each turn. Tyrius should be using skills nearly every turn, and only attacking to recover energy.

Dane, is the opposite of Tyrius; he'll be attacking to fill his rage bar, and once it gets high enough, he can either use skills, or enter the berserk state. In theberserk state, Dane's attacks become much stronger, and have a chance to stun or cause the enemy to bleed.
37
Welcome! / Re: 'Sup
September 05, 2008, 04:33:36 pm
So did I :P
38
RMXP Script Database / Re: [XP] Power Word Shield
September 05, 2008, 04:32:09 pm
I'd rather just delete this than remake it with a new template :P
39
New Projects / Re: Deira
September 05, 2008, 04:30:40 pm
Done.
40
RMXP Script Database / [XP] Power Word Shield
September 05, 2008, 03:41:29 pm
Power Word: Shield Status Effect
Authors: Falcon
Version: 1.0
Type: Status Effect
Key Term: Misc Add-on



Introduction

This script allows you to use the Power Word: Shield status. For those of you who never played WoW, the shield absorbs some damage before it goes away.


Features


  • Absorb Damage, including poisons.
  • Configure how much damage you want the shield to absorb.



Screenshots

Imagine the actor has a status effect called power word shield. Now imagine he takes no damage.


Demo

http://www.rmrevolution.com/138/power-word-shield-status-effect/


Script
Spoiler: ShowHide
#==============================================================================
# ** Power Word: Shield Status Effect
#------------------------------------------------------------------------------
# The_Falcon
# 1.0
# 1.1.07
# SDK Version : 2.3 - Parts 1
#==============================================================================
# This script overwrites the following methods:
#------------------------------------------------------------------------------
# Game_Battler : attack_effect , skill_effect , slip_damage_effect
#------------------------------------------------------------------------------
# This script aliases the following methods:
#------------------------------------------------------------------------------
# Game Battler : initialize , add_state
#==============================================================================
#How to use:
#
#Add the script under the SDK. Then you'll need to make a new state and change the PWS_ID #in the script to the ID of the effect. Then make the skills and whatnot so you can use the #new effect goofy
#Also, keep in mind, the shield is NOT meant to be dispelled, so any dispel effects will #probably screw the system up a bit.
#==============================================================================
#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Power Word: Shield Status Effect', 'The_Falcon', 1.0, '01.01.08')
SDK.check_requirements(2.3, [], [])
#--------------------------------------------------------------------------
# Begin SDK Enabled Check
#--------------------------------------------------------------------------
if SDK.enabled?('Power Word: Shield Status Effect')
 PWS_ID = 17 #ID of the power word shield state
 PWS_PERCENT = 0.2 #The percent of health you want PWS to absorb
#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass for the Game_Actor
#  and Game_Enemy classes.
#==============================================================================
class Game_Battler
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_reader   :pws_hp           # Strength of PWS
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 alias pws_init initialize
 SDK.log_alias(:Game_Battler, :initialize, :pws_init)
 #--------------------------------------------------------------------------
 def initialize
   pws_init
   @pws_hp = 0
 end
 #--------------------------------------------------------------------------
 # * Add State
 #     state_id : state ID
 #     force    : forcefully added flag (used to deal with auto state)
 #--------------------------------------------------------------------------
 alias pws_add_state add_state
 SDK.log_alias(:Game_Battler, :add_state, :pws_add_state)
 #--------------------------------------------------------------------------
 def add_state(state_id, force = false)
   if state_id == PWS_ID
     @pws_hp = Integer(self.maxhp * PWS_PERCENT)
   end
   pws_add_state(state_id, force)
 end
 # log the overwrite
 SDK.log_overwrite(:Game_Battler, :attack_effect)
 #--------------------------------------------------------------------------
 # * Applying Normal Attack Effects
 #     attacker : battler
 #--------------------------------------------------------------------------
 def attack_effect(attacker)
   # Clear critical flag
   self.critical = false
   # First hit detection
   hit_result = (rand(100) < attacker.hit)
   # If hit occurs
   if hit_result == true
     # Calculate basic damage
     atk = [attacker.atk - self.pdef / 2, 0].max
     self.damage = atk * (20 + attacker.str) / 20
     # Element correction
     self.damage *= elements_correct(attacker.element_set)
     self.damage /= 100
     # If damage value is strictly positive
     if self.damage > 0
       # Critical correction
       if rand(100) < 4 * attacker.dex / self.agi
         self.damage *= 2
         self.critical = true
       end
       # Guard correction
       if self.guarding?
         self.damage /= 2
       end
     end
     # Dispersion
     if self.damage.abs > 0
       amp = [self.damage.abs * 15 / 100, 1].max
       self.damage += rand(amp+1) + rand(amp+1) - amp
     end
     # Second hit detection
     eva = 8 * self.agi / attacker.dex + self.eva
     hit = self.damage < 0 ? 100 : 100 - eva
     hit = self.cant_evade? ? 100 : hit
     hit_result = (rand(100) < hit)
   end
   # If hit occurs
   if hit_result == true
     # State Removed by Shock
     remove_states_shock
     #-------------------------------------------
     #If the shield has strength
     if state?(PWS_ID)
       if pws_hp > self.damage
         # Substract damage from the shield's strength
         @pws_hp -= self.damage
         self.damage = "Absorb"
       else
         # Substract remaining strength from damage
         self.damage -= @pws_hp
         # Substract damage from HP
         self.hp -= self.damage
         remove_state(PWS_ID)
       end
     else
       # Substract damage from HP
       self.hp -= self.damage
     end
     #-------------------------------------------
     # State change
     @state_changed = false
     states_plus(attacker.plus_state_set)
     states_minus(attacker.minus_state_set)
   # When missing
   else
     # Set damage to "Miss"
     self.damage = "Miss"
     # Clear critical flag
     self.critical = false
   end
   # End Method
   return true
 end
 # log the overwrite
 SDK.log_overwrite(:Game_Battler, :skill_effect)
 #--------------------------------------------------------------------------
 # * Apply Skill Effects
 #     user  : the one using skills (battler)
 #     skill : skill
 #--------------------------------------------------------------------------
 def skill_effect(user, skill)
   # Clear critical flag
   self.critical = false
   # If skill scope is for ally with 1 or more HP, and your own HP = 0,
   # or skill scope is for ally with 0, and your own HP = 1 or more
   if ((skill.scope == 3 or skill.scope == 4) and self.hp == 0) or
      ((skill.scope == 5 or skill.scope == 6) and self.hp >= 1)
     # End Method
     return false
   end
   # Clear effective flag
   effective = false
   # Set effective flag if common ID is effective
   effective |= skill.common_event_id > 0
   # First hit detection
   hit = skill.hit
   if skill.atk_f > 0
     hit *= user.hit / 100
   end
   hit_result = (rand(100) < hit)
   # Set effective flag if skill is uncertain
   effective |= hit < 100
   # If hit occurs
   if hit_result == true
     # Calculate power
     power = skill.power + user.atk * skill.atk_f / 100
     if power > 0
       power -= self.pdef * skill.pdef_f / 200
       power -= self.mdef * skill.mdef_f / 200
       power = [power, 0].max
     end
     # Calculate rate
     rate = 20
     rate += (user.str * skill.str_f / 100)
     rate += (user.dex * skill.dex_f / 100)
     rate += (user.agi * skill.agi_f / 100)
     rate += (user.int * skill.int_f / 100)
     # Calculate basic damage
     self.damage = power * rate / 20
     # Element correction
     self.damage *= elements_correct(skill.element_set)
     self.damage /= 100
     # If damage value is strictly positive
     if self.damage > 0
       # Guard correction
       if self.guarding?
         self.damage /= 2
       end
     end
     # Dispersion
     if skill.variance > 0 and self.damage.abs > 0
       amp = [self.damage.abs * skill.variance / 100, 1].max
       self.damage += rand(amp+1) + rand(amp+1) - amp
     end
     # Second hit detection
     eva = 8 * self.agi / user.dex + self.eva
     hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
     hit = self.cant_evade? ? 100 : hit
     hit_result = (rand(100) < hit)
     # Set effective flag if skill is uncertain
     effective |= hit < 100
   end
   # If hit occurs
   if hit_result == true
     # If physical attack has power other than 0
     if skill.power != 0 and skill.atk_f > 0
       # State Removed by Shock
       remove_states_shock
       # Set to effective flag
       effective = true
     end
     #-------------------------------------------
     #If the shield has strength
     if state?(PWS_ID)
       if pws_hp > self.damage
         last_hp = @pws_hp
         # Substract damage from the shield's strength
         @pws_hp -= self.damage
         self.damage = "Absorb"
         effective |= @pws_hp != last_hp
       else
         # Substract damage from HP
         last_hp = @pws_hp
         # Subtract shield's last strength from damage
         self.damage -= @pws_hp
         self.hp -= self.damage
         remove_state(PWS_ID)
         effective |= self.hp != last_hp
       end
     else
       # Substract damage from HP
       last_hp = self.hp
       self.hp -= self.damage
       effective |= self.hp != last_hp
     end
     #-------------------------------------------
     # State change
     @state_changed = false
     effective |= states_plus(skill.plus_state_set)
     effective |= states_minus(skill.minus_state_set)
     # If power is 0
     if skill.power == 0
       # Set damage to an empty string
       self.damage = ""
       # If state is unchanged
       unless @state_changed
         # Set damage to "Miss"
         self.damage = "Miss"
       end
     end
   # If miss occurs
   else
     # Set damage to "Miss"
     self.damage = "Miss"
   end
   # If not in battle
   unless $game_temp.in_battle
     # Set damage to nil
     self.damage = nil
   end
   # End Method
   return effective
 end
 # log the overwrite
 SDK.log_overwrite(:Game_Battler, :slip_damage_effect)
 #--------------------------------------------------------------------------
 # * Application of Slip Damage Effects
 #--------------------------------------------------------------------------
 def slip_damage_effect
   # Set damage
   self.damage = self.maxhp / 10
   # Dispersion
   if self.damage.abs > 0
     amp = [self.damage.abs * 15 / 100, 1].max
     self.damage += rand(amp+1) + rand(amp+1) - amp
   end
   #-------------------------------------------
   #If the shield has strength
   if state?(PWS_ID)
     if pws_hp > self.damage
       # Substract damage from the shield's strength
       @pws_hp -= self.damage
       self.damage = "Absorb"
     else
       # Subtract shield's last strength from damage
       self.damage -= @pws_hp
       self.hp -= self.damage
       remove_state(PWS_ID)
     end
   else
     # Substract damage from HP
     last_hp = self.hp
     self.hp -= self.damage
   end
   #-------------------------------------------
   # End Method
   return true
 end
end
#--------------------------------------------------------------------------
# End SDK Enabled Test
#--------------------------------------------------------------------------
end




Instructions

Add the script under the SDK. Then you'll need to make a new state and change the PWS_ID in the script to the ID of the effect. Then make the skills and whatnot so you can use the new effect :)

Also, keep in mind, the shield is NOT meant to be dispelled, so any dispel effects will probably screw the system up a bit.


Compatibility

Tried to make this SDK Compliant and Compatible.


Credits and Thanks


  • Falcon



Author's Notes

Next version, I plan to add:

  • Ability to turn off poison damage absorb.
  • Fix any bugs/errors of course :P


Free to use for non-commerical use, with credit of course ;)