设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 7330|回复: 6
打印 上一主题 下一主题

[RMVA发布] 纯事件属性点分配+技能吟唱(渣渣、、)

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
30 小时
注册时间
2011-12-23
帖子
7
跳转到指定楼层
1
 楼主| 发表于 2013-2-19 09:07:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 g359576937 于 2013-2-19 09:09 编辑

没有多少难度,纯属创意,不求鼓励,只求不吐槽= =
属性点:
废话不多说,直接上图
首先,制作一个技能(或道具)

然后是事件:




这只是一个人(需4个变量)
如果有更多的队友则需要条件分歧判断是否有“属性点”状态(虽说会很麻烦)
至于技能吟唱那就更简单了,完全创意的存在。
不上图了,文字足以说明。
这是一个很蛋疼的东西,说白了就是第一回合给自己一个持续一回合的BUFF,这个BUFF会领悟一个技能。
这个技能可以是继续吟唱,也可以是释放。
如——技能1:给使用者增加一个一回合BUFF,BUFF效果:领悟技能XXX
技能2:XXX
或吟唱两个回合:技能1:给使用者增加一个一回合BUFF,BUFF效果:领悟技能2
技能2:给使用者增加一个一回合BUFF,BUFF效果:领悟技能XXX
技能3:XXX
就是这么蛋疼。。。不过在没有脚本的情况下也是无奈之举。。。
附件:
http://pan.baidu.com/share/link?shareid=370210&uk=3862230785(百度网盘)

Lv1.梦旅人

梦石
0
星屑
59
在线时间
536 小时
注册时间
2010-6-20
帖子
1489
2
发表于 2013-2-19 11:31:32 | 只看该作者
其实日本有个加点的脚本....
不过这样也行啦。不过麻烦一点...0.0
[url=http://rpg.blue/thread-329159-1-1.html]http://attach.66rpg.com/bbs/attachment/forum/201308/24/132414sa8au7zgh7ab21gx.png[/url]   [b]
无尽之旅--永无止尽的旅程。[/b]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
70
在线时间
1083 小时
注册时间
2013-3-29
帖子
2394
3
发表于 2013-3-31 21:48:13 | 只看该作者
我有这个的脚本。。。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
70
在线时间
1083 小时
注册时间
2013-3-29
帖子
2394
4
发表于 2013-3-31 21:48:45 | 只看该作者
#encoding:utf-8
#=============================================================================
#-----------RMVA加点系统正常向-v1.01---By:救世小树--------转载请注明出处-------
#=============================================================================

module Point_Tree
  
  POINT_VARIABLE = 33
  POINT_KIND     = 7             #设定加点种类
  #储存属性点的变量编号是33+角色id*(6+1),
  #即40号变量为一号角色自由点;41号起6个变量为1号角色6个种类的已加点值
  
  LEVEL_UP_POINT = 3
  #每升一级属性点增加数
  
  RESET_ITEM     = 20   #洗点水编号
  
  STR_POINT        = ["体力","精神","力量","魔力","韧性","灵活","???"]
  #分别对应增加       [MHP,MMP,物攻,物防,魔攻,魔防,敏捷,幸运]
  POINT_ADD_PARAM = [[12 ,  0,   0,  0,   0,   0,   0,   0],     #体力
                     [0  , 12,   0,  0,   0,   0,   0,   0],     #精神
                     [0  ,  0,   5,  0,   0,   0,   0,   0],     #力量
                     [0  ,  0,   0,  0,   5,   0,   0,   0],     #魔力
                     [0  ,  0,   0,  3,   0,   2,   0,   1],     #韧性
                     [0  ,  0,   0,  0,   0,   0,   3,   0],     #灵活
                     
                     [0,0,0,0,0,0,0,0]]
                     #可以按上面的格式添加下去,不过要改POINT_KIND,STR_ALL,不然加了也白加
  
  #分别对应增加       [物理命中,物理闪避,必杀,必杀闪避,魔法闪避,魔法反射,物理反击,HP再生,Mp再生,Tp再生]
  POINT_ADD_XPARAM = [[0 , 0, 0, 0, 0, 0, 0, 6, 0, 0],
                      [0 , 0, 0, 0, 0, 0, 0, 0, 6, 0],
                      [6 , 6, 0, 0, 0, 0, 0, 0, 0, 0],
                      [0 , 0, 6, 0, 0, 0, 0, 0, 0, 0],
                      [0 , 0, 0, 0, 0, 0, 0, 4, 4, 0],
                      [0 , 6, 0, 6, 6, 0, 0, 0, 0, 0],
                     
                      [0,0,0,0,0,0,0,0,0,0]]
                     #这里的单位是万分之一数值也就是0.01%,我随便填了下【别嫌小,够大了,有心情你可以算算看平衡性】
  
  #各种名称
  ADDPOINT       = "加点"   #菜单中选项
  
  POINT_NAME     = "属性点" #未分配点数
  
  XARAM_NAME     = ["物理命中","物理闪避","必杀","必杀闪避","魔法闪避","魔法反射","物理反击","HP再生","Mp再生","Tp再生"]
  def reset(actor_id)
    for i in 1..6
      $game_variables[actor_id*(POINT_KIND+1) + POINT_VARIABLE]+=$game_variables[actor_id*(POINT_KIND+1) + POINT_VARIABLE+i]
      $game_variables[actor_id*(POINT_KIND+1) + POINT_VARIABLE+i]=0
    end
  end
  
  def temp_all
    r = 0
    for i in 0 .. POINT_KIND-1
      r+=$temp_point
    end
    return r
  end
  
end
$temp_point = []
for i in 0 .. Point_Tree::POINT_KIND-1
  $temp_point.push(0)
end

class Game_Actor < Game_Battler
  include Point_Tree
  alias level_up_tre level_up
  def level_up
    level_up_tre
    @hp += mhp
    @mp += mmp
    $game_variables[self.id*(POINT_KIND+1) + POINT_VARIABLE] += LEVEL_UP_POINT
  end
  def point_plus(param_id)
    r=0
    for i in 0 .. POINT_KIND-1
      r+=$game_variables[self.id*(POINT_KIND+1) + POINT_VARIABLE+i+1]*POINT_ADD_PARAM[param_id]
    end
    return r
  end

  alias point_base_param param
  
  def param(param_id)
    value = param_base(param_id) + param_plus(param_id) + point_plus(param_id)
    value *= param_rate(param_id) * param_buff_rate(param_id)
    [[value, param_max(param_id)].min, param_min(param_id)].max.to_i
  end
  def xparam(xparam_id)
    xp = super(xparam_id)
    for i in 0 .. POINT_KIND-1
      xp+=($game_variables[self.id*(POINT_KIND+1) + POINT_VARIABLE+i+1]*POINT_ADD_XPARAM[xparam_id]/10000.0)
    end
    return xp
  end
  def use_item(item)
    super
    if item.id == RESET_ITEM
      reset(self.id)
      self.hp = [self.hp,self.mhp].min
      self.mp = [self.mp,self.mmp].min
    end
  end
end

class Window_Point_Command < Window_Command
  
  include Point_Tree
  #--------------------------------------------------------------------------
  # ● 初始化指令选择位置(类方法)
  #--------------------------------------------------------------------------
  def self.init_command_position
    @@last_command_symbol = nil
  end
  #--------------------------------------------------------------------------
  # ● 初始化对象
  #--------------------------------------------------------------------------
  def initialize(actor)
    @status_window = nil
    @actor = actor
    super(0,0)
    select_last
  end
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
  def status_window=(status_window)
    return if @status_window == status_window
    @status_window = status_window
  end
  #--------------------------------------------------------------------------
  # ● 获取窗口的宽度
  #--------------------------------------------------------------------------
  def window_width
    return 160
  end
  #--------------------------------------------------------------------------
  # ● 获取显示行数
  #--------------------------------------------------------------------------
  def visible_line_number
    item_max
  end
  def get_actor_point(id)
    s = $game_variables[@actor.id*(POINT_KIND+1)+POINT_VARIABLE+id+1].to_s
    return "("+s+")+"+$temp_point[id].to_s
  end
  #--------------------------------------------------------------------------
  # ● 生成指令列表
  #--------------------------------------------------------------------------
  def make_command_list
    for i in 0 .. POINT_KIND-1
      add_command(STR_POINT   + get_actor_point(i)  , :point_add  ,add_enabled)
    end
    add_command("确认",  :point_ok)
    add_command("取消",  :point_cancle)
  end
  #--------------------------------------------------------------------------
  # ● 按下确定键时的处理
  #--------------------------------------------------------------------------
  def process_ok
    @@last_command_symbol = current_symbol
    super
  end
  #--------------------------------------------------------------------------
  # ● 返回最后一个选项的位置
  #--------------------------------------------------------------------------
  def select_last
    select_symbol(@@last_command_symbol)
  end
  
  def add_enabled
    temp_all < $game_variables[@actor.id*(POINT_KIND+1) + POINT_VARIABLE]
  end

  def update_help
    @help_window.set_text(self.index+1) if @help_window
    @status_window.index = self.index if @status_window
  end
end

#帮助窗口
class Window_Point_Help < Window_Base
  include Point_Tree
  def initialize(x,y,w,h)
    super(x, y, w, h)
   
   
  end
  def set_text(id)
    contents.clear
    if id <= POINT_KIND
      text = "\\}提升一点该属性"
    elsif id == POINT_KIND+1
      text = "\\}确认此次加点分配"
    elsif  id == POINT_KIND+2
      text = "\\}取消此次加点分配"
    end
    draw_text_ex(8, 8, text)
  end
end


#角色状态窗口
class Window_Point_Actor < Window_Base
  include Point_Tree
  
  
  def initialize(actor)
    super(160, 0, Graphics.width - 160, Graphics.height)
    @actor = actor
    @index = 0
    refresh
  end
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
  def index=(index)
    return if @index == index
    @index = index
    refresh
  end
  def line_height
    return 24
  end
  def refresh
    contents.clear
    contents.font.size = 24
    draw_actor_name(@actor, 100, 0)
    draw_actor_class(@actor, 240, 0)
    draw_actor_face(@actor, 2, 0)
    contents.font.size = 20
    draw_actor_level(@actor, 102,  24)
    draw_actor_point(100,48)
    contents.font.size = 16
    draw_actor_param_point(8,16 * 6)
    draw_actor_xparam_point(8,16 * 14)
  end
  def draw_actor_point(x,y)
    draw_text(x,y,200,line_height,"  未分配"+POINT_NAME + ":" + $game_variables[@actor.id*(POINT_KIND+1) + POINT_VARIABLE].to_s)
    draw_text(x,y+line_height,200,line_height,"此次分配"+POINT_NAME + ":" + temp_all.to_s)
  end
  def draw_actor_param_point(x,y)
    8.times {|i| draw_actor_param_to_s(x,y,i)}
  end
  def draw_actor_xparam_point(x,y)
    10.times {|i| draw_actor_xparam_to_s(x,y,i)}
  end
  
  def draw_actor_param_to_s(x,y,param_id)
    a=0
    for i in 0 .. POINT_KIND-1
      a+=$temp_point*POINT_ADD_PARAM[param_id]
    end
    s1 = Vocab::param(param_id)
    s2 = @actor.param(param_id).to_s
    s3 = (@actor.param(param_id) + a).to_s
    if @index < POINT_KIND
      if POINT_ADD_PARAM[@index][param_id]==0
        s4 = ""
      else
        s4 = "+" + POINT_ADD_PARAM[@index][param_id].to_s
      end
    else
      s4 = ""
    end
   
    change_color(system_color)
    draw_text(x,y+16*param_id,100,line_height,s1)
    change_color(normal_color)
    s2+= " →"
    draw_text(x+82,y+16*param_id,120,line_height,s2,2)
    change_color(system_color)
    draw_text(x+150,y+16*param_id,100,line_height,s3,2)
    change_color(normal_color)
    contents.font.size = 14
    draw_text(x+266,y+16*param_id,100,line_height,s4)
    contents.font.size = 16
  end
  def draw_actor_xparam_to_s(x,y,xparam_id)
    a=0.00
    for i in 0 .. POINT_KIND-1
      a+=($temp_point*POINT_ADD_XPARAM[xparam_id]/10000.0)
    end
    s1 = XARAM_NAME[xparam_id]
    s2 = sprintf("%02.2f%%",@actor.xparam(xparam_id)*100)
    s3 = sprintf("%02.2f%%",(@actor.xparam(xparam_id) + a)*100)
    print @actor.xparam(xparam_id) + a if a!=0
    print "\n" if a!=0
    if @index < POINT_KIND
      if POINT_ADD_XPARAM[@index][xparam_id]==0
        s4=""
      else
        s4 = sprintf("+%02.2f%%",POINT_ADD_XPARAM[@index][xparam_id]/100.0)
      end
    else
      s4 = ""
    end
   
    change_color(system_color)
    draw_text(x,y+16*xparam_id,100,line_height,s1)
    change_color(normal_color)
    s2+= " →"
    draw_text(x+82,y+16*xparam_id,120,line_height,s2,2)
    change_color(system_color)
    draw_text(x+150,y+16*xparam_id,100,line_height,s3,2)
    change_color(normal_color)
    contents.font.size = 14
    draw_text(x+266,y+16*xparam_id,100,line_height,s4)
    contents.font.size = 16
   
   
  end
end

class Scene_Point < Scene_Base
  include Point_Tree
  def start
    super
    create_background
    @actor = $game_party.menu_actor
    create_command_window
    create_status_window
    create_help_window
    @command_window.activate
  end
  def terminate
    super
    dispose_background
  end
  def create_background
    @background_sprite = Sprite.new
    @background_sprite.bitmap = SceneManager.background_bitmap
    @background_sprite.color.set(16, 16, 16, 128)
  end
  def dispose_background
    @background_sprite.dispose
  end
  
  def create_command_window
    @command_window = Window_Point_Command.new(@actor)
    @command_window.set_handler(:cancel,      method(:return_scene))
    @command_window.set_handler(:pagedown,    method(:next_actor))
    @command_window.set_handler(:pageup,      method(:prev_actor))
    @command_window.set_handler(:point_add,   method(:add_point))
    @command_window.set_handler(:point_ok,    method(:add_ok))
    @command_window.set_handler(:point_cancle,method(:add_cancle))
   
  end
  def return_scene
    add_cancle
    SceneManager.return
  end
  def create_status_window
    @status_window = Window_Point_Actor.new(@actor)
    @command_window.status_window = @status_window
  end
  def create_help_window
    @help_window = Window_Point_Help.new(0,@command_window.height,160,Graphics.height-@command_window.height)
    #(0, 216, 160, 200)
    @help_window.viewport = @viewport
    @command_window.help_window = @help_window
  end
  
  def add_point
    if temp_all >= $game_variables[@actor.id*(POINT_KIND+1) + POINT_VARIABLE]
      @command_window.activate
      return
    end
    $temp_point[@command_window.index] += 1
    @status_window.refresh
    @command_window.refresh
    @command_window.activate
  end
  

  def add_ok
    for i in 0 .. POINT_KIND-1
      $game_variables[@actor.id*(POINT_KIND+1) + POINT_VARIABLE+i+1] += $temp_point
    end
    $game_variables[@actor.id*(POINT_KIND+1) + POINT_VARIABLE] -= temp_all
    add_cancle
  end
  
  def add_cancle
    for i in 0 .. POINT_KIND-1
      $temp_point=0
    end
    @status_window.refresh
    @command_window.refresh
    @command_window.activate
  end
  
  
  def next_actor
    @actor = $game_party.menu_actor_next
    on_actor_change
  end
  #--------------------------------------------------------------------------
  # ● 切换到上一个角色
  #--------------------------------------------------------------------------
  def prev_actor
    @actor = $game_party.menu_actor_prev
    on_actor_change
  end
  #--------------------------------------------------------------------------
  # ● 切换角色
  #--------------------------------------------------------------------------
  def on_actor_change
    @status_window.actor = @actor
    @command_window.actor = @actor
    @command_window.activate
  end
  
end

class Window_MenuCommand < Window_Command
  alias add_original_commands_old add_original_commands
  def add_original_commands
    add_original_commands_old
    add_command(Point_Tree::ADDPOINT,    :addpoint)
  end
end

class Scene_Menu < Scene_MenuBase
  alias create_command_window_old create_command_window
  def create_command_window
    create_command_window_old
    @command_window.set_handler(:addpoint,method(:add_point))
  end
  def add_point
    @status_window.select_last
    @status_window.activate
    @status_window.set_handler(:ok,     method(:on_ok))
    @status_window.set_handler(:cancel, method(:on_personal_cancel))
  end
  def on_ok
    SceneManager.call(Scene_Point)
    Window_Point_Command::init_command_position
  end
end



class Scene_ItemBase < Scene_MenuBase
  def item_usable?
    if item.id == Point_Tree::RESET_ITEM
      return true
    end
    user.usable?(item) && item_effects_valid?
  end
end




=begin
------------------------------
class Window_Status < Window_Selectable
  include Point_Tree
  alias draw_parameters_old draw_parameters
  def draw_parameters(x, y)
    draw_parameters_old(x,y)
    draw_point(x,y)
  end
  def draw_point(x,y)
    for i in 0..5
      change_color(system_color)
      draw_text(x+100, y+ line_height * i, 80, line_height, STR_POINT)
      change_color(normal_color)
      draw_text(x+180, y+ line_height * i, 36, line_height,$game_variables[@actor.id*(POINT_KIND+1)+POINT_VARIABLE+i+1], 2)
    end
  end
  
end

class Window_Base < Window
  def draw_actor_param(actor, x, y, param_id)
    change_color(system_color)
    draw_text(x-30, y, 80, line_height, Vocab::param(param_id))
    change_color(normal_color)
    draw_text(x+ 50, y, 36, line_height, actor.param(param_id), 2)
  end
end
---------------------------------
=end
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
65
在线时间
32 小时
注册时间
2012-12-4
帖子
8
5
发表于 2013-4-20 17:29:57 | 只看该作者
黄濑凉太 发表于 2013-3-31 21:48
#encoding:utf-8
#=============================================================================
#---- ...

你好,如果可以的话,能发一个范例吗?

点评

好的~马上传。  发表于 2013-4-20 20:45
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
70
在线时间
1083 小时
注册时间
2013-3-29
帖子
2394
6
发表于 2013-4-20 21:03:03 | 只看该作者
Project2.zip (316.93 KB, 下载次数: 144)
范例做好了~

点评

哦,谢谢了。因为我最近好像在什么帖子里面看到过你,知道你还好好的。  发表于 2015-6-25 20:24
2年了,你还真敢问啊…………这个不太清楚,分配点数的成长数额应该和设置有关  发表于 2015-6-25 20:21
感谢你的范例,还有一个问题请教?加入这个脚本之后,以前数据库中已经设置好的职业属性成长还会有效吗?  发表于 2015-6-25 20:01
啊,顺便提示,我没有发RGSS的文件夹,请自补。  发表于 2013-4-20 21:03

坑的进度如上                                                                                                        点击↑
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1898
在线时间
18 小时
注册时间
2014-12-8
帖子
1
7
发表于 2014-12-18 11:09:30 | 只看该作者
LZ的魔法吟唱法给了很大启发 可以这样仿照洛奇的施法方式了 冒着挖坟的风险给LZ点个赞
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-2 10:20

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表