查看: 2393|回复: 6

[已经解决] 请教:关于ACE的一些术语什么的注解

[复制链接]
梦石
0
星屑
50
在线时间
58 小时
注册时间
2013-10-24
回帖
28
发表于 2013-11-2 15:50:36 | 显示全部楼层 |阅读模式

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

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

×
接触一个性格脚本
里面一些东西看不懂,希望大神能指教

比如下面代码中
        :preserve_tp
        :init_tp   
        :regen_tp   
        :take_hp_dmg
        :deal_hp_dmg
        :heal_hp_dmg
        :ally_hp_dmg
        :take_mp_dmg
        :deal_mp_dmg
        :heal_mp_dmg
        :ally_mp_dmg
        :deal_state
        :gain_state
        :kill_ally  
        :kill_enemy
        :win_battle
        :flee_battle
        :lose_battle
        :low_hp_turn
        :low_mp_turn
        :only_alive  
        :evasion   
这些单词的含义

可以的话 请注释下面的代码。谢谢
  1.     # -------------------------------------------------------------------------
  2.       1 => { # New TP mode!
  3.       # :setting     => Adjust settings as you see fit.
  4.         :name        => "难友",
  5.         :icon        => 122,
  6.         :description => "每当同伴受伤都增加TP.",
  7.         :preserve_tp => true,
  8.         :init_tp     => "0",
  9.         :regen_tp    => "0",
  10.         :take_hp_dmg => "0",
  11.         :deal_hp_dmg => "0",
  12.         :heal_hp_dmg => "0",
  13.         :ally_hp_dmg => "20 * tcr",
  14.         :take_mp_dmg => "0",
  15.         :deal_mp_dmg => "0",
  16.         :heal_mp_dmg => "0",
  17.         :ally_mp_dmg => "0",
  18.         :deal_state  => "0",
  19.         :gain_state  => "0",
  20.         :kill_ally   => "0",
  21.         :kill_enemy  => "0",
  22.         :win_battle  => "0",
  23.         :flee_battle => "0",
  24.         :lose_battle => "0",
  25.         :low_hp_turn => "0",
  26.         :low_mp_turn => "0",
  27.         :only_alive  => "0",
  28.         :evasion     => "0",
  29.       }, # Do not remove this.
  30.     # -------------------------------------------------------------------------
复制代码

百合控

梦石
0
星屑
6548
在线时间
1275 小时
注册时间
2013-8-21
回帖
3522

开拓者

发表于 2013-11-2 16:08:02 | 显示全部楼层
目测是脚本内用的,如果不给全的话很难了解什么意思
【目测是yanfly的TP Manager
  1.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  2.     # - TP Modes -
  3.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  4.     # TP modes have a number of things that can change the way actors gain TP.
  5.     # Adjust the settings below to change how much gain and loss incurs per
  6.     # each of the different actions.
  7.     #
  8.     # Setting        Description
  9.     # -------------------------------------------------------------------------
  10.     # - :name        - Name that appears in the TP Mode menu.
  11.     # - :icon        - Icon used for the TP Mode menu.
  12.     # - :description - Help window description. Use \n for line breaks.
  13.     # - :preserve_tp - Carry over TP from last battle to next battle?
  14.     # - :init_tp     - TP at the start of each battle if no TP preservation.
  15.     # - :regen_tp    - TP regenerated each turn. Uses a formula.
  16.     # - :take_hp_dmg - TP charged by receiving HP damage. Uses a formula.
  17.     # - :deal_hp_dmg - TP gained by dealing HP damage. Uses a formula.
  18.     # - :heal_hp_dmg - TP gained through healing HP damage. Uses a formula.
  19.     # - :ally_hp_dmg - TP gained when allies take HP damage. Uses a formula.
  20.     # - :take_mp_dmg - TP charged by receiving MP damage. Uses a formula.
  21.     # - :deal_mp_dmg - TP gained by dealing MP damage. Uses a formula.
  22.     # - :heal_mp_dmg - TP gained through healing MP damage. Uses a formula.
  23.     # - :ally_mp_dmg - TP gained when allies take MP damage. Uses a formula.
  24.     # - :deal_state  - TP gained when user inflicts a state to a foe. Formula.
  25.     # - :gain_state  - TP gained when user gains a state from a foe. Formula.
  26.     # - :kill_ally   - TP gained when an ally is killed. Uses a formula.
  27.     # - :kill_enemy  - TP gained when killing an enemy. Uses a formula.
  28.     # - :win_battle  - TP gained whenever a battle is won. Uses a formula.
  29.     # - :flee_battle - TP gained whenever party escapes. Uses a formula.
  30.     # - :lose_battle - TP gained whenever a battle is lost. Uses a formula.
  31.     # - :low_hp_turn - TP gained at the end of a turn with user at low HP.
  32.     # - :low_mp_turn - TP gained at the end of a turn with user at low MP.
  33.     # - :only_ally   - TP gained when user is only ally alive.
  34.     # - :evasion     - TP gained when user evades an attack.
  35.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
复制代码
这里都有内置介绍的,英文不懂就用翻译】
最后想和楼主说一句,插件脚本的问题最好附上整个脚本,不然世界这么大你叫我上哪找去?这是你用的脚本比较有影响力,换别的脚本谁也没辙
而且只节选部分发表很容易让你看上去很自私,没礼貌,所以我不怎么想给你翻译
萌新瑟瑟发抖
看到我请叫我去干活
回复

使用道具 举报

梦石
1
星屑
23371
在线时间
9572 小时
注册时间
2012-6-19
回帖
7021

开拓者短篇九导演组冠军

发表于 2013-11-2 16:54:25 | 显示全部楼层
你给的这些不是术语,是脚本作者自己给自己的变量常量定义的名字,你直接给出来谁看的懂啊……
这些东西的解释在脚本的注释中肯定有给
回复

使用道具 举报

梦石
0
星屑
50
在线时间
58 小时
注册时间
2013-10-24
回帖
28
 楼主| 发表于 2013-11-2 20:14:36 | 显示全部楼层
本帖最后由 76213585 于 2013-11-2 11:27 编辑

完整脚本如下  用英文翻译确实蛋疼得紧
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - TP Manager v1.02
  4. # -- Last Updated: 2011.12.10
  5. # -- Level: Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-TPManager"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2011.12.10 - Added <tp cost: x> notetag.
  15. # 2011.12.06 - Fixed an error in one of the formulas.
  16. # 2011.12.05 - Started Script and Finished.
  17. #
  18. #==============================================================================
  19. # ▼ Introduction
  20. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  21. # The TP system in RPG Maker VX Ace is actually rather limiting. A lot of the
  22. # system is hardcoded in giving Ace users very little control over how much TP
  23. # gain a battler can receive from particular actions and situations. This
  24. # script gives you the ability to adjust how much TP actors will acquire from
  25. # various actions, different TP modes, and letting players select and pick what
  26. # TP mode they want for each actor (akin to Final Fantasy X).
  27. #
  28. #==============================================================================
  29. # ▼ Instructions
  30. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  31. # To install this script, open up your script editor and copy/paste this script
  32. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  33. #
  34. # -----------------------------------------------------------------------------
  35. # Actor Notetags - These notetags go in the actors notebox in the database.
  36. # -----------------------------------------------------------------------------
  37. # <tp mode: x>
  38. # This sets the actor's default TP mode to x. If this tag isn't used, the
  39. # default TP mode will be set to whatever the module uses as default.
  40. #
  41. # <unlock tp: x>
  42. # <unlock tp: x, x>
  43. # This unlocks what TP modes the actor can use by default. If this tag isn't
  44. # used, the default unlocked TP modes will be whatever the module uses.
  45. #
  46. # -----------------------------------------------------------------------------
  47. # Item Notetags - These notetags go in the item notebox in the database.
  48. # -----------------------------------------------------------------------------
  49. # <unlock tp: x>
  50. # <unlock tp: x, x>
  51. # When this item is used upon an actor, that actor will learn TP Mode(s) x,
  52. # making it available to change in the TP Menu.
  53. #
  54. # -----------------------------------------------------------------------------
  55. # Skill Notetags - These notetags go in the skill notebox in the database.
  56. # -----------------------------------------------------------------------------
  57. # <unlock tp: x>
  58. # <unlock tp: x, x>
  59. # When this skill targets an actor, that actor will learn TP Mode(s) x thus,
  60. # making it available to change in the TP Menu.
  61. #
  62. # <learn unlock tp: x>
  63. # <learn unlock tp: x, x>
  64. # When an actor learns a skill with this notetag, that actor will learn
  65. # TP Mode(s) x making it available to change in the TP Menu.
  66. #
  67. # <tp cost: x>
  68. # When this notetag appears in a skill's notebox, the TP cost for that skill
  69. # becomes x. This notetag allows TP costs to surpass 100 TP, which is the max
  70. # TP cost in the RPG Maker VX Ace database editor.
  71. #
  72. # -----------------------------------------------------------------------------
  73. # Enemy Notetags - These notetags go in the enemy notebox in the database.
  74. # -----------------------------------------------------------------------------
  75. # <tp mode: x>
  76. # This sets the enemy's default TP mode to x. If this tag isn't used, the
  77. # default TP mode will be set to whatever the module uses as default.
  78. #
  79. # -----------------------------------------------------------------------------
  80. # Script Calls - These commands are used with script calls.
  81. # -----------------------------------------------------------------------------
  82. # change_tp_mode(x, y)
  83. # Replace x with the ID of the actor you want to change to the TP Mode y. This
  84. # will also unlock the TP mode for the actor, and make it available under the
  85. # skill menu for changing.
  86. #
  87. # unlock_tp_mode(x, y)
  88. # Replace x with the ID of the actor you want to learn for the TP Mode y. This
  89. # will cause the actor to learn the TP mode and have it accessible in the skill
  90. # menu for changing.
  91. #
  92. # remove_tp_mode(x, y)
  93. # Replace x with the ID of the actor you want to remove the TP Mode y. This
  94. # will cause the actor to forget the TP mode and no longer have it accessible
  95. # through the skill menu for changing.
  96. #
  97. # unlock_all_tp_modes(x)
  98. # Replace x with the ID of the actor you want to unlock all TP modes for. This
  99. # will make all the TP modes available to the actor from the skill menu.
  100. #
  101. # remove_all_tp_modes(x)
  102. # Removes all TP modes for actor x except for the actor's default TP mode.
  103. # This removes all TP modes from being available in the actor's skill menu.
  104. #
  105. #==============================================================================
  106. # ▼ Compatibility
  107. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  108. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  109. # it will run with RPG Maker VX without adjusting.
  110. #
  111. #==============================================================================

  112. module YEA
  113.   module TP_MANAGER
  114.    
  115.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  116.     # - General TP Settings -
  117.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  118.     # Here, you can adjust global settings for TP including the maximum TP,
  119.     # whether or not you want the player to change TP modes, and more.
  120.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  121.     TP_LIMIT  = 100         # Sets the maximum TP. Default: 100
  122.     DEFAULT_TP_MODE = 0            # This is the TP mode everybody starts with
  123.                                    # unless changed through notetags.
  124.     DEFAULT_UNLOCKS = [0, 1, 2, 3,4,5,6,7,8,9,10,11,12,13,14,15,]
  125.     # These modes are unlocked for all actors
  126.                                    # unless changed through notetags.
  127.     LOW_HP = 0.25           # Percent for what is considered low HP.
  128.     LOW_MP = 0.25           # Percent for what is considered low MP.
  129.    
  130.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  131.     # - TP Mode Change Settings -
  132.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  133.     # Adjust the settings here for TP Mode Menu related items. Also, be sure
  134.     # to bind the TP_MODE_SWITCH to a switch ID. If that switch is on, the
  135.     # TP Mode item will appear in the skill menu. If off, it won't appear.
  136.     # If you set it to 0, then TP mode will always be enabled.
  137.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  138.     MENU_NAME = "性格"   # The displayed name for the TP Menu.
  139.     TP_MODE_SWITCH  = 0     # Switch ID used for enabling TP Mode menu.
  140.     DEFAULT_ENABLE  = true  # Enable switch by default?
  141.     CHANGE_TP_RESET = true  # Reset TP to 0 whenever a mode is changed?
  142.     EQUIPPED_COLOUR = 17    # Window text colour used for equipped TP mode.
  143.    
  144.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  145.     # - TP Modes -
  146.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  147.     # TP modes have a number of things that can change the way actors gain TP.
  148.     # Adjust the settings below to change how much gain and loss incurs per
  149.     # each of the different actions.
  150.     #
  151.     # Setting        Description
  152.     # -------------------------------------------------------------------------
  153.     # - :name        - Name that appears in the TP Mode menu.
  154.     # - :icon        - Icon used for the TP Mode menu.
  155.     # - :description - Help window description. Use \n for line breaks.
  156.     # - :preserve_tp - Carry over TP from last battle to next battle?
  157.     # - :init_tp     - TP at the start of each battle if no TP preservation.
  158.     # - :regen_tp    - TP regenerated each turn. Uses a formula.
  159.     # - :take_hp_dmg - TP charged by receiving HP damage. Uses a formula.
  160.     # - :deal_hp_dmg - TP gained by dealing HP damage. Uses a formula.
  161.     # - :heal_hp_dmg - TP gained through healing HP damage. Uses a formula.
  162.     # - :ally_hp_dmg - TP gained when allies take HP damage. Uses a formula.
  163.     # - :take_mp_dmg - TP charged by receiving MP damage. Uses a formula.
  164.     # - :deal_mp_dmg - TP gained by dealing MP damage. Uses a formula.
  165.     # - :heal_mp_dmg - TP gained through healing MP damage. Uses a formula.
  166.     # - :ally_mp_dmg - TP gained when allies take MP damage. Uses a formula.
  167.     # - :deal_state  - TP gained when user inflicts a state to a foe. Formula.
  168.     # - :gain_state  - TP gained when user gains a state from a foe. Formula.
  169.     # - :kill_ally   - TP gained when an ally is killed. Uses a formula.
  170.     # - :kill_enemy  - TP gained when killing an enemy. Uses a formula.
  171.     # - :win_battle  - TP gained whenever a battle is won. Uses a formula.
  172.     # - :flee_battle - TP gained whenever party escapes. Uses a formula.
  173.     # - :lose_battle - TP gained whenever a battle is lost. Uses a formula.
  174.     # - :low_hp_turn - TP gained at the end of a turn with user at low HP.
  175.     # - :low_mp_turn - TP gained at the end of a turn with user at low MP.
  176.     # - :only_ally   - TP gained when user is only ally alive.
  177.     # - :evasion     - TP gained when user evades an attack.
  178.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  179.     TP_MODES ={
  180.     # TP Mode => { Settings }
  181.     # -------------------------------------------------------------------------
  182.       0 => { # This is the default mode.
  183.       # :setting     => Adjust settings as you see fit.
  184.         :name        => "苦行僧",
  185.         :icon        => 121,
  186.         :description => "在等待或者受到攻击时增加TP.",
  187.         :preserve_tp => false,
  188.         :init_tp     => "rand * 25",
  189.         :regen_tp    => "100 * trg",
  190.         :take_hp_dmg => "50 * damage_rate * tcr",
  191.         :deal_hp_dmg => "0",
  192.         :heal_hp_dmg => "0",
  193.         :ally_hp_dmg => "0",
  194.         :take_mp_dmg => "0",
  195.         :deal_mp_dmg => "0",
  196.         :heal_mp_dmg => "0",
  197.         :ally_mp_dmg => "0",
  198.         :deal_state  => "0",
  199.         :gain_state  => "0",
  200.         :kill_ally   => "0",
  201.         :kill_enemy  => "0",
  202.         :win_battle  => "0",
  203.         :flee_battle => "0",
  204.         :lose_battle => "0",
  205.         :low_hp_turn => "0",
  206.         :low_mp_turn => "0",
  207.         :only_alive  => "0",
  208.         :evasion     => "0",
  209.       }, # Do not remove this.
  210.     # -------------------------------------------------------------------------
  211.       1 => { # New TP mode!
  212.       # :setting     => Adjust settings as you see fit.
  213.         :name        => "难友",
  214.         :icon        => 122,
  215.         :description => "每当同伴受伤都增加TP.",
  216.         :preserve_tp => true,
  217.         :init_tp     => "0",
  218.         :regen_tp    => "0",
  219.         :take_hp_dmg => "0",
  220.         :deal_hp_dmg => "0",
  221.         :heal_hp_dmg => "0",
  222.         :ally_hp_dmg => "20 * tcr",
  223.         :take_mp_dmg => "0",
  224.         :deal_mp_dmg => "0",
  225.         :heal_mp_dmg => "0",
  226.         :ally_mp_dmg => "0",
  227.         :deal_state  => "0",
  228.         :gain_state  => "0",
  229.         :kill_ally   => "0",
  230.         :kill_enemy  => "0",
  231.         :win_battle  => "0",
  232.         :flee_battle => "0",
  233.         :lose_battle => "0",
  234.         :low_hp_turn => "0",
  235.         :low_mp_turn => "0",
  236.         :only_alive  => "0",
  237.         :evasion     => "0",
  238.       }, # Do not remove this.
  239.     # -------------------------------------------------------------------------
  240.       2 => { # New TP mode!
  241.       # :setting     => Adjust settings as you see fit.
  242.         :name        => "勇者",
  243.         :icon        => 116,
  244.         :description => "进攻和治疗时增加TP.",
  245.         :preserve_tp => true,
  246.         :init_tp     => "0",
  247.         :regen_tp    => "0",
  248.         :take_hp_dmg => "0",
  249.         :deal_hp_dmg => "[@result.hp_damage * 100 / mhp, 16].min * tcr",
  250.         :heal_hp_dmg => "0",
  251.         :ally_hp_dmg => "0",
  252.         :take_mp_dmg => "0",
  253.         :deal_mp_dmg => "0",
  254.         :heal_mp_dmg => "0",
  255.         :ally_mp_dmg => "0",
  256.         :deal_state  => "0",
  257.         :gain_state  => "0",
  258.         :kill_ally   => "0",
  259.         :kill_enemy  => "0",
  260.         :win_battle  => "0",
  261.         :flee_battle => "0",
  262.         :lose_battle => "0",
  263.         :low_hp_turn => "0",
  264.         :low_mp_turn => "0",
  265.         :only_alive  => "0",
  266.         :evasion     => "0",
  267.       }, # Do not remove this.
  268.     # -------------------------------------------------------------------------
  269.       3 => { # New TP mode!
  270.       # :setting     => Adjust settings as you see fit.
  271.         :name        => "守护者",
  272.         :icon        => 112,
  273.         :description => "治疗时增加TP.",
  274.         :preserve_tp => true,
  275.         :init_tp     => "0",
  276.         :regen_tp    => "0",
  277.         :take_hp_dmg => "0",
  278.         :deal_hp_dmg => "0",
  279.         :heal_hp_dmg => "[@result.hp_damage * -100 / mhp, 16].min * tcr",
  280.         :ally_hp_dmg => "0",
  281.         :take_mp_dmg => "0",
  282.         :deal_mp_dmg => "0",
  283.         :heal_mp_dmg => "0",
  284.         :ally_mp_dmg => "0",
  285.         :deal_state  => "0",
  286.         :gain_state  => "0",
  287.         :kill_ally   => "0",
  288.         :kill_enemy  => "0",
  289.         :win_battle  => "0",
  290.         :flee_battle => "0",
  291.         :lose_battle => "0",
  292.         :low_hp_turn => "0",
  293.         :low_mp_turn => "0",
  294.         :only_alive  => "0",
  295.         :evasion     => "0",
  296.       }, # Do not remove this.
  297.     # -------------------------------------------------------------------------
  298.       4 => { # New TP mode!
  299.       # :setting     => Adjust settings as you see fit.
  300.         :name        => "中断者",
  301.         :icon        => 215,
  302.         :description => "恢复MP损害受到MP损伤或者同伴受到损伤时提高TP.",
  303.         :preserve_tp => true,
  304.         :init_tp     => "0",
  305.         :regen_tp    => "0",
  306.         :take_hp_dmg => "0",
  307.         :deal_hp_dmg => "0",
  308.         :heal_hp_dmg => "0",
  309.         :ally_hp_dmg => "0",
  310.         :take_mp_dmg => "50 * damage_rate * tcr",
  311.         :deal_mp_dmg => "[@result.mp_damage / 4, 16].min * tcr",
  312.         :heal_mp_dmg => "0",
  313.         :ally_mp_dmg => "20 * tcr",
  314.         :deal_state  => "0",
  315.         :gain_state  => "0",
  316.         :kill_ally   => "0",
  317.         :kill_enemy  => "0",
  318.         :win_battle  => "0",
  319.         :flee_battle => "0",
  320.         :lose_battle => "0",
  321.         :low_hp_turn => "0",
  322.         :low_mp_turn => "0",
  323.         :only_alive  => "0",
  324.         :evasion     => "0",
  325.       }, # Do not remove this.
  326.     # -------------------------------------------------------------------------
  327.       5 => { # New TP mode!
  328.       # :setting     => Adjust settings as you see fit.
  329.         :name        => "炼金术士",
  330.         :icon        => 193,
  331.         :description => "恢复同伴MP时增加TP.",
  332.         :preserve_tp => true,
  333.         :init_tp     => "0",
  334.         :regen_tp    => "0",
  335.         :take_hp_dmg => "0",
  336.         :deal_hp_dmg => "0",
  337.         :heal_hp_dmg => "0",
  338.         :ally_hp_dmg => "0",
  339.         :take_mp_dmg => "0",
  340.         :deal_mp_dmg => "0",
  341.         :heal_mp_dmg => "[@result.mp_damage / -4, 16].min * tcr",
  342.         :ally_mp_dmg => "0",
  343.         :deal_state  => "0",
  344.         :gain_state  => "0",
  345.         :kill_ally   => "0",
  346.         :kill_enemy  => "0",
  347.         :win_battle  => "0",
  348.         :flee_battle => "0",
  349.         :lose_battle => "0",
  350.         :low_hp_turn => "0",
  351.         :low_mp_turn => "0",
  352.         :only_alive  => "0",
  353.         :evasion     => "0",
  354.       }, # Do not remove this.
  355.     # -------------------------------------------------------------------------
  356.       6 => { # New TP mode!
  357.       # :setting     => Adjust settings as you see fit.
  358.         :name        => "杀手",
  359.         :icon        => 115,
  360.         :description => "当同伴死亡时增加TP.",
  361.         :preserve_tp => true,
  362.         :init_tp     => "0",
  363.         :regen_tp    => "0",
  364.         :take_hp_dmg => "0",
  365.         :deal_hp_dmg => "0",
  366.         :heal_hp_dmg => "0",
  367.         :ally_hp_dmg => "0",
  368.         :take_mp_dmg => "0",
  369.         :deal_mp_dmg => "0",
  370.         :heal_mp_dmg => "0",
  371.         :ally_mp_dmg => "0",
  372.         :deal_state  => "0",
  373.         :gain_state  => "0",
  374.         :kill_ally   => "0",
  375.         :kill_enemy  => "25 * tcr",
  376.         :win_battle  => "0",
  377.         :flee_battle => "0",
  378.         :lose_battle => "0",
  379.         :low_hp_turn => "0",
  380.         :low_mp_turn => "0",
  381.         :only_alive  => "0",
  382.         :evasion     => "0",
  383.       }, # Do not remove this.
  384.     # -------------------------------------------------------------------------
  385.       7 => { # New TP mode!
  386.       # :setting     => Adjust settings as you see fit.
  387.         :name        => "复仇者",
  388.         :icon        => 1,
  389.         :description => "当同伴死亡时增加TP.",
  390.         :preserve_tp => true,
  391.         :init_tp     => "0",
  392.         :regen_tp    => "0",
  393.         :take_hp_dmg => "0",
  394.         :deal_hp_dmg => "0",
  395.         :heal_hp_dmg => "0",
  396.         :ally_hp_dmg => "0",
  397.         :take_mp_dmg => "0",
  398.         :deal_mp_dmg => "0",
  399.         :heal_mp_dmg => "0",
  400.         :ally_mp_dmg => "0",
  401.         :deal_state  => "0",
  402.         :gain_state  => "0",
  403.         :kill_ally   => "50 * tcr",
  404.         :kill_enemy  => "0",
  405.         :win_battle  => "0",
  406.         :flee_battle => "0",
  407.         :lose_battle => "0",
  408.         :low_hp_turn => "0",
  409.         :low_mp_turn => "0",
  410.         :only_alive  => "0",
  411.         :evasion     => "0",
  412.       }, # Do not remove this.
  413.     # -------------------------------------------------------------------------
  414.       8 => { # New TP mode!
  415.       # :setting     => Adjust settings as you see fit.
  416.         :name        => "胜利者",
  417.         :icon        => 113,
  418.         :description => "不管是否战斗都增加TP.",
  419.         :preserve_tp => true,
  420.         :init_tp     => "0",
  421.         :regen_tp    => "0",
  422.         :take_hp_dmg => "0",
  423.         :deal_hp_dmg => "0",
  424.         :heal_hp_dmg => "0",
  425.         :ally_hp_dmg => "0",
  426.         :take_mp_dmg => "0",
  427.         :deal_mp_dmg => "0",
  428.         :heal_mp_dmg => "0",
  429.         :ally_mp_dmg => "0",
  430.         :deal_state  => "0",
  431.         :gain_state  => "0",
  432.         :kill_ally   => "0",
  433.         :kill_enemy  => "0",
  434.         :win_battle  => "20 * tcr",
  435.         :flee_battle => "0",
  436.         :lose_battle => "0",
  437.         :low_hp_turn => "0",
  438.         :low_mp_turn => "0",
  439.         :only_alive  => "0",
  440.         :evasion     => "0",
  441.       }, # Do not remove this.
  442.     # -------------------------------------------------------------------------
  443.       9 => { # New TP mode!
  444.       # :setting     => Adjust settings as you see fit.
  445.         :name        => "胆小鬼",
  446.         :icon        => 114,
  447.         :description => "不管是否逃跑都增加TP.",
  448.         :preserve_tp => true,
  449.         :init_tp     => "0",
  450.         :regen_tp    => "0",
  451.         :take_hp_dmg => "0",
  452.         :deal_hp_dmg => "0",
  453.         :heal_hp_dmg => "0",
  454.         :ally_hp_dmg => "0",
  455.         :take_mp_dmg => "0",
  456.         :deal_mp_dmg => "0",
  457.         :heal_mp_dmg => "0",
  458.         :ally_mp_dmg => "0",
  459.         :deal_state  => "0",
  460.         :gain_state  => "0",
  461.         :kill_ally   => "0",
  462.         :kill_enemy  => "0",
  463.         :win_battle  => "0",
  464.         :flee_battle => "0",
  465.         :lose_battle => "20 * tcr",
  466.         :low_hp_turn => "0",
  467.         :low_mp_turn => "0",
  468.         :only_alive  => "0",
  469.         :evasion     => "0",
  470.       }, # Do not remove this.
  471.     # -------------------------------------------------------------------------
  472.       10 => { # New TP mode!
  473.       # :setting     => Adjust settings as you see fit.
  474.         :name        => "狂人",
  475.         :icon        => 48,
  476.         :description => "不管战斗结束后多少TP都增加.",
  477.         :preserve_tp => true,
  478.         :init_tp     => "0",
  479.         :regen_tp    => "0",
  480.         :take_hp_dmg => "0",
  481.         :deal_hp_dmg => "0",
  482.         :heal_hp_dmg => "0",
  483.         :ally_hp_dmg => "0",
  484.         :take_mp_dmg => "0",
  485.         :deal_mp_dmg => "0",
  486.         :heal_mp_dmg => "0",
  487.         :ally_mp_dmg => "0",
  488.         :deal_state  => "0",
  489.         :gain_state  => "0",
  490.         :kill_ally   => "0",
  491.         :kill_enemy  => "0",
  492.         :win_battle  => "0",
  493.         :flee_battle => "0",
  494.         :lose_battle => "0",
  495.         :low_hp_turn => "16 * tcr",
  496.         :low_mp_turn => "0",
  497.         :only_alive  => "0",
  498.         :evasion     => "0",
  499.       }, # Do not remove this.
  500.     # -------------------------------------------------------------------------
  501.       11 => { # New TP mode!
  502.       # :setting     => Adjust settings as you see fit.
  503.         :name        => "调剂师",
  504.         :icon        => 49,
  505.         :description => "不管战斗结束后多少MP都增加TP.",
  506.         :preserve_tp => true,
  507.         :init_tp     => "0",
  508.         :regen_tp    => "0",
  509.         :take_hp_dmg => "0",
  510.         :deal_hp_dmg => "0",
  511.         :heal_hp_dmg => "0",
  512.         :ally_hp_dmg => "0",
  513.         :take_mp_dmg => "0",
  514.         :deal_mp_dmg => "0",
  515.         :heal_mp_dmg => "0",
  516.         :ally_mp_dmg => "0",
  517.         :deal_state  => "0",
  518.         :gain_state  => "0",
  519.         :kill_ally   => "0",
  520.         :kill_enemy  => "0",
  521.         :win_battle  => "0",
  522.         :flee_battle => "0",
  523.         :lose_battle => "0",
  524.         :low_hp_turn => "0",
  525.         :low_mp_turn => "16 * tcr",
  526.         :only_alive  => "0",
  527.         :evasion     => "0",
  528.       }, # Do not remove this.
  529.     # -------------------------------------------------------------------------
  530.       12 => { # New TP mode!
  531.       # :setting     => Adjust settings as you see fit.
  532.         :name        => "战略家",
  533.         :icon        => 10,
  534.         :description => "每当使敌人状态受到攻击提高TP.",
  535.         :preserve_tp => true,
  536.         :init_tp     => "0",
  537.         :regen_tp    => "0",
  538.         :take_hp_dmg => "0",
  539.         :deal_hp_dmg => "0",
  540.         :heal_hp_dmg => "0",
  541.         :ally_hp_dmg => "0",
  542.         :take_mp_dmg => "0",
  543.         :deal_mp_dmg => "0",
  544.         :heal_mp_dmg => "0",
  545.         :ally_mp_dmg => "0",
  546.         :deal_state  => "16 * tcr",
  547.         :gain_state  => "0",
  548.         :kill_ally   => "0",
  549.         :kill_enemy  => "0",
  550.         :win_battle  => "0",
  551.         :flee_battle => "0",
  552.         :lose_battle => "0",
  553.         :low_hp_turn => "0",
  554.         :low_mp_turn => "0",
  555.         :only_alive  => "0",
  556.         :evasion     => "0",
  557.       }, # Do not remove this.
  558.     # -------------------------------------------------------------------------
  559.       13 => { # New TP mode!
  560.       # :setting     => Adjust settings as you see fit.
  561.         :name        => "病人",
  562.         :icon        => 3,
  563.         :description => "每当状态受到攻击提高TP.",
  564.         :preserve_tp => true,
  565.         :init_tp     => "0",
  566.         :regen_tp    => "0",
  567.         :take_hp_dmg => "0",
  568.         :deal_hp_dmg => "0",
  569.         :heal_hp_dmg => "0",
  570.         :ally_hp_dmg => "0",
  571.         :take_mp_dmg => "0",
  572.         :deal_mp_dmg => "0",
  573.         :heal_mp_dmg => "0",
  574.         :ally_mp_dmg => "0",
  575.         :deal_state  => "0",
  576.         :gain_state  => "16 * tcr",
  577.         :kill_ally   => "0",
  578.         :kill_enemy  => "0",
  579.         :win_battle  => "0",
  580.         :flee_battle => "0",
  581.         :lose_battle => "0",
  582.         :low_hp_turn => "0",
  583.         :low_mp_turn => "0",
  584.         :only_alive  => "0",
  585.         :evasion     => "0",
  586.       }, # Do not remove this.
  587.     # -------------------------------------------------------------------------
  588.       14 => { # New TP mode!
  589.       # :setting     => Adjust settings as you see fit.
  590.         :name        => "舞者",
  591.         :icon        => 12,
  592.         :description => "每当成功地逃避攻击提高TP.",
  593.         :preserve_tp => true,
  594.         :init_tp     => "0",
  595.         :regen_tp    => "0",
  596.         :take_hp_dmg => "0",
  597.         :deal_hp_dmg => "0",
  598.         :heal_hp_dmg => "0",
  599.         :ally_hp_dmg => "0",
  600.         :take_mp_dmg => "0",
  601.         :deal_mp_dmg => "0",
  602.         :heal_mp_dmg => "0",
  603.         :ally_mp_dmg => "0",
  604.         :deal_state  => "0",
  605.         :gain_state  => "0",
  606.         :kill_ally   => "0",
  607.         :kill_enemy  => "0",
  608.         :win_battle  => "0",
  609.         :flee_battle => "0",
  610.         :lose_battle => "0",
  611.         :low_hp_turn => "0",
  612.         :low_mp_turn => "0",
  613.         :only_alive  => "0",
  614.         :evasion     => "16 * tcr",
  615.       }, # Do not remove this.
  616.     # -------------------------------------------------------------------------
  617.       15 => { # New TP mode!
  618.       # :setting     => Adjust settings as you see fit.
  619.         :name        => "独行侠",
  620.         :icon        => 14,
  621.         :description => "当只剩最后一人时增加TP.",
  622.         :preserve_tp => true,
  623.         :init_tp     => "0",
  624.         :regen_tp    => "0",
  625.         :take_hp_dmg => "0",
  626.         :deal_hp_dmg => "0",
  627.         :heal_hp_dmg => "0",
  628.         :ally_hp_dmg => "0",
  629.         :take_mp_dmg => "0",
  630.         :deal_mp_dmg => "0",
  631.         :heal_mp_dmg => "0",
  632.         :ally_mp_dmg => "0",
  633.         :deal_state  => "0",
  634.         :gain_state  => "0",
  635.         :kill_ally   => "0",
  636.         :kill_enemy  => "0",
  637.         :win_battle  => "0",
  638.         :flee_battle => "0",
  639.         :lose_battle => "0",
  640.         :low_hp_turn => "0",
  641.         :low_mp_turn => "0",
  642.         :only_alive  => "16 * tcr",
  643.         :evasion     => "0",
  644.       }, # Do not remove this.
  645.     # -------------------------------------------------------------------------
  646.     } # Do not remove this.
  647.    
  648.   end # TP_MANAGER
  649. end # YEA

  650. #==============================================================================
  651. # ▼ Editting anything past this point may potentially result in causing
  652. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  653. # halitosis so edit at your own risk.
  654. #==============================================================================

  655. module YEA
  656.   module REGEXP
  657.   module ACTOR
  658.    
  659.     TP_MODE   = /<(?:TP_MODE|tp mode):[ ](\d+)>/i
  660.     UNLOCK_TP = /<(?:UNLOCK_TP|unlock tp):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
  661.    
  662.   end # ACTOR
  663.   module ENEMY
  664.    
  665.     TP_MODE   = /<(?:TP_MODE|tp mode):[ ](\d+)>/i
  666.    
  667.   end # ENEMY
  668.   module BASEITEM
  669.    
  670.     UNLOCK_TP = /<(?:UNLOCK_TP|unlock tp):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
  671.     LEARN_TP = /<(?:LEARN_UNLOCK_TP|learn unlock tp):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
  672.     TP_COST  = /<(?:TP_COST|tp cost):[ ](\d+)>/i
  673.    
  674.   end # BASEITEM
  675.   end # REGEXP
  676. end # YEA

  677. #==============================================================================
  678. # ■ Switch
  679. #==============================================================================

  680. module Switch
  681.   
  682.   #--------------------------------------------------------------------------
  683.   # self.tp_mode
  684.   #--------------------------------------------------------------------------
  685.   def self.tp_mode
  686.     return true if YEA::TP_MANAGER::TP_MODE_SWITCH <= 0
  687.     return $game_switches[YEA::TP_MANAGER::TP_MODE_SWITCH]
  688.   end
  689.   
  690.   #--------------------------------------------------------------------------
  691.   # self.tp_mode_set
  692.   #--------------------------------------------------------------------------
  693.   def self.tp_mode_set(item)
  694.     return if YEA::TP_MANAGER::TP_MODE_SWITCH <= 0
  695.     $game_switches[YEA::TP_MANAGER::TP_MODE_SWITCH] = item
  696.   end
  697.    
  698. end # Switch

  699. #==============================================================================
  700. # ■ Numeric
  701. #==============================================================================

  702. class Numeric
  703.   
  704.   #--------------------------------------------------------------------------
  705.   # new method: group_digits
  706.   #--------------------------------------------------------------------------
  707.   unless $imported["YEA-CoreEngine"]
  708.   def group; return self.to_s; end
  709.   end # $imported["YEA-CoreEngine"]
  710.    
  711. end # Numeric

  712. #==============================================================================
  713. # ■ DataManager
  714. #==============================================================================

  715. module DataManager
  716.   
  717.   #--------------------------------------------------------------------------
  718.   # alias method: load_database
  719.   #--------------------------------------------------------------------------
  720.   class <<self; alias load_database_tpm load_database; end
  721.   def self.load_database
  722.     load_database_tpm
  723.     load_notetags_tpm
  724.   end
  725.   
  726.   #--------------------------------------------------------------------------
  727.   # new method: load_notetags_tpm
  728.   #--------------------------------------------------------------------------
  729.   def self.load_notetags_tpm
  730.     groups = [$data_actors, $data_enemies, $data_items, $data_skills]
  731.     for group in groups
  732.       for obj in group
  733.         next if obj.nil?
  734.         obj.load_notetags_tpm
  735.       end
  736.     end
  737.   end
  738.   
  739.   #--------------------------------------------------------------------------
  740.   # alias method: setup_new_game
  741.   #--------------------------------------------------------------------------
  742.   class <<self; alias setup_new_game_tpm setup_new_game; end
  743.   def self.setup_new_game
  744.     setup_new_game_tpm
  745.     Switch.tp_mode_set(YEA::TP_MANAGER::DEFAULT_ENABLE)
  746.   end
  747.   
  748. end # DataManager

  749. #==============================================================================
  750. # ■ RPG::Actor
  751. #==============================================================================

  752. class RPG::Actor < RPG::BaseItem
  753.   
  754.   #--------------------------------------------------------------------------
  755.   # public instance variables
  756.   #--------------------------------------------------------------------------
  757.   attr_accessor :tp_mode
  758.   attr_accessor :unlocked_tp_modes
  759.   
  760.   #--------------------------------------------------------------------------
  761.   # common cache: load_notetags_tpm
  762.   #--------------------------------------------------------------------------
  763.   def load_notetags_tpm
  764.     @tp_mode = nil
  765.     @unlocked_tp_modes = []
  766.     #---
  767.     self.note.split(/[\r\n]+/).each { |line|
  768.       case line
  769.       #---
  770.       when YEA::REGEXP::ACTOR::TP_MODE
  771.         @tp_mode = $1.to_i
  772.       when YEA::REGEXP::ACTOR::UNLOCK_TP
  773.         $1.scan(/\d+/).each { |num|
  774.         @unlocked_tp_modes.push(num.to_i) if num.to_i > 0 }
  775.       #---
  776.       end
  777.     } # self.note.split
  778.     #---
  779.     @tp_mode = YEA::TP_MANAGER::DEFAULT_TP_MODE if @tp_mode.nil?
  780.     if @unlocked_tp_modes.empty?
  781.       @unlocked_tp_modes = YEA::TP_MANAGER::DEFAULT_UNLOCKS.clone
  782.     end
  783.     @unlocked_tp_modes.push(@tp_mode) if !@unlocked_tp_modes.include?(@tp_mode)
  784.     @unlocked_tp_modes.uniq!
  785.     @unlocked_tp_modes.sort!
  786.   end
  787.   
  788. end # RPG::Actor

  789. #==============================================================================
  790. # ■ RPG::Enemy
  791. #==============================================================================

  792. class RPG::Enemy < RPG::BaseItem
  793.   
  794.   #--------------------------------------------------------------------------
  795.   # public instance variables
  796.   #--------------------------------------------------------------------------
  797.   attr_accessor :tp_mode
  798.   
  799.   #--------------------------------------------------------------------------
  800.   # common cache: load_notetags_tpm
  801.   #--------------------------------------------------------------------------
  802.   def load_notetags_tpm
  803.     @tp_mode = YEA::TP_MANAGER::DEFAULT_TP_MODE
  804.     #---
  805.     self.note.split(/[\r\n]+/).each { |line|
  806.       case line
  807.       #---
  808.       when YEA::REGEXP::ENEMY::TP_MODE
  809.         @tp_mode = $1.to_i
  810.       #---
  811.       end
  812.     } # self.note.split
  813.     #---
  814.   end
  815.   
  816. end # RPG::Enemy

  817. #==============================================================================
  818. # ■ RPG::BaseItem
  819. #==============================================================================

  820. class RPG::BaseItem
  821.   
  822.   #--------------------------------------------------------------------------
  823.   # public instance variables
  824.   #--------------------------------------------------------------------------
  825.   attr_accessor :unlocked_tp_modes
  826.   attr_accessor :learn_tp_modes
  827.   attr_accessor :tp_cost
  828.   
  829.   #--------------------------------------------------------------------------
  830.   # common cache: load_notetags_tpm
  831.   #--------------------------------------------------------------------------
  832.   def load_notetags_tpm
  833.     @unlocked_tp_modes = []
  834.     @learn_tp_modes = []
  835.     #---
  836.     self.note.split(/[\r\n]+/).each { |line|
  837.       case line
  838.       #---
  839.       when YEA::REGEXP::BASEITEM::UNLOCK_TP
  840.         $1.scan(/\d+/).each { |num|
  841.         @unlocked_tp_modes.push(num.to_i) if num.to_i > 0 }
  842.       when YEA::REGEXP::BASEITEM::LEARN_TP
  843.         $1.scan(/\d+/).each { |num|
  844.         @learn_tp_modes.push(num.to_i) if num.to_i > 0 }
  845.       when YEA::REGEXP::BASEITEM::TP_COST
  846.         next unless self.is_a?(RPG::Skill)
  847.         @tp_cost = $1.to_i
  848.       #---
  849.       end
  850.     } # self.note.split
  851.     #---
  852.   end
  853.   
  854. end # RPG::BaseItem

  855. #==============================================================================
  856. # ■ BattleManager
  857. #==============================================================================

  858. module BattleManager
  859.   #--------------------------------------------------------------------------
  860.   # alias method: load_database
  861.   #--------------------------------------------------------------------------
  862.   class <<self; alias battle_end_tpm battle_end;end
  863.   def self.battle_end(result)
  864.     battle_end_tpm(result)
  865.     case result
  866.     when 0
  867.       for member in $game_party.alive_members
  868.         member.tp += eval(member.tp_setting(:win_battle))
  869.       end
  870.     when 1
  871.       for member in $game_party.alive_members
  872.         member.tp += eval(member.tp_setting(:flee_battle))
  873.       end
  874.     end
  875.   end
  876.   
  877.   
  878.   
  879. end # BattleManager

  880. #==============================================================================
  881. # ■ Game_BattlerBase
  882. #==============================================================================

  883. class Game_BattlerBase
  884.   #--------------------------------------------------------------------------
  885.   # public instance variables
  886.   #--------------------------------------------------------------------------
  887.   attr_accessor :tp_mode
  888.   attr_accessor :unlocked_tp_modes
  889.   
  890.   #--------------------------------------------------------------------------
  891.   # overwrite method: max_tp
  892.   #--------------------------------------------------------------------------
  893.   def max_tp; return YEA::TP_MANAGER::TP_LIMIT; end
  894.   
  895.   #--------------------------------------------------------------------------
  896.   # anti-crash methods: max_tp, unlocked_tp_modes
  897.   #--------------------------------------------------------------------------
  898.   def tp_mode; return 0; end
  899.   def unlocked_tp_modes; return [0]; end
  900.   
  901.   #--------------------------------------------------------------------------
  902.   # new method: tp_setting
  903.   #--------------------------------------------------------------------------
  904.   def tp_setting(setting)
  905.     return YEA::TP_MANAGER::TP_MODES[tp_mode][setting]
  906.   end
  907.   
  908.   #--------------------------------------------------------------------------
  909.   # alias method: preserve_tp?
  910.   #--------------------------------------------------------------------------
  911.   alias game_battlerbase_preserve_tp_tpm preserve_tp?
  912.   def preserve_tp?
  913.     return true if tp_setting(:preserve_tp)
  914.     return game_battlerbase_preserve_tp_tpm
  915.   end
  916.   
  917. end # Game_BattlerBase

  918. #==============================================================================
  919. # ■ Game_Battler
  920. #==============================================================================

  921. class Game_Battler < Game_BattlerBase
  922.   
  923.   #--------------------------------------------------------------------------
  924.   # overwrite method: init_tp
  925.   #--------------------------------------------------------------------------
  926.   def init_tp
  927.     self.tp = eval(tp_setting(:init_tp))
  928.   end
  929.   
  930.   #--------------------------------------------------------------------------
  931.   # overwrite method: charge_tp_by_damage
  932.   #--------------------------------------------------------------------------
  933.   def charge_tp_by_damage(damage_rate)
  934.     self.tp += eval(tp_setting(:take_hp_dmg))
  935.   end
  936.   
  937.   #--------------------------------------------------------------------------
  938.   # new method: charge_tp_by_mp_damage
  939.   #--------------------------------------------------------------------------
  940.   def charge_tp_by_mp_damage(damage_rate)
  941.     self.tp += eval(tp_setting(:take_mp_dmg))
  942.   end
  943.   
  944.   #--------------------------------------------------------------------------
  945.   # overwrite method:
  946.   #--------------------------------------------------------------------------
  947.   def regenerate_tp
  948.     self.tp += eval(tp_setting(:regen_tp))
  949.     self.tp += eval(tp_setting(:low_hp_turn)) if self.hp < tp_low_hp
  950.     self.tp += eval(tp_setting(:low_mp_turn)) if self.mp < tp_low_mp
  951.     if friends_unit.alive_members.size == 1
  952.       self.tp += eval(tp_setting(:only_alive))
  953.     end
  954.   end
  955.   
  956.   #--------------------------------------------------------------------------
  957.   # new method: tp_low_hp
  958.   #--------------------------------------------------------------------------
  959.   def tp_low_hp
  960.     return self.mhp * YEA::TP_MANAGER::LOW_HP
  961.   end
  962.   
  963.   #--------------------------------------------------------------------------
  964.   # new method: tp_low_mp
  965.   #--------------------------------------------------------------------------
  966.   def tp_low_mp
  967.     return self.mmp * YEA::TP_MANAGER::LOW_MP
  968.   end
  969.   
  970.   #--------------------------------------------------------------------------
  971.   # alias method: execute_damage
  972.   #--------------------------------------------------------------------------
  973.   alias game_battler_execute_damage_tpm execute_damage
  974.   def execute_damage(user)
  975.     game_battler_execute_damage_tpm(user)
  976.     return unless $game_party.in_battle
  977.     if @result.hp_damage > 0
  978.       user.tp += eval(user.tp_setting(:deal_hp_dmg))
  979.       gain_tp_ally_hp_damage
  980.     elsif @result.hp_damage < 0
  981.       user.tp += eval(user.tp_setting(:heal_hp_dmg))
  982.     end
  983.     if @result.mp_damage > 0
  984.       user.tp += eval(user.tp_setting(:deal_mp_dmg))
  985.       gain_tp_ally_mp_damage
  986.       charge_tp_by_mp_damage(@result.mp_damage)
  987.     elsif @result.mp_damage < 0
  988.       user.tp += eval(user.tp_setting(:heal_mp_dmg))
  989.     end
  990.     user.tp += eval(user.tp_setting(:kill_enemy)) if self.hp == 0
  991.     gain_tp_kill_ally if self.hp == 0
  992.   end
  993.   
  994.   #--------------------------------------------------------------------------
  995.   # new method: gain_tp_ally_hp_damage
  996.   #--------------------------------------------------------------------------
  997.   def gain_tp_ally_hp_damage
  998.     for member in friends_unit.alive_members
  999.       next if member == self
  1000.       member.tp += eval(member.tp_setting(:ally_hp_dmg))
  1001.     end
  1002.   end
  1003.   
  1004.   #--------------------------------------------------------------------------
  1005.   # new method: gain_tp_ally_mp_damage
  1006.   #--------------------------------------------------------------------------
  1007.   def gain_tp_ally_mp_damage
  1008.     for member in friends_unit.alive_members
  1009.       next if member == self
  1010.       member.tp += eval(member.tp_setting(:ally_mp_dmg))
  1011.     end
  1012.   end
  1013.   
  1014.   #--------------------------------------------------------------------------
  1015.   # new method: gain_tp_kill_ally
  1016.   #--------------------------------------------------------------------------
  1017.   def gain_tp_kill_ally
  1018.     for member in friends_unit.alive_members
  1019.       next if member == self
  1020.       member.tp += eval(member.tp_setting(:kill_ally))
  1021.     end
  1022.   end
  1023.   
  1024.   #--------------------------------------------------------------------------
  1025.   # alias method: item_effect_add_state
  1026.   #--------------------------------------------------------------------------
  1027.   alias game_battler_item_effect_add_state_tpm item_effect_add_state
  1028.   def item_effect_add_state(user, item, effect)
  1029.     original_states = states.clone
  1030.     game_battler_item_effect_add_state_tpm(user, item, effect)
  1031.     return unless $game_party.in_battle
  1032.     if original_states != states && opponents_unit.members.include?(user)
  1033.       user.tp += eval(user.tp_setting(:deal_state))
  1034.       self.tp += eval(tp_setting(:gain_state))
  1035.     end
  1036.   end
  1037.   
  1038.   #--------------------------------------------------------------------------
  1039.   # alias method: item_apply
  1040.   #--------------------------------------------------------------------------
  1041.   alias game_battler_item_apply_tpm item_apply
  1042.   def item_apply(user, item)
  1043.     game_battler_item_apply_tpm(user, item)
  1044.     return unless $game_party.in_battle
  1045.     return if @result.hit?
  1046.     self.tp += eval(tp_setting(:evasion))
  1047.   end
  1048.   
  1049.   #--------------------------------------------------------------------------
  1050.   # alias method: item_test
  1051.   #--------------------------------------------------------------------------
  1052.   alias game_battler_item_test_tpm item_test
  1053.   def item_test(user, item)
  1054.     return false if item.for_dead_friend? != dead?
  1055.     return true if item.unlocked_tp_modes.size > 0
  1056.     return game_battler_item_test_tpm(user, item)
  1057.   end
  1058.   
  1059.   #--------------------------------------------------------------------------
  1060.   # alias method: item_user_effect
  1061.   #--------------------------------------------------------------------------
  1062.   alias game_battler_item_user_effect_tpm item_user_effect
  1063.   def item_user_effect(user, item)
  1064.     game_battler_item_user_effect_tpm(user, item)
  1065.     return unless actor?
  1066.     for mode in item.unlocked_tp_modes
  1067.       unlock_tp_mode(mode)
  1068.     end
  1069.   end
  1070.   
  1071. end # Game_Battler

  1072. #==============================================================================
  1073. # ■ Game_Actor
  1074. #==============================================================================

  1075. class Game_Actor < Game_Battler
  1076.   
  1077.   #--------------------------------------------------------------------------
  1078.   # alias method: setup
  1079.   #--------------------------------------------------------------------------
  1080.   alias game_actor_setup_tpm setup
  1081.   def setup(actor_id)
  1082.     game_actor_setup_tpm(actor_id)
  1083.     @tp_mode = actor.tp_mode
  1084.     @unlocked_tp_modes = actor.unlocked_tp_modes.clone
  1085.   end
  1086.   
  1087.   #--------------------------------------------------------------------------
  1088.   # new method: tp_mode
  1089.   #--------------------------------------------------------------------------
  1090.   def tp_mode
  1091.     @tp_mode = actor.tp_mode if @tp_mode.nil?
  1092.     return @tp_mode
  1093.   end
  1094.   
  1095.   #--------------------------------------------------------------------------
  1096.   # new method: unlocked_tp_modes
  1097.   #--------------------------------------------------------------------------
  1098.   def unlocked_tp_modes
  1099.     if @unlocked_tp_modes.empty?
  1100.       @unlocked_tp_modes = actor.unlocked_tp_modes.clone
  1101.     end
  1102.     return @unlocked_tp_modes.uniq
  1103.   end
  1104.   
  1105.   #--------------------------------------------------------------------------
  1106.   # new method: change_tp_mode
  1107.   #--------------------------------------------------------------------------
  1108.   def change_tp_mode(mode)
  1109.     @tp_mode = mode
  1110.     unlock_tp_mode(mode)
  1111.     self.tp = 0 if YEA::TP_MANAGER::CHANGE_TP_RESET
  1112.   end
  1113.   
  1114.   #--------------------------------------------------------------------------
  1115.   # new method: unlock_tp_mode
  1116.   #--------------------------------------------------------------------------
  1117.   def unlock_tp_mode(mode)
  1118.     if @unlocked_tp_modes.empty?
  1119.       @unlocked_tp_modes = actor.unlocked_tp_modes.clone
  1120.     end
  1121.     @unlocked_tp_modes.push(mode)
  1122.     @unlocked_tp_modes.uniq!
  1123.     @unlocked_tp_modes.sort!
  1124.   end
  1125.   
  1126.   #--------------------------------------------------------------------------
  1127.   # new method: remove_tp_mode
  1128.   #--------------------------------------------------------------------------
  1129.   def remove_tp_mode(mode)
  1130.     if @unlocked_tp_modes.empty?
  1131.       @unlocked_tp_modes = actor.unlocked_tp_modes.clone
  1132.     end
  1133.     @unlocked_tp_modes.delete(mode)
  1134.     @tp_mode = @unlocked_tp_modes[0] if @tp_mode == mode
  1135.   end
  1136.   
  1137.   #--------------------------------------------------------------------------
  1138.   # alias method: learn_skill
  1139.   #--------------------------------------------------------------------------
  1140.   alias game_actor_learn_skill_tpm learn_skill
  1141.   def learn_skill(skill_id)
  1142.     game_actor_learn_skill_tpm(skill_id)
  1143.     for mode in $data_skills[skill_id].learn_tp_modes
  1144.       unlock_tp_mode(mode)
  1145.     end
  1146.   end
  1147.   
  1148. end # Game_Actor

  1149. #==============================================================================
  1150. # ■ Game_Enemy
  1151. #==============================================================================

  1152. class Game_Enemy < Game_Battler
  1153.   
  1154.   #--------------------------------------------------------------------------
  1155.   # new method: tp_mode
  1156.   #--------------------------------------------------------------------------
  1157.   def tp_mode; return enemy.tp_mode; end
  1158.   
  1159. end # Game_Enemy
  1160.   
  1161. #==============================================================================
  1162. # ■ Game_Interpreter
  1163. #==============================================================================

  1164. class Game_Interpreter
  1165.   
  1166.   #--------------------------------------------------------------------------
  1167.   # new method: change_tp_mode
  1168.   #--------------------------------------------------------------------------
  1169.   def change_tp_mode(actor_id, mode)
  1170.     $game_actors[actor_id].change_tp_mode(mode)
  1171.   end
  1172.   
  1173.   #--------------------------------------------------------------------------
  1174.   # new method: unlock_tp_mode
  1175.   #--------------------------------------------------------------------------
  1176.   def unlock_tp_mode(actor_id, mode)
  1177.     $game_actors[actor_id].unlock_tp_mode(mode)
  1178.   end
  1179.   
  1180.   #--------------------------------------------------------------------------
  1181.   # new method: remove_tp_mode
  1182.   #--------------------------------------------------------------------------
  1183.   def remove_tp_mode(actor_id, mode)
  1184.     $game_actors[actor_id].remove_tp_mode(mode)
  1185.   end
  1186.   
  1187.   #--------------------------------------------------------------------------
  1188.   # new method: unlock_all_tp_modes
  1189.   #--------------------------------------------------------------------------
  1190.   def unlock_all_tp_modes(actor_id)
  1191.     for key in YEA::TP_MANAGER::TP_MODES
  1192.       $game_actors[actor_id].unlock_tp_mode(key[0])
  1193.     end
  1194.   end
  1195.   
  1196.   #--------------------------------------------------------------------------
  1197.   # new method: remove_all_tp_modes
  1198.   #--------------------------------------------------------------------------
  1199.   def remove_all_tp_modes(actor_id)
  1200.     for key in YEA::TP_MANAGER::TP_MODES
  1201.       next if key[0] == $data_actors[actor_id].tp_mode
  1202.       $game_actors[actor_id].remove_tp_mode(key[0])
  1203.     end
  1204.   end
  1205.   
  1206. end # Game_Interpreter

  1207. #==============================================================================
  1208. # ■ Window_SkillCommand
  1209. #==============================================================================

  1210. class Window_SkillCommand < Window_Command
  1211.   
  1212.   #--------------------------------------------------------------------------
  1213.   # alias method: make_command_list
  1214.   #--------------------------------------------------------------------------
  1215.   alias window_skillcommand_make_command_list_tpm make_command_list
  1216.   def make_command_list
  1217.     return unless @actor
  1218.     window_skillcommand_make_command_list_tpm
  1219.    
  1220.   end
  1221.   
  1222.   #--------------------------------------------------------------------------
  1223.   # new method: add_tp_modes
  1224.   #--------------------------------------------------------------------------
  1225.   def add_tp_modes
  1226.     return unless Switch.tp_mode
  1227.     add_command(YEA::TP_MANAGER::MENU_NAME, :tp_mode, true, :tp_mode)
  1228.   end
  1229.   
  1230. end # Window_SkillCommand

  1231. #==============================================================================
  1232. # ■ Window_SkillList
  1233. #==============================================================================

  1234. class Window_SkillList < Window_Selectable
  1235.   
  1236.   #--------------------------------------------------------------------------
  1237.   # new method: tp_mode?
  1238.   #--------------------------------------------------------------------------
  1239.   def tp_mode?; return @stype_id == :tp_mode; end
  1240.   
  1241.   #--------------------------------------------------------------------------
  1242.   # new method: tp_mode
  1243.   #--------------------------------------------------------------------------
  1244.   def tp_mode
  1245.     return nil unless tp_mode?
  1246.     return @data[index]
  1247.   end
  1248.   
  1249.   #--------------------------------------------------------------------------
  1250.   # alias method: make_item_list
  1251.   #--------------------------------------------------------------------------
  1252.   alias window_skilllist_make_item_list_tpm make_item_list
  1253.   def make_item_list
  1254.     if tp_mode?
  1255.       @data = @actor.unlocked_tp_modes
  1256.       @data.sort!
  1257.     else
  1258.       window_skilllist_make_item_list_tpm
  1259.     end
  1260.   end
  1261.   
  1262.   #--------------------------------------------------------------------------
  1263.   # alias method: draw_item
  1264.   #--------------------------------------------------------------------------
  1265.   alias window_skilllist_draw_item_tpm draw_item
  1266.   def draw_item(index)
  1267.     if tp_mode?
  1268.       draw_tp_mode_item(index)
  1269.     else
  1270.       window_skilllist_draw_item_tpm(index)
  1271.     end
  1272.   end
  1273.   
  1274.   #--------------------------------------------------------------------------
  1275.   # new method: draw_tp_mode_item
  1276.   #--------------------------------------------------------------------------
  1277.   def draw_tp_mode_item(index)
  1278.     tp_mode = @data[index]
  1279.     return unless YEA::TP_MANAGER::TP_MODES.include?(tp_mode)
  1280.     rect = item_rect(index)
  1281.     rect.width -= 4
  1282.     icon = YEA::TP_MANAGER::TP_MODES[tp_mode][:icon]
  1283.     draw_icon(icon, rect.x, rect.y)
  1284.     change_color(tp_mode_colour(tp_mode))
  1285.     name = YEA::TP_MANAGER::TP_MODES[tp_mode][:name]
  1286.     draw_text(rect.x+24, rect.y, rect.width-24, line_height, name)
  1287.   end
  1288.   
  1289.   #--------------------------------------------------------------------------
  1290.   # new method: tp_mode_colour
  1291.   #--------------------------------------------------------------------------
  1292.   def tp_mode_colour(mode)
  1293.     if @actor.tp_mode == mode
  1294.       return text_color(YEA::TP_MANAGER::EQUIPPED_COLOUR)
  1295.     else
  1296.       return normal_color
  1297.     end
  1298.   end
  1299.   
  1300.   #--------------------------------------------------------------------------
  1301.   # alias method: current_item_enabled?
  1302.   #--------------------------------------------------------------------------
  1303.   alias window_skilllist_current_item_enabled current_item_enabled?
  1304.   def current_item_enabled?
  1305.     if tp_mode?
  1306.       return @actor.tp_mode != @data[index]
  1307.     else
  1308.       return window_skilllist_current_item_enabled
  1309.     end
  1310.   end
  1311.   
  1312.   #--------------------------------------------------------------------------
  1313.   # alias method: update_help
  1314.   #--------------------------------------------------------------------------
  1315.   alias window_skilllist_update_help_tpm update_help
  1316.   def update_help
  1317.     if tp_mode?
  1318.       tp_mode = @data[index]
  1319.       if YEA::TP_MANAGER::TP_MODES.include?(tp_mode)
  1320.         text = YEA::TP_MANAGER::TP_MODES[tp_mode][:description]
  1321.       else
  1322.         text = ""
  1323.       end
  1324.       @help_window.set_text(text)
  1325.     else
  1326.       window_skilllist_update_help_tpm
  1327.     end
  1328.   end
  1329.   
  1330. end # Window_SkillList

  1331. #==============================================================================
  1332. # ■ Scene_Skill
  1333. #==============================================================================

  1334. class Scene_Skill < Scene_ItemBase
  1335.   
  1336.   #--------------------------------------------------------------------------
  1337.   # alias method: create_command_window
  1338.   #--------------------------------------------------------------------------
  1339.   alias scene_skill_create_command_window_tpm create_command_window
  1340.   def create_command_window
  1341.     scene_skill_create_command_window_tpm
  1342.     @command_window.set_handler(:tp_mode,    method(:command_skill))
  1343.   end
  1344.   
  1345.   #--------------------------------------------------------------------------
  1346.   # alias method: on_item_ok
  1347.   #--------------------------------------------------------------------------
  1348.   alias scene_skill_on_item_ok_tpm on_item_ok
  1349.   def on_item_ok
  1350.     if @item_window.tp_mode?
  1351.       Sound.play_equip
  1352.       user.change_tp_mode(@item_window.tp_mode)
  1353.       @status_window.refresh
  1354.       @item_window.refresh
  1355.       @item_window.activate
  1356.     else
  1357.       scene_skill_on_item_ok_tpm
  1358.     end
  1359.   end
  1360.   
  1361. end # Scene_Skill

  1362. #==============================================================================
  1363. #
  1364. # ▼ End of File
  1365. #
  1366. #==============================================================================
复制代码
回复

使用道具 举报

梦石
0
星屑
50
在线时间
58 小时
注册时间
2013-10-24
回帖
28
 楼主| 发表于 2013-11-2 20:16:08 | 显示全部楼层
余烬之中 发表于 2013-11-2 16:08
目测是脚本内用的,如果不给全的话很难了解什么意思
【目测是yanfly的TP Manager这里都有内置介绍的,英文 ...

英语蛋疼啊。用翻译软件效果很不好。根本不能理解。
诺诺的问句  TP 干嘛使的
回复

使用道具 举报

百合控

梦石
0
星屑
6548
在线时间
1275 小时
注册时间
2013-8-21
回帖
3522

开拓者

发表于 2013-11-2 20:58:12 | 显示全部楼层
lc19801203 发表于 2013-11-2 20:16
英语蛋疼啊。用翻译软件效果很不好。根本不能理解。
诺诺的问句  TP 干嘛使的 ...

TP,可以理解为士气、怒气值,VA自带的东西,和HP、MP相近
一般来说,TP在每场战斗中都会重置,随着战斗进行增加,到一定程度可以释放出TP技能
TP技能可以在数据库设置
翻译:
  1.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  2.     # - TP 模式 -
  3.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  4.     # TP 模式 改变和调控玩家获得 TP 的方法.
  5.     # 调整下面的设定来改变每个行为会获得/失去多少TP.
  6.     #
  7.     # 设定             描述
  8.     # -------------------------------------------------------------------------
  9.     # - :name        - 在TP 模式菜单中显示的名字.
  10.     # - :icon        - 在TP 模式菜单中显示的图标.
  11.     # - :description - 帮助窗口显示的描述. 使用 \n 换行.
  12.     # - :preserve_tp - 保留上一场战斗留下来的TP
  13.     # - :init_tp     - 如果没有TP保留下来,在每场战斗开始时拥有的TP
  14.     # - :regen_tp    - 每回合获得的TP. 使用公式填写.
  15.     # - :take_hp_dmg - 受伤时获得的TP. 使用公式.
  16.     # - :deal_hp_dmg - 对敌人造成伤害时……. 使用公式.
  17.     # - :heal_hp_dmg - 治愈时……. 使用公式.
  18.     # - :ally_hp_dmg - 队友受伤……. 使用公式.
  19.     # - :take_mp_dmg - MP损失……. 使用公式.
  20.     # - :deal_mp_dmg - 对敌人造成MP损失……. 公式.
  21.     # - :heal_mp_dmg - MP回复……. 公式.
  22.     # - :ally_mp_dmg - 队友消耗MP……. 公式.
  23.     # - :deal_state  - 对敌人施加状态……. 公式.
  24.     # - :gain_state  - 被敌人施加状态……. 公式.
  25.     # - :kill_ally   - 同伴死亡……. 公式.
  26.     # - :kill_enemy  - 敌人死亡……. 公式.
  27.     # - :win_battle  - 战胜……. 公式.
  28.     # - :flee_battle - 逃跑……. 公式.
  29.     # - :lose_battle - 战败……. 公式.
  30.     # - :low_hp_turn - 回合结束时玩家HP低时…….
  31.     # - :low_mp_turn - 回合结束时玩家MP低时…….
  32.     # - :only_ally   - 战后只有伙伴存活时…….
  33.     # - :evasion     - 玩家闪避了攻击时…….
  34.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
复制代码

评分

参与人数 1梦石 +1 收起 理由
Sion + 1 认可答案

查看全部评分

萌新瑟瑟发抖
看到我请叫我去干活
回复

使用道具 举报

梦石
0
星屑
50
在线时间
58 小时
注册时间
2013-10-24
回帖
28
 楼主| 发表于 2013-11-3 10:22:06 | 显示全部楼层
余烬之中 发表于 2013-11-2 20:58
TP,可以理解为士气、怒气值,VA自带的东西,和HP、MP相近
一般来说,TP在每场战斗中都会重置,随着战斗 ...

非常感谢。
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部