iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!

> ATTENTION!

Do not post questions about Ace in this section. Any and all Ace related support should be posted in the Ace section found here.

2 Pages V   1 2 >  
Closed TopicStart new topic
> How to make a weapon do magic damage?
Anderson88
post Aug 3 2011, 12:53 AM
Post #1


Grammar Nazi
Group Icon


Type: Writer
Alignment: Unaligned




How do you make a weapon do spirit-based damage?


--------------------
Currently working on Eternal Bond : Chains of Fate.


I support :
Spoiler:







Go to the top of the page
 
+Quote Post
   
fmstwre
post Aug 3 2011, 03:19 AM
Post #2



Group Icon


Type: Designer
Alignment: Lawful Good




This might help.

http://rmrk.net/index.php?topic=42413.0

This script basically makes a weapon use a skill instead of an attack. For example, you could configure, Ice Sword to Cast Ice 100% of the time.
For the spirit based attack, have a skill that damages only by spirit and then set the weapon to use that skill. Easy! biggrin.gif. The Script has a tutorial inside it too. Happy scripting!

This post has been edited by CrimsonItsuki: Aug 3 2011, 03:19 AM


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

Go to the top of the page
 
+Quote Post
   
Anderson88
post Aug 3 2011, 04:30 AM
Post #3


Grammar Nazi
Group Icon


Type: Writer
Alignment: Unaligned




Oh! How could I not think of that before! I had the idea, but I forgot about the spirit skill. Anyways, thanks! laugh.gif

This post has been edited by Anderson88: Aug 3 2011, 04:30 AM


--------------------
Currently working on Eternal Bond : Chains of Fate.


I support :
Spoiler:







Go to the top of the page
 
+Quote Post
   
Sharpe
post Aug 3 2011, 04:37 AM
Post #4



Group Icon


Type: Writer
Alignment: Lawful Good




Isn't there also a script on here that lets players use weapons and armor as items? Like, it makes it so that you can "use" the Flame Sword to cast Fire II or whatever.

I looked for it for the OP but couldn't find it.

By "spirit-based damage," do you mean damage that is calculated by Spirit rather than Attack? Or, do you mean damage that take away from the victim's Spirit score?


--------------------
My first tutorial: Moving a Player Through a Door Using a Move Route

"I give thee now a chance to share this world and to rule half of it
if thou will now stand beside me.
"What sayest thou?
"Will the great warrior stand with me?"

--The Dragonlord, Dragon Warrior, 1989.
Go to the top of the page
 
+Quote Post
   
fmstwre
post Aug 3 2011, 01:32 PM
Post #5



Group Icon


Type: Designer
Alignment: Lawful Good




I know what you are talking about and I believe that script you are refering to is the KGC Usable Equipment:

This is not my script, and in no way did I edit this. This is strictly made by KGC only. Ask before distribution!

Spoiler:
CODE
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/    ◆              Usable Equipment - KGC_UsableEquipment            ◆ VX ◆
#_/    ◇                    Last update : 2008/01/13                         ◇
#_/    ◆                  Translation by Mr. Anonymous                       ◆
#_/   ◆ http://ytomy.sakura.ne.jp/                                            ◆
#_/-----------------------------------------------------------------------------
#_/  This script allows equipment to have "usable" effects like items. Note that
#_/   for now, only unequipped weapons and equipment have this "usable" effect.
#_/=============================================================================
#_/                         ◆ Instructions For Usage ◆
#_/  To make use of these functions, you must insert the desired tag into the
#_/   "Notes" box located in the Skills section of the database. For
#_/   example, you want the King's Sword have the same effect as the Fire Scroll
#_/   when used (NOT while attacking with it). You would locate King's Sword
#_/   in the weapons tab of the database and insert "<itemeffect 15>"
#_/   (without quotations) in the note box. Simple, yes?
#_/
#_/  The format is <itemeffect ItemID>, where ItemID = The Item's ID number
#_/   in the Items Database.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_

$imported = {} if $imported == nil
$imported["UsableEquipment"] = true

#  Whatever word(s) are after the separator ( | ) in the following lines are
#   what are used to determine what is searched for in the "Notes" section.

module KGC
module UsableEquipment
  # Regular Expression Defined
  module Regexp
    # Base Item Module
    module BaseItem
      # Item Effect tag string
      ITEM_EFFECT = /<(?:ITEM_EFFECT|itemeffect)[ ]*(\d+)>/i
    end
  end
end
end

#==============================================================================
# ■ RPG::BaseItem
#==============================================================================

class RPG::BaseItem
  #--------------------------------------------------------------------------
  # ○ 使用効果付き装備のキャッシュを作成
  #--------------------------------------------------------------------------
  def create_usable_equipment_cache
    @__item_id = 0

    self.note.split(/[\r\n]+/).each { |line|
      case line
      when KGC::UsableEquipment::Regexp::BaseItem::ITEM_EFFECT
        # アイテム効果
        @__item_id = $1.to_i
      end
    }
  end
  #--------------------------------------------------------------------------
  # ○ 使用時アイテム効果
  #--------------------------------------------------------------------------
  def item_id
    create_usable_equipment_cache if @__item_id == nil
    return @__item_id
  end
  #--------------------------------------------------------------------------
  # ○ 使用時アイテム
  #--------------------------------------------------------------------------
  def item
    return (item_id > 0 ? $data_items[item_id] : nil)
  end
  #--------------------------------------------------------------------------
  # ○ 戦闘時使用可否
  #--------------------------------------------------------------------------
  def battle_ok?
    return false if item_id == 0
    return item.battle_ok?
  end
  #--------------------------------------------------------------------------
  # ○ メニュー画面使用可否
  #--------------------------------------------------------------------------
  def menu_ok?
    return false
  end
end

#==============================================================================
# ■ Game_BattleAction
#==============================================================================

class Game_BattleAction
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :use_equipment            # 使用装備品
  #--------------------------------------------------------------------------
  # ● クリア
  #--------------------------------------------------------------------------
  alias clear_KGC_UsableEquipment clear
  def clear
    clear_KGC_UsableEquipment

    @use_equipment = nil
  end
  #--------------------------------------------------------------------------
  # ● アイテムを設定
  #     item_id : アイテム ID
  #--------------------------------------------------------------------------
  alias set_item_KGC_UsableEquipment set_item
  def set_item(item_id)
    @use_equipment = nil

    set_item_KGC_UsableEquipment(item_id)
  end
  #--------------------------------------------------------------------------
  # ○ 装備品を設定
  #     item : 装備品 (武器 or 防具)
  #--------------------------------------------------------------------------
  def set_equipment(item)
    @kind = 2
    @use_equipment = item
  end
  #--------------------------------------------------------------------------
  # ● アイテムオブジェクト取得
  #--------------------------------------------------------------------------
  alias item_KGC_UsableEquipment item
  def item
    if use_equipment?
      # 装備品を使用する場合、ダミーアイテムを生成
      source_item = $data_items[@use_equipment.item_id].clone
      source_item.name = @use_equipment.name  # アイテム名を装備品名にする
      source_item.consumable = false          # 消耗しない
      return source_item
    end
    return item_KGC_UsableEquipment
  end
  #--------------------------------------------------------------------------
  # ● 装備品判定
  #--------------------------------------------------------------------------
  def use_equipment?
    return (item? && @use_equipment != nil && @use_equipment.item_id > 0)
  end
  #--------------------------------------------------------------------------
  # ● 行動が有効か否かの判定
  #    イベントコマンドによる [戦闘行動の強制] ではないとき、ステートの制限
  #    やアイテム切れなどで予定の行動ができなければ false を返す。
  #--------------------------------------------------------------------------
  alias valid_KGC_UsableEquipment? valid?
  def valid?
    return false if nothing?                      # 何もしない
    return true if @forcing                       # 行動強制中
    return false unless battler.movable?          # 行動不能

    result = valid_KGC_UsableEquipment?

    if !result && use_equipment?                  # 装備品使用
      return true if friends_unit.item_can_use?(@use_equipment)
    end
    return result
  end
end

#==============================================================================
# ■ Window_Item
#==============================================================================

class Window_Item < Window_Selectable
  unless $imported["CategorizeItem"]
  #--------------------------------------------------------------------------
  # ● アイテムをリストに含めるかどうか
  #     item : アイテム
  #--------------------------------------------------------------------------
  alias include_KGC_UsableEquipment? include?
  def include?(item)
    return false if item == nil

    result = include_KGC_UsableEquipment?(item)

    unless result
      # 使用可能なら追加候補とする
      result = true if $game_party.item_can_use?(item)
    end
    return result
  end
  end

  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  alias refresh_KGC_UsableEquipment refresh
  def refresh
    refresh_KGC_UsableEquipment

    # 装備品を選択した場合のインデックス復元
    if $game_party.last_equipment_object != nil
      last_index = @data.index($game_party.last_equipment_object)
      self.index = last_index if last_index != nil
    end
  end
end

#==============================================================================
# ■ Game_Party
#==============================================================================

class Game_Party < Game_Unit
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :last_equipment_object    # カーソル記憶用 : 装備品
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  alias initialize_KGC_UsableEquipment initialize
  def initialize
    initialize_KGC_UsableEquipment

    @last_equipment_object = nil
  end
  #--------------------------------------------------------------------------
  # ● カーソル記憶用 : アイテム (attr_writer の再定義)
  #--------------------------------------------------------------------------
  def last_item_id=(value)
    @last_item_id = value
    @last_equipment_object = nil
  end
  #--------------------------------------------------------------------------
  # ● 戦闘テスト用パーティのセットアップ
  #--------------------------------------------------------------------------
  alias setup_battle_test_members_KGC_UsableEquipment setup_battle_test_members
  def setup_battle_test_members
    setup_battle_test_members_KGC_UsableEquipment

    # 武器・防具も 99 個取得
    @weapons = {}
    for i in 1...$data_weapons.size
      weapon = $data_weapons[i]
      if weapon.battle_ok?
        @weapons[i] = 99 unless weapon.name.empty?
      end
    end
    @armors = {}
    for i in 1...$data_armors.size
      armor = $data_armors[i]
      if armor.battle_ok?
        @armors[i] = 99 unless armor.name.empty?
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● アイテムの使用可能判定
  #     item : アイテム, 武器, 防具
  #--------------------------------------------------------------------------
  alias item_can_use_KGC_UsableEquipment? item_can_use?
  def item_can_use?(item)
    if item.is_a?(RPG::Weapon) || item.is_a?(RPG::Armor)
      return false if item_number(item) == 0
      return ($game_temp.in_battle ? item.battle_ok? : item.menu_ok?)
    else
      return item_can_use_KGC_UsableEquipment?(item)
    end
  end
end

#==============================================================================
# ■ Scene_Battle
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # ● アイテムの決定
  #--------------------------------------------------------------------------
  alias determine_item_KGC_UsableEquipment determine_item
  def determine_item
    last_active_battler = nil
    selected_item = nil
    if @item.is_a?(RPG::Weapon) || @item.is_a?(RPG::Armor)
      # アイテムウィンドウの選択項目を装備品に設定
      $game_party.last_item_id = 0
      $game_party.last_equipment_object = @item
      selected_item = @item
      # 装備品で発動するアイテムを選択したと見なす
      @active_battler.action.set_equipment(@item)
      source_item = @active_battler.action.item
      @item = source_item
      last_active_battler = @active_battler
    end

    determine_item_KGC_UsableEquipment

    if last_active_battler != nil
      # 行動時に使用する装備品をセット
      last_active_battler.action.set_equipment(selected_item)
    end
  end
end
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/  The original untranslated version of this script can be found here:
# http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/php/tech.php?tool=VX&cat=tech_vx/equip&tech=add_equipment_options
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_


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

Go to the top of the page
 
+Quote Post
   
Anderson88
post Aug 3 2011, 02:54 PM
Post #6


Grammar Nazi
Group Icon


Type: Writer
Alignment: Unaligned




QUOTE (Sharpe @ Aug 2 2011, 11:37 PM) *
Isn't there also a script on here that lets players use weapons and armor as items? Like, it makes it so that you can "use" the Flame Sword to cast Fire II or whatever.

I looked for it for the OP but couldn't find it.

By "spirit-based damage," do you mean damage that is calculated by Spirit rather than Attack? Or, do you mean damage that take away from the victim's Spirit score?


I mean that the damage should be calculated by Spirit.

QUOTE (CrimsonItsuki @ Aug 3 2011, 08:32 AM) *
I know what you are talking about and I believe that script you are refering to is the KGC Usable Equipment:

This is not my script, and in no way did I edit this. This is strictly made by KGC only. Ask before distribution!

Spoiler:
CODE
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/    ◆              Usable Equipment - KGC_UsableEquipment            ◆ VX ◆
#_/    ◇                    Last update : 2008/01/13                         ◇
#_/    ◆                  Translation by Mr. Anonymous                       ◆
#_/   ◆ http://ytomy.sakura.ne.jp/                                            ◆
#_/-----------------------------------------------------------------------------
#_/  This script allows equipment to have "usable" effects like items. Note that
#_/   for now, only unequipped weapons and equipment have this "usable" effect.
#_/=============================================================================
#_/                         ◆ Instructions For Usage ◆
#_/  To make use of these functions, you must insert the desired tag into the
#_/   "Notes" box located in the Skills section of the database. For
#_/   example, you want the King's Sword have the same effect as the Fire Scroll
#_/   when used (NOT while attacking with it). You would locate King's Sword
#_/   in the weapons tab of the database and insert "<itemeffect 15>"
#_/   (without quotations) in the note box. Simple, yes?
#_/
#_/  The format is <itemeffect ItemID>, where ItemID = The Item's ID number
#_/   in the Items Database.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_

$imported = {} if $imported == nil
$imported["UsableEquipment"] = true

#  Whatever word(s) are after the separator ( | ) in the following lines are
#   what are used to determine what is searched for in the "Notes" section.

module KGC
module UsableEquipment
  # Regular Expression Defined
  module Regexp
    # Base Item Module
    module BaseItem
      # Item Effect tag string
      ITEM_EFFECT = /<(?:ITEM_EFFECT|itemeffect)[ ]*(\d+)>/i
    end
  end
end
end

#==============================================================================
# ■ RPG::BaseItem
#==============================================================================

class RPG::BaseItem
  #--------------------------------------------------------------------------
  # ○ 使用効果付き装備のキャッシュを作成
  #--------------------------------------------------------------------------
  def create_usable_equipment_cache
    @__item_id = 0

    self.note.split(/[\r\n]+/).each { |line|
      case line
      when KGC::UsableEquipment::Regexp::BaseItem::ITEM_EFFECT
        # アイテム効果
        @__item_id = $1.to_i
      end
    }
  end
  #--------------------------------------------------------------------------
  # ○ 使用時アイテム効果
  #--------------------------------------------------------------------------
  def item_id
    create_usable_equipment_cache if @__item_id == nil
    return @__item_id
  end
  #--------------------------------------------------------------------------
  # ○ 使用時アイテム
  #--------------------------------------------------------------------------
  def item
    return (item_id > 0 ? $data_items[item_id] : nil)
  end
  #--------------------------------------------------------------------------
  # ○ 戦闘時使用可否
  #--------------------------------------------------------------------------
  def battle_ok?
    return false if item_id == 0
    return item.battle_ok?
  end
  #--------------------------------------------------------------------------
  # ○ メニュー画面使用可否
  #--------------------------------------------------------------------------
  def menu_ok?
    return false
  end
end

#==============================================================================
# ■ Game_BattleAction
#==============================================================================

class Game_BattleAction
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :use_equipment            # 使用装備品
  #--------------------------------------------------------------------------
  # ● クリア
  #--------------------------------------------------------------------------
  alias clear_KGC_UsableEquipment clear
  def clear
    clear_KGC_UsableEquipment

    @use_equipment = nil
  end
  #--------------------------------------------------------------------------
  # ● アイテムを設定
  #     item_id : アイテム ID
  #--------------------------------------------------------------------------
  alias set_item_KGC_UsableEquipment set_item
  def set_item(item_id)
    @use_equipment = nil

    set_item_KGC_UsableEquipment(item_id)
  end
  #--------------------------------------------------------------------------
  # ○ 装備品を設定
  #     item : 装備品 (武器 or 防具)
  #--------------------------------------------------------------------------
  def set_equipment(item)
    @kind = 2
    @use_equipment = item
  end
  #--------------------------------------------------------------------------
  # ● アイテムオブジェクト取得
  #--------------------------------------------------------------------------
  alias item_KGC_UsableEquipment item
  def item
    if use_equipment?
      # 装備品を使用する場合、ダミーアイテムを生成
      source_item = $data_items[@use_equipment.item_id].clone
      source_item.name = @use_equipment.name  # アイテム名を装備品名にする
      source_item.consumable = false          # 消耗しない
      return source_item
    end
    return item_KGC_UsableEquipment
  end
  #--------------------------------------------------------------------------
  # ● 装備品判定
  #--------------------------------------------------------------------------
  def use_equipment?
    return (item? && @use_equipment != nil && @use_equipment.item_id > 0)
  end
  #--------------------------------------------------------------------------
  # ● 行動が有効か否かの判定
  #    イベントコマンドによる [戦闘行動の強制] ではないとき、ステートの制限
  #    やアイテム切れなどで予定の行動ができなければ false を返す。
  #--------------------------------------------------------------------------
  alias valid_KGC_UsableEquipment? valid?
  def valid?
    return false if nothing?                      # 何もしない
    return true if @forcing                       # 行動強制中
    return false unless battler.movable?          # 行動不能

    result = valid_KGC_UsableEquipment?

    if !result && use_equipment?                  # 装備品使用
      return true if friends_unit.item_can_use?(@use_equipment)
    end
    return result
  end
end

#==============================================================================
# ■ Window_Item
#==============================================================================

class Window_Item < Window_Selectable
  unless $imported["CategorizeItem"]
  #--------------------------------------------------------------------------
  # ● アイテムをリストに含めるかどうか
  #     item : アイテム
  #--------------------------------------------------------------------------
  alias include_KGC_UsableEquipment? include?
  def include?(item)
    return false if item == nil

    result = include_KGC_UsableEquipment?(item)

    unless result
      # 使用可能なら追加候補とする
      result = true if $game_party.item_can_use?(item)
    end
    return result
  end
  end

  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  alias refresh_KGC_UsableEquipment refresh
  def refresh
    refresh_KGC_UsableEquipment

    # 装備品を選択した場合のインデックス復元
    if $game_party.last_equipment_object != nil
      last_index = @data.index($game_party.last_equipment_object)
      self.index = last_index if last_index != nil
    end
  end
end

#==============================================================================
# ■ Game_Party
#==============================================================================

class Game_Party < Game_Unit
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :last_equipment_object    # カーソル記憶用 : 装備品
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  alias initialize_KGC_UsableEquipment initialize
  def initialize
    initialize_KGC_UsableEquipment

    @last_equipment_object = nil
  end
  #--------------------------------------------------------------------------
  # ● カーソル記憶用 : アイテム (attr_writer の再定義)
  #--------------------------------------------------------------------------
  def last_item_id=(value)
    @last_item_id = value
    @last_equipment_object = nil
  end
  #--------------------------------------------------------------------------
  # ● 戦闘テスト用パーティのセットアップ
  #--------------------------------------------------------------------------
  alias setup_battle_test_members_KGC_UsableEquipment setup_battle_test_members
  def setup_battle_test_members
    setup_battle_test_members_KGC_UsableEquipment

    # 武器・防具も 99 個取得
    @weapons = {}
    for i in 1...$data_weapons.size
      weapon = $data_weapons[i]
      if weapon.battle_ok?
        @weapons[i] = 99 unless weapon.name.empty?
      end
    end
    @armors = {}
    for i in 1...$data_armors.size
      armor = $data_armors[i]
      if armor.battle_ok?
        @armors[i] = 99 unless armor.name.empty?
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● アイテムの使用可能判定
  #     item : アイテム, 武器, 防具
  #--------------------------------------------------------------------------
  alias item_can_use_KGC_UsableEquipment? item_can_use?
  def item_can_use?(item)
    if item.is_a?(RPG::Weapon) || item.is_a?(RPG::Armor)
      return false if item_number(item) == 0
      return ($game_temp.in_battle ? item.battle_ok? : item.menu_ok?)
    else
      return item_can_use_KGC_UsableEquipment?(item)
    end
  end
end

#==============================================================================
# ■ Scene_Battle
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # ● アイテムの決定
  #--------------------------------------------------------------------------
  alias determine_item_KGC_UsableEquipment determine_item
  def determine_item
    last_active_battler = nil
    selected_item = nil
    if @item.is_a?(RPG::Weapon) || @item.is_a?(RPG::Armor)
      # アイテムウィンドウの選択項目を装備品に設定
      $game_party.last_item_id = 0
      $game_party.last_equipment_object = @item
      selected_item = @item
      # 装備品で発動するアイテムを選択したと見なす
      @active_battler.action.set_equipment(@item)
      source_item = @active_battler.action.item
      @item = source_item
      last_active_battler = @active_battler
    end

    determine_item_KGC_UsableEquipment

    if last_active_battler != nil
      # 行動時に使用する装備品をセット
      last_active_battler.action.set_equipment(selected_item)
    end
  end
end
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/  The original untranslated version of this script can be found here:
# http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/php/tech.php?tool=VX&cat=tech_vx/equip&tech=add_equipment_options
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_


I guess it would be great if I could get them both, but the problem is that anyone can use the equipment, even if it is not their class, right? Plus you can't use the equipped item.


--------------------
Currently working on Eternal Bond : Chains of Fate.


I support :
Spoiler:







Go to the top of the page
 
+Quote Post
   
fmstwre
post Aug 3 2011, 03:16 PM
Post #7



Group Icon


Type: Designer
Alignment: Lawful Good




Yes. If the equipment is unequipped then it can be accessed from the inventory and used by anyone. That being said, you could make a specefic skill that the Equipment uses deal only spirit damage, making it more potent if used by a magic user, if you catch my drift. That's what the FF games did. With the two scripts I gave you I'm pretty sure you have the necessary tools at hand. Was there something more you wanted? Be specefic and I can find it. (Probably tongue.gif)

This post has been edited by CrimsonItsuki: Aug 3 2011, 03:17 PM


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

Go to the top of the page
 
+Quote Post
   
Anderson88
post Aug 3 2011, 07:29 PM
Post #8


Grammar Nazi
Group Icon


Type: Writer
Alignment: Unaligned




Now I can't seem to copy the Weapon Unleash script without it all going on one line. wacko.gif


--------------------
Currently working on Eternal Bond : Chains of Fate.


I support :
Spoiler:







Go to the top of the page
 
+Quote Post
   
fmstwre
post Aug 3 2011, 07:34 PM
Post #9



Group Icon


Type: Designer
Alignment: Lawful Good




OH MY GOD YOURE LIKE SOME SORT OF HUMAN WHO CAN ONLY COPY SCRIPTS ONTO ONE LINE!
Please hold...

Full credit goes to TDS for making this script. I am but a humbly messenger.

Spoiler:
CODE
#==============================================================================
# ** TDS Weapon Unleash
# Ver: 1.0
#------------------------------------------------------------------------------
# * Description:
# A Script that replicates the "Weapon Unleash" system from the game series
# "Golden sun".
#------------------------------------------------------------------------------
# * Features:
# Gives weapon a chance to "Unleash" a pre set skill during battle.
#------------------------------------------------------------------------------
# * Instructions:
# To use the unleash effect add the following to a weapon's note box.
#
# UNLEASH: Skill_ID %_Chance
#
# Skill_ID = The ID of the skill used for the weapon's unleash effect
# %_Chance = Chance of the unleash effect activating from 0-100%
#
# Example:
#
# UNLEASH: 23 100
#------------------------------------------------------------------------------
# * Notes:
# None.
#------------------------------------------------------------------------------
# * New Methods:
# RPG::Weapon Module
# - unleash_info
# ^ Method used to read from the weapon's notebox and get unleash information.
#
# Game_Battler:
# - weapon_unleash?
# ^ Method used to determine if unleash effect is possible and set unleash
# skill as an action.
#
# Scene_Battle:
# - execute_weapon_unleash
# ^ Method used to execute unleash process.
#------------------------------------------------------------------------------
# * Aliased Methods:
# Scene_Battle:
# - execute_action
# ^ Aliased to check for weapon unleash effect before original method runs.
#------------------------------------------------------------------------------
# WARNING:
#
# Do not release, distribute or change my work without my expressed written
# consent, doing so violates the terms of use of this work.
#
# If you really want to share my work please just post a link to the original
# site.
#
# * Not Knowing English or understanding these terms will not excuse you in any
# way from the consequenses.
#==============================================================================

#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
# This class deals with battlers. It's used as a superclass of the Game_Actor
# and Game_Enemy classes.
#==============================================================================

class Game_Battler
#--------------------------------------------------------------------------
# * Determine and set Weapon Unleash
#--------------------------------------------------------------------------
def weapon_unleash?
# If self is not an actor ir action is not to attack
return false if !actor? or !@action.attack?
# Get Main Weapon
weapon = weapons[0]
# Return false if main weapon is nil
return false if weapon == nil
# Get Unleash Information
unleash_info = weapon.unleash_info
# Return false if unleash info is nil
return false if unleash_info == nil
# If Unleash Rate is more than a random number from 0-100%
if (rand(100) < unleash_info[1])
# Set Weapon Unleash Skill
@action.set_skill(unleash_info[0])
# Return true
return true
end
# Return false by default
return false
end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias tds_weapon_unleash_scene_battle_execute_action execute_action unless $@
#--------------------------------------------------------------------------
# * Execute Battle Actions
#--------------------------------------------------------------------------
def execute_action
# If Active Battler weapon unleash
if @active_battler.weapon_unleash?
# Execute Weapon Unleash
execute_weapon_unleash
return
end
# Run Original Method
tds_weapon_unleash_scene_battle_execute_action
end
#--------------------------------------------------------------------------
# * Execute Battle Action: Weapon Unleash
#--------------------------------------------------------------------------
def execute_weapon_unleash
# Get Skill
skill = @active_battler.action.skill
# Weapon Unleash Text
text = sprintf("%s's %s let's out a howl! %s!", @active_battler.name,
@active_battler.weapons[0].name, skill.name)
# Add Instant Text
@message_window.add_instant_text(text)
# Wait 20 frames
wait(20)
# Make Action Targets
targets = @active_battler.action.make_targets
# Display Animation
display_animation(targets, skill.animation_id)
# Run skill common event if it exist
$game_temp.common_event_id = skill.common_event_id
# Go Through Targets
for target in targets
# Execute Skill Effect
target.skill_effect(@active_battler, skill)
# Display Action Effects
display_action_effects(target, skill)
end
end
end

#==============================================================================
# ** RPG Module
#------------------------------------------------------------------------------
# Module for handling information.
#==============================================================================

module RPG
#============================================================================
# ** RPG::Weapon
#----------------------------------------------------------------------------
# This module handles Weapon Information
#============================================================================
class Weapon < BaseItem
#-------------------------------------------------------------------------
# * Get Weapon Unleash Information
#-------------------------------------------------------------------------
def unleash_info
# Check notes for Unleash Skill ID and Chance
self.note[/UNLEASH: ([-0-9]+) ([-0-9]+)/]
# Retunr nil first match is nil
return nil if $1 == nil
# Return Array containing unleash values
return [$1.to_i, $2.to_i]
end
end
end


This post has been edited by CrimsonItsuki: Aug 3 2011, 07:35 PM


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

Go to the top of the page
 
+Quote Post
   
Anderson88
post Aug 3 2011, 07:36 PM
Post #10


Grammar Nazi
Group Icon


Type: Writer
Alignment: Unaligned




Alright, got it copied now... anyone know why that happens? dry.gif


--------------------
Currently working on Eternal Bond : Chains of Fate.


I support :
Spoiler:







Go to the top of the page
 
+Quote Post
   
fmstwre
post Aug 3 2011, 07:38 PM
Post #11



Group Icon


Type: Designer
Alignment: Lawful Good




Eh not really. It does happen to me sometimes as well. As long as you copy it correctly and from the proper source everything should be fine. Unless of course, your computer has herpes.


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

Go to the top of the page
 
+Quote Post
   
Anderson88
post Aug 3 2011, 07:40 PM
Post #12


Grammar Nazi
Group Icon


Type: Writer
Alignment: Unaligned




Okay, so when I attack with the weapon it will still do spirit-based damage regardless of silence, right..?


--------------------
Currently working on Eternal Bond : Chains of Fate.


I support :
Spoiler:







Go to the top of the page
 
+Quote Post
   
fmstwre
post Aug 3 2011, 07:47 PM
Post #13



Group Icon


Type: Designer
Alignment: Lawful Good




I'll check now.
Yes. You will still do that attack when silenced.

This post has been edited by CrimsonItsuki: Aug 3 2011, 07:47 PM


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

Go to the top of the page
 
+Quote Post
   
Anderson88
post Aug 3 2011, 07:56 PM
Post #14


Grammar Nazi
Group Icon


Type: Writer
Alignment: Unaligned




For KGC's usable equipment, how do you make it so that it uses a skill? Should I just make an item with the exact same properties of the skill?
Also, is there a way to make it so that only the class that can equip the weapon can use it in battle?


--------------------
Currently working on Eternal Bond : Chains of Fate.


I support :
Spoiler:







Go to the top of the page
 
+Quote Post
   
fmstwre
post Aug 3 2011, 08:07 PM
Post #15



Group Icon


Type: Designer
Alignment: Lawful Good




There's a tutorial on how to make the script work in the actual script but I'll help anyway. Basically, you're setting the equipment up to use an item. So that means that "Holy Robe" would have the same effect as potion when used. Keep in mind that they cannot use skills, (although the customization for the two is rather similar).

All the coding you need to make the equipment effect is scripted in the weapons notebox.
<itemeffect itemID>
ItemID is the number that the item corresponds too. The number can be found to the left of the name.

So if you want "Healing Helm" to have the same effect as potion just put the code
<itemeffect 1> into the notes textbox of the "Healing Helm". (In this exaple ID:1 belongs to potion).

You can also customize what item is used.

EDIT: And you can't seclude the item usage by class....maybe some scripter can help us...whose name starts with BigEd...

This post has been edited by CrimsonItsuki: Aug 3 2011, 08:14 PM


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

Go to the top of the page
 
+Quote Post
   
BigEd781
post Aug 3 2011, 08:09 PM
Post #16


No method: 'stupid_title' found for 'nil:NilClass`
Group Icon


Type: Coder
Alignment: Chaotic Good




QUOTE (Anderson88 @ Aug 3 2011, 12:36 PM) *
Alright, got it copied now... anyone know why that happens? dry.gif


Non-standard (for Windows) line breaks would be my guess... not all platforms use \r\n to signify a line break. Pasting it first into Notepad will normalize them.


--------------------
My blog - It's awesome, I assure you
QUOTE
While sloppy writing does not invariably mean sloppy thinking, we've generally found the correlation to be strong -- and we have no use for sloppy thinkers. If you can't yet write competently, learn to. - Eric Raymond

---
My awards for being so awesome
Spoiler:
Go to the top of the page
 
+Quote Post
   
Anderson88
post Aug 3 2011, 08:09 PM
Post #17


Grammar Nazi
Group Icon


Type: Writer
Alignment: Unaligned




Yes, that's what I did, though I was just asking if it would work with a skill. Guess that answers my question. tongue.gif

Edit : @BigEd781, when I paste it in Notepad it doesn't skip lines, either.

This post has been edited by Anderson88: Aug 3 2011, 08:10 PM


--------------------
Currently working on Eternal Bond : Chains of Fate.


I support :
Spoiler:







Go to the top of the page
 
+Quote Post
   
BigEd781
post Aug 3 2011, 08:13 PM
Post #18


No method: 'stupid_title' found for 'nil:NilClass`
Group Icon


Type: Coder
Alignment: Chaotic Good




QUOTE (Anderson88 @ Aug 3 2011, 01:09 PM) *
Edit : @BigEd781, when I paste it in Notepad it doesn't skip lines, either.


Yes, I know, that's what I said.


--------------------
My blog - It's awesome, I assure you
QUOTE
While sloppy writing does not invariably mean sloppy thinking, we've generally found the correlation to be strong -- and we have no use for sloppy thinkers. If you can't yet write competently, learn to. - Eric Raymond

---
My awards for being so awesome
Spoiler:
Go to the top of the page
 
+Quote Post
   
Anderson88
post Aug 3 2011, 08:26 PM
Post #19


Grammar Nazi
Group Icon


Type: Writer
Alignment: Unaligned




Oh whoops, I didn't read that right. wacko.gif


--------------------
Currently working on Eternal Bond : Chains of Fate.


I support :
Spoiler:







Go to the top of the page
 
+Quote Post
   
fmstwre
post Aug 3 2011, 08:45 PM
Post #20



Group Icon


Type: Designer
Alignment: Lawful Good




Is this all you need? Or do you still need help with the whole thing. I feel that I've given you adequete info.


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

Go to the top of the page
 
+Quote Post
   

2 Pages V   1 2 >
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 3rd September 2014 - 06:07 AM

RPGMakerVX.net is an Privacy Policy, Legal.