Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

Share | 
 

 [Help] passive skill script error

Topik sebelumnya Topik selanjutnya Go down 
[Help] passive skill script error Empty2013-02-15, 16:39
Post[Help] passive skill script error
#1
Necrosys 
Newbie
Newbie
Necrosys

Level 5
Posts : 4
Thanked : 0
Engine : RMXP
Skill : Beginner
Type : Composer

[Help] passive skill script error Vide
Permisi kk, saya pakai script passive skill buatan orang lain. waktu ditest play muncul error seperti ini waktu buka menu:
[Help] passive skill script error 22Rhu
scriptnya seperti ini:
Code:
#===============================================================================
#  Passive Skills, by Leon_Westbrooke
#  v. 1.0
#----------------------------------------------------------------------
#  Instructions:  Put below all default scripts, and above Main

#  Features:  Creates passive skills that adds to the stats:
#    HP, SP, STR, DEX, AGI, INT, EVA, Atk, PDef, MDef
#   
#    Adds stats based on a percentage. (so, 100% will double that stat.)
#
#  To have a skill lower stats, make the number negative in the module.
#
#  Compatability:
#    There are no known clashes with other scripts.
#
#  Notes:
#    This script aliases the stats in Game_Actor, and rewrites the refresh
#    method in Window_Skill.
#===============================================================================


#===============================================================================
#  module Passive_Skills
#===============================================================================
module Passive_Skills
  #--------------------------------------------------------------------
  #  Passive_Skills = { skill_id => {'stat' => amount,..},..}
  #  stats:  'hp', 'sp', 'str', 'dex', 'agi', 'int', 'eva', 'atk', 'pdef', 'mdef'
  #--------------------------------------------------------------------
  Passive_Skills = {
  1 => {'hp' => 5}
  }
end
#===============================================================================
#  END module Passive_Skills
#===============================================================================


#===============================================================================
#  Game_Actor
#===============================================================================
class Game_Actor < Game_Battler
 
  attr_accessor :passive_hp
  attr_accessor :passive_sp
  attr_accessor :passive_str
  attr_accessor :passive_dex
  attr_accessor :passive_agi
  attr_accessor :passive_int
  attr_accessor :passive_eva
  attr_accessor :passive_atk
  attr_accessor :passive_pdef
  attr_accessor :passive_mdef
 
  alias leon_passiveskills_gameactor_setup setup
  alias leon_passiveskills_gameactor_basehp base_maxhp
  alias leon_passiveskills_gameactor_basesp base_maxsp
  alias leon_passiveskills_gameactor_basestr base_str
  alias leon_passiveskills_gameactor_basedex base_dex
  alias leon_passiveskills_gameactor_baseagi base_agi
  alias leon_passiveskills_gameactor_baseint base_int
  alias leon_passiveskills_gameactor_baseeva base_eva
  alias leon_passiveskills_gameactor_baseatk base_atk
  alias leon_passiveskills_gameactor_basepdef base_pdef
  alias leon_passiveskills_gameactor_basemdef base_mdef
 
  def setup(actor_id)
    @passive_hp = 0
    @passive_sp = 0
    @passive_str = 0
    @passive_dex = 0
    @passive_agi = 0
    @passive_int = 0
    @passive_eva = 0
    @passive_atk = 0
    @passive_pdef = 0
    @passive_mdef = 0
    leon_passiveskills_gameactor_setup(actor_id)
  end
 
  def passive_bonus
    ps = Passive_Skills
    hp = 0
    sp = 0
    str = 0
    dex = 0
    agi = 0
    int = 0
    eva = 0
    atk = 0
    pdef = 0
    mdef = 0
    for i in 0...@skills.size
      if ps::Passive_Skills.keys.include?(@skills[i])
        for j in 0...ps::Passive_Skills[@skills[i]].size
          case ps::Passive_Skills[@skills[i]].keys[j]
          when 'hp'
            hp += ps::Passive_Skills[@skills[i]]['hp']
          when 'sp'
            sp += ps::Passive_Skills[@skills[i]]['sp']
          when 'str'
            str += ps::Passive_Skills[@skills[i]]['str']
          when 'dex'
            dex += ps::Passive_Skills[@skills[i]]['dex']
          when 'agi'
            agi += ps::Passive_Skills[@skills[i]]['agi']
          when 'int'
            int += ps::Passive_Skills[@skills[i]]['int']
          when 'eva'
            eva += ps::Passive_Skills[@skills[i]]['eva']
          when 'atk'
            atk += ps::Passive_Skills[@skills[i]]['atk']
          when 'pdef'
            pdef += ps::Passive_Skills[@skills[i]]['pdef']
          when 'mdef'
            mdef += ps::Passive_Skills[@skills[i]]['mdef']
          end
        end
      end
    end
    @passive_hp = hp
    @passive_sp = sp
    @passive_str = str
    @passive_dex = dex
    @passive_agi = agi
    @passive_int = int
    @passive_eva = eva
    @passive_atk = atk
    @passive_pdef = pdef
    @passive_mdef = mdef
  end
 
  def base_maxhp
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basehp
    n = n + (n * @passive_hp * 0.01)
    passive_bonus
    return n
  end
 
  def base_maxsp
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basesp
    n = n + (n * @passive_sp * 0.01)
    return n
  end
 
  def base_str
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basestr
    n = n + (n * @passive_str * 0.01)
    return n
  end
 
  def base_dex
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basedex
    n = n + (n * @passive_dex * 0.01)
    return n
  end
 
  def base_agi
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_baseagi
    n = n + (n * @passive_agi * 0.01)
    return n
  end
 
  def base_int
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_baseint
    n = n + (n * @passive_int * 0.01)
    return n
  end
 
  def base_atk
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_baseatk
    n = n + (n * @passive_atk * 0.01)
    return n
  end
 
  def base_pdef
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basepdef
    n = n + (n * @passive_pdef * 0.01)
    return n
  end
 
  def base_mdef
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basemdef
    n = n + (n * @passive_mdef * 0.01)
    return n
  end
end
#===============================================================================
#  END Game_Actor
#===============================================================================


#===============================================================================
#  Window_Skill
#===============================================================================
class Window_Skill
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...@actor.skills.size
      skill = $data_skills[@actor.skills[i]]
      #-----------------------------------------------------------------
      #  Added 3 Lines right here:
      #  if $game_temp.in_battle
      #    ps = Passive_Skills
      #    unless ps::Passive_Skills.keys.include?(skill)
      # ----------------------------------------------------------------
      if $game_temp.in_battle
        ps = Passive_Skills
        unless ps::Passive_Skills.keys.include?(skill.id)
          if skill != nil
            @data.push(skill)
          end
      #-----------------------------------------------------------------
      # Added two 'end's right here.
      #-----------------------------------------------------------------
        end
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      self.contents.font.name = $defaultfonttype  # "Skill" window font
      self.contents.font.size = $defaultfontsize
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
end
#===============================================================================
# End Window_Skill
#===============================================================================
saya lihat di thread yang membahas script ini tidak ada yang mengalami hal seperti ini. dan saya juga tidak menggunakan script custom lain yang bisa menyebabkan crash jika digunakan bersamaan,

apakah RMXP/RGSS saya yang bermasalah atau ada solusi lain?
oh iya, saya bukan scripter hehe :P
thanks in advance :)
[Help] passive skill script error Empty2013-02-15, 19:10
PostRe: [Help] passive skill script error
#2
privateer 
Novice
Novice
privateer

Level 5
Posts : 253
Thanked : 1
Engine : RMXP
Skill : Advanced
Type : Scripter

[Help] passive skill script error Vide
Bisa tolong di kasih screenshot gimana om ngesetting scriptnya? Kok kayaknya saya pake nyaman-nyaman saja.
Atau om bisa gak kasih tahu kapan muncul errornya.
BTW : Salah kamar om... Harusnya di script support.
[Help] passive skill script error Empty2013-02-15, 19:19
PostRe: [Help] passive skill script error
#3
richter_h 
Salto Master
Hancip RMID
richter_h

Kosong
Posts : 1705
Thanked : 30
Engine : Other
Skill : Skilled
Type : Developer
Awards:

[Help] passive skill script error Vide
Necrosys wrote:
Permisi kk, saya pakai script passive skill buatan orang lain. waktu ditest play muncul error seperti ini waktu buka menu:
[Help] passive skill script error 22Rhu
scriptnya seperti ini:
Code:
#===============================================================================
#  Passive Skills, by Leon_Westbrooke
#  v. 1.0
#----------------------------------------------------------------------
#  Instructions:  Put below all default scripts, and above Main

#  Features:  Creates passive skills that adds to the stats:
#    HP, SP, STR, DEX, AGI, INT, EVA, Atk, PDef, MDef
#   
#    Adds stats based on a percentage. (so, 100% will double that stat.)
#
#  To have a skill lower stats, make the number negative in the module.
#
#  Compatability:
#    There are no known clashes with other scripts.
#
#  Notes:
#    This script aliases the stats in Game_Actor, and rewrites the refresh
#    method in Window_Skill.
#===============================================================================


#===============================================================================
#  module Passive_Skills
#===============================================================================
module Passive_Skills
  #--------------------------------------------------------------------
  #  Passive_Skills = { skill_id => {'stat' => amount,..},..}
  #  stats:  'hp', 'sp', 'str', 'dex', 'agi', 'int', 'eva', 'atk', 'pdef', 'mdef'
  #--------------------------------------------------------------------
  Passive_Skills = {
  1 => {'hp' => 5}
  }
end
#===============================================================================
#  END module Passive_Skills
#===============================================================================


#===============================================================================
#  Game_Actor
#===============================================================================
class Game_Actor < Game_Battler
 
  attr_accessor :passive_hp
  attr_accessor :passive_sp
  attr_accessor :passive_str
  attr_accessor :passive_dex
  attr_accessor :passive_agi
  attr_accessor :passive_int
  attr_accessor :passive_eva
  attr_accessor :passive_atk
  attr_accessor :passive_pdef
  attr_accessor :passive_mdef
 
  alias leon_passiveskills_gameactor_setup setup
  alias leon_passiveskills_gameactor_basehp base_maxhp
  alias leon_passiveskills_gameactor_basesp base_maxsp
  alias leon_passiveskills_gameactor_basestr base_str
  alias leon_passiveskills_gameactor_basedex base_dex
  alias leon_passiveskills_gameactor_baseagi base_agi
  alias leon_passiveskills_gameactor_baseint base_int
  alias leon_passiveskills_gameactor_baseeva base_eva
  alias leon_passiveskills_gameactor_baseatk base_atk
  alias leon_passiveskills_gameactor_basepdef base_pdef
  alias leon_passiveskills_gameactor_basemdef base_mdef
 
  def setup(actor_id)
    @passive_hp = 0
    @passive_sp = 0
    @passive_str = 0
    @passive_dex = 0
    @passive_agi = 0
    @passive_int = 0
    @passive_eva = 0
    @passive_atk = 0
    @passive_pdef = 0
    @passive_mdef = 0
    leon_passiveskills_gameactor_setup(actor_id)
  end
 
  def passive_bonus
    ps = Passive_Skills
    hp = 0
    sp = 0
    str = 0
    dex = 0
    agi = 0
    int = 0
    eva = 0
    atk = 0
    pdef = 0
    mdef = 0
    for i in 0...@skills.size
      if ps::Passive_Skills.keys.include?(@skills[i])
        for j in 0...ps::Passive_Skills[@skills[i]].size
          case ps::Passive_Skills[@skills[i]].keys[j]
          when 'hp'
            hp += ps::Passive_Skills[@skills[i]]['hp']
          when 'sp'
            sp += ps::Passive_Skills[@skills[i]]['sp']
          when 'str'
            str += ps::Passive_Skills[@skills[i]]['str']
          when 'dex'
            dex += ps::Passive_Skills[@skills[i]]['dex']
          when 'agi'
            agi += ps::Passive_Skills[@skills[i]]['agi']
          when 'int'
            int += ps::Passive_Skills[@skills[i]]['int']
          when 'eva'
            eva += ps::Passive_Skills[@skills[i]]['eva']
          when 'atk'
            atk += ps::Passive_Skills[@skills[i]]['atk']
          when 'pdef'
            pdef += ps::Passive_Skills[@skills[i]]['pdef']
          when 'mdef'
            mdef += ps::Passive_Skills[@skills[i]]['mdef']
          end
        end
      end
    end
    @passive_hp = hp
    @passive_sp = sp
    @passive_str = str
    @passive_dex = dex
    @passive_agi = agi
    @passive_int = int
    @passive_eva = eva
    @passive_atk = atk
    @passive_pdef = pdef
    @passive_mdef = mdef
  end
 
  def base_maxhp
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basehp
    n = n + (n * @passive_hp * 0.01)
    passive_bonus
    return n
  end
 
  def base_maxsp
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basesp
    n = n + (n * @passive_sp * 0.01)
    return n
  end
 
  def base_str
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basestr
    n = n + (n * @passive_str * 0.01)
    return n
  end
 
  def base_dex
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basedex
    n = n + (n * @passive_dex * 0.01)
    return n
  end
 
  def base_agi
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_baseagi
    n = n + (n * @passive_agi * 0.01)
    return n
  end
 
  def base_int
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_baseint
    n = n + (n * @passive_int * 0.01)
    return n
  end
 
  def base_atk
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_baseatk
    n = n + (n * @passive_atk * 0.01)
    return n
  end
 
  def base_pdef
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basepdef
    n = n + (n * @passive_pdef * 0.01)
    return n
  end
 
  def base_mdef
    ps = Passive_Skills
    n = leon_passiveskills_gameactor_basemdef
    n = n + (n * @passive_mdef * 0.01)
    return n
  end
end
#===============================================================================
#  END Game_Actor
#===============================================================================


#===============================================================================
#  Window_Skill
#===============================================================================
class Window_Skill
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...@actor.skills.size
      skill = $data_skills[@actor.skills[i]]
      #-----------------------------------------------------------------
      #  Added 3 Lines right here:
      #  if $game_temp.in_battle
      #    ps = Passive_Skills
      #    unless ps::Passive_Skills.keys.include?(skill)
      # ----------------------------------------------------------------
      if $game_temp.in_battle
        ps = Passive_Skills
        unless ps::Passive_Skills.keys.include?(skill.id)
          if skill != nil
            @data.push(skill)
          end
      #-----------------------------------------------------------------
      # Added two 'end's right here.
      #-----------------------------------------------------------------
        end
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      self.contents.font.name = $defaultfonttype  # "Skill" window font
      self.contents.font.size = $defaultfontsize
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
end
#===============================================================================
# End Window_Skill
#===============================================================================
saya lihat di thread yang membahas script ini tidak ada yang mengalami hal seperti ini. dan saya juga tidak menggunakan script custom lain yang bisa menyebabkan crash jika digunakan bersamaan,

apakah RMXP/RGSS saya yang bermasalah atau ada solusi lain?
oh iya, saya bukan scripter hehe :P
thanks in advance :)

*trid dipindahkamarkan*

kalo bisa ente perjelas lagi errornya kenapa, dan kalo mau ente coba dulu di project kosong :hmm:
dan juga, seperti kata privateer, perjelas lagi errornya pas gimana :hmm:

thanks
[Help] passive skill script error Empty2013-02-15, 22:01
PostRe: [Help] passive skill script error
#4
Necrosys 
Newbie
Newbie
Necrosys

Level 5
Posts : 4
Thanked : 0
Engine : RMXP
Skill : Beginner
Type : Composer

[Help] passive skill script error Vide
oh iya maap2 salah kamar. salah ngeklik kamar hahaha.... orz

privateer wrote:
Bisa tolong di kasih screenshot gimana om ngesetting scriptnya? Kok kayaknya saya pake nyaman-nyaman saja.
Atau om bisa gak kasih tahu kapan muncul errornya.
BTW : Salah kamar om... Harusnya di script support.

richter_h wrote:
*trid dipindahkamarkan*

kalo bisa ente perjelas lagi errornya kenapa, dan kalo mau ente coba dulu di project kosong :hmm:
dan juga, seperti kata privateer, perjelas lagi errornya pas gimana :hmm:

thanks
screenshot:
setelah di paste, scriptnya belum sempet saya edit pun udah error.
errornya muncul pas buka menu in-game.
nah iya om, kalo pas dicoba di project kosong lancar2 aja. tapi pas dicoba di project saya langsung error :(
[Help] passive skill script error Empty2013-02-16, 17:33
PostRe: [Help] passive skill script error
#5
privateer 
Novice
Novice
privateer

Level 5
Posts : 253
Thanked : 1
Engine : RMXP
Skill : Advanced
Type : Scripter

[Help] passive skill script error Vide
Waduh... Kalo gitu bisa kasih tahu script apa saja yang om pake? Meskipun om bilang gak ada script yang ke clash, tapi sepertinya tidak mungkin kalo errornya bukan dari compatibility.
BTW : Kalo memang masih error, coba pake script ini aja : http://save-point.org/thread-896.html
[Help] passive skill script error Empty2013-02-17, 00:09
PostRe: [Help] passive skill script error
#6
Necrosys 
Newbie
Newbie
Necrosys

Level 5
Posts : 4
Thanked : 0
Engine : RMXP
Skill : Beginner
Type : Composer

[Help] passive skill script error Vide
privateer wrote:
Waduh... Kalo gitu bisa kasih tahu script apa saja yang om pake? Meskipun om bilang gak ada script yang ke clash, tapi sepertinya tidak mungkin kalo errornya bukan dari compatibility.
BTW : Kalo memang masih error, coba pake script ini aja : http://save-point.org/thread-896.html
whoa pake script yang ini bisa jalan. makasih ya om Privateer :D

anoo, kalo boleh sekalian nanya lagi. di script yang om privateer kasih itu kan penambahan statnya pake operasi +/-, kalo misalnya diubah jadi operasi perkalian atau pembagian ubahnya di bagian mananya ya?
soalnya saya mau bikin penambahan stat dari skill itu berupa persentase (rencananya saya mau bikin tiap class punya stats modifier yang beda2 biar keliatan beda antara class yang fungsinya hitter, tank, atau supp).
thanks :D
[Help] passive skill script error Empty2013-02-17, 10:17
PostRe: [Help] passive skill script error
#7
privateer 
Novice
Novice
privateer

Level 5
Posts : 253
Thanked : 1
Engine : RMXP
Skill : Advanced
Type : Scripter

[Help] passive skill script error Vide
Wah.. Itu secara default gak ada om. Mesti di edit, saya sih bisa-bisa aja tapi lagi sibuk bikin projek saya :v Tapi kalo om maunya per class, mungkin bisa pake ini : http://forum.chaos-project.com/index.php?PHPSESSID=8d184ad8aa05af00cd5d854d9484f242&topic=9894.0
Eh, script-script yang saya share bukan punya saya. Tolong credit ke authornya, ya.
- privateer
[Help] passive skill script error Empty2013-02-17, 13:38
PostRe: [Help] passive skill script error
#8
Necrosys 
Newbie
Newbie
Necrosys

Level 5
Posts : 4
Thanked : 0
Engine : RMXP
Skill : Beginner
Type : Composer

[Help] passive skill script error Vide
privateer wrote:
Wah.. Itu secara default gak ada om. Mesti di edit, saya sih bisa-bisa aja tapi lagi sibuk bikin projek saya :v Tapi kalo om maunya per class, mungkin bisa pake ini : http://forum.chaos-project.com/index.php?PHPSESSID=8d184ad8aa05af00cd5d854d9484f242&topic=9894.0
Eh, script-script yang saya share bukan punya saya. Tolong credit ke authornya, ya.
- privateer
ternyata bisa om pake operasi perkalian. tinggal ubah operasi += di bagian "get (stat)" line @skills.each jadi *=.

makasih juga buat script yang keduanya, sangat convenient dan bisa hemat skill database. tapi saya berusaha pake custom script seminimal mungkin supaya ga gampang clash hehe :P

oke nanti saya credit om privateer dan penulis scriptnya. makasih banyak :D
[Help] passive skill script error Empty2013-02-23, 18:24
PostRe: [Help] passive skill script error
#9
privateer 
Novice
Novice
privateer

Level 5
Posts : 253
Thanked : 1
Engine : RMXP
Skill : Advanced
Type : Scripter

[Help] passive skill script error Vide
No problem, always a pleasure to help others. :D
- privateer
[Help] passive skill script error Empty
PostRe: [Help] passive skill script error
Sponsored content 




[Help] passive skill script error Vide
 

[Help] passive skill script error

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMXP Scripts :: RGSS Support-