XP 스크립트

FF2처럼, 스테이터스 성장은 전투중의 행동에 따라 결정됩니다.(가령, 전투중 대미지를 입었을 때는 최대 HP가 증가하고, 물리공격을 많이하면 그만큼 Str이 올라가고 등등)  경험치는 있지만 통상의 레벨업이 없으므로 경험치 부분은 사실상 더미입니다(대신 스킬을 익힌다든가 하는 다른 용도로 사용가능).


#==============================================================================
# Custom Stat Growing System (CSGS) by Blizzard
# version 1.0
# Date: 20.5.2006
#
# Special Thanks:
# Viviatus - for requesting this script =D
#
# IMPORTANT NOTE:
# This script will disable the feature of leveling up. Please be sure to use
# a Custom Skill Learning System or have an appropriate script.
#
# SDK compatibilty:
# This script was NOT tested with SDK, altough there is only a 5% chance, that
# it will not work with SDK.
#
# Description:
# This script disables the ability to gain levels, altough EXP are still being
# received and can be used for another purpose. It also will allow to raise
# the character stats by other meanings than level ups.
#
# Explanation:
# - max HP will be raised if the character loses an ammount of HP, that is
# equal to a specific (and configurable) percentage of the max HP
# - max SP will be raised if the character uses an ammount of SP, that is
# equal to a specific (and configurable) percentage of the max SP
# - also it is possible to set up the succes chance of raising max HP and/or SP
# - STR will be raised if the character attacks often.
# - DEX will be raised if the character lands a critical hit or evade a status
# change.
# - INT will be raised if the character uses magic based skills, but not if
# skills are only STR, DEX and/or AGI based!
# - AGI will be raised if the character manages to evades a physical attack or
# is the very first character to act during a round.
#
# This script has a preconfiguration, but I highly recommend to configure it to
# your suits. Press CTRL+F and type CONFIGURATION to find the part, that may be
# configured.
#
#==============================================================================

#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor < Game_Battler

  attr_reader  :dmghp
  attr_reader  :usesp
  attr_reader  :xstr
  attr_reader  :xdex
  attr_reader  :xint
  attr_reader  :xagi
 
  alias setup_later setup
  def setup(actor_id)
    setup_later(actor_id)
    @dmghp = 0
    @usesp = 0
    @xstr = 0
    @xdex = 0
    @xint = 0
    @xagi = 0
  end
 
  def dmghp=(hp)
    @dmghp = hp
  end
 
  def usesp=(sp)
    @usesp = sp
  end
 
  def xstr=(str)
    @xstr = str
  end
 
  def xdex=(dex)
    @xdex = dex
  end
 
  def xint=(int)
    @xint = int
  end
 
  def xagi=(agi)
    @xagi = agi
  end

  def exp=(exp) # disabling level up
    @exp = [[exp, 9999999].min, 0].max
    # Correction if exceeding current max HP and max SP
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end
 
end

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler

  alias attack_effect_later attack_effect
  def attack_effect(attacker)
    # saving old ammount of HP
    last_hp = self.hp
    saving = attack_effect_later(attacker)
    # Is the actor the one being attacked?
    if self.is_a?(Game_Actor)
      # Has the actor taken damage?
      if last_hp > self.hp
        self.dmghp += (last_hp - self.hp)
      end
      if self.damage == "Miss"
        self.xagi += 1
      end
    end
    # Is the actor the attacker?
    if attacker.is_a?(Game_Actor)
      # Has the actor dealt damage?
      if last_hp > self.hp
        attacker.xstr += 1
      end
      # Is the damage dealt by the actor critical?
      if self.critical == true
        attacker.xdex += 1
      end
    end
    return saving
  end
 
  alias skill_effect_later skill_effect
  def skill_effect(user, skill)
    # saving old ammount of HP and SP
    last_hp = self.hp
    last_sp = user.sp
    saving = skill_effect_later(user, skill)
    if self.is_a?(Game_Actor)
      # Has the actor taken damage?
      if last_hp > self.hp
        self.dmghp += (last_hp - self.hp)
      end
      if @state_changed == false
        self.xdex += 1
      end
    end
    if user.is_a?(Game_Actor)
      # Has the actor used skill points?
      if last_sp > user.sp
        user.usesp += (last_sp - user.sp)
      end
      # Is the skill magical?
      if skill.int_f != 0
        user.xint += 1
      end
    end
    return saving
  end
 
  alias slip_damage_effect_later slip_damage_effect
  def slip_damage_effect
    # saving old ammount of HP
    last_hp = self.hp
    saving = slip_damage_effect_later
    if self.is_a?(Game_Actor)
      # Has the actor taken damage?
      if last_hp > self.hp
        self.dmghp += (last_hp - self.hp)
      end
    end
    return saving
  end

end

#==============================================================================
# Window_BattleStatus
#==============================================================================

class Window_BattleStatus < Window_Base
 
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      actor_x = i * 160 + 4
      draw_actor_name(actor, actor_x, 0)
      draw_actor_hp(actor, actor_x, 32, 120)
      draw_actor_sp(actor, actor_x, 64, 120)
      if @level_up_flags[i]
        self.contents.font.color = normal_color
        self.contents.draw_text(actor_x, 96, 120, 32, "STATS UP!")
      else
        draw_actor_state(actor, actor_x, 96)
      end
    end
  end
 
end

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle
 
  alias main_later main
  def main
    #---------------------#
    # BEGIN CONFIGURATION #
    #---------------------#
    @hpchance = 50 # % chance of HP raising if 50% of max HP value were lost
    @spchance = 50 # % chance of SP raising if 50% of max SP value were used
    @hplost = 50 # how much % of max HP must be lost, that max HP increase
    @spused = 50 # how much % of max SP must be used, that max SP increase
    @hprate = 100 # how much additional HP
    @sprate = 100 # how much additional SP
    @strchance = 70 # % chance of STR raising
    @dexchance = 70 # % chance of DEX raising
    @intchance = 70 # % chance of INT raising
    @agichance = 70 # % chance of AGI raising
    @strrate = 7 # how much additional STR points
    @dexrate = 7 # how much additional DEX points
    @intrate = 7 # how much additional INT points
    @agirate = 7 # how much additional AGI points
    @strrate_min = 10 # min xstr needed to raise STR
    @dexrate_min = 10 # min xstr needed to raise DEX
    @intrate_min = 10 # min xstr needed to raise INT
    @agirate_min = 10 # min xstr needed to raise AGI
    # In the part below you can activate or deactivate the RBB - "Reset Before
    # Battle" feature, that will reset the "counters", that are counting how
    # many times a stat was stimulated. Only activate this if you want that
    # counters ARE RESETED TO ZERO before every fight. This will have the
    # effect, that not MANY battles will raise the stats, but LONG battles.
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      actor.dmghp = 0
      actor.usesp = 0
      #actor.xstr = 0 # remove the # at the beginning to activate "RBB" for STR
      #actor.xdex = 0 # remove the # at the beginning to activate "RBB" for DEX
      #actor.xint = 0 # remove the # at the beginning to activate "RBB" for INT
      #actor.xagi = 0 # remove the # at the beginning to activate "RBB" for AGI
    end
    #-------------------#
    # END CONFIGURATION #
    #-------------------#
    main_later
    # Raising stats
  end
 
  alias start_phase5_later start_phase5
  def start_phase5
    for i in 0...$game_party.actors.size
      # Lost enough HP to raise?
      actor = $game_party.actors[i]
      if actor.dmghp >= actor.maxhp * @hplost / 100
        if rand(100) > @hpchance
          actor.maxhp += @hprate
          @status_window.level_up(i)
        end
      end
      # Lost enough SP to raise?
      if actor.usesp >= actor.maxsp * @spused / 100
        if rand(100) > @spchance
          actor.maxsp += @sprate
          @status_window.level_up(i)
        end
      end
      # Enough xstr gained to raise str?
      if actor.xstr >= @strrate_min
        if rand(100) > @strchance
          actor.str += @strrate
          actor.xstr = 0
          @status_window.level_up(i)
        end
      end
      # Enough xdex gained to raise dex?
      if actor.xdex >= @dexrate_min
        if rand(100) > @dexchance
          actor.dex += @dexrate
          actor.xdex = 0
          @status_window.level_up(i)
        end
      end
      # Enough xint gained to raise int?
      if actor.xint >= @intrate_min
        if rand(100) > @intchance
          actor.int += @intrate
          actor.xint = 0
          @status_window.level_up(i)
        end
      end
      # Enough xagi gained to raise agi?
      if actor.xagi >= @agirate_min
        if rand(100) > @agichance
          actor.agi += @agirate
          actor.xagi = 0
          @status_window.level_up(i)
        end
      end
    end
    start_phase5_later
  end
 
  alias make_action_orders_later make_action_orders
  def make_action_orders
    make_action_orders_later
    if @action_battlers[0].is_a?(Game_Actor)
      @action_battlers[0].xagi += 1
    end
  end
 
end

Who's 백호

?

이상혁입니다.

http://elab.kr

Atachment
첨부 '1'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6314
481 기타 일본RPGXP게임에서 번역한 스크립트 입니다. 1 백호 2009.02.22 1735
» 상태/속성 Custom stat growing system 1.0 by Blizzard@rmxp.org file 백호 2009.02.22 1101
479 저장 Advanced Save System Edit (현재 맵을 보여주지 않음) file 백호 2009.02.22 1567
478 메뉴 스테이터스 화면 from Harts Horn 2 백호 2009.02.22 1577
477 기타 대화창 글자 한글자씩뜨는 스크립트 7 백호 2009.02.22 2186
476 기타 치트키 시스템 3 백호 2009.02.22 1595
475 기타 Crafting/Recipe system script by Axe Man Deke 백호 2009.02.22 829
474 기타 (T-RPG) 데미지 표시 시의 폰트를 설정 백호 2009.02.22 1351
473 기타 스테이터스 표시 플러스 1.00ver 백호 2009.02.22 1143
472 전투 전투의 커맨드에 따라 능력치를 상승 백호 2009.02.22 904
471 기타 메세지를 분출해 표시 백호 2009.02.22 1169
470 스킬 Trickster's Bag of Skill Effects file 백호 2009.02.22 1077
469 기타 레벨업시 전회복 by ccoa 8 백호 2009.02.22 2516
468 기타 Book Event v2 by Bruth 5 백호 2009.02.22 1696
467 전투 SBABS v3 6 file 백호 2009.02.22 2046
466 이름입력 영어 이름 입력기 2 백호 2009.02.22 1335
465 기타 레벨, 능력치 무한 스크립트 3 백호 2009.02.22 1712
464 기타 광물캐기 스크립트 1 file 백호 2009.02.22 1852
463 저장 [KCG] 2 Pane Save Scene 번역본 백호 2009.02.22 1122
462 저장 [KCG] 2 Pane Save Scene file 백호 2009.02.22 1129
Board Pagination Prev 1 ... 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 ... 52 Next
/ 52