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 | 
 

 [RGSS2] Normal Individual Damage Variance

Topik sebelumnya Topik selanjutnya Go down 
[RGSS2] Normal Individual Damage Variance Empty2012-08-07, 07:10
Post[RGSS2] Normal Individual Damage Variance
#1
richter_h 
Salto Master
Hancip RMID
richter_h

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

[RGSS2] Normal Individual Damage Variance Vide
Normal Individual Damage Variance
Versi: 1.0
Tipe: Actor Customization


Pengenalan

Skrip ini buat nentuin damage variance buat aktor atawa musuh, bahkan senjata tertentu. Kalo nggak tau damage variance itu apa, itu adalah range damage yang dipake sama sistem buat nentuin damage, jadi damage yang keluar lebih bervariasi tiap serangannya
Skrip ini cuma nentuin damage variance buat serangan biasa, bukan buat skill.


Fitur


  • Nentuin damage variance per aktor dan per musuh, yang nanti ngefek pas di battle
  • NEW: tiap senjata bisa dikasih damage variance tertentu
  • NEW: Kompatibel sama Tankentai SBS



Screenshots

kayaknya ngga perlu deh :ngacay2:


Demo

SS aja ngga perlu, apalagi demo :ngacay2:


Scripts
Code:
# ==============================================================================
# richter_h's Normal Individual Damage Variance
# v1.0 - August 12, 2012
# Type: Actors Customization
# Level: Easy, Medium
# ==============================================================================
# Skrip ini buat nentuin damage variance buat aktor atawa musuh, bahkan
# senjata tertentu. Kalo nggak tau damage variance itu apa, itu adalah range
# damage yang dipake sama sistem buat nentuin damage, jadi damage yang keluar
# lebih bervariasi tiap serangannya.
# Skrip ini cuma nentuin damage variance buat serangan biasa, bukan buat skill.
#
# Credits if you wanna. Don't claim as your own.
# ==============================================================================
# New methods:
# - Game_Actor: damage_variance
# - Game_Enemy: damage_variance
# - RPG::Weapon: scan_variance, variance
# Aliased:
# - Scene_Title: load_database, load_bt_database
# Overwrites:
# - Game_Battler: make_attack_damage_value
# ==============================================================================


$imported = {} if $imported == nil
$imported["Individual_Damage_Variance"] = true
 
module Damage_Variance
  # Damage Variance Rate: Actor
  # Disini ente bisa ngeset berapa nilai variance buat aktor tertentu.
  # Format:
  #    <ID aktor di database> => <nilai variance>
  #
  # Ingat, ane blom pernah ngeset nilainya diatas 100%
  ACTOR_VAR = {
    0 => 20, # Jangan hapus ID 0
    1 => 60,
    2 => 50,
    3 => 30,
    4 => 50,
    5 => 20
  }
 
  # Damage Variance Rate: Enemy
  # Disini ente bisa ngeset berapa nilai variance buat musuh tertentu.
  # Format:
  #    <ID musuh di database> => <nilai variance>
  #
  # Ingat, ane blom pernah ngeset nilainya diatas 100%
  ENEMY_VAR = {
    0 => 20  # Jangan hapus ID 0
  }
 
  # Damage Variance Rate: Weapon
  # Disini ente bisa ngeset berapa nilai variance buat senjata tertentu.
  # Format:
  #    <ID senjata di database> => <nilai variance>
  #
  # Ingat, ane blom pernah ngeset nilainya diatas 100%
  WEP_VAR = {
    0 => 20, # Jangan hapus ID 0
    1 => 60
  }
end

# ==============================================================================
# Menyentuh yang di bawah ini lebih bahaya dari tabung LPG 3 kg, lhoo! :hammer
# Jadi jauhi yang di bawah kecuali pernah latihan debus atawa ente emang
# berpengalaman ngeskrip... :Peace:
# ==============================================================================

class Game_Actor
  def damage_variance
    if Damage_Variance::ACTOR_VAR.include?(@actor_id)
      n = Damage_Variance::ACTOR_VAR[@actor_id]
    else
      n = Damage_Variance::ACTOR_VAR[0]
    end
    return n
  end
end

class Game_Enemy
  def damage_variance
    if Damage_Variance::ENEMY_VAR.include?(@enemy_id)
      n = Damage_Variance::ENEMY_VAR[@enemy_id]
    else
      n = Damage_Variance::ENEMY_VAR[0]
    end
    return n
  end
end

module RPG
  class Weapon < BaseItem
    def scan_variance
      if Damage_Variance::WEP_VAR.include?(self.id)
        @variance = Damage_Variance::WEP_VAR[self.id]
      else
        @variance = Damage_Variance::WEP_VAR[0]
      end
    end
    def variance
      return @variance
    end
  end
end

class Scene_Title < Scene_Base
  alias variance_set_load_database load_database
  def load_database
    variance_set_load_database
    for weapon in $data_weapons
      weapon.scan_variance if weapon != nil
    end
  end
  alias variance_set_load_bt_database load_database
  def load_bt_database
    variance_set_load_database
    for weapon in $data_weapons
      weapon.scan_variance if weapon != nil
    end
  end
end

class Game_Battler
  def make_attack_damage_value(attacker)
    damage = attacker.atk * 4 - self.def * 2
    damage = 0 if damage < 0
    damage *= elements_max_rate(attacker.element_set)
    damage /= 100
    if damage == 0
      damage = rand(2)
    elsif damage > 0
      @critical = (rand(100) < attacker.cri)
      @critical = false if prevent_critical
      damage *= 3 if @critical
    end
    if attacker.is_a(Game_Actor)
      if attacker.weapon_id != nil
        damage = apply_variance(damage, $data_weapons[attacker.weapon_id].variance)
      else
        damage = apply_variance(damage, attacker.damage_variance)
      end
    else
      if $imported["TankentaiSideview"] and attacker.weapon != nil
        damage = apply_variance(damage, $data_weapons[attacker.weapon].variance)
      else
        damage = apply_variance(damage, attacker.damage_variance)
      end
    end
    damage = apply_guard(damage)
    @hp_damage = damage
  end
end

Perlu diingat, perlu beberapa cubitan buat skrip ini biar works sama skrip yang ngubah method make_attack_damage_value, kek Custom Damage Formula-nya Yanfly


Credits


  • richter_h, yang ganteng yang udah bikin ni skrip 8) :kabur:




Terakhir diubah oleh richter_h tanggal 2012-08-08, 10:47, total 2 kali diubah
[RGSS2] Normal Individual Damage Variance Empty2012-08-07, 11:19
PostRe: [RGSS2] Normal Individual Damage Variance
#2
ashm 
Veteran
Veteran
ashm

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

[RGSS2] Normal Individual Damage Variance Vide
Oh ia juga sih, ane make yem damage formula utk variance nya di 0 in. Tapi itu utk skill doank.

Baru kepikiran, ane butuh ini juga. Ijin sedot puh.

Edit : wait a minit, cubitan belah mana aja nih. Takut salah ntar, soal nya damage formula di ojek ane fix. (atk-def) +- 0 (variance = 0), jadi script ni kemungkinan bakal di pake banget.
[RGSS2] Normal Individual Damage Variance Empty2012-08-07, 11:45
PostRe: [RGSS2] Normal Individual Damage Variance
#3
aidilriski 
Senior
Senior
aidilriski

Level 5
Posts : 643
Thanked : 2
Engine : Multi-Engine User
Type : Mapper

[RGSS2] Normal Individual Damage Variance Vide
@_h :hmm: Hmm... Jdi ini buat attack nya bervariasi, gk sama tiap kli nyerang ya om? Boleh dicoba :D :kabur:
[RGSS2] Normal Individual Damage Variance Empty2012-08-07, 12:34
PostRe: [RGSS2] Normal Individual Damage Variance
#4
richter_h 
Salto Master
Hancip RMID
richter_h

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

[RGSS2] Normal Individual Damage Variance Vide
ah iya :hmm:
ane lupa harusnya ane bikin damage variance per weapon bukan per actor :ngacay2:

tapi, ane lagi nyoba cara itu dan kemungkinan ane update ni skrip :ngacay2:

@asem
pake Damage Formula-nya Yanfly ya? :hmm: ane pakenya yang versi YERD, jadi kalo yang versi YEM ane kudu ngecek skripnya lagi. Patch bakal ane kasi ntar...

@aidil
emang gitu kan :v
jadi beda tiap aktor dan musuh, soale kalo sistem bawaan RMVX-nya semua dipukul rata 20%
[RGSS2] Normal Individual Damage Variance Empty2012-08-07, 13:43
PostRe: [RGSS2] Normal Individual Damage Variance
#5
ashm 
Veteran
Veteran
ashm

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

[RGSS2] Normal Individual Damage Variance Vide
Ane lupa, ane pake YEZ. Emang beda nya apa YERD,YEM,YEZ ?

Sama2 damage formula kan.

Via weapon ato via actor, ane mah tetep 0 variance :ngacay:
[RGSS2] Normal Individual Damage Variance Empty2012-08-08, 10:48
PostRe: [RGSS2] Normal Individual Damage Variance
#6
richter_h 
Salto Master
Hancip RMID
richter_h

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

[RGSS2] Normal Individual Damage Variance Vide
UPDATE

sekarang tiap senjata bisa dikasi damage variance masing-masing
dan kompatibel sama Tankentai SBS

:ngacay2:
[RGSS2] Normal Individual Damage Variance Empty2012-08-08, 12:42
PostRe: [RGSS2] Normal Individual Damage Variance
#7
arls 
Advance
Advance
arls

Level 5
Posts : 412
Thanked : 3
Engine : RMVX Ace
Skill : Very Beginner
Type : Mapper
Awards:
[RGSS2] Normal Individual Damage Variance Vide
tambahan untuk pertanyaan kk ashm@ yanfly engine 6 itu masuk jenis yg mana?
YEM,YERD,YEZ kah?
[RGSS2] Normal Individual Damage Variance Empty2012-08-08, 15:38
PostRe: [RGSS2] Normal Individual Damage Variance
#8
ashm 
Veteran
Veteran
ashm

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

[RGSS2] Normal Individual Damage Variance Vide
@arl : huh? 6?
Ane lom pernah denger. Tapi biasanya itu ada dijudul script. Dan dipaketin demo nya dgn nama sejenis.
Setau ane, masing2 engine punya "rada spesialisasi" misal di battle, custom scene. Cmiiw.

@H : jadi ni aman dipake kah? Ane coba sedot ya.
[RGSS2] Normal Individual Damage Variance Empty2012-08-08, 15:49
PostRe: [RGSS2] Normal Individual Damage Variance
#9
richter_h 
Salto Master
Hancip RMID
richter_h

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

[RGSS2] Normal Individual Damage Variance Vide
ng,
kalo mau pake skrip ini sama skrip Yanfly, ane sediain patch-nya ntar :ngacay2:

ada yang mau? :tf:

@asem blom aman sih, tapi yang ini ane update soale ada tambahan... :kabur:
[RGSS2] Normal Individual Damage Variance Empty2012-08-08, 15:57
PostRe: [RGSS2] Normal Individual Damage Variance
Ameron 
♚ Leader of Ameron™ ♚
Ameron

Level 5
Posts : 440
Thanked : 3
Engine : RMVX
Skill : Intermediate
Type : Developer
Awards:
[RGSS2] Normal Individual Damage Variance Vide
wah ada sekrip baru, saya baru lihat ada yang untuk atak variance :ngacay2: CMIIW
bagus nih kreatif banget om richter_h, saya coba dulu, apakah ada
perubahan nanti di report. =w=b
[RGSS2] Normal Individual Damage Variance Empty2012-08-08, 16:30
PostRe: [RGSS2] Normal Individual Damage Variance
ashm 
Veteran
Veteran
ashm

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

[RGSS2] Normal Individual Damage Variance Vide
@H : sebener nya gak dibuat patch pun gak apa sih. Ane sebner nya diakalin lewat derivating tankentai.
Weapon > action sequence > skill > variance kecil. Yaaa walopun ribet dan banyak.
Teserah ente sih, dibuatin ane bersukur, gak juga gak apa. :)

Dibuat compatible dgn tankentai ?
Lha emang tankentai ngurusin damage calculation ya ? :hmm:
[RGSS2] Normal Individual Damage Variance Empty2012-08-08, 16:43
PostRe: [RGSS2] Normal Individual Damage Variance
richter_h 
Salto Master
Hancip RMID
richter_h

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

[RGSS2] Normal Individual Damage Variance Vide
yup
ane bikin kompatibel sama tankentai soale buat senjata yang dipake sama musuh :v
tau kan kalo di tankentai musuhnya bisa dikasih senjata? :tf:

makanya skrip ini ada :ngacay2:
[RGSS2] Normal Individual Damage Variance Empty
PostRe: [RGSS2] Normal Individual Damage Variance
Sponsored content 




[RGSS2] Normal Individual Damage Variance Vide
 

[RGSS2] Normal Individual Damage Variance

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 
Halaman 1 dari 1

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