|
| [Help] passive skill script error | |
| | Pengirim | Message |
---|
Necrosys Newbie
Posts : 4 Thanked : 0 Engine : RMXP Skill : Beginner Type : Composer
| Subyek: [Help] passive skill script error 2013-02-15, 16:39 | |
| Permisi kk, saya pakai script passive skill buatan orang lain. waktu ditest play muncul error seperti ini waktu buka menu: 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 thanks in advance | |
| | | privateer Novice
Posts : 253 Thanked : 1 Engine : RMXP Skill : Advanced Type : Scripter
| Subyek: Re: [Help] passive skill script error 2013-02-15, 19:10 | |
| 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 Salto Master Hancip RMID
Posts : 1705 Thanked : 30 Engine : Other Skill : Skilled Type : Developer
Trophies
Awards:
| Subyek: Re: [Help] passive skill script error 2013-02-15, 19:19 | |
| - Necrosys wrote:
- Permisi kk, saya pakai script passive skill buatan orang lain. waktu ditest play muncul error seperti ini waktu buka menu:
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 thanks in advance *trid dipindahkamarkan* kalo bisa ente perjelas lagi errornya kenapa, dan kalo mau ente coba dulu di project kosong dan juga, seperti kata privateer, perjelas lagi errornya pas gimana thanks | |
| | | Necrosys Newbie
Posts : 4 Thanked : 0 Engine : RMXP Skill : Beginner Type : Composer
| Subyek: Re: [Help] passive skill script error 2013-02-15, 22:01 | |
| oh iya maap2 salah kamar. salah ngeklik kamar hahaha.... - 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 dan juga, seperti kata privateer, perjelas lagi errornya pas gimana
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 | |
| | | privateer Novice
Posts : 253 Thanked : 1 Engine : RMXP Skill : Advanced Type : Scripter
| Subyek: Re: [Help] passive skill script error 2013-02-16, 17:33 | |
| 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 | |
| | | Necrosys Newbie
Posts : 4 Thanked : 0 Engine : RMXP Skill : Beginner Type : Composer
| Subyek: Re: [Help] passive skill script error 2013-02-17, 00:09 | |
| - 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 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 | |
| | | privateer Novice
Posts : 253 Thanked : 1 Engine : RMXP Skill : Advanced Type : Scripter
| Subyek: Re: [Help] passive skill script error 2013-02-17, 10:17 | |
| Wah.. Itu secara default gak ada om. Mesti di edit, saya sih bisa-bisa aja tapi lagi sibuk bikin projek saya 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 | |
| | | Necrosys Newbie
Posts : 4 Thanked : 0 Engine : RMXP Skill : Beginner Type : Composer
| Subyek: Re: [Help] passive skill script error 2013-02-17, 13:38 | |
| - privateer wrote:
- Wah.. Itu secara default gak ada om. Mesti di edit, saya sih bisa-bisa aja tapi lagi sibuk bikin projek saya 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 oke nanti saya credit om privateer dan penulis scriptnya. makasih banyak | |
| | | privateer Novice
Posts : 253 Thanked : 1 Engine : RMXP Skill : Advanced Type : Scripter
| Subyek: Re: [Help] passive skill script error 2013-02-23, 18:24 | |
| No problem, always a pleasure to help others. - privateer | |
| | | Sponsored content
| Subyek: Re: [Help] passive skill script error | |
| |
| | | | [Help] passive skill script error | |
|
Similar topics | |
|
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
| Latest topics | » [Web Novel] Gloria Infidelis by LightNightKnight 2016-11-17, 21:27
» [Announcement] Forum baru untuk RMID by TheoAllen 2016-08-25, 16:39
» Where I'm Wrong ? by ReydVires 2016-07-24, 16:10
» flakeheartnet's Resources part III by flakeheartnet 2016-07-08, 14:30
» Keira's Art Warehouse by KeiraBlaze 2016-06-28, 19:27
» Theo Core Time System + Bingung by Lockin 2016-06-27, 16:24
» Error Script, Maybe ? by Lockin 2016-06-27, 16:20
» Nusaimoe @ RMID Lounge by Jihad Bagas 2016-06-21, 05:02
» Call Random Battle by Lockin 2016-06-15, 17:04
» Flakeheartnet Resources Part II [come back gift] by flakeheartnet 2016-06-07, 15:51
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|