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 | 
 

 [VX]Rhyme's Garden Auto battle

Topik sebelumnya Topik selanjutnya Go down 
[VX]Rhyme's Garden Auto battle Empty2011-09-07, 16:19
Post[VX]Rhyme's Garden Auto battle
#1
shikami 
Member 1000 Konsep
avatar

Level 5
Posts : 3744
Thanked : 31
Engine : Multi-Engine User
Skill : Beginner
Type : Developer
Awards:


[VX]Rhyme's Garden Auto battle Vide
Rhyme's Garden Auto Battle
Versi: 1.0
Tipe: Battle Add on


Pengenalan

ini script bikinan rhyme yang disuruh ngepost sini karena sayang post countnya :hammer:. jadi jangan kredit dan hubungi saya jika ada masalah script,silahkan post aja. mungkin bakal dijawab.


Fitur


  • set AI Enemy pada Auto Battle Actor



Screenshots

Ga ada


Demo
Ga 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


  • Rhyme

[VX]Rhyme's Garden Auto battle Empty2011-09-07, 17:03
PostRe: [VX]Rhyme's Garden Auto battle
#2
McPherson 
Senior
Senior
McPherson

Level 5
Posts : 777
Thanked : 7
Engine : Multi-Engine User
Skill : Intermediate
Type : Mapper
Awards:

[VX]Rhyme's Garden Auto battle Vide
bwat ap sih kk, kaga ngerti..
coba kasi contoh, biar mungkin bisa ngerti,..
[VX]Rhyme's Garden Auto battle Empty2011-09-07, 17:11
PostRe: [VX]Rhyme's Garden Auto battle
#3
shikami 
Member 1000 Konsep
avatar

Level 5
Posts : 3744
Thanked : 31
Engine : Multi-Engine User
Skill : Beginner
Type : Developer
Awards:


[VX]Rhyme's Garden Auto battle Vide
berarti AI buat actornya pake dari database enemy,kaeknya udah jelas gtu penjelasanny.kalo ga ngerti ya nda usa pake ga masalah :)
[VX]Rhyme's Garden Auto battle Empty2011-09-07, 17:19
PostRe: [VX]Rhyme's Garden Auto battle
#4
bradhawk 
Admin
Admin
bradhawk

Level 5
Posts : 637
Thanked : 8
Skill : Beginner

[VX]Rhyme's Garden Auto battle Vide
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 .. :D
[VX]Rhyme's Garden Auto battle Empty2011-09-07, 17:21
PostRe: [VX]Rhyme's Garden Auto battle
#5
ashm 
Veteran
Veteran
ashm

Level 5
Posts : 1131
Thanked : 8
Engine : RMVX Ace
Skill : Intermediate
Type : Event Designer
Awards:

[VX]Rhyme's Garden Auto battle Vide
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.
[VX]Rhyme's Garden Auto battle Empty
PostRe: [VX]Rhyme's Garden Auto battle
#6
Sponsored content 




[VX]Rhyme's Garden Auto battle Vide
 

[VX]Rhyme's Garden Auto battle

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 :: RMVX Scripts-