查看: 2289|回复: 19

[已经过期] VA的转生系统

[复制链接]
梦石
0
星屑
1345
在线时间
378 小时
注册时间
2015-6-16
回帖
526
发表于 2017-8-9 10:43:35 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本人知道XP有一个转生系统,想问问有没有VA版本的转生系统。

点评

这个脚本用于 WIDTH = 1024 HEIGHT = 768 窗口 需要你自己调试  发表于 2017-8-9 20:16
P1不太上了,有问题加个Q1286124843,不管是脚本还是游戏问题都可以来找我
梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

发表于 2017-8-9 20:09:00 | 显示全部楼层
本帖最后由 j296196585 于 2017-8-9 20:15 编辑

转生系统VA版
转生设定
状态画面+菜单主界面
转生界面WINDOW
转生界面SCENE
转生核心







#===========================================[pre lang="ruby"]LX_LEVEL = 50       #达到转生要求的最低等级。
#------------------------------------------------------------------------------
LX_VARIABLE = 200   #储存各角色转生次数的起始变量。比如:设置为 200 ,那么1号角
#                    色转生次数储存在 201 号变量,2号角色储存在 202 号变量,,,
#------------------------------------------------------------------------------
LX_N = 10           #转生前,角色的各属性除以设定的这个值,再乘以转生次数,加入
#                    到转生后的属性中。这个设定的值越高,加入转生后的属性就越
#                    少,反之就越多。
#------------------------------------------------------------------------------
LX_DX = false        #转生次数限制,限制写 true       不限制写  false
#------------------------------------------------------------------------------
LX_DX_N = 5         #转生最高次数限制,上面的限制设置写 true  该项才有效。
#------------------------------------------------------------------------------
LX_CLASS = false      #转生后是否改变角色职业,是 写入 true    否 写入 false
#------------------------------------------------------------------------------
LX_CLASS_ID = 1      #转生后,角色的职业ID。上面是否改变职业设置写 true
#                     该设置才有效。
#                     比如转生后,全部转为 1 号职业,从“新手”做起。
#------------------------------------------------------------------------------
LX_EVENT_ID = 1      #转生成功后激活的公共事件ID。公共事件里可设置一些转生成功后
#                    播放动画,以及一些提示等。
#------------------------------------------------------------------------------
#~ LEVEL_UP = false     #推荐配合使用升级加点系统。如果工程里有升级加点系统
#                    请写 true    没有则写 false
#==============================================================================
##转生后角色各属性增加度设置:
#------------------------------------------------------------------------------
#(角色每升一级增加的属性 = 数据库设置的基本值 + 下面设置的增加度 乘以 转生次数)
#(比如设置HP为 10  ,转生 0 次 角色每升一级,角色的HP多增加 0 点;
#  转生 1 次 多增加 10 点;转生 2 次 多增加 20 点,,,,;以此类推。)
#------------------------------------------------------------------------------
LX_EXP = 2           # EXP曲线基础值和增加度。(一般设为 1 — 10)
#------------------------------------------------------------------------------
LX_HP = 10           # HP
#------------------------------------------------------------------------------
LX_SP = 8            # MP
#------------------------------------------------------------------------------
LX_STATE = 1         # 六项基础能力[/pre]===================================
# ★ 【角色转生系统】★
#------------------------------------------------------------------------------
# ☆  原作者 by 芯☆淡茹水  
# ☆  VA版移植 by 魔法丶小肉包
#==============================================================================
#◆ 使用方法:
#        复制该脚本,插入到 Main 前。
#        召唤转生系统的方法:事件 → 脚本  写入  SceneManager.call(Scene_Lx)
#===============================================================================
#◆ 说明:
#        和一些网游的转生类似。角色随着转生次数的增加,各种属性(hp,sp,力量,
#      灵巧,,,等)的初始值会越来越高,而每升一级增加的属性也会越来越多。
#      (注意:数据库各角色的初始等级都设置为 1 级。)
#
#       由于手动设置的项目较多,在使用前,请先仔细阅读并设置下面的设置项。
#
#===============================================================================
#VA版说明补充:
#1.适用于加点系统的LEVEL_UP功能取消(懒...)当然需要的话可以加上去

点评

按顺序复制 我想说的是 这是我自己定制的脚本 可惜 VA 最后还是 弃坑了  发表于 2017-8-9 20:14
大大有的话能否提供一个呢  发表于 2017-8-9 20:11
额~不需要为什么还要发帖呢  发表于 2017-8-9 20:10
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

发表于 2017-8-9 20:11:29 | 显示全部楼层
[pre lang="ruby"]class Window_Base < Window
  def draw_actor_xdrs_lx(actor, x, y)
    self.contents.font.color = text_color(3)
    draw_text(x + 4, y, 120, 32, "轮回次数:")
    i =  actor.id + LX_VARIABLE
    self.contents.font.color = text_color(6)
    draw_text(x + 126, y, 80, 32, $game_variables.to_s)
  end
end
class Window_MenuStatus < Window_Selectable
  def draw_item(index)
    actor = $game_party.members[index]
    enabled = $game_party.battle_members.include?(actor)
    rect = item_rect(index)
    draw_item_background(index)
    draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)
    draw_actor_simple_status(actor, rect.x + 108, rect.y + line_height / 2)
    draw_actor_xdrs_lx(actor, rect.x + 98, rect.y+60)
  end
end
class Window_Status < Window_Selectable
  def draw_block1(y)
    draw_actor_name(@actor, 4, y)
    draw_actor_class(@actor, 128, y)
    draw_actor_nickname(@actor, 268, y)
    draw_actor_xdrs_lx(@actor, 380, y)
  end
end
#encoding:utf-8
#==============================================================================
# ■ Window_Help1
#------------------------------------------------------------------------------
#  显示特技和物品等的说明、以及角色状态的窗口
#==============================================================================

class Window_Help1 < Window_Base
  #--------------------------------------------------------------------------
  # ● 初始化对象
  #--------------------------------------------------------------------------
  def initialize(line_number = 2)
    super(0, 0, Graphics.width, fitting_height(line_number))
  end
  #--------------------------------------------------------------------------
  # ● 设置内容
  #--------------------------------------------------------------------------
  def set_text(text)
    if text != @text
      @text = text
      refresh
    end
  end
  #--------------------------------------------------------------------------
  # ● 清除
  #--------------------------------------------------------------------------
  def clear
    set_text("")
  end
  #--------------------------------------------------------------------------
  # ● 设置物品
  #     item : 技能、物品等
  #--------------------------------------------------------------------------
  def set_item(item)
    set_text(item ? item.description : "")
  end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_text_ex(4, 0, @text)
  end
end
[/pre]
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

发表于 2017-8-9 20:12:01 | 显示全部楼层
[pre lang="ruby"]class Window_LxStatus < Window_Base
  attr_reader   :selected
  def initialize(height, i)
    super(0, i * height, Graphics.width, height)
    @index = i
    refresh
    @selected = false
  end
  def refresh
    contents.clear
    change_color(normal_color)
    actor = $game_party.members[@index]
    draw_actor_xdrs_lx(actor, x + 130, 56)
      draw_actor_graphic(actor, x + 35, 80)
      draw_actor_name(actor, x, 0)
      draw_actor_class(actor, x + 134, 28)
      draw_actor_level(actor, x + 134, 0)
      draw_actor_hp(actor, x + 300, 0 )
      draw_actor_mp(actor, x + 300, 26)
  end
  def draw_current_and_max_values(x, y, width, current, max, color1, color2)
    change_color(color1)
    xr = x + width
    if width < 96
      draw_text(xr - 40, y, 42, line_height, current, 2)
    else
      draw_text(xr - 92, y, 42, line_height, current, 2)
      change_color(color2)
      draw_text(xr - 52, y, 12, line_height, "/", 2)
      draw_text(xr - 42, y, 42, line_height, max, 2)
    end
  end
  def selected=(selected)
    @selected = selected
    update_cursor
  end
  def update_cursor
    if @selected
      cursor_rect.set(0, 0, Graphics.width, height)
    else
      cursor_rect.empty
    end
  end
end
class Window_xz < Window_Command
  def make_command_list
    add_command("是",   :ok)
    add_command("否",   :cancel)
  end
end[/pre]
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

发表于 2017-8-9 20:12:26 | 显示全部楼层
[pre lang="ruby"]class Scene_Lx < Scene_MenuBase
  def start
    super
    create_help_window
    create_lx_viewport
    create_lx_windows
    init_selection
  end
  def terminate
    super
    @lx_viewport.dispose
    @lx_windows.each {|window| window.dispose }
  end
  def update
    super
    @lx_windows.each {|window| window.update }
    update_lx_selection
  end
  def create_help_window
    @help_window = Window_Help1.new(1)
    @help_window.set_text("★请选择要轮回的角色★")
  end
  def create_lx_viewport
    @lx_viewport = Viewport.new
    @lx_viewport.rect.y = @help_window.height
    @lx_viewport.rect.height -= @help_window.height
  end
  def create_lx_windows
    @lx_windows = Array.new(item_max) do |i|
      Window_LxStatus.new(lx_height, i)
    end
    @lx_windows.each {|window| window.viewport = @lx_viewport }
  end
  def init_selection
    @index = first_lx_index
    @lx_windows[@index].selected = true
    self.top_index = @index - visible_max / 2
    ensure_cursor_visible
  end
  def item_max
    $game_party.all_members.size
  end
  def visible_max
    return 4
  end
  def lx_height
    @lx_viewport.rect.height / visible_max
  end
  def first_lx_index
    return 0
  end
  def index
    @index
  end
  def top_index
    @lx_viewport.oy / lx_height
  end
  def top_index=(index)
    index = 0 if index < 0
    index = item_max - visible_max if index > item_max - visible_max
    @lx_viewport.oy = index * lx_height
  end
  def bottom_index
    top_index + visible_max - 1
  end
  def bottom_index=(index)
    self.top_index = index - (visible_max - 1)
  end
  def update_lx_selection
    return on_lx_ok     if Input.trigger?(:C)
    return on_lx_cancel if Input.trigger?(:B)
    update_cursor
  end
  def on_lx_ok
    level = $game_party.members[index].level
    if level >= LX_LEVEL
      if LX_DX == true
        i = $game_party.members[index].id
        if $game_variables[i + LX_VARIABLE] < LX_DX_N
          @xz = Window_xz.new(100,200)
          @xz.x = 100
          @xz.y = 400
          @xz.set_handler(:ok,      method(:c_ok))
          @xz.set_handler(:cancel,      method(:c_cancel))
        else
          @help_window.set_text("已达轮回次数上限!")
        end
      else
        @xz = Window_xz.new(100,200)
          @xz.x = 100
          @xz.y = 200
          @xz.set_handler(:ok,      method(:c_ok))
          @xz.set_handler(:cancel,      method(:c_cancel))
      end
    else
        text = LX_LEVEL.to_s
        text +=  "级后才能轮回!"
        @help_window.set_text(text)
    end
    return
  end
  def on_lx_cancel
    Sound.play_cancel
    return_scene
  end
  def c_ok
    actor = $game_party.members[index]
    i = actor.id
    v = LX_VARIABLE + i
    n = $game_variables[v] + 1
    hp = actor.mhp/LX_N * n
    sp = actor.mmp/LX_N * n
    atk = actor.atk/LX_N * n
    de = actor.def/LX_N * n
    mat = actor.mat/LX_N * n
    mdf = actor.mdf/LX_N * n
    agi = actor.agi/LX_N * n
    luk = actor.luk/LX_N * n
    $game_actors.setup(i)
    if LX_CLASS == true
      actor.class_id = LX_CLASS_ID
    end
    actor.add_param(0,hp)
    actor.add_param(1,sp)
    actor.add_param(2,atk)
    actor.add_param(3,de)
    actor.add_param(4,mat)
    actor.add_param(5,mdf)
    actor.add_param(6,agi)
    actor.add_param(7,luk)
    $game_variables[v] += 1
    actor.recover_all
    $data_common_events[LX_EVENT_ID]
    return_scene
  end
  def c_cancel
    @xz.hide
  end
  def update_cursor
    last_index = @index
    cursor_down (Input.trigger?(:DOWN))  if Input.repeat?(:DOWN)
    cursor_up   (Input.trigger?(:UP))    if Input.repeat?(:UP)
    cursor_pagedown   if Input.trigger?(:R)
    cursor_pageup     if Input.trigger?(:L)
    if @index != last_index
      Sound.play_cursor
      @lx_windows[last_index].selected = false
      @lx_windows[@index].selected = true
    end
  end
  def cursor_down(wrap)
    @index = (@index + 1) % item_max if @index < item_max - 1 || wrap
    ensure_cursor_visible
  end
  def cursor_up(wrap)
    @index = (@index - 1 + item_max) % item_max if @index > 0 || wrap
    ensure_cursor_visible
  end
  def cursor_pagedown
    if top_index + visible_max < item_max
      self.top_index += visible_max
      @index = [@index + visible_max, item_max - 1].min
    end
  end
  def cursor_pageup
    if top_index > 0
      self.top_index -= visible_max
      @index = [@index - visible_max, 0].max
    end
  end
  def ensure_cursor_visible
    self.top_index = index if index < top_index
    self.bottom_index = index if index > bottom_index
  end
end[/pre]
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

发表于 2017-8-9 20:12:49 | 显示全部楼层
  1. class RPG::Class < RPG::BaseItem
  2.   def initialize
  3.     super
  4.     @exp_params = [30,20,30,30]
  5.     @params = Table.new(8,100)
  6.     (1..99).each do |i|
  7.       @params[0,i] = 400+i*50#+LX_HP * $game_variables[LX_VARIABLE+id]
  8.       @params[1,i] = 80+i*10
  9.       (2..5).each {|j| @params[j,i] = 15+i*5/4 }
  10.       (6..7).each {|j| @params[j,i] = 30+i*5/2 }
  11.     end
  12.     @learnings = []
  13.     @features.push(RPG::BaseItem::Feature.new(23, 0, 1))
  14.     @features.push(RPG::BaseItem::Feature.new(22, 0, 0.95))
  15.     @features.push(RPG::BaseItem::Feature.new(22, 1, 0.05))
  16.     @features.push(RPG::BaseItem::Feature.new(22, 2, 0.04))
  17.     @features.push(RPG::BaseItem::Feature.new(41, 1))
  18.     @features.push(RPG::BaseItem::Feature.new(51, 1))
  19.     @features.push(RPG::BaseItem::Feature.new(52, 1))
  20.   end
  21.   def exp_for_level(level)
  22.     lv = level.to_f
  23.     lx = LX_EXP * $game_variables[LX_VARIABLE+id]
  24.     basis = @exp_params[0].to_f+lx
  25.     extra = @exp_params[1].to_f+lx
  26.     acc_a = @exp_params[2].to_f+lx
  27.     acc_b = @exp_params[3].to_f+lx
  28.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  29.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  30.   end
  31.   attr_accessor :exp_params
  32.   attr_accessor :params
  33.   attr_accessor :learnings
  34. end
复制代码

点评

可以啊,4G没问题。就是时间不够。Q:1286124843.应该不陌生了吧。话说弃坑还能讨论  发表于 2017-8-9 20:26
按照二楼 我给发布的排列啊 范例 差不多4G 你需要吗? 这个游戏我TM弃坑了  发表于 2017-8-9 20:20
有没有完整的范例,发现这个排版我怕BUG  发表于 2017-8-9 20:17
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

梦石
0
星屑
1345
在线时间
378 小时
注册时间
2015-6-16
回帖
526
 楼主| 发表于 2017-8-9 20:15:57 | 显示全部楼层
先说声多谢,但是身上没有好人卡。(抱歉了)

点评

我还有战力系统 也是他有偿给我移植的  发表于 2017-8-9 20:24
麻蛋 我这是有偿 。。你会干吗  发表于 2017-8-9 20:23
没好人卡的挺抱歉的。想报答你点什么  发表于 2017-8-9 20:21
我看见了肉包大大,我就知道了什么  发表于 2017-8-9 20:20
你只要发布 带上 我 和原作者 加上 移植 作者 就好了  发表于 2017-8-9 20:18
P1不太上了,有问题加个Q1286124843,不管是脚本还是游戏问题都可以来找我
回复

使用道具 举报

梦石
0
星屑
2457
在线时间
912 小时
注册时间
2014-10-14
回帖
1155

开拓者

发表于 2017-8-9 20:22:23 | 显示全部楼层
复制的时候已经知道怕你出错  已经一楼 一个顺序 排列好了
360截图20170809202331464.jpg
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部