[XP] Blizz-ABS

Started by Blizzard, January 09, 2008, 08:21:56 am

Previous topic - Next topic

Aqua

That works... thanks  ;D

diablosbud

Hey I had been looking for a script for this that is compatible with Blizz-ABS and I finally found one and I thought I would post it here to make people using Blizz-ABS happy. A bare-hand fighting script, this works by taking the strength and for every -- of strength = added -- ATK. This also works the same way with PDEF, for -- of dexterity = added -- of PDEF and MDEF, for -- of intellegence = -- of MDEF. The only part that isn't good about this script is that for bare-handed fighting it takes away the increase if you are wielding a weapon and adds it again when you unequip the weapon.

Here is the script:
Spoiler: ShowHide
#===================================
#  No Equipment Stats, by Leon
#===================================
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  * Game_Actor
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class Game_Actor < Game_Battler
 
  alias leon_wyzstat_gameactor_baseatk base_atk
  alias leon_wyzstat_gameactor_basepdef base_pdef
  alias leon_wyzstat_gameactor_basemdef base_mdef
 
  #Multiplies strength by a number.  1.0 = strength, higher for more atk, lower for less.
  #Use decimals, as shown.
  STRENGTH_MOD = 1.4
  #Multiplies dexterity by a number.  1.0 = dexterity, higher for more Phys Defense, lower for less.
  #Use decimals, as shown.
  DEXTERITY_MOD = 1.6
  #Multiplies intelligence by a number.  1.0 = intellect, higher for more Magic Defense, lower for less.
  #Use decimals, as shown.
  INTELLECT_MOD = 1.6
 
  def base_atk
    n = leon_wyzstat_gameactor_baseatk
    if n == 0
      n += $data_actors[@actor_id].parameters[2, @level] * STRENGTH_MOD
      n = n.round
      return n
    else
      return n
    end
  end
 
  def base_pdef
    n = leon_wyzstat_gameactor_basepdef
    if n == 0
      n += $data_actors[@actor_id].parameters[3, @level] * DEXTERITY_MOD
      n = n.round
      return n
    else
      return n
    end
  end
 
  def base_mdef
    n = leon_wyzstat_gameactor_basemdef
    if n == 0
      n += $data_actors[@actor_id].parameters[5, @level] * INTELLECT_MOD
      n = n.round
      return n
    else
      return n
    end
  end
end

diablosbud

Blizzard, I was wondering if you could please fix a compatibility issue between Weapon Master by Formar0153. There is an error, very uncommon when I attack an enemy it says "Script 'Weapon Masteries' line 78: NoMethodError occurred.

unidentified method '/' for #<String:0x9a1c050>".

Here is the script:
Weapon Masteries script: ShowHide
#==============================================================================
# Individual Character Development - Weapon Master by Fomar0153
#==============================================================================
class Game_Party

  attr_accessor :icd_weapon_masters
  attr_accessor :icd_weapon_type
  attr_accessor :icd_weapon_type_skills
  attr_accessor :icd_weapon_max_level
  attr_accessor :icd_weapon_damage_bonus
 
  alias fomar_icd_weapon_master_initialize initialize
  def initialize
    fomar_icd_weapon_master_initialize
    @icd_weapon_masters = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
    @icd_weapon_type = [
    {'name'=>'Blade Mastery', 'weapons'=>[46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 60, 61, 62, 63, 64, 66]},
    {'name'=>'Blunt Mastery', 'weapons'=>[1, 2, 3, 4, 5, 10, 11, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 37, 38, 42, 43, 44, 45, 68, 69, 70]},
    {'name'=>'Marksman Mastery', 'weapons'=>[12, 13, 14, 15, 16, 17, 18]},
    {'name'=>'Spear Mastery', 'weapons'=>[31, 33, 34, 35, 36]},
    {'name'=>'Polearm Mastery', 'weapons'=>[6, 7, 8, 9, 71]},   
    {'name'=>'Throwing Mastery', 'weapons'=>[5, 32, 52, 65]},
    {'name'=>'Staff Mastery', 'weapons'=>[39, 40, 41, 72, 73]}
    ]
    @icd_weapon_type_skills = {'Sword1'=>57, 'Sword2'=>58, 'Sword3'=>59, 'Sword4'=>60,
    'Spear1'=>61, 'Spear2'=>62, 'Spear3'=>63, 'Spear4'=>64}
    @icd_weapon_max_level = 20
    @icd_weapon_damage_bonus = 8
   
  end
end

class Game_Actor < Game_Battler
 
  alias fomar_icd_weapon_master_setup setup
  def setup(actor_id)
    fomar_icd_weapon_master_setup(actor_id)
    @icd_weapon_type_levels = {}
   
    for icd_type in $game_party.icd_weapon_type
      @icd_weapon_type_levels[icd_type['name']] = 0
    end
   
  end
 
  def damage_multiplier
    for icd_type in $game_party.icd_weapon_type
      if icd_type['weapons'].include?(@weapon_id)
        return ((@icd_weapon_type_levels[icd_type['name']])/100)  * $game_party.icd_weapon_damage_bonus
      end
    end
    return 0
  end
 
  def improve_weapon_use
    for icd_type in $game_party.icd_weapon_type
      if icd_type['weapons'].include?(@weapon_id)
        unless @icd_weapon_type_levels[icd_type['name']] == 100 * $game_party.icd_weapon_max_level
          @icd_weapon_type_levels[icd_type['name']] += 1
          if (@icd_weapon_type_levels[icd_type['name']] / 100) == (@icd_weapon_type_levels[icd_type['name']].to_f / 100.00)
            self.learn_skill($game_party.icd_weapon_type_skills[icd_type['name'] + (@icd_weapon_type_levels[icd_type['name']] / 100).to_s])
          end
        end
      end
    end
  end
 
end

class Game_Enemy < Game_Battler
 
  def attack_effect(attacker)
    if $game_party.icd_weapon_masters.include?(attacker.id)
      attacker.improve_weapon_use
      k = super
      x = self.damage
      self.damage *= (100 + attacker.damage_multiplier)
      self.damage /= 100
      self.hp -= (self.damage - x)
      return k
    else
      return super
    end
  end
 
end

nathmatt

is there a way to make ur controls gamepad compatible
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Quote from: diablosbud on May 21, 2008, 07:50:53 pm
Blizzard, I was wondering if you could please fix a compatibility issue between Weapon Master by Formar0153. There is an error, very uncommon when I attack an enemy it says "Script 'Weapon Masteries' line 78: NoMethodError occurred.

unidentified method '/' for #<String:0x9a1c050>".

Here is the script:
Weapon Masteries script: ShowHide
#==============================================================================
# Individual Character Development - Weapon Master by Fomar0153
#==============================================================================
class Game_Party

  attr_accessor :icd_weapon_masters
  attr_accessor :icd_weapon_type
  attr_accessor :icd_weapon_type_skills
  attr_accessor :icd_weapon_max_level
  attr_accessor :icd_weapon_damage_bonus
 
  alias fomar_icd_weapon_master_initialize initialize
  def initialize
    fomar_icd_weapon_master_initialize
    @icd_weapon_masters = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
    @icd_weapon_type = [
    {'name'=>'Blade Mastery', 'weapons'=>[46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 60, 61, 62, 63, 64, 66]},
    {'name'=>'Blunt Mastery', 'weapons'=>[1, 2, 3, 4, 5, 10, 11, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 37, 38, 42, 43, 44, 45, 68, 69, 70]},
    {'name'=>'Marksman Mastery', 'weapons'=>[12, 13, 14, 15, 16, 17, 18]},
    {'name'=>'Spear Mastery', 'weapons'=>[31, 33, 34, 35, 36]},
    {'name'=>'Polearm Mastery', 'weapons'=>[6, 7, 8, 9, 71]},   
    {'name'=>'Throwing Mastery', 'weapons'=>[5, 32, 52, 65]},
    {'name'=>'Staff Mastery', 'weapons'=>[39, 40, 41, 72, 73]}
    ]
    @icd_weapon_type_skills = {'Sword1'=>57, 'Sword2'=>58, 'Sword3'=>59, 'Sword4'=>60,
    'Spear1'=>61, 'Spear2'=>62, 'Spear3'=>63, 'Spear4'=>64}
    @icd_weapon_max_level = 20
    @icd_weapon_damage_bonus = 8
   
  end
end

class Game_Actor < Game_Battler
 
  alias fomar_icd_weapon_master_setup setup
  def setup(actor_id)
    fomar_icd_weapon_master_setup(actor_id)
    @icd_weapon_type_levels = {}
   
    for icd_type in $game_party.icd_weapon_type
      @icd_weapon_type_levels[icd_type['name']] = 0
    end
   
  end
 
  def damage_multiplier
    for icd_type in $game_party.icd_weapon_type
      if icd_type['weapons'].include?(@weapon_id)
        return ((@icd_weapon_type_levels[icd_type['name']])/100)  * $game_party.icd_weapon_damage_bonus
      end
    end
    return 0
  end
 
  def improve_weapon_use
    for icd_type in $game_party.icd_weapon_type
      if icd_type['weapons'].include?(@weapon_id)
        unless @icd_weapon_type_levels[icd_type['name']] == 100 * $game_party.icd_weapon_max_level
          @icd_weapon_type_levels[icd_type['name']] += 1
          if (@icd_weapon_type_levels[icd_type['name']] / 100) == (@icd_weapon_type_levels[icd_type['name']].to_f / 100.00)
            self.learn_skill($game_party.icd_weapon_type_skills[icd_type['name'] + (@icd_weapon_type_levels[icd_type['name']] / 100).to_s])
          end
        end
      end
    end
  end
 
end

class Game_Enemy < Game_Battler
 
  def attack_effect(attacker)
    if $game_party.icd_weapon_masters.include?(attacker.id)
      attacker.improve_weapon_use
      k = super
      x = self.damage
      self.damage *= (100 + attacker.damage_multiplier)
      self.damage /= 100
      self.hp -= (self.damage - x)
      return k
    else
      return super
    end
  end
 
end



This happens because the damage in Blizz-ABS is set to a text string so the SP damage display can work. Try this edit of the last part of the original code:

class Game_Enemy < Game_Battler
 
  def attack_effect(attacker)
    if $game_party.icd_weapon_masters.include?(attacker.id)
      attacker.improve_weapon_use
      k = super
      x = self.damage
      y = (x.is_a?(String) ? x.to_i : x)
      if y.is_a?(Numeric)
        self.damage = y
        self.damage *= (100 + attacker.damage_multiplier)
        self.damage /= 100
        self.hp -= (self.damage - y)
      end
      return k
    else
      return super
    end
  end
 
end


I'm not sure if this will work out right.

Quote from: nathmatt on May 22, 2008, 06:56:11 pm
is there a way to make ur controls gamepad compatible



I don't know, but most likely no. Except you can map keyboard keys to a gamepad. =/
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

May 24, 2008, 10:36:49 am #405 Last Edit: May 24, 2008, 11:28:51 am by nathmatt
never mined lol u have to many controls to use a gamepad
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


diablosbud

Well it works well I just had to add a few "end"s on to the bottom lines. Thank you extremely Blizzard because this script is cool to have with your ABS 8). I will tell you if the error occurs again.

RandomguyxD

hey, I'm a little nab with the scripting, I learned how to script yesterday xD, but this dont work with all scripts, I only know how to CTRL+C the script, Put it in above
Main, but it dosent work with this, or it maybe does? But it doesent work for me...
And it is confusing that you put random stuff with the script in the text/script, understand what I mean?  If you dont then I mean that: The stuff you write in the scripts like
Thanks to and alot of other stuff that isnt supposed to be in the script, its OK that you want to tell us all that stuff but it confuses me xD
So please just tell where to put the script and then dont write anything else in the script

Aqua

You just copy and paste part 1 of the script in a new script above Main, then C&P part 2 under part 1 in a new script, and finally C&P part 3 under part 2 in a new script.

And you have to keep the credit stuff... lol

Blizzard

These two topics can be of help:

http://forum.chaos-project.com/index.php?topic=198.0
http://forum.chaos-project.com/index.php?topic=23.0

Other than that just like Aqua said.

Scripting in RGSS Ruby is the same as programming. It's just another language. You need to follow syntax rules and use existing commands or commands that you created yourself by grouping other commands and operations.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Phasedscar

May 27, 2008, 09:59:07 pm #410 Last Edit: May 27, 2008, 10:00:24 pm by Phasedscar
Ok, this is more of a curiosity than anything else.

I currently have
DISABLE_ABS_MODE = 3

set up so that the ABS mode is only available when mobs that can attack are nearby.  I want to be able to change my character sprites so that they have both a normal walking animation while Blizz-ABS is disabled, and look on the ready for attack when it's active.

I was wondering if I could use a common script with a Conditional Branch:Script:
to achieve this effect.  However I'm curious about how to use this setup to figure out if the ABS is disabled or not.

Not sure if I'm clear, I'm wondering if there's something like:
Conditional Branch:Script:ABS = 1
  @>Change Actor Graphic: [Main], Mainattack, 0, ,0
  @>
:   Else
  @>Change Actor Graphic: [Main], Mainwalk, 0, ,0
  @>
:   Branch End

just to change the character graphics in order to appear like they're ready to attack.
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

Hm... This could interfere with the sprite animation system. a direct implementation would be better.

class Map_Battler

  alias sprite_update_idle_later sprite_update
  def sprite_update
    if @current_sprite == '' && !game_temp.in_battle
      @current_sprite = '_idl'
    end
  end
 
end


I am not sure if this will work. It should add another sprite type which is had the filename extention "_idl".
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Caesis

Small question ... whats new in 1.98?
I had 1.95 before ...


(Reasons why your ABS is best lol.)
Its way more simple than the other ABS I've seen ... just need to name it and put a graphic. Theres another which looks nicer than this, but you need far more custom graphics and some of your own scripting and have to make like five event pages for an enemy.

I like the "weapon is a seperate item" from the sprite =)

Tech support needed:

I used "sir lag alot"'s attack stance and just moved my sprite on top of him, then removed SirLagalot to get it at the right places on the picture. It looks great, minus the fact that its just a running sprite using as an attack sprite.
However, when I attack facing down, the sprite jumps back about 5 squares. Then I jump back to the proper place after the sword finishes swinging. The damage is still inflicted to enemies in the area where I started, and I can still take damage. It seems to be merely graphics ... but I can't find out why it does this.
Also, I'm using a sword very similar to "Hellbane" from sirlagalot. Basicly, I kept the blade shape and ever so slightly changed the handle shape. And recoulored it. So I'm pretty sure its not that.

Thanks alot
- Caesis

Joe Rockhead

@Phasedscar - That is a cool idea! Hey Blizz I hope you include that in one of your future updates to Blizz-ABS! I would definately use that.

winkio

@Caesis:  Use the YOffset option.  Set it to 112 (i think).  This is needed because when you chop the scprite up into identical squares, it is a bit uneven.  Blizz can explain better.

Caesis

Alright ... I only set it to like 5 or 6 previously to see if it did anything =p

I'll try this out

Thanks
- Caesis

diablosbud

May 30, 2008, 06:42:08 pm #416 Last Edit: May 31, 2008, 09:21:55 am by Blizzard
Blizzard, I want this for my game, and it works except for two parts, I don't need this done, but it shouldn't be hard to fix. I have a Passive Skills script and I just got it perfectly running, except for the EXP, and gold percentage change. I need this to be percentage so I am not giving to low or too high ammounts of them, because that may be it. Well basically when I tell it to give me more EXP and gold it doesn't. There is no error, just the normal ammounts of each. Please Blizzard when you get some free-time on your hands could you please fix this compatibility issue?

Here is the script:
Passive Skills by Gando: ShowHide
#==============================================================================
# ** Passive_Skills
#------------------------------------------------------------------------------
# By: Gando
# 4/5 2008
#------------------------------------------------------------------------------
#                              INTRODUCTION
#------------------------------------------------------------------------------
#
#  With this script you will be able to create Passive skills.
#  And for those of you that doesn't know what passive skills are,
#  here is a short explaination:
#
#  A passive skill is a skill that cannot be used.
#  It just gives "support" to the skills owner, like bonus str, dex, hp etc.
#
#---
#
#  I've also added a little feature that removes the "0" from the skill window,
#  when a skill doesn't cost any sp. If you for some reason don't want this
#  feature, just remove the whole Window_Skill at the bottom of this script.
#
#------------------------------------------------------------------------------
#                                 SETUP
#------------------------------------------------------------------------------
#
#  PASSIVE_SKILLS - Here are all the passive skills. To add a new skill,
#                   put the skills id from the database here.
#
#  ATTRIBUTES - Here is where you do your passive skills setup.
#               The numbers to the left(1=>..., 2=>... etc.) are the id's
#               of the skills in PASSIVE_SKILLS. To add a new passive skill
#               in ATTRIBUTES, put a comma at the end of the last skill setup
#               and put this line below it, and set it up as you want it:
#  skill_id => [max_hp, max_sp, str, dex, agi, int, atk, pdef, mdef, gold, exp]
#               
#
#  max_hp - Increaces the max health. 
#  max_sp - Increaces the max mana.
#  str    - Increaces the strength.
#  dex    - Increaces the dexterity.
#  agi    - Increaces the agility.
#  int    - Increaces the intelligence.
#  atk    - Increaces the attack power.
#  pdef   - Increaces the  physical defence.
#  mdef   - Increaces the magical defence.
#  gold   - Increaces the gold gain in battle.
#  exp    - Increaces the exp gain in battle, (for the whole party).
#
#  GOLD_GAIN_PERCENT - If true, the gold number in ATTRUBUTES will be treated
#                      as percent,(20 would be 20% extra gold).
#                      If false, the gold gain will be multiplied by the gold
#                      number in ATTRIBUTES,(20 would be gold * 20).
#
#  EXP_GAIN_PERCENT  - If true, the exp number in ATTRIBUTES will be treated
#                      as percent,(20 would be 20% extra exp).
#                      If false, the exp gain will be multiplied by the exp
#                      number in ATTRIBUTES,(20 would be exp * 20).
#
#------------------------------------------------------------------------------
#                               REMEMBER!
#------------------------------------------------------------------------------
#
# Since passive skills are supposed to be "support" skills, they are not meant
# to be used in battle or the menu.
# So remember to Change the Database/Skills/Occasion to never.
# Also remember to change the sp cost of the skill to 0.
#
# Of course you can have regular, usable skills and still have the passive bonus.
# It's all up to you how you want the skills to work.
#
#------------------------------------------------------------------------------
#  CREDITS: Gando for making the script and khmp for helping with it.
#==============================================================================
  PASSIVE_SKILLS = [41]
  #skill_id => [max_hp, max_sp, str, dex, agi, int, atk, pdef, mdef, gold, exp]
  ATTRIBUTES =
  {
  41 => [0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 25] ,

  }
 
  GOLD_GAIN_PERCENT = true
  EXP_GAIN_PERCENT  = true
 
class Game_Actor < Game_Battler
  alias passive_skill_learn learn_skill
  alias passive_skill_forget forget_skill
  #--------------------------------------------------------------------------
  # * Get Actor ID
  #--------------------------------------------------------------------------
  def learn_skill(skill_id)
    passive_skill_learn(skill_id)
    if PASSIVE_SKILLS.include?(skill_id)
      @maxhp_plus += ATTRIBUTES[skill_id][0]
      @maxsp_plus += ATTRIBUTES[skill_id][1]
      @str_plus   += ATTRIBUTES[skill_id][2]
      @dex_plus   += ATTRIBUTES[skill_id][3]
      @agi_plus   += ATTRIBUTES[skill_id][4]
      @int_plus   += ATTRIBUTES[skill_id][5]
      @atk_plus   += ATTRIBUTES[skill_id][6]
      @pdef_plus  += ATTRIBUTES[skill_id][7]
      @mdef_plus  += ATTRIBUTES[skill_id][8]
      @goldt      += ATTRIBUTES[skill_id][9]
      @expt       += ATTRIBUTES[skill_id][10]
    end
  end
  def forget_skill(skill_id)
    passive_skill_forget(skill_id)
    if PASSIVE_SKILLS.include?(skill_id)
      @maxhp_plus -= ATTRIBUTES[skill_id][0]
      @maxsp_plus -= ATTRIBUTES[skill_id][1]
      @str_plus   -= ATTRIBUTES[skill_id][2]
      @dex_plus   -= ATTRIBUTES[skill_id][3]
      @agi_plus   -= ATTRIBUTES[skill_id][4]
      @int_plus   -= ATTRIBUTES[skill_id][5]
      @atk_plus   -= ATTRIBUTES[skill_id][6]
      @pdef_plus  -= ATTRIBUTES[skill_id][7]
      @mdef_plus  -= ATTRIBUTES[skill_id][8]
      @goldt      -= ATTRIBUTES[skill_id][9]
      @expt       -= ATTRIBUTES[skill_id][10]
    end
  end
end

class Game_Battler
  attr_accessor :goldt
  attr_accessor :expt
  alias parameter_init initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @atk_plus = 0
    @pdef_plus = 0
    @mdef_plus = 0
    @goldt = 0
    @expt = 0
    parameter_init
  end
 
  #--------------------------------------------------------------------------
  # * Get Attack
  #--------------------------------------------------------------------------
  def atk
    n = [[base_atk + @atk_plus, 1].max, 999].min
    for state in states do n *= state.atk_rate / 100.0 end
    n = [[Integer(n), 1].max, 999].min
    return n
  end

  #--------------------------------------------------------------------------
  # * Get Defense
  #--------------------------------------------------------------------------
  def pdef
    n = [[base_pdef + @pdef_plus, 1].max, 999].min
    for i in @states
      n *= $data_states[i].pdef_rate / 100.0
    end
    return Integer(n)
  end
 
  #--------------------------------------------------------------------------
  # * Get Defense
  #--------------------------------------------------------------------------
  def mdef
    n = [[base_mdef + @mdef_plus, 1].max, 999].min
    for i in @states
      n *= $data_states[i].mdef_rate / 100.0
    end
    return Integer(n)
  end
 
  #--------------------------------------------------------------------------
  # * Set Attack
  #     new_atk : new attack
  #--------------------------------------------------------------------------
  def atk=(new_atk)
    @atk_plus += new_atk - self.atk
    @atk_plus = [[@atk_plus, -999].max, 999].min
  end
 
  #--------------------------------------------------------------------------
  # * Set Defense
  #     new_def : new defense
  #--------------------------------------------------------------------------
  def pdef=(new_pdef)
    @pdef_plus += new_pdef - self.pdef
    @pdef_plus = [[@pdef_plus, -999].max, 999].min
  end
 
  #--------------------------------------------------------------------------
  # * Set Defense
  #     new_def : new defense
  #--------------------------------------------------------------------------
  def mdef=(new_mdef)
    @mdef_plus += new_mdef - self.mdef
    @mdef_plus = [[@mdef_plus, -999].max, 999].min
  end
end

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 = []
    # 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
        # Determine if treasure appears
        if rand(100) < 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
    gold_mult = 0
    exp_mult = 0
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      exp_mult += $game_party.actors[i].expt
    end
    if EXP_GAIN_PERCENT == true
      exp += (exp * exp_mult == 0? 0: exp * exp_mult / 100).to_i
    elsif EXP_GAIN_PERCENT == false
      exp = (exp * exp_mult == 0? 0: exp * exp_mult).to_i
    end
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      gold_mult += $game_party.actors[i].goldt
      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
    if GOLD_GAIN_PERCENT == true
      gold += (gold * gold_mult == 0? 0: gold * gold_mult / 100).to_i
    elsif GOLD_GAIN_PERCENT == false
      gold = (gold * gold_mult == 0? 0: gold * gold_mult).to_i
    end
    # Obtaining gold
    $game_party.gain_gold(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, gold, treasures)
    # Set wait count
    @phase5_wait_count = 100
  end
end
#==============================================================================
# ** Window_Skill
#------------------------------------------------------------------------------
#  This will hide the zero if the skill doesn't cost any SP.
#==============================================================================
class Window_Skill < Window_Selectable
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    skill = @data[index]
    if @actor.skill_can_use?(skill.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(skill.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, 204, 32, skill.name, 0)
    if @data[index].sp_cost != 0
    self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
    end
  end
end

Phasedscar

Thanks for response Blizz.  I haven't tried it yet but I've only been working on the art my game this week (for the most part).

Out of curiosity though, is it possible to have the condition branch with...?
if @current_sprite == '' && !game_temp.in_battle

The reason I ask is because this also allows the option of battle music.  I suppose that can be writen with another subscript in the one you had posted before?

Anyway, I know you're writing your thesis atm so I'm being patient on this.  But it might be a consideration for ABS 2.1  :)
Spoiler: ShowHide
My own game project & My resource workshop! (respectively)
http://forum.chaos-project.com/index.php?topic=608.0 http://forum.chaos-project.com/index.php?topic=682.0



What that is? Affection area for flails. - Blizz-ABS, the ultimate ABS

The pictures in your signature may altogether be no more than 200kB. The height must not exceed 200 px and the width must not exceed 800 px. Altogether they may take up an area of 160000 px2. Every signature not matching this criteria is a subject of the moderator team to remove and leave this rule as message in your signature.

Blizzard

May 31, 2008, 09:20:52 am #418 Last Edit: May 31, 2008, 09:27:02 am by Blizzard
Use

if $game_player.current_sprite == '' && !game_temp.in_battle


I'm currently not in a state to distinguish whether this actually will work or not in a sense of functionality.

Wow, even though I am wasted from yesterday night, I still manage to sound "smart". xD What I meant is that I'm not sure if this will work out since I am not sure what condition you want to check. This condition would mean something like "if not in action and not in battle".

@diablosbud: I will fix it in the next release.

@Caesis: Just like winkio said. If you want to know what's new, chapter 1.3 (I think) in the user manual has a version history.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

diablosbud

Thanks, because that makes a good edition to games with ABSs such as Diablo II with auras.