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 | 
 

 [VXA]Yeki NPU

Topik sebelumnya Topik selanjutnya Go down 
[VXA]Yeki NPU Empty2012-10-03, 01:41
Post[VXA]Yeki NPU
#1
yeki 
Novice
Novice
yeki

Level 5
Posts : 182
Thanked : 6
Engine : RMVX Ace
Skill : Beginner
Type : Scripter
Awards:

[VXA]Yeki NPU Vide
Yeki New Parameter Upgrade
Versi: 1.00


Pengenalan

Script ini memberikan fitur untuk membuat parameter baru yang mana parameter ini akan berpengaruh dengan perkembangan parameter yang sudah ada(mhp,mmp,atk,def,dst...).
Selain itu, player juga dapat mengupgrade parameternya selama point yang didapat saat naik level masih ada.


Fitur


  • Membuat parameter sendiri
  • Mengatur parameter sendiri
  • parameter yang baru dapat di upgrade
  • pengaturan point didapat saat naik level



Screenshots

<NONE>


Demo

<NONE>


Scripts

Code:
#===============================================================================
# Yeki New Parameter Upgrade
#===============================================================================
# Author  : Yeki
# Created : 10/3/2012
# Version : 1.00
# Engine  : RMVX Ace
#-------------------------------------------------------------------------------
# Contact : www.rpgmakerid.com
# username: yeki
#===============================================================================
# License
#-------------------------------------------------------------------------------
# Dilarang keras untuk memperjual belikan script init. Penggunaan script ini di
# berikan secara gratis.
#===============================================================================
# Script ini memberikan fitur pembuatan parameter baru beserta pengaruh parameter
# yang baru dengan parameter yang lama. Selain itu script ini memberi fitur
# parameter upgrade, yang mana player bisa mengatur besar kenaikan parameter tiap
# levelnya.
#===============================================================================
# Compatibility
#-------------------------------------------------------------------------------
# Alias :
# - Game_Actor.level_up
# - Window_MenuCommand.make_command_list
# - Scene_Menu.create_command_window
#
# Overwrite :
# - Scene_Menu.on_personal_ok
#===============================================================================
# Cara Pemakaian
#-------------------------------------------------------------------------------
# Letakkan Scripti ini dibawah Yeki Module
#===============================================================================
# Penjelasan
#===============================================================================
# Note Tag Actor
#
# masukkan tag ini ke note Aktor pada database :
# <set param>
# konfigurasi
# </set param>
#
# dimana konfigurasi adalah :
#
# np id : n
# mengatur nilai awal parameter baru dengan id pada Yeki>NP>New_Param
# (dimulai dari 0), sejumlah n.
#
# point : n
# mengatur pendapatan point tiap naik level dengan sejumlah n.
#===============================================================================
module Yeki
  module NP
#===============================================================================
# SETTING
#-------------------------------------------------------------------------------
# New_Param : parameter yang akan dibuat(awali dengan tanda " : ").
# contoh: New_Param = (:siji,:cie,:seko,:one)
#-------------------------------------------------------------------------------
    New_Param = [:str,:vit,:int,:dex]
#-------------------------------------------------------------------------------
# Default_Param : Nilai default dari parameter baru.
#-------------------------------------------------------------------------------
    Default_Param = [22,22,22,22]
#-------------------------------------------------------------------------------
# Calc_Param : mengatur vocabulary dan pengaruh ke parameter lama.
# formatnya adalah :
# Calc_Parameter = {:nwparam01=>[vocab,mhp  ,mmp,atk  ,def,mat  ,mdf,agi  ,luk],
#-------------------------------------------------------------------------------
    Calc_Param = {:str=>["Strength"  ,  5,  0, 2.3, 0.5, 0.7,  0 , 0.3, 0.2],
                  :vit=>["Vitality"  ,  17,  0,  0, 1.2,  0, 0.6,  0, 0.1],
                  :int=>["Intelligence",  0,  7,  0, 0.2, 1.0, 1.0,  0, 0.4],
                  :dex=>["Dexterity"  ,  0,  0, 0.4,  0, 0.2, 0.1, 1.5, 0.6]
#-------------------------------------------------------------------------------
# END OF SETTING
#===============================================================================               
                  }
    def self.param_v(i)
      Calc_Param[New_Param[i]][0]
    end
    NP_s      = /<set param>/i
    NP_e      = /<\/set param>/i
    NP_r      = /(?:np\s*(\d+))\s*:\s*(\d+)/i
    Point_r  = /(?:point\s*:\s*(\d+)/i
    Start_Point    = 5
    Level_Point    = 5
  end
end
#===============================================================================
# SCRIPT START!
#-------------------------------------------------------------------------------
# Merubah atau mengganti apapun syntax dibawah ini adalah tanggung jawab anda
# sendiri.
#-------------------------------------------------------------------------------
class RPG::Actor < RPG::BaseItem
  def scan_np
    command = Yeki::NP
    np_flag = false
    @new_param =[]
    @point  = command::Start_Point
    @lvlpoint = command::Level_Point
    for i in 0..command::New_Param.size - 1
      @new_param[i] = command::Default_Param[i]
    end
    self.note.split(/\r\n/).each {|line|
    case line
    when command::NP_s
      np_flag = true
    when command::NP_e
      np_flag = false
    when command::NP_r
      @new_param[$1.to_i] = $2.to_i if np_flag
    when command::Point_r
      @lvlpoint = $1.to_i if np_flag
    end}
  end
  def new_param(i)
    scan_np if @new_param.nil?
    return @new_param[i]
  end
  def add_new_param(i,value)
    @new_param[i] += value
  end 
  def point
    scan_np if @point.nil?
    return @point
  end
  def point=(point)
    @point = point
  end
  def lvlpoint
    @scan_np if @lvlpoint.nil?
    return @lvlpoint
  end
end
#-------------------------------------------------------------------------------
class Game_Actor < Game_Battler
  def new_param(i)
    return actor.new_param(i)
  end
  def add_new_param(i,value)
    actor.add_new_param(i,value)
  end
  def point
    @point = actor.point * @level if @point.nil?
    return @point
  end
  def point=(point)
    @point = point
  end
  alias :yeki_np_level_up :level_up
  def level_up
    yeki_np_level_up
    @point += actor.lvlpoint
  end
  def lvlpoint
    actor.lvlpoint
  end
end
#-------------------------------------------------------------------------------
class Window_NP < Window_Base
  def initialize(x,y,w,h)
    super(x,y,w,h)
    @actor = nil
  end
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
  def refresh
    @space = contents.width
    @param = [0] * 8
    for i in 0..7
      @actor.weapons.each {|equip|
      @param[i] = @param[i] + equip.params[i]}
      @actor.armors.each {|equip|
      @param[i] = @param[i] + equip.params[i]}
    end
    @line = 24
    @path = Yeki::NP
    contents.clear
    draw_label
  end
  def draw_label
    contents.font.color = system_color
    draw_text(0,0,@space,@line,"Upgrade Parameter",1)
    for i in 0..@path::New_Param.size - 1
      contents.font.color = system_color
      draw_text(0,@line * (i+2),@space,@line,@path.param_v(i))
      contents.font.color = normal_color
      draw_text(0,@line * (i+2),@space/2,@line, @actor.new_param(i),2)
    end
    for j in 2..7
      contents.font.color = system_color
      draw_text(@space / 2 + 24,@line * (j),@space,@line,Vocab.param(j))
      contents.font.color = normal_color
      draw_text(0,@line * (j),@space - 48,@line,@actor.param(j) - @param[j],2)
      if @param[j] >= 1
        contents.font.color = power_up_color
        text = "+" + @param[j].to_s
      elsif @param[j] <= -1
        contents.font.color = power_down_color
        text = @param[j].to_s
      else
        text = ""
      end
      draw_text(@space - 46,@line * (j),@space,@line,text)
    end
    contents.font.color = system_color
    draw_text(@space/2,@line * 9,@space,@line,"Point")
    contents.font.color = normal_color
    draw_text(0,@line * 9,@space, @line, @actor.point,2)
  end
end
#-------------------------------------------------------------------------------
class Window_UpgradeNP < Window_Command
  def initialize(x,y)
    super(x,y)
    @actor = $game_actors[1]
    self.back_opacity = 0
  end
  def window_width
    return 48
  end
  def visible_line_number
    Yeki::NP::New_Param.size
  end
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end   
  def make_command_list
    for i in 0..Yeki::NP::New_Param.size - 1
      add_command("",Yeki::NP::New_Param[i],checking)
    end
  end
  def checking
    $game_party.menu_actor.point >= 1
  end
end
#-------------------------------------------------------------------------------
class Scene_NP < Scene_MenuBase
  def start
    super
    create_mini_window
    create_status_window
    create_command_window
  end
  def create_mini_window
    @mini_window = Window_SkillStatus.new(0,0)
    @mini_window.actor = @actor
  end
  def create_status_window
    y = @mini_window.height
    w = @mini_window.width
    h = Graphics.height - @mini_window.height
    @status_window = Window_NP.new(0,y,w,h)
    @status_window.actor = @actor
  end
  def create_command_window
    x = @status_window.width / 2 - 36
    y = @mini_window.height + 48
    @command_window = Window_UpgradeNP.new(x, y)
    @command_window.actor = @actor
    @command_window.set_handler(:ok, method(:check_status))
    @command_window.set_handler(:cancel, method(:return_scene))
    @command_window.set_handler(:pagedown, method(:next_actor))
    @command_window.set_handler(:pageup,  method(:prev_actor))
  end 
  def on_actor_change
    @mini_window.actor = @actor
    @status_window.actor = @actor
    @command_window.actor = @actor
    @command_window.activate
  end
  def check_status
    for i in 0..Yeki::NP::New_Param.size - 1
    case @command_window.current_symbol
      when Yeki::NP::New_Param[i]
        @actor.add_new_param(i,1)
        for j in 0..7
          @actor.add_param(j,Yeki::NP::Calc_Param[Yeki::NP::New_Param[i]][j+1])
        end
      end     
    end
    @actor.point -= 1
    apply_effect
  end
  def apply_effect
    @mini_window.refresh
    @status_window.refresh
    @command_window.refresh
    @command_window.activate
  end
end
#-------------------------------------------------------------------------------
class Window_MenuCommand < Window_Command
  alias :yeki_np_make_command_list :make_command_list
  def make_command_list
    yeki_np_make_command_list
    add_command("Stat Up",:statup,main_commands_enabled)
  end
end
#-------------------------------------------------------------------------------
class Scene_Menu < Scene_MenuBase
  alias :yeki_create_command_window :create_command_window
  def create_command_window
    yeki_create_command_window
    @command_window.set_handler(:statup,method(:command_personal))
  end
  def on_personal_ok
    case @command_window.current_symbol
    when :skill
      SceneManager.call(Scene_Skill)
    when :equip
      SceneManager.call(Scene_Equip)
    when :status
      SceneManager.call(Scene_Status)
    when :statup
      SceneManager.call(Scene_NP)
    end
  end
end
#===============================================================================
# SCRIPT END
#===============================================================================


Credits


  • Enterbrain
  • Yeki
[VXA]Yeki NPU Empty2012-10-03, 16:04
PostRe: [VXA]Yeki NPU
#2
Ameron 
♚ Leader of Ameron™ ♚
Ameron

Level 5
Posts : 440
Thanked : 3
Engine : RMVX
Skill : Intermediate
Type : Developer
Awards:
[VXA]Yeki NPU Vide
Oh seperti persona 2 ya?
Jika level up, player bisa milih sendiri parameter yang ingin ditingkatkan?
Baru disini yang saya lihat script seperti itu.Dan sepertinya menarik

Karyanya rumayan begitu cepat, sepertinya anda sangat tertarik menjadi scripter.
Jarang ada scripter yang buat script itu tiap minggu.
Yang pernah saya lihat cuman si Lukas yang karyanya juga begitu cepat.
Lanjutkan ya kk!
[VXA]Yeki NPU Empty2012-10-03, 16:13
PostRe: [VXA]Yeki NPU
#3
ashm 
Veteran
Veteran
ashm

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

[VXA]Yeki NPU Vide
Hmm... yang ane tangkep sih kita buat parameter baru kayak dex ama vit (mirip kayak dari yanfly, tapi bedanya kalo yanfly terbatas hanya untuk dex, res, luck, kalo ini kita namain nya terserah). Btw, kalo permisalan gimana ?

Kayak conditional branch, misal player butuh STR sekian buat ngaktifin switch.
Good job deh, ane blom make vxace sih :thumbup:
[VXA]Yeki NPU Empty2012-10-03, 19:33
PostRe: [VXA]Yeki NPU
#4
yeki 
Novice
Novice
yeki

Level 5
Posts : 182
Thanked : 6
Engine : RMVX Ace
Skill : Beginner
Type : Scripter
Awards:

[VXA]Yeki NPU Vide
@rezky: bukan berminat ke scripter tapi ga ada jalan lain, berhubung laptop downgrade banget....jadi hanya mampu scripting..

@ash: yup betul sekali, di script ini tidak terbatas parameter barunya, bisa saja
str,dex,vit,int,wisdom,power, order...dan seterusnya...kalo mo conditional branch event, tentu gunakan script didalamnya dimana

$game_actors[id].new_param(x) op n

id : urutan actor pada database
x : urutan parameter baru saat pembuatan di module Yeki::NP
op : bisa di isi dengan tanda :
- ==
- >=
- <=
- !=

n : nilai nya.
[VXA]Yeki NPU Empty
PostRe: [VXA]Yeki NPU
#5
Sponsored content 




[VXA]Yeki NPU Vide
 

[VXA]Yeki NPU

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 Ace Scripts-