RPGXP 스크립트
2013.09.24 00:49

[아힝흥행]레벨한계 돌파 스크립트

조회 수 1169 추천 수 0 댓글 3
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

#LV 한계 돌파
#
#처음에 거절하고 일어나시면 ,이 스크립트(script)를 사용한 것보다도
#자력으로 개조한 쪽이 ,다양 자유롭게 가능하다 하여 권장입니다.
#이기 때문에 ,참고 정도에 보여 줄 수 있는다면 좋을지도 모릅니다.
#( 물론,이것 단체라도 움직이도록 만들고 있으므로
#그대로 사용하고 받아도 상관하지 않습니다.)
#
#그대로 사용한 경우의 주의점으로서 ,
#지금까지의 스크립트(script)와 달리,기초로부터 있는 처리를 몇개인가 개서하고 입니다.
#병용이라든가 한 경우,가능한한 위의 쪽에 부착하면 그럭 저럭 되다,카모시れ 늘릴 수 없다.
#
#사용 방법
#먼저,데이터베이스(database)의 배우(actor) 설정으로 패러미터(parameter)의 설정을 합니다.
#각 패러미터(parameter)는 초기치 + 기본 치 * LV 로 산출됩니다.
#배우(actor)의 LV1의 때의 패러미터(parameter)의 값이 초기치
#LV2의 때의 값이 기본 값입니다.
#가사 HP의 초기치가 1500,기본치가 150과 자태라면,
#데이터베이스(database)의 배우(actor)의 패러미터(parameter) 설정으로
#LV1의 때의 HP가 1500,LV2의 때의 HP가 150으로 되도록 설정하십시오.
#
#패러미터(parameter)의 산출이 적당 지나기 때문에 ,각자 수정이 필요나와 .

  BASE_FINAL_LEVEL = 9999   #상한 레벨(level)(그다지 큰 값을 설정한다면 항 합니다)
  MAXHP_LIMIT = 99999999    #HP 한계 치
  MAXSP_LIMIT = 99999999    #SP 한계 치
  STR_LIMIT   = 999999      #STR 한계 치
  DEX_LIMIT   = 999999      #DEX 한계 치
  AGI_LIMIT   = 999999      #AGI 한계 치
  INT_LIMIT   = 999999      #INT 한계 치

class Game_Actor < Game_Battler
  def new_final_level
    lv = BASE_FINAL_LEVEL
    #이하 상한 LV 개별 지정 용
    #case self.id #엑터의 ID 번호에 따라 레벨 한계치를 각자 개별로 바꿔줄 수 있습니다.
    #when 1
    #  lv = 255
    #when 2
    #  lv = 999
    #when 8
    #  lv = 15600
    #end
    return lv
  end
  #--------------------------------------------------------------------------
  # ● EXP 계산
  #--------------------------------------------------------------------------
  def make_exp_list
    actor = $data_actors[@actor_id]
    @exp_list = Array.new(new_final_level + 2)
    @exp_list[1] = 0
    pow_i = 2.4 + actor.exp_inflation / 100.0
    for i in 2..new_final_level + 1
      if i > new_final_level
        @exp_list[i] = 0
      else
        n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
        @exp_list[i] = @exp_list[i-1] + Integer(n)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● MaxHP 의(것) 취득
  #--------------------------------------------------------------------------
  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, MAXHP_LIMIT].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, MAXHP_LIMIT].min
    return n
  end
  #--------------------------------------------------------------------------
  # ● 기본 MaxHP 의(것) 취득
  #--------------------------------------------------------------------------
  def base_maxhp
    n = $data_actors[@actor_id].parameters[0, 1]
    n += $data_actors[@actor_id].parameters[0, 2] * @level
    return n
  end
  #--------------------------------------------------------------------------
  # ● 기본 MaxSP 의(것) 취득
  #--------------------------------------------------------------------------
  def base_maxsp
    n = $data_actors[@actor_id].parameters[1, 1]
    n += $data_actors[@actor_id].parameters[1, 2] * @level
    return n
  end
  #--------------------------------------------------------------------------
  # ● 기본 완력의 취득
  #--------------------------------------------------------------------------
  def base_str
    n = $data_actors[@actor_id].parameters[2, 1]
    n += $data_actors[@actor_id].parameters[2, 2] * @level
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.str_plus : 0
    n += armor1 != nil ? armor1.str_plus : 0
    n += armor2 != nil ? armor2.str_plus : 0
    n += armor3 != nil ? armor3.str_plus : 0
    n += armor4 != nil ? armor4.str_plus : 0
    return [[n, 1].max, STR_LIMIT].min
  end
  #--------------------------------------------------------------------------
  # ● 기본 손재주가 사노 취득
  #--------------------------------------------------------------------------
  def base_dex
    n = $data_actors[@actor_id].parameters[3, 1]
    n += $data_actors[@actor_id].parameters[3, 2] * @level
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.dex_plus : 0
    n += armor1 != nil ? armor1.dex_plus : 0
    n += armor2 != nil ? armor2.dex_plus : 0
    n += armor3 != nil ? armor3.dex_plus : 0
    n += armor4 != nil ? armor4.dex_plus : 0
    return [[n, 1].max, DEX_LIMIT].min
  end
  #--------------------------------------------------------------------------
  # ● 기본 신속함의 취득
  #--------------------------------------------------------------------------
  def base_agi
    n = $data_actors[@actor_id].parameters[4, 1]
    n += $data_actors[@actor_id].parameters[4, 2] * @level
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.agi_plus : 0
    n += armor1 != nil ? armor1.agi_plus : 0
    n += armor2 != nil ? armor2.agi_plus : 0
    n += armor3 != nil ? armor3.agi_plus : 0
    n += armor4 != nil ? armor4.agi_plus : 0
    return [[n, 1].max, AGI_LIMIT].min
  end
  #--------------------------------------------------------------------------
  # ● 기본 마력의 취득
  #--------------------------------------------------------------------------
  def base_int
    n = $data_actors[@actor_id].parameters[5, 1]
    n += $data_actors[@actor_id].parameters[5, 2] * @level
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.int_plus : 0
    n += armor1 != nil ? armor1.int_plus : 0
    n += armor2 != nil ? armor2.int_plus : 0
    n += armor3 != nil ? armor3.int_plus : 0
    n += armor4 != nil ? armor4.int_plus : 0
    return [[n, 1].max, INT_LIMIT].min
  end
  #--------------------------------------------------------------------------
  # ● EXP 의(것) 변경
  #     exp : 새롭다 EXP
  #--------------------------------------------------------------------------
  def exp=(exp)
    # ★EXP의 상한 체크(check)를 해제
    @exp = [exp, 0].max
    # 레벨업(level up)
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
      @level += 1
      # 숙련(skill) 습득
      for j in $data_classes[@class_id].learnings
        if j.level == @level
          learn_skill(j.skill_id)
        end
      end
    end
    # 레벨(level) 다운(down)
    while @exp < @exp_list[@level]
      @level -= 1
    end
    # 현재의 HP 라고(와) SP 이(가) 최대치를 초과하고 있다면 수정
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end
  #--------------------------------------------------------------------------
  # ● 레벨(level)의 변경
  #     level : 새로운 레벨(level)
  #--------------------------------------------------------------------------
  def level=(level)
    # 상하한 체크(check)
    # ★LV 상한을 new_final_level로 체크(check)하도록 변경
    level = [[level, new_final_level].min, 1].max
    # EXP 을(를) 변경
    self.exp = @exp_list[level]
  end
end
 
 
class Game_Battler
  #--------------------------------------------------------------------------
  # ● MaxSP 의(것) 취득
  #--------------------------------------------------------------------------
  def maxsp
    n = [[base_maxsp + @maxsp_plus, 0].max, MAXSP_LIMIT].min
    for i in @states
      n *= $data_states[i].maxsp_rate / 100.0
    end
    n = [[Integer(n), 0].max, MAXSP_LIMIT].min
    return n
  end
  #--------------------------------------------------------------------------
  # ● 완력의 취득
  #--------------------------------------------------------------------------
  def str
    n = [[base_str + @str_plus, 1].max, STR_LIMIT].min
    for i in @states
      n *= $data_states[i].str_rate / 100.0
    end
    n = [[Integer(n), 1].max, STR_LIMIT].min
    return n
  end
  #--------------------------------------------------------------------------
  # ● 손재주가 사노 취득
  #--------------------------------------------------------------------------
  def dex
    n = [[base_dex + @dex_plus, 1].max, DEX_LIMIT].min
    for i in @states
      n *= $data_states[i].dex_rate / 100.0
    end
    n = [[Integer(n), 1].max, DEX_LIMIT].min
    return n
  end
  #--------------------------------------------------------------------------
  # ● 신속함의 취득
  #--------------------------------------------------------------------------
  def agi
    n = [[base_agi + @agi_plus, 1].max, AGI_LIMIT].min
    for i in @states
      n *= $data_states[i].agi_rate / 100.0
    end
    n = [[Integer(n), 1].max, AGI_LIMIT].min
    return n
  end
  #--------------------------------------------------------------------------
  # ● 마력의 취득
  #--------------------------------------------------------------------------
  def int
    n = [[base_int + @int_plus, 1].max, INT_LIMIT].min
    for i in @states
      n *= $data_states[i].int_rate / 100.0
    end
    n = [[Integer(n), 1].max, INT_LIMIT].min
    return n
  end
  #--------------------------------------------------------------------------
  # ● MaxHP 의(것) 설정
  #     maxhp : 새롭다 MaxHP
  #--------------------------------------------------------------------------
  def maxhp=(maxhp)
    @maxhp_plus += maxhp - self.maxhp
    @maxhp_plus = [[@maxhp_plus, -MAXHP_LIMIT].max, MAXHP_LIMIT].min
    @hp = [@hp, self.maxhp].min
  end
  #--------------------------------------------------------------------------
  # ● MaxSP 의(것) 설정
  #     maxsp : 새롭다 MaxSP
  #--------------------------------------------------------------------------
  def maxsp=(maxsp)
    @maxsp_plus += maxsp - self.maxsp
    @maxsp_plus = [[@maxsp_plus, -MAXSP_LIMIT].max, MAXSP_LIMIT].min
    @sp = [@sp, self.maxsp].min
  end
  #--------------------------------------------------------------------------
  # ● 완력의 설정
  #     str : 새로운 완력
  #--------------------------------------------------------------------------
  def str=(str)
    @str_plus += str - self.str
    @str_plus = [[@str_plus, -STR_LIMIT].max, STR_LIMIT].min
  end
  #--------------------------------------------------------------------------
  # ● 손재주가 사노 설정
  #     dex : 새로운 손재주가
  #--------------------------------------------------------------------------
  def dex=(dex)
    @dex_plus += dex - self.dex
    @dex_plus = [[@dex_plus, -DEX_LIMIT].max, DEX_LIMIT].min
  end
  #--------------------------------------------------------------------------
  # ● 신속함의 설정
  #     agi : 새로운 신속함
  #--------------------------------------------------------------------------
  def agi=(agi)
    @agi_plus += agi - self.agi
    @agi_plus = [[@agi_plus, -AGI_LIMIT].max, AGI_LIMIT].min
  end
  #--------------------------------------------------------------------------
  # ● 마력의 설정
  #     int : 새로운 마력
  #--------------------------------------------------------------------------
  def int=(int)
    @int_plus += int - self.int
    @int_plus = [[@int_plus, -INT_LIMIT].max, INT_LIMIT].min
  end
end

레벨한계 돌파 스크립트 입니다.유용하게쓰세요ㅎㅎ

원하시는게 있으면 댓글로 달아주세요.있으면 올리겠습니다ㅎㅎ

?
  • ?
    슈퍼겨털맨 2014.07.28 09:20
    낮에받고지금에야 댓글쓰네요.
    감사합니다!
  • ?
    태풍RPG 2014.09.11 02:44
    어떻게 하는지 이해가
  • ?
    jeraru 2015.01.03 00:36
    Erro no Script , em 34 na linaha 'TypeError'
    undefined superclass 'Game_Battler'
    스크립트 복붙하고 게임 테스트 하면
    이렇게 떠여?? 어떻게 해요??

  1. Mog_Battle_hud(MZ버전도 있습니다)

    Date2021.03.05 CategoryRPGMV 플러그인 By스트레이보우 Views1847 Votes0
    Read More
  2. 컷신 플러그인

    Date2020.10.30 CategoryRPGMV 플러그인 By스트레이보우 Views2453 Votes0
    Read More
  3. 업적플러그인

    Date2020.09.02 CategoryRPGMV 플러그인 By스트레이보우 Views2090 Votes0
    Read More
  4. 한글조합입력기(영어가능)

    Date2019.11.10 CategoryRPGXP 스크립트 By조규진1 Views946 Votes0
    Read More
  5. 게임에서 제공해주는 노래가 아닌 외부에서 다운받고 안에 넣어쓰려면 어떻게 해야하나요?

    Date2019.07.26 CategoryRPGMV 플러그인 ByBigOrca Views1463 Votes0
    Read More
  6. Ghost Effect

    Date2019.01.20 CategoryRPGMV 플러그인 By러닝은빛 Views1156 Votes0
    Read More
  7. RPG XP Xas액알

    Date2018.10.30 CategoryRPGXP 스크립트 By심심치 Views1161 Votes0
    Read More
  8. 커스텀 숫자 입력 패드

    Date2018.10.19 CategoryRPGMV 플러그인 By러닝은빛 Views1222 Votes0
    Read More
  9. 9마리 이상의 몬스터 설정 | More Enemies

    Date2018.08.31 CategoryRPGMV 플러그인 By러닝은빛 Views974 Votes0
    Read More
  10. 동적 맵 타일 수정 플러그인

    Date2018.07.17 CategoryRPGMV 플러그인 By베지테리안카카오 Views1035 Votes0
    Read More
  11. VXA에서 XBOX360 컨트롤러 사용 여부 체크

    Date2018.07.15 CategoryRPGVX Ace 스크립트 By러닝은빛 Views891 Votes0
    Read More
  12. RMMV 옵션 창에 메시지 속도 및 글자 크기 변경 기능 추가

    Date2018.07.15 CategoryRPGMV 플러그인 By러닝은빛 Views1636 Votes0
    Read More
  13. 한글 데미지 표시

    Date2018.07.09 CategoryRPGMV 플러그인 By러닝은빛 Views1420 Votes0
    Read More
  14. [ MV ] 심장[체력표시 하트] 플러그인

    Date2018.07.01 CategoryRPGMV 플러그인 By수성의물 Views2257 Votes0
    Read More
  15. [鳥小屋] 실적 플러그인(인게임 트로피 시스템)

    Date2017.10.31 CategoryRPGMV 플러그인 By이니군 Views1747 Votes0
    Read More
  16. LuD Script Package

    Date2017.08.16 CategoryRPGVX Ace 스크립트 ByLuD Views1674 Votes0
    Read More
  17. [VXAce] 레이어 맵 <layer> 시스템

    Date2017.08.07 CategoryRPGVX Ace 스크립트 ByLuD Views1272 Votes0
    Read More
  18. [RPG MV] 퀘스트 마커 지속 표시 플러그인

    Date2017.04.09 CategoryRPGMV 플러그인 Bylklslel Views1697 Votes0
    Read More
  19. Mirror Area - RPG Maker MV

    Date2017.01.03 CategoryRPGMV 플러그인 By러닝은빛 Views5033 Votes0
    Read More
  20. Keyboard Event - RPG Maker MV

    Date2017.01.03 CategoryRPGMV 플러그인 By러닝은빛 Views2311 Votes0
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15


[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)