$name_str = "冰雪殇璃陌梦·爱樱沫渺·落璃琴依语·千梦然丝伤·可薇·茉殇黎·幽幻紫银·泪如韵影倾乐兰慕·凝羽冰蓝璃·泪伊如琉璃爱梦莲泪·冰雅泪落冰紫蝶梦·殇心樱语冰凌伊蝶梦如·璃紫陌悠千艳优墨阳云筱残·雪莲茉·伊文思·蕊夏清·碎墨音·芊乐梦黛怡·墨丽莎·梦灵苏魅香·紫蓝幽幻倾城萌美迷离·茉莉白嫩爱凤风魑·殇泪花如霜梦兰·萝莉心梦妖丽百千艳·瑰百合香珠合梦喃·泪伤梦雅爱之瑰·墨艳黎幻殇雪倩梦·情娜血清恋沫幽弥千月绯心丝梦灵蓝千月筱雪殇·希羽岚梦心殇雨樱琉璃舞韵倾雅·蕾玥瑷雅芸茜殇樱雪梦·曦魂梦月澪瑷琪欣泪·咝玥蓝·岚樱殇紫乐蝶雨·苏丽落雅馨瑷魅·音蕾琦洛凤之幽·蠫赬飖·风璃殇·颜鸢璃沫血伤·月冰灵希洛梦·玖兮恋琴爱·雨烟雪殇萌呗·血叶洛莉兰·凝羽冰蓝璃·泪伊如冰缈娅泪落冰花紫蝶梦珠·殇心樱语冰凌伊娜·洛丽塔紫心爱·蝶梦如璃紫陌悠千艳·优花梦冰玫瑰灵伤如爱·晶泪墨阳云筱残伤雅·琉璃爱梦莲泪·冰雪殇璃陌梦".gsub!(/·/,"") def random_name(n) start = rand($name_str.length / 3) return $name_str[start*3..start*3+n*3-1] end
class Interpreter # 用于在事件脚本中调用的初始化方法 def init_plugin_CreateActor $all_saved_actor_ids = [] $name_str = "...".gsub!(/·/,"") end # 用于在事件脚本中调用的呼叫窗口方法 def call_mapmenu_CreateActor ... call_mapmenu('新增角色', '删除角色', '编辑角色', '开始游戏') ... $game_map.need_refresh = true end end class Game_Party # 插件 Task 设置 alias _CreateActor_set_mapwindow_task set_mapwindow_task def set_mapwindow_task # 保留之前的 task 设置 _CreateActor_set_mapwindow_task # 新的内容只有插件开启的时候会添加 if $plugin_CreateActor_enable # 具体的 Task 设置 # 新增角色 if $all_saved_actor_ids.size == 8 name = "新增角色:角色已满@Return" text = "角色已满 8 人,请先删除角色!" @tasks_info.push Game_Task.new(name,text) else ... end # 删除和编辑角色 if $all_saved_actor_ids.empty? ... else $all_saved_actor_ids.each do |id| ... end end # 开始游戏 if $all_saved_actor_ids.size == 4 ... else ... end end end end class Window_MapMenu < Window_Command # 插件 按键响应 设置 alias _CreateActor_run_confirm run_confirm def run_confirm(ary) _CreateActor_run_confirm(ary) if $plugin_CreateActor_enable # ------------------------------------------------------- # 具体的 按键响应 设置 # --------------------------------------------------------- # 从 '@' 选项中读取角色ID if ary[2] =~ /ID\[(\d+)\]/ id = $1.to_i end # ------------------------------------------------------- if ary[0] == "新增角色" # ------------------------------------------------------- if ary[1] == "随机生成" $game_actors[id].name = random_name_CreateActor(4) end # ------------------------------------------------------- if ary[1] == "确认结果" $all_saved_actor_ids.push id end end # ------------------------------------------------------- if ary[0] == "删除角色" if $all_saved_actor_ids.size > 0 $all_saved_actor_ids.delete id end end # ------------------------------------------------------- if ary[0] == "开始游戏" if $all_saved_actor_ids.size == 4 ... else end end end end # 用于生成随机的名字 def random_name_CreateActor(n) ... end end
class Interpreter # 用于在事件脚本中调用的初始化方法 def init_plugin_LockAttributes $lock_LockAttributes = [false] * 12 $max_LockAttributes = 4 # 最多锁定 4 个属性 end # 用于在事件脚本中调用的呼叫窗口方法 def call_mapmenu_LockAttributes # 初始化 init_plugin_LockAttributes if !$lock_LockAttributes # 插件开启 $plugin_LockAttributes_enable = true # 记录上一个窗口位置,设置窗口位置 last_position_LockAttributes = $wmm_position.clone $wmm_position = {1=>[-100, -100, 100, 100], 2=>[0, 320, 160, 160], 3=>[160, 320, 480, 160]} # 设置窗口透明度,nil会调用默认透明度 $wmm_backopacity = nil # 呼叫菜单,请设置此插件需要呼叫的主菜单 call_mapmenu('锁定属性') # 插件关闭 $plugin_LockAttributes_enable = false # 还原到上一个窗口位置 $wmm_position = last_position_LockAttributes # 刷新地图 $game_map.need_refresh = true end end
alias _CreateActor_run_right run_right def run_right(ary) _CreateActor_run_right(ary) if $plugin_CreateActor_enable # ------------------------------------------------------- if ary[0] == "编辑角色" Interpreter.new(0,true).call_mapmenu_LockAttributes end end end
luliang 发表于 2017-2-24 11:41
我居然不是板凳....
214.42 KB, 下载次数: 73
夜狠简单 发表于 2017-3-19 16:48
这样很好看但是还是有不少bug的
guoxiaomi 发表于 2017-3-19 17:21
窗口,菜单系统的bug,还是这个角色创造界面的bug?
以及不做成scene是有以下考虑:每次离开和返回 Scen ...
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |