shikami Member 1000 Konsep
Posts : 3744 Thanked : 31 Engine : Multi-Engine User Skill : Beginner Type : Developer
Trophies
Awards:
| Subyek: [VX]Rhyme's Garden Auto battle 2011-09-07, 16:19 | |
| Rhyme's Garden Auto Battle Versi: 1.0 Tipe: Battle Add on Pengenalanini script bikinan rhyme yang disuruh ngepost sini karena sayang post countnya . jadi jangan kredit dan hubungi saya jika ada masalah script,silahkan post aja. mungkin bakal dijawab. Fitur
- set AI Enemy pada Auto Battle Actor
ScreenshotsGa ada DemoGa ada Scripts - Code:
-
#=======================================================================[r1.id]= # ● Garden: Auto-Battle # Merubah properti Actor "Auto-Battle" untuk menggunakan set Action dari Enemy. # Auto-Battle kemudian akan bertindak seperti "Enemy", menyediakan # perilaku yang jauh lebih fleksibel, dan terkendali sampai batas tertentu. # ~rhyme #=============================================================================== module RhyAI # Mengaktifkan / Menonaktifkan script. AutoBattle = true # Jika Auto-Battle tidak ada data khusus, Enemy ini akan dipakai. Default_Enemy_ID = 100 # Data khusus Actor ID. # Actor ID => Enemy ID Actor_Enemy_Data = { 1 => 110, 2 => 111, 3 => 112, 4 => 113, } # Data khusus Class ID. # Class ID => Enemy ID Class_Enemy_Data = { 5 => 114, 6 => 115, 7 => 116, 8 => 117, } end #=============================================================================== class Game_Actor < Game_Battler include RhyAI alias rhy_ai_make_action make_action def make_action if AutoBattle @action.clear if Actor_Enemy_Data.include?(@actor_id) enemy = $data_enemies[Actor_Enemy_Data[@actor_id]] elsif Class_Enemy_Data.include?(@class_id) enemy = $data_enemies[Class_Enemy_Data[@class_id]] else enemy = Default_Enemy_ID end return unless movable? available_actions = [] rating_max = 0 for action in enemy.actions next unless conditions_met?(action) if action.kind == 1 next unless skill_can_use?($data_skills[action.skill_id]) end available_actions.push(action) rating_max = [rating_max, action.rating].max end ratings_total = 0 rating_zero = rating_max - 3 for action in available_actions next if action.rating <= rating_zero ratings_total += action.rating - rating_zero end return if ratings_total == 0 value = rand(ratings_total) for action in available_actions next if action.rating <= rating_zero if value < action.rating - rating_zero @action.kind = action.kind @action.basic = action.basic @action.skill_id = action.skill_id @action.decide_random_target return else value -= action.rating - rating_zero end end else rhy_ai_make_action end end def conditions_met?(action) case action.condition_type when 1 n = $game_troop.turn_count a = action.condition_param1 b = action.condition_param2 return false if (b == 0 and n != a) return false if (b > 0 and (n < 1 or n < a or n % b != a % b)) when 2 hp_rate = hp * 100.0 / maxhp return false if hp_rate < action.condition_param1 return false if hp_rate > action.condition_param2 when 3 mp_rate = mp * 100.0 / maxmp return false if mp_rate < action.condition_param1 return false if mp_rate > action.condition_param2 when 4 return false unless state?(action.condition_param1) when 5 return false if $game_party.max_level < action.condition_param1 when 6 switch_id = action.condition_param1 return false if $game_switches[switch_id] == false end return true end end
Credits | |
|
McPherson Senior
Posts : 777 Thanked : 7 Engine : Multi-Engine User Skill : Intermediate Type : Mapper
Trophies
Awards:
| Subyek: Re: [VX]Rhyme's Garden Auto battle 2011-09-07, 17:03 | |
| bwat ap sih kk, kaga ngerti.. coba kasi contoh, biar mungkin bisa ngerti,.. | |
|
shikami Member 1000 Konsep
Posts : 3744 Thanked : 31 Engine : Multi-Engine User Skill : Beginner Type : Developer
Trophies
Awards:
| Subyek: Re: [VX]Rhyme's Garden Auto battle 2011-09-07, 17:11 | |
| berarti AI buat actornya pake dari database enemy,kaeknya udah jelas gtu penjelasanny.kalo ga ngerti ya nda usa pake ga masalah | |
|
bradhawk Admin
Posts : 637 Thanked : 8 Skill : Beginner
| Subyek: Re: [VX]Rhyme's Garden Auto battle 2011-09-07, 17:19 | |
| mungkin ini script buat AInya Actor, di actor kan ada Auto-Battle, nah Auto-Battlenya kan ga bisa kita edit AInya, script ini menggunakan AInya enemy dijadikan AI Actor .. | |
|
ashm Veteran
Posts : 1131 Thanked : 8 Engine : RMVX Ace Skill : Intermediate Type : Event Designer
Trophies
Awards:
| Subyek: Re: [VX]Rhyme's Garden Auto battle 2011-09-07, 17:21 | |
| Oh, jadi auto battle pada actor bisa diatur kayak priority action nya? Jadi kalo punya temen AI bisa lebih diatur. Contoh : Temen AI kita punya skill heal. Secara default, kalo darah kita berkurang dikit langsung di heal (padahal boros mp),
sampe gw ngatain "aduh AI gw bego bnget sih. Tuh kan abis mp nya. Padahal blom lawan boss". Dgn script ini bisa di atur kalo di bawah sekian persen maxhp, baru heal. Gitu kah? Waw... Ini yg ashm cari2 dari bbrp bulan yang lalu. | |
|
Sponsored content
| Subyek: Re: [VX]Rhyme's Garden Auto battle | |
| |
|