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

Project1

 找回密码
 注册会员
搜索
楼主: cinderelmini
打印 上一主题 下一主题

[这里程序] 【有偿】<椎名君的UI脚本委托屋>

[复制链接]

Lv4.逐梦者

醉啸 长风万里

梦石
0
星屑
6047
在线时间
6586 小时
注册时间
2007-12-16
帖子
4501

贵宾

45
发表于 2016-4-12 23:08:44 | 只看该作者
问一下,XP的某个CP条移植VA可以接吗?
https://rpg.blue/thread-80324-1-1.html这个

点评

TAT……委托坑了球原谅…………  发表于 2016-4-14 17:59
前辈求个心理价位区间…………  发表于 2016-4-13 17:11
价钱你说了算喽  发表于 2016-4-13 16:00
O□O……前辈来触窝惹…………||这个看起来好像可以…………不过这个工作量窝可以收费咩………………  发表于 2016-4-13 14:54

还在龟速填坑中
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2106
在线时间
950 小时
注册时间
2015-7-16
帖子
767

开拓者

44
发表于 2016-4-10 18:39:17 | 只看该作者
我又再度上門啦,這次的主角又是 反lag腳本了
場景效果.rar (285.44 KB, 下载次数: 38)

案情描述:這個場景效果是可以走過一塊設定區域的地區後
可以有類似走路痕跡的效果,可是偶然發現遊戲中的痕跡不會再消失
查了各版本,發現又是反lag惹的禍,不過新工程放上去是直接衝突了
(看來我那誇張的腳本量又再度互補成功了......
再次助我一臂之力吧! ><

点评

或可以的話,多整合場景效果跟另一個腳本的衝突?  发表于 2016-4-23 00:02
反lag我預設放腳本最下方,兩者中間有大量腳本,實測後反lag徹底失效.....有沒有其他方案? 場景效果跟其他腳本衝突過,所以放得很上面  发表于 2016-4-23 00:00
检查了一下脚本,把场景效果脚本放到反lag下面就可以了,至于单独改成会弹错,是那个变量没赋值的原因,和之前整合好的mode7放一起就没事了。  发表于 2016-4-22 20:02
給店主加了個油  发表于 2016-4-21 14:49
这个得找时间看看……最近自家坑要弄的东西很多…………  发表于 2016-4-21 13:41
[神性领域扩张:扩张神性领域]
说了等于没说.
回复 支持 反对

使用道具 举报

Lv4.逐梦者

「Pemercyia」


Urhurrenna

梦石
0
星屑
9335
在线时间
2745 小时
注册时间
2008-9-5
帖子
3540

开拓者短篇八RM组冠军短篇九导演组亚军白银编剧

43
 楼主| 发表于 2016-4-3 20:53:11 | 只看该作者
zx903193387 发表于 2016-3-30 18:45
求在VIPArcher的装备说明脚本上增加能够在白魔的装备合成脚本的界面上正确呼出说明窗口 ...

试了一下好像可以了……(不愧是VIP菊苣的代码……好方便……
下面这一小段放在合成脚本的下面……
【召唤EXHELP的代码】

评分

参与人数 1星屑 +20 收起 理由
zx903193387 + 20 同上

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
710 小时
注册时间
2013-7-26
帖子
52
42
发表于 2016-4-1 23:26:14 | 只看该作者
请问 实现我这个功能 复杂吗?(rpgxp 仿空轨的菜单中 仿洛川)

点评

这个算比较简单的菜单,自己基本搞定了。我想要定制的是,一个战斗系统,比这个复杂数十倍,感觉还是放弃了...  发表于 2016-4-7 13:43
你可以放工程,一定會讓大家覺得簡單一些的XD  发表于 2016-4-7 11:21
已实现上图界面效果,拼拼凑凑的脚本很乱,效率低下,离成品还有段距离,卡壳了弃坑好几天... ...  发表于 2016-4-4 16:20
TAT…………球放过………………这个真的要命………………窝造不出来啦…………果咩…………  发表于 2016-4-2 14:11
不是普通複雜,光是看一眼理解就有些頭疼了  发表于 2016-4-2 02:23
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
20915
在线时间
9331 小时
注册时间
2012-6-19
帖子
7105

开拓者短篇九导演组冠军

41
发表于 2016-3-31 14:14:48 | 只看该作者
有丘直方 发表于 2016-3-30 19:56
简单脚本不付费是吗?
那我求个简单的。自认为简单,写起来一直出错……主要因为不熟悉File类和Dir类的缘故 ...

打开游戏目录下的 6r.txt 文件并判断内容
  1. open('6r.txt') do |file|
  2.   array = file.readlines
  3.   p array.length        # 文本文件总共几行
  4.   p array[0] == 'test'  # 第一行的内容是否是 test
  5.   p array[1] == 'hello' # 第二行的内容是否是 hello
  6. end
复制代码
注意txt文件必须为标准的utf-8格式不带bom,否则可能会有各种奇怪的转码问题

点评

为什么你要在 XP、VA 定制贴里要 VX 的脚本?  发表于 2016-4-2 19:04
话说,这么直接就用open函数,它是内建函数?RGSS2有这个函数吗?是不是需要另外定义一个?  发表于 2016-3-31 21:24
如果要判断的文档在游戏目录的某文件夹中,是不是只要在字符串中添加文件路径就行了?  发表于 2016-3-31 20:44

评分

参与人数 3星屑 +226 梦石 +1 收起 理由
迷糊的安安 + 1 +1好人卡
cinderelmini + 166 感谢科技!
zaiy2863 + 60 +1好人卡

查看全部评分

回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2106
在线时间
950 小时
注册时间
2015-7-16
帖子
767

开拓者

40
发表于 2016-3-31 12:59:47 | 只看该作者
我又登門囉

這次希望能整合兩個腳本,一個是倉庫腳本,另一個是物品破限腳本
這兩個腳本加在一起會很有意思,倉庫當你取得物品
假設你得到了10個麵包
那麼倉庫會顯示你持有10/99個麵包
可是用了破限後,物品持有都能超過99,這時就算你只拿10個麵包
畫面會顯示你持有 999/9999 的錯誤內容,雖然腳本沒出錯
但是能不能修正這個錯誤的顯示呢?
物品倉庫.rar (1.43 MB, 下载次数: 55)

点评

就只能先觀望了 (茶 話說後來我懂了其中原理後,自己修改了相關設定,收穫不小  发表于 2016-4-7 00:52
错误BUG不知道会不会弹,但是可能会发生存的东西大于10个之类的事情吧……大概……  发表于 2016-4-6 14:20
存取難道會發生錯誤BUG ? QAQ!?  发表于 2016-4-4 21:52
不过存取好像还是会有问题的……嘛……看造化吧……  发表于 2016-4-4 21:42
成功了,感謝  发表于 2016-4-4 20:36
[神性领域扩张:扩张神性领域]
说了等于没说.
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1934
在线时间
403 小时
注册时间
2015-8-30
帖子
395
39
发表于 2016-3-30 19:56:19 | 只看该作者
简单脚本不付费是吗?
那我求个简单的。自认为简单,写起来一直出错……主要因为不熟悉File类和Dir类的缘故。
求一个可以判断游戏文件夹中某一路径所指定的txt文件的内容的函数。
没错就这么简单。

点评

然后读txt内容请参考41L……  发表于 2016-3-31 20:51
那判断某目录里某文件是否不存在就可以用【Dir.glob('目录/目录/.../文件名.格式').empty?】了哇?  发表于 2016-3-31 20:47
标题画面判断是否存在存档用的函数就用到了Dir类的类方法……  发表于 2016-3-31 20:41
TAT…………Dir类窝没摸过……不懂诶……………………  发表于 2016-3-30 21:43
小仙女一枚~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
70
在线时间
345 小时
注册时间
2011-10-13
帖子
414
38
发表于 2016-3-30 18:45:56 | 只看该作者
{:2_276:}{:2_276:}求在VIPArcher的装备说明脚本上增加能够在白魔的装备合成脚本的界面上正确呼出说明窗口的功能,应该算是个小手术
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ 技能物品说明增强 蓝本:wyongcan
  4. # 修改 :VIPArcher
  5. #
  6. # 改动说明:
  7. # 改用新的帮助窗口和新定义draw_text_vip方法来增强兼容性
  8. # 更改初始化数据时机以支持跳过标题
  9. # 追加对普通物品和技能的说明内容
  10. # 修改了对帮助窗口行数的计算以支持控制符
  11. # 加上了各种颜色的设置,具体更高级的玩法自己领悟吧
  12. # 改成光标不动一段时间后才会出现帮助窗口
  13. #
  14. #  -- 本脚本来自 [url]https://rpg.blue[/url] 使用或转载请保留以上信息。
  15. #==============================================================================
  16. $VIPArcherScript ||= {};$VIPArcherScript[:help_ex] = 20141007
  17. $VIPArcherScript[:equip_limit] = false #是否使用了后知后觉的装备能力限制
  18. class << DataManager
  19.   alias_method :vip_load_database, :load_database
  20.   #--------------------------------------------------------------------------
  21.   # ● 读取数据库
  22.   #--------------------------------------------------------------------------
  23.   def load_database
  24.     vip_load_database
  25.     VIPArcher::Equipplus.equiphelpready
  26.   end
  27. end
  28. module VIPArcher;end
  29. module VIPArcher::Equipplus
  30.   TIME = 15 #帮助窗口自动出现的时间(单位帧
  31.   Font_Name = "微软雅黑" # 推荐"微软雅黑"
  32.   Font_Size = 20              # "微软雅黑"的话就20号字体
  33.   UP   = 24 #能力值提升颜色编号
  34.   DOWN = 25 #能力值下降颜色编号
  35.   VIP  = 14 #特殊能力颜色编号
  36.   MP   = 23
  37.   TP   = 29
  38.   CODE ={
  39.     11 => "属性抗性",
  40.     12 => "弱化抗性",
  41.     13 => "状态抗性",
  42.     14 => "状态免疫",
  43.     21 => "普通能力",
  44.     22 => "添加能力",
  45.     23 => "特殊能力",
  46.     31 => "附带属性",
  47.     32 => "附带状态",
  48.     33 => "攻击速度",
  49.     34 => "添加攻击次数",
  50.     41 => "添加技能类型",
  51.     42 => "禁用技能类型",
  52.     43 => "添加技能",
  53.     44 => "禁用技能",
  54.     51 => "可装备武器类型",
  55.     52 => "可装备护甲类型",
  56.     53 => "固定装备",
  57.     54 => "禁用装备",
  58.     55 => "装备风格",
  59.     61 => "添加行动次数",
  60.     62 => "特殊标志",
  61.     63 => "消失效果",
  62.     64 => "队伍能力"}
  63.   #特殊标志
  64.   FLAG ={
  65.     0 => "自动战斗",
  66.     1 => "擅长防御",
  67.     2 => "保护弱者",
  68.     3 => "特技专注"}
  69.   #技能效果范围
  70.   SCOPE ={
  71.     0 => "无",
  72.     1 => "单个敌人",
  73.     2 => "全体敌人",
  74.     3 => "一个随机敌人",
  75.     4 => "两个随机敌人",
  76.     5 => "三个随机敌人",
  77.     6 => "四个随机敌人",
  78.     7 => "单个队友",
  79.     8 => "全体队友",
  80.     9 => "单个队友(战斗不能)",
  81.     10 => "全体队友(战斗不能)",
  82.     11 => "使用者" }
  83.   #技能命中类型
  84.   HIT ={
  85.     0 => "必定命中",
  86.     1 => "物理攻击",
  87.     2 => "魔法攻击"}
  88.   #使用限制
  89.   OCCASION ={
  90.     0 => "随时可用",
  91.     1 => "仅战斗中",
  92.     2 => "仅菜单中",
  93.     3 => "不能使用"}
  94.   #添加能力
  95.   XPARAM ={
  96.     0 => "物理命中几率:",
  97.     1 => "物理闪避几率:",
  98.     2 => "必杀几率:",
  99.     3 => "必杀闪避几率:",
  100.     4 => "魔法闪避几率:",
  101.     5 => "魔法反射几率:",
  102.     6 => "物理反击几率:",
  103.     7 => "体力值再生速度:",
  104.     8 => "魔力值再生速度:",
  105.     9 => "特技值再生速度:"}
  106.   #特殊能力
  107.   SPARAM ={
  108.     0 => "受到攻击的几率",
  109.     1 => "防御效果比率",
  110.     2 => "恢复效果比率",
  111.     3 => "药理知识",
  112.     4 => "MP消费率",
  113.     5 => "TP消耗率",
  114.     6 => "物理伤害加成",
  115.     7 => "魔法伤害加成",
  116.     8 => "地形伤害加成",
  117.     9 => "经验获得加成"}
  118.   #装备风格  require 装备风格扩展脚本
  119.   SLOT_TYPE ={
  120.     0 => "普通",
  121.     1 => "双持武器",
  122.     2 => "索爷三刀流",
  123.     3 => "NPC",
  124.     4 => "233",
  125.     5 => "论坛@的BUG好烦啊"}
  126.   #队伍能力
  127.   PARTY_ABILITY ={
  128.     0 => "遇敌几率减半",
  129.     1 => "随机遇敌无效",
  130.     2 => "敌人偷袭无效",
  131.     3 => "先制攻击几率上升",
  132.     4 => "获得金钱数量双倍",
  133.     5 => "物品掉落几率双倍"}
  134.   #伤害类型
  135.   DAMAGE_TYPE = {
  136.     0 => "无",
  137.     1 => "体力值伤害",
  138.     2 => "魔力值伤害",
  139.     3 => "体力值恢复",
  140.     4 => "魔力值恢复",
  141.     5 => "体力值吸收",
  142.     6 => "魔力值吸收"}
  143.   #普通能力
  144.   #这只是个示范,你也可以依照个人喜好对这些用语添加颜色控制符
  145.   @params ={
  146.     0 => "\\c[17]最大HP",
  147.     1 => "\\c[16]最大MP",
  148.     2 => "\\c[20]力量",
  149.     3 => "\\c[21]智力",
  150.     4 => "\\c[30]敏捷",
  151.     5 => "\\c[31]防御",
  152.     6 => "\\c[14]速度",
  153.     7 => "\\c[17]幸运"}
  154.   #我举例技能类型的原因就是因为它 短
  155.   @skill_types = { # 这个和下面equiphelpready里注释掉的做的是一样的事
  156.                    # 只是下面是读取数据库添加用语,这里是手动枚举
  157.     1 => "\\c[1]特技",
  158.     2 => "\\c[2]魔法",
  159.     3 => "\\c[3]必杀",
  160.     4 => "\\c[5]卖萌"}
  161.   #初始化数据,当然如果你要用上面那样的控制符改变颜色的话
  162.   #欢迎枚举格式就是上面这样用Hash,用ID做键把用语对应起来
  163.   def self.equiphelpready
  164.     params = $data_system.terms.params
  165.     elements = $data_system.elements
  166.     weapon_types = $data_system.weapon_types
  167.     armor_types = $data_system.armor_types
  168.     etypes = $data_system.terms.etypes
  169.     skill_types = $data_system.skill_types
  170.     @states       ||= {}
  171.     @params       ||= {}
  172.     @weapon_types ||= {}
  173.     @armor_types  ||= {}
  174.     @etypes       ||= {}
  175.     @skill_types  ||= {}
  176.     @elements     ||= {}
  177.     skill_types.each_with_index{|x,y| @skill_types[y] = x if !x.nil?} if @skill_types == {}
  178.     $data_states.each{|x| @states[x.id] = x.name if !x.nil?} if @states == {}
  179.     elements.each_with_index{|x,y| @elements[y] = x if !x.nil?} if @elements == {}
  180.     weapon_types.each_with_index{|x,y| @weapon_types[y] = x if !x.nil?} if @weapon_types == {}
  181.     armor_types.each_with_index{|x,y| @armor_types[y] = x if !x.nil?} if @armor_types == {}
  182.     etypes.each_with_index{|x,y| @etypes[y] = x} if @etypes == {}
  183.     params.each_with_index{|x,y| @params[y] = x} if @params == {}
  184.   end
  185.   #获取装备帮助内容
  186.   def self.getequiphelp(equip)
  187.     help = ""
  188.     param = []
  189.     help += "\\c[16]装备位置:#{Vocab::etype(equip.etype_id)}\\c[0]\n"
  190.     if $VIPArcherScript[:equip_limit] #装备能力限制
  191.       help += "\\c[16]等级需求:#{equip.level_limit}\n" if equip.level_limit > 0
  192.       param_limit = []
  193.       for i in 0..7
  194.         if equip.params_limit(i) != 0
  195.           help += "\\c[16]#{@params[i]}需求:#{equip.params_limit(i)}\\c[0]\n"
  196.         end
  197.       end
  198.     end
  199.     equip.params.each_with_index{|x,y| param.push([@params[y],x])}
  200.     param = param.select{|x| x[1] != 0}
  201.     param.each{|x| help += "\\c[#{x[1]>0? UP : DOWN}]#{x[0]}:\\c[#{x[1]>0? UP : DOWN}]#{"﹢"if x[1]>0}#{x[1].to_int.to_s}\\c[0]\n"}
  202.     features = equip.features
  203.     featuresparam = []
  204.     featuresparam.push features.select{|x| x.code == 21}
  205.     featuresparam.push features.select{|x| x.code == 22}
  206.     featuresparam.push features.select{|x| x.code == 23}
  207.     featuresparam[0].each{|x| help += "\\c[#{x.value<0?DOWN: UP}]#{@params[x.data_id]}#{x.value<0?"﹣":"﹢"}#{(x.value.abs*100).to_i}%\n"}
  208.     featuresparam[1].each{|x| help += "\\c[#{x.value<0?DOWN: UP}]#{XPARAM[x.data_id]}#{x.value<0?"﹣":"﹢"}#{(x.value.abs*100).to_i}%\n"}
  209.     featuresparam[2].each{|x| help += "\\c[#{x.value<0?DOWN: UP}]#{SPARAM[x.data_id]}#{x.value<0?"﹣":"﹢"}#{(x.value.abs*100).to_i}%\n"}
  210.     if $VIPArcherScript[:slot_type]
  211.       help += "\\c[#{VIP}]#{CODE[55]}:#{SLOT_TYPE[$1.to_i]}\\c[0]\n" if equip.note =~ /<slot_type\s*[:](.*)>/i
  212.     else
  213.       features.select{|x| x.code == 55}.each{|x| help += "\\c[#{VIP}]#{CODE[x.code]}:双持武器\\c[0]\n"}
  214.     end
  215.     features.select{|x| x.code == 11}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@elements[x.data_id]}×#{(x.value*100).to_i}%\\c[0]\n"}
  216.     features.select{|x| x.code == 12}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@params[x.data_id]}×#{(x.value*100).to_i}%\\c[0]\n"}
  217.     features.select{|x| x.code == 13}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@states[x.data_id]}×#{(x.value*100).to_i}%\\c[0]\n"}
  218.     features.select{|x| x.code == 14}.each{|x| help += "\\c[#{VIP}]#{CODE[x.code]}:#{@states[x.data_id]}\\c[0]\n"}
  219.     features.select{|x| x.code == 31}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@elements[x.data_id]}\\c[0]\n"}
  220.     features.select{|x| x.code == 32}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@states[x.data_id]}#{(x.value*100).to_i}%\\c[0]\n"}
  221.     features.select{|x| x.code == 33}.each{|x| help += "\\c[#{x.value>0? UP : DOWN}]#{CODE[x.code]}:#{x.value}\\c[0]\n"}
  222.     features.select{|x| x.code == 34}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{x.value}\\c[0]\n"}
  223.     features.select{|x| x.code == 41}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@skill_types[x.data_id]}\\c[0]\n"}
  224.     features.select{|x| x.code == 42}.each{|x| help += "\\c[#{DOWN}]#{CODE[x.code]}:#{@skill_types[x.data_id]}\\c[0]\n"}
  225.     features.select{|x| x.code == 43}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{$data_skills[x.data_id].name}\\c[0]\n"}
  226.     features.select{|x| x.code == 44}.each{|x| help += "\\c[#{DOWN}]#{CODE[x.code]}:#{$data_skills[x.data_id].name}\\c[0]\n"}
  227.     features.select{|x| x.code == 51}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@weapon_types[x.data_id]}\\c[0]\n"}
  228.     features.select{|x| x.code == 52}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@armor_types[x.data_id]}\\c[0]\n"}
  229.     features.select{|x| x.code == 53}.each{|x| help += "\\c[#{DOWN}]#{CODE[x.code]}:#{@etypes[x.data_id]}\\c[0]\n"}
  230.     features.select{|x| x.code == 54}.each{|x| help += "\\c[#{DOWN}]#{CODE[x.code]}:#{@etypes[x.data_id]}\\c[0]\n"}
  231.     features.select{|x| x.code == 61}.each{|x| help += "\\c[#{VIP}]#{CODE[x.code]}:#{x.value}\\c[0]\n"}
  232.     features.select{|x| x.code == 62}.each{|x| help += "\\c[#{VIP}]#{CODE[x.code]}:#{FLAG[x.data_id]}\\c[0]\n"}
  233.     features.select{|x| x.code == 64}.each{|x| help += "\\c[#{VIP}]#{CODE[x.code]}:#{PARTY_ABILITY[x.data_id]}\\c[0]\n"}
  234.     help
  235.   end
  236.   #获取技能帮助内容
  237.   def self.getskillhelp(skill)
  238.     help = ""
  239.     effects = skill.effects
  240.     damage  = skill.damage
  241.     r = [skill.required_wtype_id1,skill.required_wtype_id2]
  242.     help += "\\c[16]消耗:\\c[#{MP}]MP:#{skill.mp_cost.to_s} \\c[#{TP}]TP:#{skill.tp_cost.to_s}\\c[0]\n" if skill.mp_cost > 0 && skill.tp_cost > 0
  243.     help += "\\c[16]消耗:\\c[#{MP}]MP:#{skill.mp_cost.to_s}\\c[0]\n" if skill.mp_cost > 0 && skill.tp_cost <= 0
  244.     help += "\\c[16]消耗:\\c[#{TP}]TP:#{skill.tp_cost.to_s}\\c[0]\n" if skill.tp_cost > 0 && skill.mp_cost <= 0
  245.     help += "\\c[#{skill.speed<0?DOWN: UP}]速度修正:#{skill.speed}\\c[0]\n" if skill.speed != 0
  246.     help += "\\c[#{DOWN}]成功率:#{skill.success_rate}%\\c[0]\n" if skill.success_rate != 100
  247.     help += "\\c[16]类型:#{HIT[skill.hit_type]}\\c[0]\n"
  248.     help += "\\c[16]范围:#{SCOPE[skill.scope]}\\c[0]\n" if skill.scope != 0
  249.     help += "\\c[16]效果:#{@elements[damage.element_id]}#{DAMAGE_TYPE[damage.type]}\\c[0]\n" if damage.type != 0
  250.     effects.select{|x| x.code == 31}.each{|x| help += "\\c[#{UP}]强化:#{@params[x.data_id]} #{x.value1.to_i}回合\\c[0]\n"}
  251.     effects.select{|x| x.code == 32}.each{|x| help += "\\c[#{UP}]弱化:#{@params[x.data_id]} #{x.value1.to_i}回合\\c[0]\n"}
  252.     effects.select{|x| x.code == 33}.each{|x| help += "\\c[#{UP}]解除:强化#{@params[x.data_id]}\n"}
  253.     effects.select{|x| x.code == 34}.each{|x| help += "\\c[#{UP}]解除:弱化#{@params[x.data_id]}\n"}
  254.     effects.select{|x| x.code == 21}.each{|x| help += "\\c[#{UP}]附加:#{x.data_id == 0 ? "普通攻击" : @states[x.data_id]} #{(x.value1*100).to_i}%\\c[0]\n"}
  255.     effects.select{|x| x.code == 22}.each{|x| help += "\\c[#{UP}]解除:#{@states[x.data_id]} #{(x.value1*100).to_i}%\\c[0]\n"}
  256.     effects.select{|x| x.code == 41}.each{|x| help += "\\c[#{VIP}]特殊效果:撤退\n"}
  257.     effects.select{|x| x.code == 42}.each{|x| help += "\\c[#{UP}]提升:#{@params[x.data_id]}#{x.value1.to_i}点\\c[0]\n"}
  258.     effects.select{|x| x.code == 43}.each{|x| help += "\\c[#{VIP}]学会:#{$data_skills[x.data_id].name}\\c[0]\n"}
  259.     help += "\\c[16]场合:#{OCCASION[skill.occasion]}\n"
  260.     help += "\\c[#{DOWN}]限制:#{$data_system.weapon_types[r[0]] if r[0] != 0} #{$data_system.weapon_types[r[1]] if r[1] != 0}\\c[0]\n" if r != [0,0]
  261.     help
  262.   end
  263.   #获取道具帮助内容
  264.   def self.getitemhelp(item)
  265.     help = ""
  266.     effects = item.effects
  267.     damage  = item.damage
  268.     help += "\\c[16]类型:\\c[#{VIP}]#{"贵重物品  "if item.itype_id != 1}\\c[#{DOWN}]#{item.consumable ? "消耗品":"非消耗品"}\\c[0]\n"
  269.     help += "\\c[16]范围:#{SCOPE[item.scope]}\\c[0]\n" if item.scope != 0
  270.     help += "\\c[16]效果:#{@elements[damage.element_id]}#{DAMAGE_TYPE[damage.type]}\\c[0]\n" if damage.type != 0
  271.     effects.select{|x| x.code == 31}.each{|x| help += "\\c[#{UP}]强化:#{@params[x.data_id]} #{x.value1.to_i}回合\\c[0]\n"}
  272.     effects.select{|x| x.code == 32}.each{|x| help += "\\c[#{UP}]弱化:#{@params[x.data_id]} #{x.value1.to_i}回合\\c[0]\n"}
  273.     effects.select{|x| x.code == 33}.each{|x| help += "\\c[#{UP}]解除:强化#{@params[x.data_id]}\\c[0]\n"}
  274.     effects.select{|x| x.code == 34}.each{|x| help += "\\c[#{UP}]解除:弱化#{@params[x.data_id]}\\c[0]\n"}
  275.     effects.select{|x| x.code == 21}.each{|x| help += "\\c[#{UP}]附加:#{x.data_id == 0 ? "普通攻击" : @states[x.data_id]} #{(x.value1*100).to_i}%\\c[0]\n"}
  276.     effects.select{|x| x.code == 22}.each{|x| help += "\\c[#{UP}]解除:#{@states[x.data_id]} #{(x.value1*100).to_i}%\\c[0]\n"}
  277.     effects.select{|x| x.code == 41}.each{|x| help += "\\c[#{VIP}]特殊效果:撤退\n"}
  278.     effects.select{|x| x.code == 42}.each{|x| help += "\\c[#{VIP}]提升:#{@params[x.data_id]}#{x.value1.to_i}点\\c[0]\n"}
  279.     effects.select{|x| x.code == 43}.each{|x| help += "\\c[#{VIP}]学会:#{$data_skills[x.data_id].name}\\c[0]\n"}
  280.     help += "\\c[16]场合:#{OCCASION[item.occasion]}\\c[0]\n"
  281.     help
  282.   end
  283.   #计算行数(有些字体的汉字和[字母,数字,符号]的宽度不同,
  284.   #有可能会照成行数计算不对,尽量用宽度相同的字体吧)
  285.   def self.getline(text,maxtext)
  286.     text_new = ""
  287.     xtext = []
  288.     line = 0
  289.     text.each_line{|x| text_new += x.gsub(/\\\S\[\d+\]/i){}} #去掉控制符
  290.     text_new.each_line{|x| xtext.push x.gsub(/\n/){}}        #去掉换行符
  291.     xtext.each{|x| line += (x.size / (maxtext.to_f + 1).to_i) + 1}
  292.     line
  293.   end
  294. end
  295. #==============================================================================
  296. # ■ Window_Help_Ex
  297. #------------------------------------------------------------------------------
  298. #  加强显示特技和物品等的说明
  299. #==============================================================================

  300. class Window_Help_Ex < Window_Base
  301.   include VIPArcher::Equipplus
  302.   #--------------------------------------------------------------------------
  303.   # ● 初始化对象
  304.   #--------------------------------------------------------------------------
  305.   def initialize(line_number = 0)
  306.     super(0, 0, 210, 0)
  307.     self.z = 150
  308.     contents.font.size = Font_Size
  309.     @time = 0
  310.   end
  311.   #--------------------------------------------------------------------------
  312.   # ● 设置内容
  313.   #--------------------------------------------------------------------------
  314.   def set_text(text)
  315.     @text = text
  316.     refresh
  317.   end
  318.   #--------------------------------------------------------------------------
  319.   # ● 清除
  320.   #--------------------------------------------------------------------------
  321.   def clear
  322.     set_text("")
  323.   end
  324.   #--------------------------------------------------------------------------
  325.   # ● 更新帮助位置
  326.   #--------------------------------------------------------------------------
  327.   def uppos(index,rect,window)
  328.     self.height = fitting_height_vip(VIPArcher::Equipplus.getline(@xtext,13))
  329.     create_contents
  330.     contents.font.name = Font_Name
  331.     contents.font.size = Font_Size
  332.     rect.x -= window.ox
  333.     rect.y -= window.oy
  334.     ax = rect.x + rect.width + 10
  335.     ax = rect.x - self.width + 10 if ax + self.width > window.width + 10
  336.     ax += window.x
  337.     ax = 0 if ax < 0
  338.     ay = rect.y + rect.height
  339.     ay = rect.y - self.height if ay + self.height > window.height
  340.     ay += window.y
  341.     ay = 0 if ay < 0
  342.     self.x = ax
  343.     self.y = ay
  344.     set_text(@xtext)
  345.     @time = TIME
  346.     self.show
  347.     self.openness = 0
  348.   end
  349.   #--------------------------------------------------------------------------
  350.   # ● 设置物品
  351.   #     item : 技能、物品等
  352.   #--------------------------------------------------------------------------
  353.   def set_item(item)
  354.     if item == nil
  355.       set_text("")
  356.       return
  357.     end
  358.     @xtext = ""
  359.     if $VIPArcherScript[:itemcolor] # require 物品描绘颜色脚本
  360.       @xtext = "\\c[16]名称:\\c[#{VIPArcher::ItemColor::Color_Lv[item.color]}]" +
  361.       "#{item.name}  #{item.color if item.color != 0}#{"★" if item.color != 0}\\c[0]\n"
  362.     else
  363.       @xtext = "\\c[16]名称:\\c[0]#{item.name}\n"
  364.     end
  365.     @xtext += "\\c[16]介绍:\\c[0]#{item.description}\n"
  366.     if $VIPArcherScript[:load]      # require 队伍负重脚本
  367.       @xtext += "\\c[16]售价:#{item.price} 重量:#{item.load}\\c[0]\n"
  368.     else
  369.       @xtext += item.price == 0 ? "\\c[16]售价:\\c[14]无法出售\\c[0]\n":"\\c[16]售价:#{item.price}\\c[0]\n"
  370.     end if item.is_a?(RPG::EquipItem) || item.is_a?(RPG::Item)
  371.     @xtext += VIPArcher::Equipplus.getequiphelp(item) if item.is_a?(RPG::EquipItem)
  372.     @xtext += VIPArcher::Equipplus.getskillhelp(item) if item.is_a?(RPG::Skill)
  373.     @xtext += VIPArcher::Equipplus.getitemhelp(item) if item.is_a?(RPG::Item)
  374.     if $VIPArcherScript[:exdrop_rate]   # require 队伍掉率扩展
  375.       @xtext += "\\c[#{$2.to_i > 0 ? UP : DOWN}]#{$1}掉率: #{$2}%\\c[0]\n" if
  376.       item.note =~ /<(\W+)掉率:\s*([0-9+.-]+)%>/i
  377.     end if item.is_a?(RPG::EquipItem) || item.is_a?(RPG::Skill)
  378.     @xtext = @xtext[0,@text.size - 2] if @xtext[@xtext.size - 2,2] == "\n"
  379.   end
  380.   #--------------------------------------------------------------------------
  381.   # ● 刷新
  382.   #--------------------------------------------------------------------------
  383.   def refresh
  384.     contents.clear
  385.     self.hide if @text == ""
  386.     draw_text_vip(4, 0, @text,width,40,false)
  387.   end
  388.   #--------------------------------------------------------------------------
  389.   # ● 更新画面
  390.   #--------------------------------------------------------------------------
  391.   def update
  392.     super
  393.     @time -= 1 if @time > 0
  394.     self.open if @time == 0
  395.   end
  396. end
  397. class Window_Base < Window
  398.   #--------------------------------------------------------------------------
  399.   # ● 计算窗口显示指定行数时的应用高度2*************************
  400.   #--------------------------------------------------------------------------
  401.   def fitting_height_vip(line_number)
  402.     line_number * contents.font.size + standard_padding * 2
  403.   end
  404.   # draw_text_ex的增强,使其可以自动换行  原作者:叶子 修改:wyongcan
  405.   #--------------------------------------------------------------------------
  406.   # ● 绘制带有控制符的文本内容
  407.   #   如果传递了width参数的话,会自动换行
  408.   #--------------------------------------------------------------------------
  409.   def draw_text_vip(x, y, text, width = nil,textwidth = nil,normalfont = true)
  410.     reset_font_settings if normalfont == true
  411.     text = convert_escape_characters(text)
  412.     pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
  413.     if width != nil
  414.       pos[:height] = contents.font.size
  415.       pos[:width] = width
  416.       pos[:textwidth] = textwidth
  417.     end
  418.     process_character(text.slice!(0, 1), text, pos) until text.empty?
  419.   end
  420.   #--------------------------------------------------------------------------
  421.   # ● 文字的处理
  422.   #     c    : 文字
  423.   #     text : 绘制处理中的字符串缓存(字符串可能会被修改)
  424.   #     pos  : 绘制位置 {:x, :y, :new_x, :height}
  425.   #--------------------------------------------------------------------------
  426.   def process_character(c, text, pos)
  427.     case c
  428.     when "\r"   # 回车
  429.       return
  430.     when "\n"   # 换行
  431.       process_new_line(text, pos)
  432.     when "\f"   # 翻页
  433.       process_new_page(text, pos)
  434.     when "\e"   # 控制符
  435.       process_escape_character(obtain_escape_code(text), text, pos)
  436.     else        # 普通文字
  437.       pos[:textwidth] == nil ? text_width = text_size(c).width : text_width = pos[:textwidth]
  438.       if pos[:width] != nil && pos[:x] - pos[:new_x] + text_width > pos[:width]
  439.         process_new_line(text, pos)
  440.       end
  441.       process_normal_character(c, pos)
  442.     end
  443.   end
  444.   #--------------------------------------------------------------------------
  445.   # ● 处理换行文字
  446.   #--------------------------------------------------------------------------
  447.   alias vip_20141007_process_new_line process_new_line
  448.   def process_new_line(text, pos)
  449.     vip_20141007_process_new_line(text, pos)
  450.     pos[:height] = contents.font.size if pos[:width] != nil
  451.   end
  452. end

  453. #==============================================================================
  454. # ■ 设置帮助增强窗口
  455. #==============================================================================
  456. class Window_Selectable < Window_Base
  457.   attr_reader   :help_ex_window
  458.   #--------------------------------------------------------------------------
  459.   # ● 调用帮助窗口的更新方法
  460.   #--------------------------------------------------------------------------
  461.   alias help_ex_call_update_help call_update_help
  462.   def call_update_help
  463.     help_ex_call_update_help
  464.     update_ex_help if active && @help_ex_window
  465.   end
  466.   #--------------------------------------------------------------------------
  467.   # ● 更新帮助内容
  468.   #--------------------------------------------------------------------------
  469.   def update_ex_help
  470.     @help_ex_window.set_item(item) if @help_ex_window
  471.     if index != -1 && item != nil
  472.       @help_ex_window.uppos(index,item_rect(index),self)
  473.     end
  474.   end
  475.   #--------------------------------------------------------------------------
  476.   # ● 设置帮助增强窗口
  477.   #--------------------------------------------------------------------------
  478.   def help_ex_window=(help_ex_window)
  479.     @help_ex_window = help_ex_window
  480.   end
  481. end
  482. #==============================================================================
  483. # ■ 在各场景处理帮助窗口
  484. #==============================================================================
  485. class Scene_Base
  486.   #--------------------------------------------------------------------------
  487.   # ● 生成帮助增强窗口
  488.   #--------------------------------------------------------------------------
  489.   def create_help_ex
  490.     @help_ex_window  = Window_Help_Ex.new
  491.     @help_ex_window .viewport = @viewport
  492.     @item_window.help_ex_window  = @help_ex_window if @item_window
  493.     @slot_window.help_ex_window  = @help_ex_window if @slot_window
  494.     @skill_window.help_ex_window = @help_ex_window if @skill_window
  495.     @buy_window.help_ex_window   = @help_ex_window if @buy_window
  496.     @sell_window.help_ex_window  = @help_ex_window if @sell_window
  497.   end
  498. end
  499. #道具栏
  500. class Scene_Item < Scene_ItemBase
  501.   #--------------------------------------------------------------------------
  502.   # ● 开始处理
  503.   #--------------------------------------------------------------------------
  504.   alias help_ex_start start
  505.   def start
  506.     help_ex_start
  507.     create_help_ex
  508.   end
  509.   #--------------------------------------------------------------------------
  510.   # ● 物品“取消”
  511.   #--------------------------------------------------------------------------
  512.   alias help_ex_on_item_cancel on_item_cancel
  513.   def on_item_cancel
  514.     help_ex_on_item_cancel
  515.     @help_ex_window.hide
  516.   end
  517. end
  518. #装备栏
  519. class Scene_Equip < Scene_MenuBase
  520.   #--------------------------------------------------------------------------
  521.   # ● 开始处理
  522.   #--------------------------------------------------------------------------
  523.   alias help_ex_start start
  524.   def start
  525.     help_ex_start
  526.     create_help_ex
  527.   end
  528.   #--------------------------------------------------------------------------
  529.   # ● 装备栏“取消”
  530.   #--------------------------------------------------------------------------
  531.   alias help_ex_on_slot_cancel on_slot_cancel
  532.   def on_slot_cancel
  533.     help_ex_on_slot_cancel
  534.     @help_ex_window.hide
  535.   end
  536. end
  537. #技能栏
  538. class Scene_Skill < Scene_ItemBase
  539.   #--------------------------------------------------------------------------
  540.   # ● 开始处理
  541.   #--------------------------------------------------------------------------
  542.   alias help_ex_start start
  543.   def start
  544.     help_ex_start
  545.     create_help_ex
  546.   end
  547.   #--------------------------------------------------------------------------
  548.   # ● 物品“确定”
  549.   #--------------------------------------------------------------------------
  550.   alias help_ex_on_item_ok on_item_ok
  551.   def on_item_ok
  552.     help_ex_on_item_ok
  553.     @help_ex_window.hide
  554.   end
  555.   #--------------------------------------------------------------------------
  556.   # ● 物品“取消”
  557.   #--------------------------------------------------------------------------
  558.   alias help_ex_on_item_cancel on_item_cancel
  559.   def on_item_cancel
  560.     help_ex_on_item_cancel
  561.     @help_ex_window.hide
  562.   end
  563. end
  564. #战斗界面
  565. class Scene_Battle < Scene_Base
  566.   #--------------------------------------------------------------------------
  567.   # ● 开始处理
  568.   #--------------------------------------------------------------------------
  569.   alias help_ex_start start
  570.   def start
  571.     help_ex_start
  572.     create_help_ex
  573.   end
  574.   #--------------------------------------------------------------------------
  575.   # ● 技能“确定”
  576.   #--------------------------------------------------------------------------
  577.   alias help_ex_on_skill_ok on_skill_ok
  578.   def on_skill_ok
  579.     help_ex_on_skill_ok
  580.     @help_ex_window.hide
  581.   end
  582.   #--------------------------------------------------------------------------
  583.   # ● 技能“取消”
  584.   #--------------------------------------------------------------------------
  585.   alias help_ex_on_skill_cancel on_skill_cancel
  586.   def on_skill_cancel
  587.     help_ex_on_skill_cancel
  588.     @help_ex_window.hide
  589.   end
  590.   #--------------------------------------------------------------------------
  591.   # ● 物品“确定”
  592.   #--------------------------------------------------------------------------
  593.   alias help_ex_on_item_ok on_item_ok
  594.   def on_item_ok
  595.     help_ex_on_item_ok
  596.     @help_ex_window.hide
  597.   end
  598.   #--------------------------------------------------------------------------
  599.   # ● 物品“取消”
  600.   #--------------------------------------------------------------------------
  601.   alias help_ex_on_item_cancel on_item_cancel
  602.   def on_item_cancel
  603.     help_ex_on_item_cancel
  604.     @help_ex_window.hide
  605.   end
  606. end
  607. #商店界面
  608. class Scene_Shop < Scene_MenuBase
  609.   #--------------------------------------------------------------------------
  610.   # ● 开始处理
  611.   #--------------------------------------------------------------------------
  612.   alias help_ex_start start
  613.   def start
  614.     help_ex_start
  615.     create_help_ex
  616.   end
  617.   #--------------------------------------------------------------------------
  618.   # ● 买入“确定”
  619.   #--------------------------------------------------------------------------
  620.   alias help_ex_on_buy_ok on_buy_ok
  621.   def on_buy_ok
  622.     help_ex_on_buy_ok
  623.     @help_ex_window.hide
  624.   end
  625.   #--------------------------------------------------------------------------
  626.   # ● 买入“取消”
  627.   #--------------------------------------------------------------------------
  628.   alias help_ex_on_buy_cancel on_buy_cancel
  629.   def on_buy_cancel
  630.     help_ex_on_buy_cancel
  631.     @help_ex_window.hide
  632.   end
  633.   #--------------------------------------------------------------------------
  634.   # ● 卖出“确定”
  635.   #--------------------------------------------------------------------------
  636.   alias help_ex_on_sell_ok on_sell_ok
  637.   def on_sell_ok
  638.     help_ex_on_sell_ok
  639.     @help_ex_window.hide
  640.   end
  641.   #--------------------------------------------------------------------------
  642.   # ● 卖出“取消”
  643.   #--------------------------------------------------------------------------
  644.   alias help_ex_on_sell_cancel on_sell_cancel
  645.   def on_sell_cancel
  646.     help_ex_on_sell_cancel
  647.     @help_ex_window.hide
  648.   end
  649. end
复制代码
  1. #==============================================================================
  2. # ■ RGSS3 アイテム合成 ver 1.04
  3. #------------------------------------------------------------------------------
  4. #  配布元:
  5. #     白の魔 http://izumiwhite.web.fc2.com/
  6. #
  7. #  利用規約:
  8. #     RPGツクールVX Aceの正規の登録者のみご利用になれます。
  9. #     利用報告・著作権表示とかは必要ありません。
  10. #     改造もご自由にどうぞ。
  11. #     何か問題が発生しても責任は持ちません。
  12. #==============================================================================


  13. #--------------------------------------------------------------------------
  14. # ★ 初期設定。
  15. #    合成レシピ等の設定
  16. #--------------------------------------------------------------------------
  17. module WD_itemsynthesis_ini
  18.   
  19.   Cost_view =  true #費用(G)の表示(合成の費用が全て0Gの場合はfalseを推奨)
  20.   
  21.   Category_i = true #カテゴリウィンドウに「アイテム」の項目を表示
  22.   Category_w = true #カテゴリウィンドウに「武器」の項目を表示
  23.   Category_a = true #カテゴリウィンドウに「防具」の項目を表示
  24.   Category_k = true #カテゴリウィンドウに「大事なもの」の項目を表示
  25.   
  26.   I_recipe = [] #この行は削除しないこと
  27.   W_recipe = [] #この行は削除しないこと
  28.   A_recipe = [] #この行は削除しないこと
  29.   
  30.   #以下、合成レシピ。
  31.   #例: I_recipe[3]  = [100, ["I",1,1], ["W",2,1], ["A",2,2], ["A",3,1]]
  32.   #と記載した場合、ID3のアイテムの合成必要は、100G。
  33.   #必要な素材は、ID1のアイテム1個、ID2の武器1個、ID2の防具2個、ID3の防具1個
  34.   #となる。
  35.   
  36.   #アイテムの合成レシピ
  37.   I_recipe[2]  = [10,  ["I",1,2]]
  38.   I_recipe[3]  = [100, ["I",1,1], ["I",2,1]]
  39.   I_recipe[17] = [500, ["I",1,10]]

  40.   #武器の合成レシピ
  41.   W_recipe[11]  = [50,   ["W",1,1], ["W",2,1]]
  42.   W_recipe[12]  = [600,  ["W",3,1], ["I",17,0]]
  43.   
  44.   #防具の合成レシピ  
  45.   A_recipe[2]  = [40,   ["A",1,2]]
  46.   A_recipe[5]  = [400,  ["A",2,1], ["W",2,2], ["I",17,0]]
  47.   
  48. end


  49. #==============================================================================
  50. # ■ WD_itemsynthesis
  51. #------------------------------------------------------------------------------
  52. #  アイテム合成用の共通メソッドです。
  53. #==============================================================================

  54. module WD_itemsynthesis
  55.   def i_recipe_switch_on(id)
  56.     $game_system.i_rcp_sw = [] if $game_system.i_rcp_sw == nil
  57.     $game_system.i_rcp_sw[id] = false if $game_system.i_rcp_sw[id] == nil
  58.     $game_system.i_rcp_sw[id] = true
  59.   end
  60.   def i_recipe_switch_off(id)
  61.     $game_system.i_rcp_sw = [] if $game_system.i_rcp_sw == nil
  62.     $game_system.i_rcp_sw[id] = false if $game_system.i_rcp_sw[id] == nil
  63.     $game_system.i_rcp_sw[id] = false
  64.   end
  65.   def i_recipe_switch_on?(id)
  66.     $game_system.i_rcp_sw = [] if $game_system.i_rcp_sw == nil
  67.     $game_system.i_rcp_sw[id] = false if $game_system.i_rcp_sw[id] == nil
  68.     return $game_system.i_rcp_sw[id]
  69.   end
  70.   def i_recipe_all_switch_on
  71.     for i in 1..$data_items.size
  72.       i_recipe_switch_on(i)
  73.     end
  74.   end
  75.   def i_recipe_all_switch_off
  76.     for i in 1..$data_items.size
  77.       i_recipe_switch_off(i)
  78.     end
  79.   end
  80.   def w_recipe_switch_on(id)
  81.     $game_system.w_rcp_sw = [] if $game_system.w_rcp_sw == nil
  82.     $game_system.w_rcp_sw[id] = false if $game_system.w_rcp_sw[id] == nil
  83.     $game_system.w_rcp_sw[id] = true
  84.   end
  85.   def w_recipe_switch_off(id)
  86.     $game_system.w_rcp_sw = [] if $game_system.w_rcp_sw == nil
  87.     $game_system.w_rcp_sw[id] = false if $game_system.w_rcp_sw[id] == nil
  88.     $game_system.w_rcp_sw[id] = false
  89.   end
  90.   def w_recipe_switch_on?(id)
  91.     $game_system.w_rcp_sw = [] if $game_system.w_rcp_sw == nil
  92.     $game_system.w_rcp_sw[id] = false if $game_system.w_rcp_sw[id] == nil
  93.     return $game_system.w_rcp_sw[id]
  94.   end
  95.   def w_recipe_all_switch_on
  96.     for i in 1..$data_weapons.size
  97.       w_recipe_switch_on(i)
  98.     end
  99.   end
  100.   def w_recipe_all_switch_off
  101.     for i in 1..$data_weapons.size
  102.       w_recipe_switch_off(i)
  103.     end
  104.   end
  105.   def a_recipe_switch_on(id)
  106.     $game_system.a_rcp_sw = [] if $game_system.a_rcp_sw == nil
  107.     $game_system.a_rcp_sw[id] = false if $game_system.a_rcp_sw[id] == nil
  108.     $game_system.a_rcp_sw[id] = true
  109.   end
  110.   def a_recipe_switch_off(id)
  111.     $game_system.a_rcp_sw = [] if $game_system.a_rcp_sw == nil
  112.     $game_system.a_rcp_sw[id] = false if $game_system.a_rcp_sw[id] == nil
  113.     $game_system.a_rcp_sw[id] = false
  114.   end
  115.   def a_recipe_switch_on?(id)
  116.     $game_system.a_rcp_sw = [] if $game_system.a_rcp_sw == nil
  117.     $game_system.a_rcp_sw[id] = false if $game_system.a_rcp_sw[id] == nil
  118.     return $game_system.a_rcp_sw[id]
  119.   end
  120.   def a_recipe_all_switch_on
  121.     for i in 1..$data_armors.size
  122.       a_recipe_switch_on(i)
  123.     end
  124.   end
  125.   def a_recipe_all_switch_off
  126.     for i in 1..$data_armors.size
  127.       a_recipe_switch_off(i)
  128.     end
  129.   end
  130.   def recipe_all_switch_on
  131.     i_recipe_all_switch_on
  132.     w_recipe_all_switch_on
  133.     a_recipe_all_switch_on
  134.   end
  135.   def recipe_all_switch_off
  136.     i_recipe_all_switch_off
  137.     w_recipe_all_switch_off
  138.     a_recipe_all_switch_off
  139.   end

  140. end

  141. class Game_Interpreter
  142.   include WD_itemsynthesis
  143. end

  144. class Game_System
  145.   #--------------------------------------------------------------------------
  146.   # ● 公開インスタンス変数
  147.   #--------------------------------------------------------------------------
  148.   attr_accessor :i_rcp_sw
  149.   attr_accessor :w_rcp_sw
  150.   attr_accessor :a_rcp_sw
  151.   #--------------------------------------------------------------------------
  152.   # ● オブジェクト初期化
  153.   #--------------------------------------------------------------------------
  154.   alias wd_orig_initialize004 initialize
  155.   def initialize
  156.     wd_orig_initialize004
  157.     @i_rcp_sw = []
  158.     @w_rcp_sw = []
  159.     @a_rcp_sw = []
  160.   end
  161. end


  162. #==============================================================================
  163. # ■ Scene_ItemSynthesis
  164. #------------------------------------------------------------------------------
  165. #  合成画面の処理を行うクラスです。
  166. #==============================================================================

  167. class Scene_ItemSynthesis < Scene_MenuBase
  168.   #--------------------------------------------------------------------------
  169.   # ● 開始処理
  170.   #--------------------------------------------------------------------------
  171.   def start
  172.     super
  173.     create_help_window
  174.     create_dummy_window
  175.     create_number_window
  176.     create_status_window
  177.     create_material_window
  178.     create_list_window
  179.     create_category_window
  180.     create_gold_window
  181.     create_change_window
  182.   end
  183.   #--------------------------------------------------------------------------
  184.   # ● ゴールドウィンドウの作成
  185.   #--------------------------------------------------------------------------
  186.   def create_gold_window
  187.     @gold_window = Window_Gold.new
  188.     @gold_window.viewport = @viewport
  189.     @gold_window.x = Graphics.width - @gold_window.width
  190.     @gold_window.y = @help_window.height
  191.     @gold_window.hide
  192.   end
  193.   #--------------------------------------------------------------------------
  194.   # ● 切り替え表示ウィンドウの作成
  195.   #--------------------------------------------------------------------------
  196.   def create_change_window
  197.     wx = 0
  198.     wy = @gold_window.y
  199.     ww = Graphics.width - @gold_window.width
  200.     wh = @gold_window.height
  201.     @change_window = Window_ItemSynthesisChange.new(wx, wy, ww, wh)
  202.     @change_window.viewport = @viewport
  203.     @change_window.hide
  204.   end
  205.   #--------------------------------------------------------------------------
  206.   # ● ダミーウィンドウの作成
  207.   #--------------------------------------------------------------------------
  208.   def create_dummy_window
  209.     wy = @help_window.y + @help_window.height + 48
  210.     wh = Graphics.height - wy
  211.     @dummy_window = Window_Base.new(0, wy, Graphics.width, wh)
  212.     @dummy_window.viewport = @viewport
  213.   end
  214.   #--------------------------------------------------------------------------
  215.   # ● 個数入力ウィンドウの作成
  216.   #--------------------------------------------------------------------------
  217.   def create_number_window
  218.     wy = @dummy_window.y
  219.     wh = @dummy_window.height
  220.     @number_window = Window_ItemSynthesisNumber.new(0, wy, wh)
  221.     @number_window.viewport = @viewport
  222.     @number_window.hide
  223.     @number_window.set_handler(:ok,     method(:on_number_ok))
  224.     @number_window.set_handler(:cancel, method(:on_number_cancel))
  225.     @number_window.set_handler(:change_window, method(:on_change_window))   
  226.   end
  227.   #--------------------------------------------------------------------------
  228.   # ● ステータスウィンドウの作成
  229.   #--------------------------------------------------------------------------
  230.   def create_status_window
  231.     wx = @number_window.width
  232.     wy = @dummy_window.y
  233.     ww = Graphics.width - wx
  234.     wh = @dummy_window.height
  235.     @status_window = Window_ShopStatus.new(wx, wy, ww, wh)
  236.     @status_window.viewport = @viewport
  237.     @status_window.hide
  238.   end
  239.   #--------------------------------------------------------------------------
  240.   # ● 素材ウィンドウの作成
  241.   #--------------------------------------------------------------------------
  242.   def create_material_window
  243.     wx = @number_window.width
  244.     wy = @dummy_window.y
  245.     ww = Graphics.width - wx
  246.     wh = @dummy_window.height
  247.     @material_window = Window_ItemSynthesisMaterial.new(wx, wy, ww, wh)
  248.     @material_window.viewport = @viewport
  249.     @material_window.hide
  250.     @number_window.material_window = @material_window
  251.   end
  252.   #--------------------------------------------------------------------------
  253.   # ● 合成アイテムリストウィンドウの作成
  254.   #--------------------------------------------------------------------------
  255.   def create_list_window
  256.     wy = @dummy_window.y
  257.     wh = @dummy_window.height
  258.     @list_window = Window_ItemSynthesisList.new(0, wy, wh)
  259.     @list_window.viewport = @viewport
  260.     @list_window.help_window = @help_window
  261.     @list_window.status_window = @status_window
  262.     @list_window.material_window = @material_window
  263.     @list_window.hide
  264.     @list_window.set_handler(:ok,     method(:on_list_ok))
  265.     @list_window.set_handler(:cancel, method(:on_list_cancel))
  266.     @list_window.set_handler(:change_window, method(:on_change_window))   
  267.   end
  268.   #--------------------------------------------------------------------------
  269.   # ● カテゴリウィンドウの作成
  270.   #--------------------------------------------------------------------------
  271.   def create_category_window
  272.     @category_window = Window_ItemSynthesisCategory.new
  273.     @category_window.viewport = @viewport
  274.     @category_window.help_window = @help_window
  275.     @category_window.y = @help_window.height
  276.     @category_window.activate
  277.     @category_window.item_window = @list_window
  278.     @category_window.set_handler(:ok,     method(:on_category_ok))
  279.     @category_window.set_handler(:cancel, method(:return_scene))
  280.   end
  281.   #--------------------------------------------------------------------------
  282.   # ● 合成アイテムリストウィンドウのアクティブ化
  283.   #--------------------------------------------------------------------------
  284.   def activate_list_window
  285.     @list_window.money = money
  286.     @list_window.show.activate
  287.   end
  288.   #--------------------------------------------------------------------------
  289.   # ● 合成[決定]
  290.   #--------------------------------------------------------------------------
  291.   def on_list_ok
  292.     @item = @list_window.item
  293.     @list_window.hide
  294.     @number_window.set(@item, max_buy, buying_price, currency_unit)
  295.     @number_window.show.activate
  296.   end
  297.   #--------------------------------------------------------------------------
  298.   # ● 合成[キャンセル]
  299.   #--------------------------------------------------------------------------
  300.   def on_list_cancel
  301.     @category_window.activate
  302.     @category_window.show
  303.     @dummy_window.show
  304.     @list_window.hide
  305.     @status_window.hide
  306.     @status_window.item = nil
  307.     @material_window.hide
  308.     @material_window.set(nil, nil)
  309.     @gold_window.hide
  310.     @change_window.hide
  311.     @help_window.clear
  312.   end
  313.   #--------------------------------------------------------------------------
  314.   # ● 表示切替
  315.   #--------------------------------------------------------------------------
  316.   def on_change_window
  317.     if @status_window.visible
  318.       @status_window.hide
  319.       @material_window.show
  320.     else
  321.       @status_window.show
  322.       @material_window.hide
  323.     end
  324.   end
  325.   #--------------------------------------------------------------------------
  326.   # ● カテゴリ[決定]
  327.   #--------------------------------------------------------------------------
  328.   def on_category_ok
  329.     activate_list_window
  330.     @gold_window.show
  331.     @change_window.show
  332.     @material_window.show
  333.     @category_window.hide
  334.     @list_window.select(0)
  335.   end
  336.   #--------------------------------------------------------------------------
  337.   # ● 個数入力[決定]
  338.   #--------------------------------------------------------------------------
  339.   def on_number_ok
  340.     Sound.play_shop
  341.     do_syntetic(@number_window.number)
  342.     end_number_input
  343.     @gold_window.refresh
  344.   end
  345.   #--------------------------------------------------------------------------
  346.   # ● 個数入力[キャンセル]
  347.   #--------------------------------------------------------------------------
  348.   def on_number_cancel
  349.     Sound.play_cancel
  350.     end_number_input
  351.   end
  352.   #--------------------------------------------------------------------------
  353.   # ● 合成の実行
  354.   #--------------------------------------------------------------------------
  355.   def do_syntetic(number)
  356.     $game_party.lose_gold(number * buying_price)
  357.     $game_party.gain_item(@item, number)
  358.    
  359.       @recipe = @list_window.recipe(@item)
  360.       for i in [email protected]
  361.         kind = @recipe[i][0]
  362.         id   = @recipe[i][1]
  363.         num  = @recipe[i][2]
  364.         if kind == "I"
  365.           item = $data_items[id]
  366.         elsif kind == "W"
  367.           item = $data_weapons[id]
  368.         elsif kind == "A"
  369.           item = $data_armors[id]
  370.         end
  371.         $game_party.lose_item(item, num*number)
  372.       end
  373.   end
  374.   #--------------------------------------------------------------------------
  375.   # ● 個数入力の終了
  376.   #--------------------------------------------------------------------------
  377.   def end_number_input
  378.     @number_window.hide
  379.     activate_list_window
  380.   end
  381.   #--------------------------------------------------------------------------
  382.   # ● 最大購入可能個数の取得
  383.   #--------------------------------------------------------------------------
  384.   def max_buy
  385.     max = $game_party.max_item_number(@item) - $game_party.item_number(@item)
  386.    
  387.     @recipe = @list_window.recipe(@item)
  388.       for i in [email protected]
  389.         kind = @recipe[i][0]
  390.         id   = @recipe[i][1]
  391.         num  = @recipe[i][2]
  392.         if kind == "I"
  393.           item = $data_items[id]
  394.         elsif kind == "W"
  395.           item = $data_weapons[id]
  396.         elsif kind == "A"
  397.           item = $data_armors[id]
  398.         end
  399.         if num > 0
  400.           max_buf = $game_party.item_number(item)/num
  401.         else
  402.           max_buf = 999
  403.         end
  404.         max = [max, max_buf].min
  405.       end
  406.       
  407.     buying_price == 0 ? max : [max, money / buying_price].min

  408.   end
  409.   #--------------------------------------------------------------------------
  410.   # ● 所持金の取得
  411.   #--------------------------------------------------------------------------
  412.   def money
  413.     @gold_window.value
  414.   end
  415.   #--------------------------------------------------------------------------
  416.   # ● 通貨単位の取得
  417.   #--------------------------------------------------------------------------
  418.   def currency_unit
  419.     @gold_window.currency_unit
  420.   end
  421.   #--------------------------------------------------------------------------
  422.   # ● 合成費用の取得
  423.   #--------------------------------------------------------------------------
  424.   def buying_price
  425.     @list_window.price(@item)
  426.   end
  427. end


  428. #==============================================================================
  429. # ■ Window_ItemSynthesisList
  430. #------------------------------------------------------------------------------
  431. #  合成画面で、合成可能なアイテムの一覧を表示するウィンドウです。
  432. #==============================================================================

  433. class Window_ItemSynthesisList < Window_Selectable
  434.   include WD_itemsynthesis
  435.   #--------------------------------------------------------------------------
  436.   # ● 公開インスタンス変数
  437.   #--------------------------------------------------------------------------
  438.   attr_reader   :status_window            # ステータスウィンドウ
  439.   #--------------------------------------------------------------------------
  440.   # ● オブジェクト初期化
  441.   #--------------------------------------------------------------------------
  442.   def initialize(x, y, height)
  443.     super(x, y, window_width, height)
  444.    
  445.     @shop_goods = []
  446.     @shop_recipes = []
  447.    
  448.     for i in 1..WD_itemsynthesis_ini::I_recipe.size
  449.       recipe = WD_itemsynthesis_ini::I_recipe[i]
  450.       if recipe
  451.         good = [0, i, recipe[0]]
  452.         if i_recipe_switch_on?(i)
  453.           @shop_goods.push(good)
  454.           @shop_recipes.push(recipe)
  455.         end
  456.       end
  457.     end
  458.     for i in 1..WD_itemsynthesis_ini::W_recipe.size
  459.       recipe = WD_itemsynthesis_ini::W_recipe[i]
  460.       if recipe
  461.         good = [1, i, recipe[0]]
  462.         if w_recipe_switch_on?(i)
  463.           @shop_goods.push(good)
  464.           @shop_recipes.push(recipe)
  465.         end
  466.       end
  467.     end
  468.     for i in 1..WD_itemsynthesis_ini::A_recipe.size
  469.       recipe = WD_itemsynthesis_ini::A_recipe[i]
  470.       if recipe
  471.         good = [2, i, recipe[0]]
  472.         if a_recipe_switch_on?(i)
  473.           @shop_goods.push(good)
  474.           @shop_recipes.push(recipe)
  475.         end
  476.       end
  477.     end
  478.    
  479.     @money = 0
  480.     refresh
  481.     select(0)
  482.   end
  483.   #--------------------------------------------------------------------------
  484.   # ● ウィンドウ幅の取得
  485.   #--------------------------------------------------------------------------
  486.   def window_width
  487.     return 304
  488.   end
  489.   #--------------------------------------------------------------------------
  490.   # ● 項目数の取得
  491.   #--------------------------------------------------------------------------
  492.   def item_max
  493.     @data ? @data.size : 1
  494.   end
  495.   #--------------------------------------------------------------------------
  496.   # ● アイテムの取得
  497.   #--------------------------------------------------------------------------
  498.   def item
  499.     @data[index]
  500.   end
  501.   #--------------------------------------------------------------------------
  502.   # ● 所持金の設定
  503.   #--------------------------------------------------------------------------
  504.   def money=(money)
  505.     @money = money
  506.     refresh
  507.   end
  508.   #--------------------------------------------------------------------------
  509.   # ● 選択項目の有効状態を取得
  510.   #--------------------------------------------------------------------------
  511.   def current_item_enabled?
  512.     enable?(@data[index])
  513.   end
  514.   #--------------------------------------------------------------------------
  515.   # ● 合成費用を取得
  516.   #--------------------------------------------------------------------------
  517.   def price(item)
  518.     @price[item]
  519.   end
  520.   #--------------------------------------------------------------------------
  521.   # ● 合成可否を取得
  522.   #--------------------------------------------------------------------------
  523.   def enable?(item)
  524.     @makable[item]
  525.   end
  526.   #--------------------------------------------------------------------------
  527.   # ● レシピを取得
  528.   #--------------------------------------------------------------------------
  529.   def recipe(item)
  530.     @recipe[item]
  531.   end
  532.   #--------------------------------------------------------------------------
  533.   # ● アイテムを許可状態で表示するかどうか
  534.   #--------------------------------------------------------------------------
  535.   def have_mat?(recipe)
  536.     flag = true
  537.     if @money >= recipe[0]
  538.       for i in 1...recipe.size
  539.         kind = recipe[i][0]
  540.         id   = recipe[i][1]
  541.         num  = recipe[i][2]
  542.         if kind == "I"
  543.           item = $data_items[id]
  544.         elsif kind == "W"
  545.           item = $data_weapons[id]
  546.         elsif kind == "A"
  547.           item = $data_armors[id]
  548.         end
  549.         if $game_party.item_number(item) < [num, 1].max
  550.           flag = false
  551.         end
  552.       end
  553.     else
  554.       flag = false
  555.     end
  556.     return flag
  557.   end
  558.   #--------------------------------------------------------------------------
  559.   # ● カテゴリの設定
  560.   #--------------------------------------------------------------------------
  561.   def category=(category)
  562.     return if @category == category
  563.     @category = category
  564.     refresh
  565.   end
  566.   #--------------------------------------------------------------------------
  567.   # ● リフレッシュ
  568.   #--------------------------------------------------------------------------
  569.   def refresh
  570.     make_item_list
  571.     create_contents
  572.     draw_all_items
  573.   end
  574.   #--------------------------------------------------------------------------
  575.   # ● アイテムをリストに含めるかどうか
  576.   #--------------------------------------------------------------------------
  577.   def include?(item)
  578.     case @category
  579.     when :item
  580.       item.is_a?(RPG::Item) && !item.key_item?
  581.     when :weapon
  582.       item.is_a?(RPG::Weapon)
  583.     when :armor
  584.       item.is_a?(RPG::Armor)
  585.     when :key_item
  586.       item.is_a?(RPG::Item) && item.key_item?
  587.     else
  588.       false
  589.     end
  590.   end
  591.   #--------------------------------------------------------------------------
  592.   # ● アイテムリストの作成
  593.   #--------------------------------------------------------------------------
  594.   def make_item_list
  595.     @data = []
  596.     @price = {}
  597.     @makable = {}
  598.     @recipe = {}
  599.     for i in 0...@shop_goods.size
  600.       goods = @shop_goods[i]
  601.       recipe = @shop_recipes[i]
  602.       case goods[0]
  603.       when 0;  item = $data_items[goods[1]]
  604.       when 1;  item = $data_weapons[goods[1]]
  605.       when 2;  item = $data_armors[goods[1]]
  606.       end
  607.       if item
  608.         if include?(item)
  609.           @data.push(item)
  610.           @price[item] = goods[2]
  611.           @makable[item] = have_mat?(recipe) && $game_party.item_number(item) < $game_party.max_item_number(item)
  612.           @recipe[item] = recipe
  613.         end
  614.       end
  615.     end
  616.   end
  617.   #--------------------------------------------------------------------------
  618.   # ● 項目の描画
  619.   #--------------------------------------------------------------------------
  620.   def draw_item(index)
  621.     item = @data[index]
  622.     rect = item_rect(index)
  623.     draw_item_name(item, rect.x, rect.y, enable?(item))
  624.     rect.width -= 4
  625.     draw_text(rect, price(item), 2)  if WD_itemsynthesis_ini::Cost_view
  626.   end
  627.   #--------------------------------------------------------------------------
  628.   # ● ステータスウィンドウの設定
  629.   #--------------------------------------------------------------------------
  630.   def status_window=(status_window)
  631.     @status_window = status_window
  632.     call_update_help
  633.   end
  634.   #--------------------------------------------------------------------------
  635.   # ● 素材ウィンドウの設定
  636.   #--------------------------------------------------------------------------
  637.   def material_window=(material_window)
  638.     @material_window = material_window
  639.     call_update_help
  640.   end
  641.   #--------------------------------------------------------------------------
  642.   # ● ヘルプテキスト更新
  643.   #--------------------------------------------------------------------------
  644.   def update_help
  645.     @help_window.set_item(item) if @help_window
  646.     @status_window.item = item if @status_window
  647.     @material_window.set(item, recipe(item)) if @material_window
  648.   end
  649.   #--------------------------------------------------------------------------
  650.   # ● Z ボタン(表示切替)が押されたときの処理
  651.   #--------------------------------------------------------------------------
  652.   def process_change_window
  653.     Sound.play_cursor
  654.     Input.update
  655.     call_handler(:change_window)
  656.   end
  657.   #--------------------------------------------------------------------------
  658.   # ● 決定やキャンセルなどのハンドリング処理
  659.   #--------------------------------------------------------------------------
  660.   def process_handling
  661.     super
  662.     if active
  663.       return process_change_window if handle?(:change_window) && Input.trigger?(:Z)
  664. #      return process_change_window if handle?(:change_window) && Input.trigger?(:Z)
  665.     end
  666.   end
  667. end


  668. #==============================================================================
  669. # ■ Window_ItemSynthesisMaterial
  670. #------------------------------------------------------------------------------
  671. #  合成画面で、合成に必要な素材を表示するウィンドウです。
  672. #==============================================================================

  673. class Window_ItemSynthesisMaterial < Window_Base
  674.   #--------------------------------------------------------------------------
  675.   # ● オブジェクト初期化
  676.   #--------------------------------------------------------------------------
  677.   def initialize(x, y, width, height)
  678.     super(x, y, width, height)
  679.     @item = nil
  680.     refresh
  681.   end
  682.   #--------------------------------------------------------------------------
  683.   # ● リフレッシュ
  684.   #--------------------------------------------------------------------------
  685.   def refresh
  686.     contents.clear
  687.     draw_possession(4, 0)
  688.     draw_material_info(0, line_height * 2)
  689.   end
  690.   #--------------------------------------------------------------------------
  691.   # ● アイテムの設定
  692.   #--------------------------------------------------------------------------
  693.   def set(item, recipe)
  694.     @item = item
  695.     @recipe = recipe
  696.     @make_number = 1
  697.     refresh
  698.   end
  699.   #--------------------------------------------------------------------------
  700.   # ● 作成個数の設定
  701.   #--------------------------------------------------------------------------
  702.   def set_num(make_number)
  703.     @make_number = make_number
  704.     refresh
  705.   end
  706.   #--------------------------------------------------------------------------
  707.   # ● 所持数の描画
  708.   #--------------------------------------------------------------------------
  709.   def draw_possession(x, y)
  710.     rect = Rect.new(x, y, contents.width - 4 - x, line_height)
  711.     change_color(system_color)
  712.     draw_text(rect, Vocab::Possession)
  713.     change_color(normal_color)
  714.     draw_text(rect, $game_party.item_number(@item), 2)
  715.   end
  716.   #--------------------------------------------------------------------------
  717.   # ● 素材情報の描画
  718.   #--------------------------------------------------------------------------
  719.   def draw_material_info(x, y)
  720.     rect = Rect.new(x, y, contents.width, line_height)
  721.     change_color(system_color)
  722.     contents.font.size = 18
  723.     draw_text(rect, "必要素材", 0)
  724.     if @recipe
  725.       for i in [email protected]
  726.         kind = @recipe[i][0]
  727.         id   = @recipe[i][1]
  728.         num  = @recipe[i][2]
  729.         if kind == "I"
  730.           item = $data_items[id]
  731.         elsif kind == "W"
  732.           item = $data_weapons[id]
  733.         elsif kind == "A"
  734.           item = $data_armors[id]
  735.         end
  736.         rect = Rect.new(x, y + line_height*i, contents.width, line_height)
  737.         enabled = true
  738.         enabled = false if [num*@make_number, 1].max  > $game_party.item_number(item)
  739.         draw_item_name(item, rect.x, rect.y, enabled)
  740.         change_color(normal_color, enabled)
  741.         if num > 0
  742.           draw_text(rect, "#{num*@make_number}/#{$game_party.item_number(item)}", 2)
  743.         end
  744.       end
  745.     end
  746.     change_color(normal_color)
  747.     contents.font.size = 24
  748.   end
  749. end


  750. #==============================================================================
  751. # ■ Window_ItemSynthesisNumber
  752. #------------------------------------------------------------------------------
  753. #  合成画面で、合成するアイテムの個数を入力するウィンドウです。
  754. #==============================================================================

  755. class Window_ItemSynthesisNumber < Window_ShopNumber
  756.   #--------------------------------------------------------------------------
  757.   # ● リフレッシュ
  758.   #--------------------------------------------------------------------------
  759.   def refresh
  760.     contents.clear
  761.     draw_item_name(@item, 0, item_y)
  762.     draw_number
  763.     draw_total_price if WD_itemsynthesis_ini::Cost_view
  764.   end
  765.   #--------------------------------------------------------------------------
  766.   # ● オブジェクト初期化
  767.   #--------------------------------------------------------------------------
  768.   def material_window=(material_window)
  769.     @material_window = material_window
  770.     call_update_help
  771.   end
  772.   #--------------------------------------------------------------------------
  773.   # ● 作成個数の変更
  774.   #--------------------------------------------------------------------------
  775.   def change_number(amount)
  776.     @number = [[@number + amount, @max].min, 1].max
  777.     call_update_help #追加
  778.   end
  779.   #--------------------------------------------------------------------------
  780.   # ● ヘルプテキスト更新
  781.   #--------------------------------------------------------------------------
  782.   def call_update_help
  783.     @material_window.set_num(@number) if @material_window
  784.   end
  785.   #--------------------------------------------------------------------------
  786.   # ● Z ボタン(表示切替)が押されたときの処理
  787.   #--------------------------------------------------------------------------
  788.   def process_change_window
  789.     Sound.play_cursor
  790.     Input.update
  791.     call_handler(:change_window)
  792.   end
  793.   #--------------------------------------------------------------------------
  794.   # ● 決定やキャンセルなどのハンドリング処理
  795.   #--------------------------------------------------------------------------
  796.   def process_handling
  797.     super
  798.     if active
  799.       return process_change_window if handle?(:change_window) && Input.trigger?(:Z)
  800. #      return process_change_window if handle?(:change_window) && Input.trigger?(:Z)
  801.     end
  802.   end
  803. end


  804. #==============================================================================
  805. # ■ Window_ItemSynthesisCategory
  806. #------------------------------------------------------------------------------
  807. #  合成画面で、通常アイテムや装備品の分類を選択するウィンドウです。
  808. #==============================================================================

  809. class Window_ItemSynthesisCategory < Window_ItemCategory
  810.   #--------------------------------------------------------------------------
  811.   # ● 桁数の取得
  812.   #--------------------------------------------------------------------------
  813.   def col_max
  814.     i = 0
  815.     i += 1 if WD_itemsynthesis_ini::Category_i
  816.     i += 1 if WD_itemsynthesis_ini::Category_w
  817.     i += 1 if WD_itemsynthesis_ini::Category_a
  818.     i += 1 if WD_itemsynthesis_ini::Category_k
  819.     return i
  820.   end
  821.   #--------------------------------------------------------------------------
  822.   # ● コマンドリストの作成
  823.   #--------------------------------------------------------------------------
  824.   def make_command_list
  825.     add_command(Vocab::item,     :item)     if WD_itemsynthesis_ini::Category_i
  826.     add_command(Vocab::weapon,   :weapon)   if WD_itemsynthesis_ini::Category_w
  827.     add_command(Vocab::armor,    :armor)    if WD_itemsynthesis_ini::Category_a
  828.     add_command(Vocab::key_item, :key_item) if WD_itemsynthesis_ini::Category_k
  829.   end
  830. end


  831. #==============================================================================
  832. # ■ Window_ItemSynthesisNumber
  833. #------------------------------------------------------------------------------
  834. #  合成画面で、切替を表示するウィンドウです。
  835. #==============================================================================

  836. class Window_ItemSynthesisChange < Window_Base
  837.   #--------------------------------------------------------------------------
  838.   # ● オブジェクト初期化
  839.   #--------------------------------------------------------------------------
  840.   def initialize(x, y, width, height)
  841.     super(x, y, width, height)
  842.     refresh
  843.   end
  844.   #--------------------------------------------------------------------------
  845.   # ● リフレッシュ
  846.   #--------------------------------------------------------------------------
  847.   def refresh
  848.     contents.clear
  849.     text = "D: 制作素材 / 装备对比 界面切换"
  850.     draw_text(0, 0, contents_width, line_height, text, 1)
  851.   end
  852. end
复制代码

点评

TAT……球两段代码加个折叠……这样翻起来好费劲……  发表于 2016-4-3 20:55
那就拜托了,最近感到智商严重下降,已经看不懂脚本了  发表于 2016-4-1 15:03
嘛……在start里面放上生成的方法之后……剩下的全是.hide和刷新的苦力活儿就是了……啥时候闲的没事做了窝再弄一下……  发表于 2016-4-1 14:32
然而我就是使用各种体位召唤失败了才无奈求助的……说实在的并不是很懂ruby  发表于 2016-4-1 00:03
顺便……话说……第一个代码框里面已经有各种召唤姿势了……自己照着那样肝就好了吧…………  发表于 2016-3-31 20:59
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2106
在线时间
950 小时
注册时间
2015-7-16
帖子
767

开拓者

37
发表于 2016-3-30 14:50:20 | 只看该作者
如果沒弄錯應該是這一段604~609 (我有新增幾句錯誤說明,所以多幾行

点评

嘛~填坑什么的加了个油……  发表于 2016-3-30 17:36
順帶一提現在正在做ARPG,66創帳到現在,全都是為了製作我目前的這款遊戲,現在應該半年多幾個月了,過程真令人感動  发表于 2016-3-30 15:23
真的幫大忙了! 這下子困擾幾個月的噩夢終於可以結束,不介意的話讓我把您的大名加進遊戲感謝名單吧^ ^!  发表于 2016-3-30 15:21
成功啦! 居然沒注意到OWO  发表于 2016-3-30 15:06
对……所以错位了………………不过应该窝有说是【update_position】方法……也就是下面的【def update_position】那段啦…………  发表于 2016-3-30 14:58
[神性领域扩张:扩张神性领域]
说了等于没说.
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2106
在线时间
950 小时
注册时间
2015-7-16
帖子
767

开拓者

36
发表于 2016-3-30 13:41:46 | 只看该作者
本帖最后由 duzine 于 2016-3-30 14:38 编辑

看來還沒結束...
改變角度的功能失效了,剛好又是最關鍵的功能 (沒了這個,就好像冰淇淋只剩餅乾...


BUG.rar (1.49 MB, 下载次数: 43)



話說我好像已經找到反lag腳本那樣寫的原因了,單獨測試某些腳本跟反lag的相性所發現


奇怪的是雖然測試的腳本跟反lag單獨放一起會出錯,但在我遊戲本體裡面達成完美平衡....真不知道是哪個腳本當了和事佬...


我遊戲中的小遊戲,小精靈那種的 (別名吃豆人


用上了反lag修正版後


各種空中走鋼索...

点评

隱形的沒出現了,但是依然飄浮在空中,小夥伴們都暈哭在廁所了  发表于 2016-3-30 14:46
對,我已經改了,問題還在QAQ  发表于 2016-3-30 14:46
事件浮空问题见第六条评论哇…………  发表于 2016-3-30 14:42
最下圖的隱形是我自己設定的閃爍,不是反lag造成的,補充一下  发表于 2016-3-30 14:40
等等,我有補圖,可以看到區別了  发表于 2016-3-30 14:39
[神性领域扩张:扩张神性领域]
说了等于没说.
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-20 00:17

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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