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.

Topics - Falcon

1
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.

2
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
3
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



4
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.


5
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 ;)
6
New Projects / Deira
September 05, 2008, 03:38:48 pm
Deira


Plot


Twenty-six years after a war that raged across the continent and pitted the Elves against Humanity, many citizens in the Republic of Soth still live in squalor. Adding to the chaos of the situation, small bands of mercenary gangs, called 'families', have risen up who are willing to take any jobs, including illegal ones, for money. In the Ezra Family, Dane and Tyrius are sent on a routine collection mission. Upon their return however, they find the headquarters of the Ezra Family being ransacked by the police and their comrades slain or arrested. Now fugitives, Dane and Tyrius embark on their journey.

Races



Humans - Humans have been around for about a century, and were originally enslaved by elves alongside Cin'dor to work as slaves. As a result, the two races share a great bond, and they have fought together in every battle. Humans became the dominant race after the discovery of the mana plague.

Elves - The elves ruled unchallenged as the dominant race for most of the world's history, but the war changed that. The elves have always considered themselves superior to all other races because of their strong magic affinity. Ultimately, this promoted a false sense of security and thus they were not prepared when the humans developed alchemy.

Half Elves - Half elves are of course, the result of a union between a human and an elf. Only Aleria has no problem with the half elves, most other nations despise them.

Cin'dor - The Cin'dor were originally created by magic; the elves intended them to be the perfect slaves, with more strength than humans. However, the Cin'dor broke free with the humans, and went on to develop basic alchemy.

Characters




Tyrius Sanen
Age: 16
Class: Thief

A human whose father is a drug-addict, Tyrius turned to thievery at an early age. He was adopted into a local mercenary guild and often takes on the seedier jobs for which the guild is hired. Though his bluntness and crassness often put off those he meets, he is respected within the guild for the agility and speed that he has due to his use of alchemy.


Dane
Age: 7
Class: Berserker

A half-Cin'dor child, the physical maturity that comes from his Cin'dor heritage far outpaces his emotional maturity. Harbouring an obscene devotion to his mother, he works in the Mercenary guild in order to support his sick mother. Due to his fierce appearance and his strength, he is most often used as an enforcer on missions.
Factions




Human Factions

Doren - While the nation of Doren has existed for little over a half century; they only recently gained power. Doren is undoubtedly the most powerful nation, gaining a large amount of terrirtory after the War for Emancipation. After releasing the mana plague, few mages dare to stand up the might of Doren.

Republic of Soth - A small nation that joined forces with Doren to fight in the war. After the war, Soth doubled its land, but the leaders believed they deserved much more.

Aleria - A large trading empire, Aleria did not play a large role in the war; but they did cease trade with the Elven nations, causing a large financial headache for Amyir.

Cin'dor Isles - While not Human, the Cin'dor have fought with the humans, and the two races are always in political agreement. Nearly 80% of the Cin'dor population live on these small islands.

Elven Factions

Amyir - Before the war, Amyir was the world leader. However, they doubted the power of alchemy, and they paid dearly for their overconfidence. Refusing to surrender to the humans, most of the population dissapeared into the desert sands.

Ilina - The first nation the released their slaves, Ilina was the tragic victim of the war. Reluctant to enter the war, only Amyir's threats caused their army to mobilize. Ilina lost about 75% of its land, and is now the weakest nation.

Screenshots


Spoiler: ShowHide



Outside the Inn

EP? RP? What does that all mean!?



Team





  • Falcon - Scripting, Mapping, Story

  • Modern Algebra - Scripting, Story

  • emidy - Artist



We are currently looking for a spriter and an artist.

Credits




  • Enterbrain (Duh)

  • Naramura

  • Nakkurman

  • Pickle/IceAx

  • Whitecat

  • Tana

  • TheInquisitor

  • Ccoa

  • Yeyinde

  • SDK Team

  • MACL Team

  • Zeriab

  • Cogwheel

  • Prexus

  • Minkoff

  • Guillaume777

  • UCoders Team

  • Momo

  • sandgolem

7
Welcome! / 'Sup
September 05, 2008, 03:36:33 pm
Hey, I'm Falcon (used to be known as Darklord) and I'm a mod over at RMRK. I'm here because of
QuoteBlizzard: I want YOU in CP chat