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

Project1

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

[RMVX发布] 【FSL】【汉化】中级向·技能树(LeongonSkillTree)

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1150
在线时间
1564 小时
注册时间
2008-7-30
帖子
4418

贵宾

跳转到指定楼层
1
发表于 2011-7-7 16:00:29 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 DeathKing 于 2011-7-7 16:01 编辑

绪言

这个就是我早些时候在水区公布的东西了,考虑到配置的复杂性,推荐有一定的脚本知识的用户使用。

就我个人来说,我觉得这个脚本除了配置复杂一点,其他部分堪称完美,而且作者当初编写的时候,把Configuration都放在一个模块了,包括语言支持什么的,我觉得挺不错的。

另外,本脚本原作者Leongon([email protected] ),发布在 http://www.rpgrevolution.com/forums/index.php?showtopic=43001 。按照原作者的意愿,您在传播此脚本的时候,在遵循FSL协议的基础上,还需要保留这个链接:www.rpgrevolution.com

ToDo
  • 试图寻找一种新的、简便的配置方法;
  • 做个针对中文游戏的美化;


下载
    相关工程: [1.1]LeongonSkillTree.rar (530.49 KB, 下载次数: 2259)
    相关文档:稍后
    相关实现:wangswz也写过类似脚本,看这里:http://rpg.blue/thread-156223-1-1.html
    在Fibrary中浏览: http://rpg.blue/fsl/rgss2/LeongonSkillTree/index.html
   

截图
    这个是作者范例工程中提供的两个配置。




这个是我的配置,用了塞娜尔史诗(天坑 = =b)中的技能图标。做得很简陋。


脚本
  1. #===============================================================================
  2. # ■ [VX]技能树脚本
  3. #    [VX]LeongonSkillTree
  4. #-------------------------------------------------------------------------------
  5. #    本脚本原作者Leongon([email protected] ),发布在引用网址[1]中。
  6. #    本脚本中文翻译者为DeathKing([email protected]),并提供相关支持。
  7. #
  8. #    按照原作者的意愿,您在传播此脚本的时候,在遵循FSL协议的基础上,还需要保留
  9. #    这个链接:www.rpgrevolution.com
  10. #
  11. #
  12. #    * 命令列表
  13. #      - ST_command::show(mode, actor, exit)..............直接打开技能树界面;
  14. #      - ST_command::reward(mode, actor, quantity)..........给予角色技能点数;
  15. #      - ST_command::reward_party(quantity).................给予队伍技能点数;
  16. #      - ST_command::reset(mode, actor).......................重置角色技能树;
  17. #      - ST_command::reset_party..............................重置队伍技能树;
  18. #
  19. #    * 参数列表
  20. #      请注意与命令列表中的命令相对应
  21. #      - mode      0 / :position - 按照角色在队伍中的位置(序号)索引;
  22. #                  1 / :name     - 按照角色的名称索引;
  23. #                  2 / :id       - 按照角色数据库中id号;
  24. #      - actor     角色的位置(序号),名字或数据库id;
  25. #                  该值得意义由 mode 参数决定。
  26. #      - exit      true          - 退出时返回到地图;
  27. #                  false[默认]   - 退出时返回到菜单;
  28. #      - quantity  指定给予的点数,忽略则给予1点;
  29. #
  30. #    * 设置技能树的相关步骤
  31. #      ① 在 ST_object 中配置 SkillObject
  32. #             SkillObject 是技能对象,他描述了一个技能要求的前置技能以及技能
  33. #         相关属性的配置,你应该先配置他;
  34. #
  35. #      ② 在 ST_object 中配置 ArrowObject
  36. #         【建议您在配置前查看一下Graphics\System\SkillTree.png的图像内容】
  37. #         【这将有助于您理解相关的设置。                                 】
  38. #             ArrowObject 是箭头对象,他描述了使用的相关箭头。你可以认为他是
  39. #         一些图片,配置这些,是为了后面的技能树布局;
  40. #
  41. #      ③ 在 ST_tree_build 中配置技能树布局
  42. #             ST_tree_build 中的数据描述了技能树的布局,请注意,这些布局是手
  43. #         动的、人为的生成的,所以配置起来有些麻烦;
  44. #
  45. #      ④ 在 ST_class_assign 中配置职业分配
  46. #             ST_class_assign 中的数据决定了哪些职业拥有什么样的技能树,请注
  47. #         意,每个职业最多支持3个技能树;
  48. #
  49. #    * 注意事项
  50. #      ① 请检查数据库中对应技能有对应的设置;
  51. #      ② 如果启用了 ST_imageback ,还需要确认存在对应图像文件;
  52. #      ③ 请注意语法格式,不要删除或缺少必要的符号(通常导致 SyntaxError);
  53. #      
  54. #-------------------------------------------------------------------------------
  55. #    更新作者: Leongon DeathKing
  56. #    许可协议: FSL
  57. #    引用网址: http://www.rpgrevolution.com/forums/index.php?showtopic=43001
  58. #               http://rpg.blue/fsl/rgss2/LeogonSKillTree/index.html
  59. #-------------------------------------------------------------------------------
  60. #    - 1.1.0707  By DeathKing
  61. #      * 对 mode 添加了符号支持;
  62. #
  63. #    - 1.0.0519  By Leongon
  64. #      * 初版;
  65. #
  66. #===============================================================================
  67. $fscript = {} if $fscript == nil
  68. $fscript["LeongonSkillTree"] = "1.1.0707"

  69. #-------------------------------------------------------------------------------
  70. # ▼ 通用配置模块
  71. #-------------------------------------------------------------------------------

  72. module FSL
  73.   module LeongonSkillTree
  74.    
  75.     # 当从技能树退出时停留的菜单选项的索引
  76.     ST_menu_pos = 2            
  77.     # 英雄等级要求是否随技能升级而提高
  78.     # 例如,1级的火焰需要英雄2级,而当这个值为true时,
  79.     #       2级的火焰就需要英雄3级。
  80.     ST_scale_mode = true
  81.     # 每次等级提升时是否增加技能点
  82.     ST_level_up_point = true
  83.     # 给予技能点的最低等级
  84.     ST_first_skill_point = 2
  85.     # 加点是否需要确认
  86.     ST_confirm_popup = true
  87.     # 确认加点文字
  88.     ST_voc_q = "确认加点"
  89.     # 确认文字
  90.     ST_voc_ok = "确定"
  91.     # 取消文字
  92.     ST_voc_cancel = "取消"
  93.     # 如果角色没有技能树,是否显示警告
  94.     ST_notalents_popup = true
  95.     # 警告中是否包含角色的名字
  96.     ST_notalents_popAN = true
  97.     # 警告的前置文字
  98.     ST_voc_noSTpop_pre = "错误!"
  99.     # 警告文字
  100.     ST_voc_noSTpop_pos = "没有有效的技能树。"
  101.     # 继续文字
  102.     ST_voc_noSTpop = "确认"
  103.    
  104.     # 菜单选项中天赋树的名字
  105.     ST_menu = "天赋"
  106.     # Skill maxed.
  107.     ST_voc_max = "Maxed"
  108.     # 未习得技能文字
  109.     ST_voc_unl = "未习得"
  110.     # 当前阶段技能描述文字
  111.     ST_voc_now = "当前阶段:"
  112.     # 下一阶段技能描述文字
  113.     ST_voc_nex = "下一阶段:"
  114.     # 当前可用技能点数
  115.     ST_voc_cur = "技能点数:"
  116.     # 前置技能文字
  117.     ST_voc_req = "前置技能:"
  118.     # 英雄等级文字
  119.     ST_voc_lvl = "英雄等级:"
  120.     # 等级需求量词(单数)
  121.     ST_voc_one = " 级 "
  122.     # 等级许留量词(复数)
  123.     ST_voc_many = " 级 "

  124.    
  125.     # (0-31) 当可用技能点数为0时的颜色
  126.     ST_zero_sp_color = 10
  127.     # (0-31) 被选中的技能的颜色
  128.     ST_skillname_color = 14
  129.     # (0-255) 无效的箭头对象的透明度
  130.     ST_arrow_disabled = 118
  131.     # (0-255) 无效的技能对象的透明度
  132.     ST_skill_disabled = 138
  133.     # (true-false) 在图标下方显示技能等级
  134.     ST_show_obj_lvl = true
  135.     # (0-360) 箭头对象的色相,可以用于调整箭头对象的颜色
  136.     ST_arrow_hue = 155
  137.     # (0-255) 技能图像背景的透明度
  138.     #         当这个选项被置为 false 的时候,停用显示自定义技能背景图像的功能
  139.     #         图像必须是 206x348 规格,且放在 Graphics/System 目录下
  140.     #         且按照技能树对象的名称命名(参考下方的 "TREE_NAME" 设置)
  141.     #         例如,ARMS技能树的图像名必须是 ARMS.png
  142.     ST_imageback = 240
  143.     # (ID) 决定界面布局的游戏变量
  144.     #      可以尝试修改对应的游戏变量的值来查看布局。
  145.     ST_windows_var = 6
  146.     # (0-2) 技能树名称选定光标
  147.     #       0 :闪烁光标
  148.     #       1 :固定光标(不闪烁)
  149.     #       2 :仅仅高亮技能树名称,无光标
  150.     ST_tree_selection = 0
  151.     # (0-31) 技能树名称高亮的颜色
  152.     ST_treeselection_color = 14


  153.     ST_arrow = [ # 不要删去此处的中括号,否则程序会出错!
  154.     #---------------------------------------------------------------------------
  155.     # * 箭头图像列表 *                                                         
  156.     #                                                                           
  157.     # 你不需要更改这个,除非你更改了 SkillTree.png 中箭头图像的顺序            
  158.     #---------------------------------------------------------------------------
  159.     # "GraphicName",                                                            
  160.       "A_l_st",            # 左向箭头,起始
  161.       "A_r_st",            # 右向箭头,起始
  162.       "A_ver_st",          # 垂直箭头,起始
  163.       "A_ver",             # 垂直箭头,中部
  164.       "A_hor",             # 水平箭头
  165.       "A_ver_end",         # 垂直箭头,终止
  166.       "A_l_end",           # 左向箭头,终止
  167.       "A_r_end",           # 右向箭头,终止
  168.       "A_ver_w_diag_r",    # 垂直,右分支
  169.       "A_ver_w_diag_l",    # 垂直,左分支
  170.       "A_diag_r_st",       # 右下对角线,起始
  171.       "A_diag_r_abo_cor",  # 右下对角线,下方填充小块
  172.       "A_diag_r_bel_cor",  # 右下对角线,上方填充小块
  173.       "A_diag_r",          # 右下对角线,中部
  174.       "A_diag_r_end",      # 右下对角线,终止
  175.       "A_diag_l_st",       # 左下对角线,起始
  176.       "A_diag_l_abo_cor",  # 左下对角线,下方填充小块
  177.       "A_diag_l_bel_cor",  # 左下对角线,上方填充小块
  178.       "A_diag_l",          # 左下对角线,中部
  179.       "A_diag_l_end",      # 左下对角线,终止
  180.     ] # 不要删去此处的中括号,否则程序会出错!


  181. ST_object = { # 不要删去此处的大括号,否则程序会出错!
  182. #------------------------------------------------------------------------------#
  183. # * 建立箭头对象列表 *                                                         #
  184. #                                                                              #
  185. # 不幸的是,你需要手动建立这些箭头对象。                                       #
  186. #------------------------------------------------------------------------------#
  187. #                                                                              #
  188. # "ArrowObject"  - 箭头对象的名称;                                            #
  189. # "arrow_object" - 标识符,固定使用 arrow_object ;                            #
  190. # "arrow"        - 箭头的图像名;                                              #
  191. # "dadskill"     - 父节点名称,参考技能对象列表中的 SkillObject 项;           #
  192. #------------------------------------------------------------------------------#
  193. # "ArrowObject" => ["arrow_object", "arrow", "dadskill"],

  194.   "MF_1_1"      => ["arrow_object", "A_ver_st", "MF_1"],
  195.   "MF_1_2"      => ["arrow_object", "A_ver_end", "MF_1"],
  196.   "MF_2_1"      => ["arrow_object", "A_diag_l_st", "MF_2"],
  197.   "MF_2_2"      => ["arrow_object", "A_diag_l_end", "MF_2"],
  198.   "MF_2_3"      => ["arrow_object", "A_diag_l_abo_cor", "MF_2"],
  199.   "MF_2_4"      => ["arrow_object", "A_diag_l_bel_cor", "MF_2"],
  200.   "MF_4_1"      => ["arrow_object", "A_ver_st", "MF_4"],
  201.   "MF_4_2"      => ["arrow_object", "A_ver_end", "MF_4"],
  202.   "WA_1_1"      => ["arrow_object", "A_ver_st", "WA_1"],
  203.   "WA_1_2"      => ["arrow_object", "A_ver_end", "WA_1"],
  204.   
  205.   "BOM_2_1"     => ["arrow_object", "A_ver_st" ,"BOM_2"],
  206.   "BOM_2_2"     => ["arrow_object", "A_ver_end", "BOM_2"],
  207.   "BOM_3_1"     => ["arrow_object", "A_ver_st", "BOM_3"],
  208.   "BOM_3_2"     => ["arrow_object", "A_ver_end", "BOM_3"],
  209.   "BOM_2_a"     => ["arrow_object", "A_diag_l_st", "BOM_2"],
  210.   "BOM_2_b"     => ["arrow_object", "A_diag_l_bel_cor", "BOM_2"],
  211.   "BOM_2_c"     => ["arrow_object", "A_diag_l_abo_cor", "BOM_2"],
  212.   "BOM_2_d"     => ["arrow_object", "A_diag_l_end", "BOM_2"],
  213.   
  214. #                                                                              #
  215. #------------------------------------------------------------------------------#


  216. #------------------------------------------------------------------------------#
  217. # * 建立技能对象列表 *                                                         #
  218. #                                                                              #
  219. # 很不幸的是,你需要手动建立这些对象。                                         #
  220. #------------------------------------------------------------------------------#
  221. #                                                                              #
  222. # "SkillObject"  - 技能对象的名称;                                            #
  223. # reqlvl         - 技能需要的英雄等级;                                        #
  224. # treepts        - 需要在此技能树中消耗多少技能点数才能开启本技能;            #
  225. # "dad" - "mom"  - 需要的前置技能(父前置技能和母前置技能);                  #
  226. # maxlvl         - 技能最大等级;                                              #
  227. # childreqlvl    - 至少需要多少点技能点才能激活子技能;                        #
  228. # idlvl...       - 每一个技能等级对应的技能id号;                              #
  229. # -----------------------------------------------------------------------------#
  230. # "SkillObject" => [reqlvl, treepts, "dad", "mom", maxlvl, childreqlvl, idlvl1, idlvl2,...],

  231.   "MF_1"        => [1, 0, nil, nil, 5, 1, 1, 2, 3, 4, 5],
  232.   "MF_2"        => [5, 0, nil, nil, 3, 1, 6, 7, 8],
  233.   "MF_3"        => [10, 0, "MF_1", "MF_2", 5, 0, 9, 10, 11, 12, 13],
  234.   "MF_4"        => [1, 0, nil, nil, 5, 5, 14, 15, 16, 17, 18],
  235.   "MF_5"        => [10, 0, "MF_4", nil, 5, 5, 19, 20, 21, 22, 23],
  236.   "WA_1"        => [1, 0, nil, nil, 3, 3, 24, 25, 26],
  237.   "WA_2"        => [1, 0, "WA_1", nil, 5, 0, 27, 28, 29, 30, 31],
  238.   
  239.   "BOM_1"       => [1,0,nil,nil,3,1,51,52,53],
  240.   "BOM_2"       => [3,0,nil,nil,3,1,54,55,56],
  241.   "BOM_3"       => [8,3,"BOM_2",nil,4,2,57,58,59,60],
  242.   "BOM_4"       => [13,0,"BOM_3",nil,5,3,61,62,63,64,65],
  243.   "BOM_5"       => [10,0,"BOM_2",nil,5,5,66,67,68,69,70],
  244.   


  245. } # 不要删去此处的大括号,否则程序会出错!


  246. ST_tree_build = { # 不要删去此处的大括号,否则程序会出错!
  247. #------------------------------------------------------------------------------#
  248. # * 技能树布局设定 *                                                           #
  249. #                                                                              #
  250. # 很不辛,你要手动设定这些对象。                                               #
  251. #                                                                              #
  252. # 每行有7个元素,第1、4、7个元素应该为技能对象或箭头对象,但第2、3、5、6必须为 #
  253. # 箭头对象或者nil。                                                            #
  254. #                                                                              #
  255. # 技能树的高度(列)没有被限定,但是一定要确保每行只有7个元素。                #
  256. #------------------------------------------------------------------------------#
  257. #                                                                              #
  258. # "TREE_NAME" - 技能树对象的名称                                               #
  259. # "obj..."    - 技能对象或者箭头对象的名称,如果为空请置为nil                  #
  260. # -----------------------------------------------------------------------------#
  261. # "TREE_NAME" => [   obj 1,   obj 2,   obj 3,   obj 4,   obj 5,   obj 6,   obj 7],

  262. "MAGE_FROST" => ["MF_1"  ,     nil,     nil,  "MF_2",     nil,     nil,  "MF_4",
  263.                   "MF_1_1","MF_2_3","MF_2_1",     nil,     nil,     nil,"MF_4_1",
  264.                   "MF_1_2","MF_2_2","MF_2_4",     nil,     nil,     nil,"MF_4_2",
  265.                   "MF_3"  ,     nil,     nil,     nil,     nil,     nil,  "MF_5"],
  266.                   
  267. "ARMS"       => ["WA_1"  ,     nil,     nil,     nil,     nil,     nil,     nil,
  268.                   "WA_1_1",     nil,     nil,     nil,     nil,     nil,     nil,
  269.                   "WA_1_2",     nil,     nil,     nil,     nil,     nil,     nil,
  270.                   "WA_2" ],
  271.                   
  272. "BOM"        => ["BOM_1",       nil,       nil,   "BOM_2", nil,  nil,  nil,
  273.                       nil, "BOM_2_c", "BOM_2_a", "BOM_2_1", nil,  nil,  nil,
  274.                       nil, "BOM_2_d", "BOM_2_b", "BOM_2_2", nil,  nil,  nil,
  275.                   "BOM_5",       nil,       nil,   "BOM_3", nil,  nil,  nil,
  276.                       nil,       nil,       nil, "BOM_3_1", nil,  nil,  nil,
  277.                       nil,       nil,       nil, "BOM_3_2", nil,  nil,  nil,
  278.                       nil,       nil,       nil,   "BOM_4"],
  279.   
  280.   # 设置的时候请注意数组对象的方括号!
  281.   # 设置的时候请注意哈希对象中的每个键-值使用逗号分隔!

  282. } # 不要删去此处的大括号,否则程序会出错!

  283. ST_class_assign = { # 不要删去此处的大括号,否则程序会出错!
  284. #------------------------------------------------------------------------------#
  285. # * 技能树职业分配 *                                                           #
  286. #                                                                              #
  287. # 在这里为每个职业设置技能树,最大支持3个技能树;没有的话,请置对应位置为nil。 #
  288. #------------------------------------------------------------------------------#
  289. #                                                                              #
  290. # ClassID           - 拥有此技能树的职业id;                                   #
  291. # "TREE..."         - 技能树对象,参考上方的 "TREE_NAME" 设置;                #
  292. # "Display..."      - 技能树显示时使用的名称;                                 #
  293. #------------------------------------------------------------------------------#
  294. # ClassID => ["TREE_1", "TREE_2", "TREE_3", "Display 1", "Display 2", "Display 3"],

  295.   1 => ["MAGE_FROST", "ARMS", nil, "寒冰之力", "战争意志", nil],
  296.   2 => ["BOM",nil,nil,"奥术基础",nil,nil],
  297.   
  298. } # 不要删去此处的大括号,否则程序会出错!

  299.   end
  300. end

  301. # 重命名命名空间
  302. ST_setup = FSL::LeongonSkillTree

  303. #==============================================================================
  304. # ■ Game_Actor
  305. #------------------------------------------------------------------------------
  306. #  处理角色的类。本类在 Game_Actors 类 ($game_actors) 的内部使用、
  307. # Game_Party 类请参考 ($game_party) 。
  308. #==============================================================================

  309. class Game_Actor < Game_Battler
  310.   include ST_setup
  311.   alias skill_tree_initialize initialize
  312.   def initialize(actor_id)
  313.     skill_tree_initialize(actor_id)
  314.     @last_tree_id = 0
  315.     @tree_skills = []
  316.     @tree_points = [0,0,0]
  317.   end
  318.   alias skill_tree_setup setup
  319.   def setup(actor_id)
  320.     skill_tree_setup(actor_id)
  321.     if ST_first_skill_point <= @level and ST_level_up_point
  322.       @base_st_points = (@level - ST_first_skill_point) +1
  323.     else
  324.       @base_st_points = 0
  325.     end
  326.     @st_points = @base_st_points
  327.   end
  328.   def tree_points
  329.     treepts = @tree_points[@last_tree_id]
  330.     return treepts
  331.   end
  332.   def st_points
  333.     return @st_points
  334.   end
  335.   def reset_skill_trees
  336.     while !@tree_skills.empty?
  337.       for skill in @tree_skills
  338.         forget_tree_skill(skill)
  339.       end
  340.     end
  341.     @st_points = @base_st_points
  342.     @tree_points = [0,0,0]
  343.   end
  344.   def learn_tree_skill(skill_id)
  345.     @tree_skills.push(skill_id)
  346.     learn_skill(skill_id)
  347.     @st_points -= 1
  348.     @tree_points[@last_tree_id] += 1
  349.   end
  350.   def forget_tree_skill(skill_id)
  351.     @tree_skills.delete(skill_id)
  352.     forget_skill(skill_id)
  353.   end
  354.   alias skill_tree_level_up level_up
  355.   def level_up
  356.     skill_tree_level_up
  357.     if ST_first_skill_point <= @level and ST_level_up_point
  358.       @st_points += 1
  359.       @base_st_points += 1
  360.     end
  361.   end
  362.   alias skill_tree_level_down level_down
  363.   def level_down
  364.     skill_tree_level_down
  365.     unless ST_first_skill_point < @level or ST_level_up_point == false
  366.       @st_points -= 1
  367.       @base_st_points -= 1
  368.     end
  369.   end
  370.   def tree_skills
  371.     return @tree_skills
  372.   end
  373.   def last_tree_id(t_id)
  374.     @last_tree_id = t_id
  375.   end
  376.   def get_last_tree_id
  377.     return @last_tree_id
  378.   end
  379.   def reward_st_points(amount)
  380.     @st_points += amount
  381.     @base_st_points += amount
  382.   end
  383. end

  384. #==============================================================================
  385. # ■ Window_SkillTree_Main
  386. #==============================================================================
  387. class Window_SkillTree_Main < Window_Selectable
  388.   include ST_setup
  389.   def initialize(actor, tree)
  390.     case $game_variables[ST_windows_var]
  391.     when 2,3
  392.       super(338, 68, 206, 348)
  393.     when 4,5
  394.       super(0, 0, 206, 348)
  395.     when 6,7
  396.       super(338, 0, 206, 348)
  397.     else
  398.       super(0, 68, 206, 348)
  399.     end
  400.     @spacing = 0
  401.     @actor = actor
  402.     @column_max = 7
  403.     @class_tree_assign = ST_class_assign[@actor.class_id]
  404.     @tree_name = @class_tree_assign[tree]
  405.     for data in ST_tree_build[@tree_name]
  406.       if data != nil and ST_object.include?(data)
  407.         object = ST_object[data]
  408.         unless object[0] == "arrow_object"
  409.           self.index = ST_tree_build[@tree_name].index(data)
  410.           break
  411.         end
  412.       end
  413.     end
  414.     $sk_lvl = 0
  415.     $sk_max_lvl = 0
  416.     if ST_imageback != false
  417.       self.back_opacity = 0
  418.     end
  419.     refresh
  420.   end
  421.   def st_enabled?(index)
  422.     req_lvl_data = @treedata_reqlvl[index]
  423.     req_lvl_data += object_lvl(index) if ST_scale_mode
  424.     if @actor.level >= req_lvl_data and
  425.       @treedata_child_allow.include?(@treedata_reqskillobj_a[index]) and
  426.       @treedata_child_allow.include?(@treedata_reqskillobj_b[index]) and
  427.       @treedata_reqtreepts[index] <= @actor.tree_points
  428.       return true
  429.     else
  430.       return false
  431.     end
  432.   end
  433.   def at_enabled?(index)
  434.     if @treedata_child_allow.include?(@treedata_reqskillobj_a[index])
  435.       return true
  436.     else
  437.       return false
  438.     end
  439.   end
  440.   def object_lvl(index)
  441.     skill_allids = @treedata_alllvlids[index]
  442.     for k in skill_allids
  443.       if @actor.tree_skills.include?(k)
  444.         lvl = skill_allids.index(k)
  445.         return lvl +1
  446.       end
  447.     end
  448.     return 0
  449.   end
  450.   def object_max_lvl(index)
  451.     return @treedata_maxlvl[index]
  452.   end
  453.   def object_dad_req(indx)
  454.     required_object = []
  455.     if get_skill_next_level(indx) == "maxed"
  456.       required_object = [0,0,0,0,0,0]
  457.       return required_object
  458.     end
  459.     obj_name_a = @treedata_reqskillobj_a[indx]
  460.     obj_name_b = @treedata_reqskillobj_b[indx]
  461.     if obj_name_a == nil
  462.       required_object.push(obj_name_a)
  463.       required_object.push(obj_name_a)
  464.       required_object.push(obj_name_b)
  465.       required_object.push(obj_name_b)
  466.     else
  467.       obj_data_a = ST_object[obj_name_a]
  468.       obj_id_a = obj_data_a[6]
  469.       name_a = $data_skills[obj_id_a].name
  470.       required_object.push(name_a)
  471.       obj_lvl_req_a = obj_data_a[5]
  472.       required_object.push(obj_lvl_req_a)
  473.       if obj_name_b == nil
  474.         required_object.push(obj_name_b)
  475.         required_object.push(obj_name_b)
  476.       else
  477.         obj_data_b = ST_object[obj_name_b]
  478.         obj_id_b = obj_data_b[6]
  479.         name_b = $data_skills[obj_id_b].name
  480.         required_object.push(name_b)
  481.         obj_lvl_req_b = obj_data_b[5]
  482.         required_object.push(obj_lvl_req_b)
  483.       end
  484.     end
  485.     obj_actor_req_lvl = @treedata_reqlvl[indx]
  486.     obj_actor_req_lvl += object_lvl(indx) if ST_scale_mode
  487.     obj_actor_reqtreepts = @treedata_reqtreepts[indx]
  488.     required_object.push(obj_actor_req_lvl)
  489.     required_object.push(obj_actor_reqtreepts)
  490.     return required_object
  491.   end
  492.   def get_skill_actual_level(data_index)
  493.     skill_allids = @treedata_alllvlids[data_index]
  494.     for k in skill_allids
  495.       if @actor.tree_skills.include?(k)
  496.         return k
  497.       end
  498.     end
  499.     return "not learned"
  500.   end
  501.   def get_skill_next_level(data_index)
  502.     skill_allids = @treedata_alllvlids[data_index]
  503.     for k in skill_allids
  504.       if @actor.tree_skills.include?(k)
  505.         sk_index = skill_allids.index(k)
  506.         sk_index += 1
  507.         if skill_allids[sk_index] == nil
  508.           return "maxed"
  509.         end
  510.         return skill_allids[sk_index]
  511.       end
  512.     end
  513.     return skill_allids[0]
  514.   end
  515.   def get_skill_child_req(object_name, data_index)
  516.     actual_lvl = nil
  517.     alllvlids_data = []
  518.     alllvlids_data = @treedata_alllvlids[data_index]
  519.     for k in alllvlids_data
  520.       if @actor.tree_skills.include?(k)
  521.         actual_lvl = alllvlids_data.index(k)
  522.         actual_lvl += 1
  523.       end
  524.     end
  525.     actual_lvl = 0 if actual_lvl == nil
  526.     skill_object_name = ST_object[object_name]
  527.     return true if actual_lvl >= skill_object_name[5]
  528.     return false
  529.   end
  530.   def build_tree_indexed_data
  531.     @treedata_arrowindex = []
  532.     @treedata_reqlvl = []
  533.     @treedata_reqtreepts = []
  534.     @treedata_reqskillobj_a = []
  535.     @treedata_reqskillobj_b = []
  536.     @treedata_maxlvl = []
  537.     @treedata_child_allow = []
  538.     @treedata_alllvlids = []
  539.     countt = 0
  540.     tree_build = ST_tree_build[@tree_name]
  541.     for l in tree_build
  542.       object_data = []
  543.       object_data = ST_object[l]
  544.       if l == nil
  545.         @treedata_arrowindex.push(nil)
  546.         @treedata_reqlvl.push(nil)
  547.         @treedata_reqtreepts.push(nil)
  548.         @treedata_reqskillobj_a.push(nil)
  549.         @treedata_reqskillobj_b.push(nil)
  550.         @treedata_maxlvl.push(nil)
  551.         @treedata_child_allow.push(nil)
  552.         @treedata_alllvlids.push(nil)
  553.       elsif object_data[0] == "arrow_object"
  554.         arrow_index = object_data[1]
  555.         @treedata_arrowindex.push(ST_arrow.index(arrow_index))
  556.         @treedata_reqlvl.push(nil)
  557.         @treedata_reqtreepts.push(nil)
  558.         @treedata_reqskillobj_a.push(object_data[2])
  559.         @treedata_reqskillobj_b.push(nil)
  560.         @treedata_maxlvl.push(nil)
  561.         @treedata_child_allow.push(nil)
  562.         @treedata_alllvlids.push(nil)
  563.       else
  564.         @treedata_arrowindex.push(nil)
  565.         @treedata_reqlvl.push(object_data[0])
  566.         @treedata_reqtreepts.push(object_data[1])
  567.         @treedata_reqskillobj_a.push(object_data[2])
  568.         @treedata_reqskillobj_b.push(object_data[3])
  569.         @treedata_maxlvl.push(object_data[4])
  570.         index_lvls_plus = 0
  571.         index_lvls_plus = object_data[4]
  572.         index_lvls_plus += 6
  573.         all_lvl_ids = []
  574.         for k in 6...index_lvls_plus
  575.           all_lvl_ids.push(object_data[k])
  576.         end
  577.         @treedata_alllvlids.push(all_lvl_ids)
  578.         @treedata_child_allow.push(l) if get_skill_child_req(l, countt)
  579.       end
  580.       countt += 1
  581.     end
  582.   end
  583.   def refresh
  584.     @data = []
  585.     build_tree_indexed_data
  586.     count = 0
  587.     tree_build = ST_tree_build[@tree_name]
  588.     for j in tree_build
  589.       if j == nil
  590.         data_skill = nil
  591.       elsif @treedata_arrowindex[count] != nil
  592.         data_skill = "arrow"
  593.       elsif get_skill_next_level(count) == "maxed"
  594.         data_skill = $data_skills[get_skill_actual_level(count)]
  595.       else
  596.         data_skill = $data_skills[get_skill_next_level(count)]
  597.       end
  598.       @data.push(data_skill)
  599.       count += 1
  600.     end
  601.     @item_max = @data.size
  602.     create_contents
  603.     for i in 0...@item_max
  604.       draw_item(i)
  605.     end
  606.   end
  607.   def draw_item(index)
  608.     rect = item_rect(index)
  609.     self.contents.clear_rect(rect)
  610.     object = @data[index]
  611.     if object != nil and object != "arrow"
  612.       rect.width -= 4
  613.       enabled = st_enabled?(index)
  614.       icon = object.icon_index
  615.       draw_icon(icon, rect.x, rect.y, enabled)
  616.       if ST_show_obj_lvl
  617.         save_size_font = self.contents.font.size
  618.         self.contents.font.size = 12
  619.         self.contents.draw_text(rect.x+12, rect.y+13, 12, 12, object_lvl(index), 2)
  620.         self.contents.font.size = save_size_font
  621.       end
  622.     elsif object != nil
  623.       rect.width -= 4
  624.       enabled = at_enabled?(index)
  625.       arrow = @treedata_arrowindex[index]
  626.       draw_arrow(arrow, rect.x, rect.y, enabled)
  627.     end
  628.   end
  629.   def draw_icon(icon_index, x, y, enabled = true)
  630.     bitmap = Cache.system("Iconset")
  631.     rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  632.     self.contents.blt(x, y, bitmap, rect, enabled ? 255 : ST_skill_disabled)
  633.   end
  634.   def draw_arrow(index, x, y, enabled = true)
  635.     bitmap = Cache.load_bitmap("Graphics/System/", "SkillTree", ST_arrow_hue)
  636.     rect = Rect.new(index % 10 * 24, index / 10 * 24, 24, 24)
  637.     self.contents.blt(x, y, bitmap, rect, enabled ? 255 : ST_arrow_disabled)
  638.   end
  639.   def skill
  640.     return @data[self.index]
  641.   end
  642.   def update_help
  643.     if skill == nil or skill == "arrow"
  644.       text_a = ""
  645.     elsif get_skill_actual_level(@index) == "not learned"
  646.       text_a = ST_voc_unl
  647.     else
  648.       actual = $data_skills[get_skill_actual_level(@index)]
  649.       text_a = ST_voc_now + actual.description
  650.       cost_a = actual.mp_cost
  651.     end
  652.     if skill == nil or skill == "arrow"
  653.       text_b = ""
  654.     elsif $sk_lvl == $sk_max_lvl
  655.       text_b = ST_voc_max
  656.     else
  657.       text_b = ST_voc_nex + skill.description
  658.       cost_b = skill.mp_cost
  659.     end
  660.     @help_window.set_text(text_a, text_b, cost_a, cost_b)
  661.   end
  662.   def cursor_down(wrap = false)
  663.     if (@index < @item_max - @column_max) or (wrap and @column_max == 1)
  664.       @index = (@index + (@column_max*3)) % @item_max unless
  665.       @data[(@index + (@column_max*3)) % @item_max] == nil or
  666.       @data[(@index + (@column_max*3)) % @item_max] == "arrow"
  667.       $sk_tree_data_refresh = true
  668.     end
  669.   end
  670.   def cursor_up(wrap = false)
  671.     if (@index >= @column_max) or (wrap and @column_max == 1)
  672.       @index = (@index - (@column_max*3) + @item_max) % @item_max unless
  673.       @data[(@index - (@column_max*3) + @item_max) % @item_max] == nil or
  674.       @data[(@index - (@column_max*3) + @item_max) % @item_max] == "arrow"
  675.       $sk_tree_data_refresh = true
  676.     end
  677.   end
  678.   def cursor_right(wrap = false)
  679.     actual_index = @index +1
  680.     for i in actual_index...@item_max
  681.       unless @data[i] == nil or @data[i] == "arrow"
  682.         @index = (i)
  683.         $sk_tree_data_refresh = true
  684.         break
  685.       end
  686.     end
  687.   end
  688.   def cursor_left(wrap = false)
  689.     actual_index = @index -1
  690.     for i in 0..actual_index
  691.       unless @data[actual_index-i] == nil or @data[actual_index-i] == "arrow"
  692.         @index = (actual_index-i)
  693.         $sk_tree_data_refresh = true
  694.         break
  695.       end
  696.     end
  697.   end
  698. end
  699. #==============================================================================
  700. # ■ Window_SkillTree_Data
  701. #==============================================================================
  702. class Window_SkillTree_Data < Window_Base
  703.   include ST_setup
  704.   def initialize(actor, tree)
  705.     case $game_variables[ST_windows_var]
  706.     when 1
  707.       super(206, 68, 338, 292)
  708.     when 2
  709.       super(0, 124, 338, 292)
  710.     when 3
  711.       super(0, 68, 338, 292)
  712.     when 4
  713.       super(206, 56, 338, 292)
  714.     when 5
  715.       super(206, 0, 338, 292)
  716.     when 6
  717.       super(0, 56, 338, 292)
  718.     when 7
  719.       super(0, 0, 338, 292)
  720.     else
  721.       super(206, 124, 338, 292)
  722.     end
  723.     @actor = actor
  724.     @tree = tree
  725.     refresh
  726.   end
  727.   def refresh
  728.     self.contents.clear
  729.     draw_actor_face(@actor, 0, 0)
  730.     draw_actor_name(@actor, 120, 0)
  731.     draw_actor_level(@actor, 248, 0)
  732.     draw_actor_class(@actor, 120, 24)
  733.     self.contents.draw_text(0, 130, 304, WLH, $sk_lvl.to_s + "/" +
  734.     $sk_max_lvl.to_s)
  735.     self.contents.font.color = text_color(ST_skillname_color)
  736.     self.contents.draw_text(0, 106, 304, WLH, $sk_name)
  737.     self.contents.font.color = system_color
  738.     self.contents.draw_text(120, 72, 184, WLH, ST_voc_cur)
  739.     self.contents.font.color = normal_color
  740.     self.contents.font.color = text_color(ST_zero_sp_color) if
  741.     @actor.st_points < 1
  742.     self.contents.draw_text(120, 72, 184, WLH, @actor.st_points, 2)
  743.     self.contents.font.color = normal_color
  744.     if $sk_req_data[0] == 0 and $sk_req_data[1] == 0 and $sk_req_data[2] == 0 and
  745.       $sk_req_data[3] == 0 and $sk_req_data[4] == 0 and  $sk_req_data[5] == 0
  746.       self.contents.draw_text(0, 153, 304, WLH, ST_voc_max, 1)
  747.     else
  748.       self.contents.draw_text(0, 153, 304, WLH, ST_voc_req, 1)
  749.     end
  750.     self.contents.font.size = 18
  751.     plus = 177
  752.     unless $sk_req_data[4] == 0
  753.       self.contents.draw_text(0, plus, 304, WLH, ST_voc_lvl + $sk_req_data[4].to_s)
  754.       plus += 20
  755.     end
  756.     unless $sk_req_data[5] == 0
  757.       display_name = ST_class_assign[@actor.class_id]
  758.       $sk_req_data[5] == 1 ? points = ST_voc_one : points = ST_voc_many
  759.       self.contents.draw_text(0, plus, 304, WLH, $sk_req_data[5].to_s + points +
  760.       display_name[@tree + 3])
  761.       plus += 20
  762.     end
  763.     unless $sk_req_data[0] == nil or $sk_req_data[1] == nil or $sk_req_data[1] == 0
  764.       $sk_req_data[1] == 1 ? points = ST_voc_one : points = ST_voc_many
  765.       self.contents.draw_text(0, plus, 304, WLH, $sk_req_data[1].to_s +
  766.       points + $sk_req_data[0].to_s)
  767.       plus += 20
  768.     end
  769.     unless $sk_req_data[2] == nil or $sk_req_data[3] == nil or $sk_req_data[1] == 0
  770.       $sk_req_data[3] == 1 ? points = ST_voc_one : points = ST_voc_many
  771.       self.contents.draw_text(0, plus, 304, WLH, $sk_req_data[3].to_s +
  772.       points + $sk_req_data[2].to_s)
  773.     end
  774.     self.contents.font.size = 20
  775.   end
  776. end
  777. class Window_SkillTree_Help < Window_Base
  778.   def initialize
  779.     case $game_variables[ST_setup::ST_windows_var]
  780.     when 4,5,6,7
  781.       super(0, 348, 544, 68)
  782.     else
  783.       super(0, 0, 544, 68)
  784.     end
  785.   end
  786.   def set_text(text_a, text_b, cost_a = nil, cost_b = nil)
  787.     self.contents.clear
  788.     self.contents.font.size = 16
  789.     self.contents.font.color = normal_color
  790.     self.contents.draw_text(0, 0, self.width - 86, 16, text_a)
  791.     self.contents.draw_text(0, 18, self.width - 86, 16, text_b)
  792.     self.contents.draw_text(0, 0, self.width - 32, 16, "(" + cost_a.to_s + " " +
  793.     Vocab::mp + ")", 2) unless cost_a == nil
  794.     self.contents.draw_text(0, 18, self.width - 32, 16, "(" + cost_b.to_s + " " +
  795.     Vocab::mp + ")", 2) unless cost_b == nil
  796.   end
  797. end

  798. #==============================================================================
  799. # ■ Window_Tree_Selection
  800. #==============================================================================
  801. class Window_Tree_Selection < Window_Selectable
  802.   def initialize(actor, tree)
  803.     case $game_variables[ST_setup::ST_windows_var]
  804.     when 1
  805.       super(206, 360, 338, 56)
  806.     when 2
  807.       super(0, 68, 338, 56)
  808.     when 3
  809.       super(0, 360, 338, 56)
  810.     when 4
  811.       super(206, 0, 338, 56)
  812.     when 5
  813.       super(206, 292, 338, 56)
  814.     when 6
  815.       super(0, 0, 338, 56)
  816.     when 7
  817.       super(0, 292, 338, 56)
  818.     else
  819.       super(206, 68, 338, 56)
  820.     end
  821.     @actor = actor
  822.     @column_max = 3
  823.     self.index = tree
  824.     refresh
  825.   end
  826.   def refresh
  827.     @data = []
  828.     display_name = ST_setup::ST_class_assign[@actor.class_id]
  829.     for name in 0..2
  830.       @data.push(display_name[name + 3])
  831.     end
  832.     create_contents
  833.     for i in 0..2
  834.       draw_item(i)
  835.     end
  836.   end
  837.   def draw_item(index)
  838.     rect = item_rect(index)
  839.     self.contents.clear_rect(rect)
  840.     tree = @data[index]
  841.     if tree != nil
  842.       if @index == index and ST_setup::ST_tree_selection == 2
  843.         self.contents.font.color = text_color(ST_setup::ST_treeselection_color)
  844.       else
  845.         self.contents.font.color = normal_color
  846.       end
  847.       self.contents.draw_text(rect, tree, 1)
  848.     end
  849.   end
  850.   def cursor_down(wrap = false)
  851.   end
  852.   def cursor_up(wrap = false)
  853.   end
  854.   def cursor_right(wrap = false)
  855.   end
  856.   def cursor_left(wrap = false)
  857.   end
  858.   def update_cursor
  859.     return if ST_setup::ST_tree_selection == 2
  860.     if @index < 0                   # If the cursor position is less than 0
  861.       self.cursor_rect.empty        # Empty cursor
  862.     else                            # If the cursor position is 0 or more
  863.       row = @index / @column_max    # Get current row
  864.       if row < top_row              # If before the currently displayed
  865.         self.top_row = row          # Scroll up
  866.       end
  867.       if row > bottom_row           # If after the currently displayed
  868.         self.bottom_row = row       # Scroll down
  869.       end
  870.       rect = item_rect(@index)      # Get rectangle of selected item
  871.       rect.y -= self.oy             # Match rectangle to scroll position
  872.       self.cursor_rect = rect       # Refresh cursor rectangle
  873.     end
  874.   end
  875. end

  876. #==============================================================================
  877. # ■ Window_NoSkillTree
  878. #==============================================================================
  879. class Scene_NoSkillTree < Scene_Base
  880.   def initialize(actor_index, return_to_map = false)
  881.     @actor_index = actor_index
  882.     @return_to_map = return_to_map
  883.   end
  884.   def update_notree_warn
  885.     if Input.trigger?(Input::B)
  886.       Sound.play_cancel
  887.       if @return_to_map
  888.         $scene = Scene_Map.new
  889.       else
  890.         $scene = Scene_Menu.new(ST_setup::ST_menu_pos)
  891.       end
  892.     elsif Input.trigger?(Input::C)
  893.       Sound.play_decision
  894.       if @return_to_map
  895.         $scene = Scene_Map.new
  896.       else
  897.         $scene = Scene_Menu.new(ST_setup::ST_menu_pos)
  898.       end
  899.     end
  900.   end
  901.   def start
  902.     unless ST_setup::ST_notalents_popup
  903.       Sound.play_cancel
  904.       if @return_to_map
  905.         $scene = Scene_Map.new
  906.       else
  907.         $scene = Scene_Menu.new(ST_setup::ST_menu_pos)
  908.       end
  909.       terminate
  910.       return
  911.     end
  912.     super
  913.     create_menu_background
  914.     @actor = $game_party.members[@actor_index]
  915.     @notree_window = Window_Command.new(200, [ST_setup::ST_voc_noSTpop], 1)
  916.     @notree_window.viewport = @viewport
  917.     @notree_window.x = Graphics.width / 2 - @notree_window.width / 2
  918.     @notree_window.y = Graphics.height / 2 - 20
  919.     @notree_window_head = Window_Base.new(0, @notree_window.y - @notree_window.height,
  920.     Graphics.width, @notree_window.height)
  921.     @notree_window_head.create_contents
  922.     if ST_setup::ST_notalents_popAN
  923.       @notree_window_head.contents.draw_text(0, 0, @notree_window_head.contents.width,
  924.       @notree_window_head.contents.height, ST_setup::ST_voc_noSTpop_pre + @actor.name +
  925.       ST_setup::ST_voc_noSTpop_pos, 1)
  926.     else
  927.       @notree_window_head.contents.draw_text(0, 0, @notree_window_head.contents.width,
  928.       @notree_window_head.contents.height, ST_setup::ST_voc_noSTpop_pre +
  929.       ST_setup::ST_voc_noSTpop_pos, 1)
  930.     end
  931.     update_notree_warn
  932.   end
  933.   def update
  934.     super
  935.     update_menu_background
  936.     @notree_window.update if ST_setup::ST_notalents_popup
  937.     update_notree_warn
  938.   end
  939.   def terminate
  940.     super
  941.     if ST_setup::ST_notalents_popup
  942.       @notree_window.dispose
  943.       @notree_window_head.dispose
  944.     end
  945.   end
  946. end
  947. #==============================================================================
  948. # ■ Scene_SkillTree
  949. #==============================================================================
  950. class Scene_SkillTree < Scene_Base
  951.   def initialize(actor_index, return_to_map = false)
  952.     @actor_index = actor_index
  953.     @return_to_map = return_to_map
  954.     $sk_name = ""
  955.     $sk_req_data = []
  956.     $sk_tree_data_refresh = false
  957.   end
  958.   def start
  959.     @actor = $game_party.members[@actor_index]
  960.     unless ST_setup::ST_class_assign.include?(@actor.class_id)
  961.       $scene = Scene_NoSkillTree.new(@actor_index, @return_to_map)
  962.       terminate
  963.       return
  964.     end
  965.     super
  966.     create_menu_background
  967.     @tree_index = @actor.get_last_tree_id
  968.     @viewport = Viewport.new(0, 0, 544, 416)
  969.     if ST_setup::ST_imageback != false
  970.       tree_name = ST_setup::ST_class_assign[@actor.class_id]
  971.       @back_img = Sprite.new
  972.       @back_img.bitmap = Bitmap.new("Graphics/System/" + tree_name[@tree_index])
  973.       @back_img.opacity = ST_setup::ST_imageback
  974.       @back_img.viewport = @viewport
  975.     end
  976.     @help_window = Window_SkillTree_Help.new
  977.     @help_window.viewport = @viewport
  978.     @skilltree_window = Window_SkillTree_Main.new(@actor, @tree_index)
  979.     @skilltree_window.viewport = @viewport
  980.     @skilltree_window.help_window = @help_window
  981.     @skilltree_window_data = Window_SkillTree_Data.new(@actor, @tree_index)
  982.     @skilltree_window_data.viewport = @viewport
  983.     @skilltree_window_tree = Window_Tree_Selection.new(@actor, @tree_index)
  984.     @skilltree_window_tree.viewport = @viewport
  985.     if ST_setup::ST_imageback != false
  986.       @back_img.x = @skilltree_window.x
  987.       @back_img.y = @skilltree_window.y
  988.     end
  989.     if ST_setup::ST_confirm_popup
  990.       @confirm_window = Window_Command.new(200, [ST_setup::ST_voc_ok,
  991.       ST_setup::ST_voc_cancel], 2)
  992.       @confirm_window.viewport = @viewport
  993.       @confirm_window.x = Graphics.width / 2 - @confirm_window.width / 2
  994.       @confirm_window.y = Graphics.height / 2 - 20
  995.       @confirm_window.active = false
  996.       @confirm_window.visible = false
  997.       @confirm_window_head = Window_Base.new(@confirm_window.x,
  998.       @confirm_window.y - @confirm_window.height, @confirm_window.width, @confirm_window.height)
  999.       @confirm_window_head.create_contents
  1000.       @confirm_window_head.contents.draw_text(0, 0, @confirm_window_head.contents.width,
  1001.       @confirm_window_head.contents.height, ST_setup::ST_voc_q, 1)
  1002.       @confirm_window_head.visible = false
  1003.     end
  1004.     actualize_data_window
  1005.   end
  1006.   def terminate
  1007.     super
  1008.     if ST_setup::ST_class_assign.include?(@actor.class_id)
  1009.       dispose_menu_background
  1010.       @help_window.dispose
  1011.       @skilltree_window.dispose
  1012.       @skilltree_window_data.dispose
  1013.       @skilltree_window_tree.dispose
  1014.       @back_img.dispose if ST_setup::ST_imageback != false
  1015.       @confirm_window.dispose if ST_setup::ST_confirm_popup
  1016.       @confirm_window_head.dispose if ST_setup::ST_confirm_popup
  1017.     end
  1018.   end
  1019.   def next_tree
  1020.     class_tree_assign = ST_setup::ST_class_assign[@actor.class_id]
  1021.     for i in 1...3
  1022.       @tree_index += i
  1023.       @tree_index %= 3
  1024.       tree_name = class_tree_assign[@tree_index]
  1025.       break if tree_name != nil
  1026.     end
  1027.     @actor.last_tree_id(@tree_index)
  1028.     $scene = Scene_SkillTree.new(@actor_index, @return_to_map)
  1029.   end
  1030.   def prev_tree
  1031.     class_tree_assign = ST_setup::ST_class_assign[@actor.class_id]
  1032.     for i in 1...3
  1033.       @tree_index -= i
  1034.       @tree_index %= 3
  1035.       tree_name = class_tree_assign[@tree_index]
  1036.       break if tree_name != nil
  1037.     end
  1038.     @actor.last_tree_id(@tree_index)
  1039.     $scene = Scene_SkillTree.new(@actor_index, @return_to_map)
  1040.   end
  1041.   def update
  1042.     return unless ST_setup::ST_class_assign.include?(@actor.class_id)
  1043.     super
  1044.     update_menu_background
  1045.     if @skilltree_window.active
  1046.       @skilltree_window.update
  1047.       @skilltree_window_tree.update unless ST_setup::ST_tree_selection == 1
  1048.       @back_img.update if ST_setup::ST_imageback != false
  1049.       update_skilltree_selection
  1050.     elsif @confirm_window.active
  1051.       @confirm_window.update
  1052.       update_confirm_selection
  1053.     end
  1054.     if $sk_tree_data_refresh != false
  1055.       actualize_data_window
  1056.       $sk_tree_data_refresh = false
  1057.     end
  1058.   end
  1059.   def update_skilltree_selection
  1060.     if Input.trigger?(Input::B)
  1061.       Sound.play_cancel
  1062.       if @return_to_map
  1063.         $scene = Scene_Map.new
  1064.       else
  1065.         $scene = Scene_Menu.new(ST_setup::ST_menu_pos)
  1066.       end
  1067.     elsif Input.trigger?(Input::R)
  1068.       Sound.play_cursor
  1069.       next_tree
  1070.     elsif Input.trigger?(Input::L)
  1071.       Sound.play_cursor
  1072.       prev_tree
  1073.     elsif Input.trigger?(Input::C)
  1074.       actual_st_index = @skilltree_window.index
  1075.       if @skill != nil
  1076.         @actor.last_skill_id = @skill
  1077.       end
  1078.       if @skilltree_window.st_enabled?(actual_st_index) and
  1079.         @actor.st_points > 0 and
  1080.         @skilltree_window.get_skill_next_level(actual_st_index) != "maxed" and
  1081.         ST_setup::ST_confirm_popup == false
  1082.         Sound.play_decision
  1083.         do_skill_up
  1084.       elsif @skilltree_window.st_enabled?(actual_st_index) and
  1085.         @actor.st_points > 0 and
  1086.         @skilltree_window.get_skill_next_level(actual_st_index) != "maxed" and
  1087.         ST_setup::ST_confirm_popup
  1088.         Sound.play_decision
  1089.         start_confirm_selection
  1090.       else
  1091.         Sound.play_buzzer
  1092.       end
  1093.     end
  1094.   end
  1095.   def actualize_data_window
  1096.     actual_st_index = @skilltree_window.index
  1097.     sk_id = @skilltree_window.skill
  1098.     $sk_name = sk_id.name
  1099.     $sk_lvl = @skilltree_window.object_lvl(actual_st_index)
  1100.     $sk_max_lvl = @skilltree_window.object_max_lvl(actual_st_index)
  1101.     $sk_req_data = @skilltree_window.object_dad_req(actual_st_index)
  1102.     @skilltree_window_data.refresh
  1103.     @skilltree_window_tree.refresh
  1104.   end
  1105.   def start_confirm_selection
  1106.     @skilltree_window.active = false
  1107.     @skilltree_window_tree.active = false
  1108.     @confirm_window.visible = true
  1109.     @confirm_window.active = true
  1110.     @confirm_window_head.visible = true
  1111.   end
  1112.   def end_confirm_selection
  1113.     @skilltree_window.active = true
  1114.     @skilltree_window_tree.active = true
  1115.     @confirm_window.visible = false
  1116.     @confirm_window.active = false
  1117.     @confirm_window_head.visible = false
  1118.     @confirm_window.index = 0
  1119.   end
  1120.   def update_confirm_selection
  1121.     if Input.trigger?(Input::B)
  1122.       Sound.play_cancel
  1123.       end_confirm_selection
  1124.     elsif Input.trigger?(Input::C)
  1125.       if @confirm_window.index == 0
  1126.         if @skill != nil
  1127.           @actor.last_skill_id = @skill
  1128.         end
  1129.         Sound.play_decision
  1130.         do_skill_up
  1131.       else
  1132.         Sound.play_cancel
  1133.       end
  1134.       end_confirm_selection
  1135.     end
  1136.   end
  1137.   def do_skill_up
  1138.     @skill = @skilltree_window.skill
  1139.     actual_st_index = @skilltree_window.index
  1140.     actual_skill = @skilltree_window.get_skill_actual_level(actual_st_index)
  1141.     @actor.forget_tree_skill(actual_skill) unless actual_skill == "not learned"
  1142.     @actor.learn_tree_skill(@skill.id)
  1143.     @skilltree_window.refresh
  1144.     actualize_data_window
  1145.   end
  1146. end

  1147. module ST_command
  1148.   
  1149.   WAYS = { :position=>0, :name=>1, :id=>2 }
  1150.   
  1151.   def self.show(way, dude, to_map = false)
  1152.     way = WAYS[way] if way.is_a? Symbol
  1153.     case way
  1154.     when 0
  1155.       $scene = Scene_SkillTree.new(dude, to_map)
  1156.     when 1
  1157.       for actor in $game_party.members
  1158.         if actor.name == dude
  1159.           $scene = Scene_SkillTree.new(actor.index, to_map)
  1160.         end
  1161.       end
  1162.     when 2
  1163.       if $game_party.members.include?($game_actors[dude])
  1164.         $scene = Scene_SkillTree.new($game_actors[dude].index, to_map)
  1165.       end
  1166.     end
  1167.   end
  1168.   def self.reward(way, dude, amount = 1)
  1169.     way = WAYS[way] if way.is_a? Symbol
  1170.     case way
  1171.     when 0
  1172.       $game_party.members[dude].reward_st_points(amount)
  1173.     when 1
  1174.       for actor in $game_party.members
  1175.         if actor.name == dude
  1176.           actor.reward_st_points(amount)
  1177.         end
  1178.       end
  1179.     when 2
  1180.       if $game_party.members.include?($game_actors[dude])
  1181.         $game_actors[dude].reward_st_points(amount)
  1182.       end
  1183.     end
  1184.   end
  1185.   def self.reward_party(amount = 1)
  1186.     for member in $game_party.members
  1187.       member.reward_st_points(amount)
  1188.     end
  1189.   end
  1190.   def self.reset(way, dude)
  1191.     way = WAYS[way] if way.is_a? Symbol
  1192.     case way
  1193.     when 0
  1194.       $game_party.members[dude].reset_skill_trees
  1195.     when 1
  1196.       for actor in $game_party.members
  1197.         if actor.name == dude
  1198.           actor.reset_skill_trees
  1199.         end
  1200.       end
  1201.     when 2
  1202.       if $game_party.members.include?($game_actors[dude])
  1203.         $game_actors[dude].reset_skill_trees
  1204.       end
  1205.     end
  1206.   end
  1207.   def self.reset_party
  1208.     for member in $game_party.members
  1209.       member.reset_skill_trees
  1210.     end
  1211.   end
  1212. end
复制代码

点评

已经汉化完毕了啦~  发表于 2011-7-8 08:13

评分

参与人数 1+1 收起 理由
129s + 1 我很赞同

查看全部评分


See FScript Here:https://github.com/DeathKing/fscript
潜心编写URG3中。
所有对URG3的疑问和勘误或者建议,请移步至发布页面。
欢迎萌妹纸催更

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1031 小时
注册时间
2011-3-22
帖子
1069
2
发表于 2011-7-7 17:18:18 | 只看该作者
本帖最后由 sim5053 于 2011-7-7 17:23 编辑

要了~~~~~~~~谢了~~~~~~~~

警告!企鹅是很多滴~请注意是否是正身~
回复 支持 反对

使用道具 举报

Lv4.逐梦者

醉啸 长风万里

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

贵宾

3
发表于 2011-7-7 19:48:10 | 只看该作者
终于等到了,死君你慢了

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

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
6795
在线时间
1666 小时
注册时间
2008-10-29
帖子
6710

贵宾

4
发表于 2011-7-7 20:03:30 | 只看该作者
如果这个只是一个纯汉化的工作的话.那么这个帖子会被转移去地球村.

如果这个工程里有你的新增原创内容.将此部分内容说明出来则可留在本区.
并建议将标题中的汉化去掉或修改为增强等其他文字.

点评

ms死君做了一次更新吧,注释里是这么写的...  发表于 2011-7-7 20:23











你知道得太多了

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
416 小时
注册时间
2006-10-21
帖子
1245
5
发表于 2011-7-7 20:28:16 | 只看该作者
闲逛看到了。。
学习!
回头看了看我的那个豆腐渣烂尾工程。。。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1150
在线时间
1564 小时
注册时间
2008-7-30
帖子
4418

贵宾

6
 楼主| 发表于 2011-7-7 21:51:21 手机端发表。 | 只看该作者
本帖最后由 DeathKing 于 2011-7-7 21:52 编辑

当然不是纯汉化。比较纠结的是的确添加了一些增强功能,而且按照作者的意思,他希望我能维护此脚本的中文版本,所以就放到了VX区。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
175 小时
注册时间
2011-1-23
帖子
46
7
发表于 2011-7-7 22:50:08 | 只看该作者
当真犀利,虽然我还不太懂,但是看上去很好,嘿嘿~~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
65
在线时间
526 小时
注册时间
2007-12-24
帖子
158
8
发表于 2011-7-8 13:49:05 | 只看该作者
每隔一段时间来 就会看到好东西
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
290
在线时间
3599 小时
注册时间
2012-2-29
帖子
3385

黄金编剧

9
发表于 2012-7-29 21:31:13 | 只看该作者
本帖最后由 ·雾逝者· 于 2012-8-1 16:41 编辑

↓楼下的问题可能会影响到GM的使用,请尽量的解答一下~
简化 高效 简约 便捷,为用户体验而思考。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
290
在线时间
3599 小时
注册时间
2012-2-29
帖子
3385

黄金编剧

10
发表于 2012-8-1 16:40:37 | 只看该作者
简化 高效 简约 便捷,为用户体验而思考。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-10-1 07:32

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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