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

Project1

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

[已经解决] 如何提高特技值的上限?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
30 小时
注册时间
2012-7-8
帖子
255
跳转到指定楼层
1
发表于 2012-8-9 20:18:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 .さっとりーん 于 2012-8-15 20:53 编辑

默认好像是100
怎么提高

Lv1.梦旅人

梦石
0
星屑
50
在线时间
228 小时
注册时间
2012-2-27
帖子
30
2
发表于 2012-8-9 22:01:50 | 只看该作者
Game_BattlerBase 中
  1.   #--------------------------------------------------------------------------
  2.   # ● 获取 TP 的最大值
  3.   #--------------------------------------------------------------------------
  4.   def max_tp
  5.     ##########################
  6.     return 200 #100
  7.   end
复制代码
  1.   #--------------------------------------------------------------------------
  2.   # ● 获取 TP 的比率
  3.   #--------------------------------------------------------------------------
  4.   def tp_rate
  5.     #############
  6.     @tp.to_f / 200         #100
  7.   end
复制代码
这个只改tp最大值 ,技能消耗的话就需要其他的脚本了!

点评

多谢  发表于 2012-8-10 19:29

评分

参与人数 1星屑 +60 收起 理由
明特·布兰马修 + 60 我很赞同

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1019 小时
注册时间
2012-4-25
帖子
799
3
发表于 2012-8-10 12:50:25 | 只看该作者
其实我倒是希望有装备提高上限的那种
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
758
在线时间
2065 小时
注册时间
2011-10-3
帖子
1686
4
发表于 2012-8-10 20:52:29 | 只看该作者
l616631804 发表于 2012-8-9 22:01
Game_BattlerBase 中这个只改tp最大值 ,技能消耗的话就需要其他的脚本了!

请问如果要修改消耗上限的话该改哪里?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
228 小时
注册时间
2012-2-27
帖子
30
5
发表于 2012-8-10 21:06:14 | 只看该作者
数据库中不能修改了,只用用其他的TP管理的脚本!  这里有一个
  1. #===============================================================================
  2. #
  3. # TP System Overhaul (1.0)
  4. # 23/4/2012
  5. # By Pacman
  6. # RPG Maker VX Ace comes with a very cool system secondary to MP called TP. All
  7. # actors (and enemies) have TP (whether it is shown or not is up to the user),
  8. # with a maximum of 100. While an interesting idea and useful in a lot of ways,
  9. # the default TP system is not very flexible to the users needs. This script
  10. # sets out to get rid of restrictions placed by the default scripts in relation
  11. # to TP.
  12. #
  13. # This super-sexy script will allow you to:
  14. #   Give actors and enemies different maximum TP values (exceeding the default
  15. #     limit of 100)
  16. #   Give skills a TP cost of over 100
  17. #   Change actor and enemy base TP values at your pleasure
  18. #   Let the TP of an actor be effected by the actor's level
  19. #   Give each actor or enemy a different formula for calculating the initial
  20. #     TP they start every battle with.
  21. #   Set TP altering stats on equips (Armors and Weapons)
  22. #
  23. # Notetags:
  24. #   Put \mtp[x] in the notebox of an enemy or actor to give them the base max
  25. #     TP value x.
  26. #   Put \tp_gain[x] in the notebox of an equip to add x to the TP of an actor
  27. #     who has it equipped.
  28. #   Put \tp_mul[x] in the notebox of an equip to multiply the TP of an actor
  29. #     who has it equipped by x.
  30. #   Put \tp_per[x] in the notebox of an equip to change the TP of an actor who
  31. #     has it equipped to x% of the preexisting value (\tp_per[150] will change,
  32. #     for example, 200 into 300).
  33. #
  34. # Script Calls:
  35. #   change_tp_limit(id, limit[, type])
  36. #     Changes the base max TP of actor or enemy with ID id to limit. id and
  37. #     limit must both be positive numbers. type must be :actor or :a for
  38. #     changing and actor's limit, or :enemy or :e for changing an enemy's limit.
  39. #     If type is ommited, it will default to actor.
  40. #
  41. # Configuration is below. Note that the formulaic options can be extremely
  42. # complicated. They are there for super-duper-crazy-smart people to make their
  43. # games extra-special fun if they want to. By all means, do not feel pressured
  44. # to use these options.
  45. #
  46. #===============================================================================
  47. #
  48. # CONFIGURATION
  49. #
  50. #===============================================================================

  51. module PAC
  52.   module TP
  53.     ACTOR_DEFAULT = 100 # Default for actor TP
  54.     ENEMY_DEFAULT = 100 # Default for enemy TP
  55.     LEVEL = true        # Does TP go up with actors' levels?
  56.     LEVEL_GAIN_DEFAULT = "2"  # How much does TP go up in levels by default?
  57.     # This is multiplied by the level of the actor.
  58.     LEVEL_GAIN = []
  59.     # In this array, we can store the formulae for calculating the amount TP
  60.     # is gained specific to each actor. This is multiplied by the level of the
  61.     # actor.
  62.     LEVEL_GAIN[1] = "self.atk / 4"
  63.     ACTOR_INIT_FORMULA = "rand * 25"  # Default formula for
  64.     # initializing actors' TP at the start of all battles.
  65.     # You can specify the formula for actors in this array.
  66.     AIF = []
  67.     AIF[2] = "[[(rand * 100) - (rand * 100), 0].max + self.mtp / 100 *
  68.     self.level, self.mtp / (self.level / 25)].min"
  69.     ENEMY_INIT_FORMULA = "rand * 25"  # Default formula for
  70.     # initializing enemies' TP at the start of all battles.
  71.     # You can specify the formula for enemies in this array.
  72.     EIF = []
  73.   end
  74. end

  75. #===============================================================================
  76. #
  77. # END CONFIGURATION
  78. #
  79. #===============================================================================

  80. ($pac ||= {})[:tp_system] = 1.0

  81. #==============================================================================
  82. # ** RPG::Actor and RPG::Enemy
  83. #------------------------------------------------------------------------------
  84. #  Data classes for actors and enemies respectively.
  85. #==============================================================================

  86. #--------------------------------------------------------------------------
  87. # Some high-tech shit goin' on up in here
  88. #--------------------------------------------------------------------------
  89. ["Actor", "Enemy"].each { |klass| mtp_code =
  90. %Q(class RPG::#{klass} < RPG::BaseItem; def mtp
  91. return !self.note[/\\mtp\[(\d+)\]/i].nil? ? $1.to_i : nil; end; end)
  92. eval(mtp_code) }

  93. #==============================================================================
  94. # ** RPG::EquipItem
  95. #------------------------------------------------------------------------------
  96. #  A superclass of weapons and armor.
  97. #==============================================================================

  98. class RPG::EquipItem < RPG::BaseItem
  99.   #--------------------------------------------------------------------------
  100.   # * Get TP Gain value
  101.   #--------------------------------------------------------------------------
  102.   def tp_gain
  103.     !self.note[/\\tp[_ ]?gain\[(\d+)\]/i].nil? ? $1.to_i : 0
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # * Get TP Multiply value
  107.   #--------------------------------------------------------------------------
  108.   def tp_multiply
  109.     !self.note[/\\tp[_ ]?mul(tiply)?\[(\d+)\]/i].nil? ? $1.to_i : 1
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # * Get TP Percentage value
  113.   #--------------------------------------------------------------------------
  114.   def tp_percent
  115.     !self.note[/\\tp[_ ]?per(cent)?\[(\d+)\]/i].nil? ? $1.to_i : 100
  116.   end
  117. end

  118. #==============================================================================
  119. # ** RPG::Skill
  120. #------------------------------------------------------------------------------
  121. #  The data class for skills.
  122. #==============================================================================

  123. class RPG::Skill < RPG::UsableItem
  124.   #--------------------------------------------------------------------------
  125.   # Alias listing
  126.   #--------------------------------------------------------------------------
  127.   alias pac_tpsys tp_cost
  128.   #--------------------------------------------------------------------------
  129.   # * Get adjusted TP cost
  130.   #--------------------------------------------------------------------------
  131.   def tp_cost(*args)
  132.     !self.note[/\\tp[_ ]?cost\[(\d+)\]/i].nil? ? $1.to_i : pac_tpsys(*args)
  133.   end
  134. end

  135. #==============================================================================
  136. # ** Game_System
  137. #------------------------------------------------------------------------------
  138. #  This class handles system data. It saves the disable state of saving and
  139. # menus. Instances of this class are referenced by $game_system.
  140. #==============================================================================

  141. class Game_System
  142.   #--------------------------------------------------------------------------
  143.   # Public Instance Variables
  144.   #--------------------------------------------------------------------------
  145.   attr_accessor :actor_tp
  146.   attr_accessor :enemy_tp
  147.   #--------------------------------------------------------------------------
  148.   # Alias listing
  149.   #--------------------------------------------------------------------------
  150.   alias pac_tpsys_init initialize
  151.   #--------------------------------------------------------------------------
  152.   # * Object Initialization
  153.   #--------------------------------------------------------------------------
  154.   def initialize(*args)
  155.     pac_tpsys_init(*args)
  156.     setup_tp_arrays
  157.   end
  158.   #--------------------------------------------------------------------------
  159.   # * Initialize TP Arrays
  160.   #--------------------------------------------------------------------------
  161.   def setup_tp_arrays
  162.     @actor_tp = []
  163.     for actor in $data_actors
  164.       next if actor.nil?
  165.       @actor_tp[actor.id] = actor.mtp || PAC::TP::ACTOR_DEFAULT
  166.     end
  167.     #----
  168.     @enemy_tp = []
  169.     for enemy in $data_enemies
  170.       next if enemy.nil?
  171.       @enemy_tp[enemy.id] = enemy.mtp || PAC::TP::ENEMY_DEFAULT
  172.     end
  173.   end
  174. end

  175. #==============================================================================
  176. # ** Game_BattlerBase
  177. #------------------------------------------------------------------------------
  178. #  This base class handles battlers. It mainly contains methods for calculating
  179. # parameters. It is used as a super class of the Game_Battler class.
  180. #==============================================================================

  181. class Game_BattlerBase
  182.   #--------------------------------------------------------------------------
  183.   # * Get Battler ID
  184.   #--------------------------------------------------------------------------
  185.   if !defined?(id); def id
  186.     actor? ? @actor_id : @enemy_id
  187.   end; end
  188.   #--------------------------------------------------------------------------
  189.   # * Get Max TP value
  190.   #--------------------------------------------------------------------------
  191.   def mtp
  192.     b = actor? ? $game_system.actor_tp[self.id] : $game_system.enemy_tp[self.id]
  193.     if actor? && PAC::TP::LEVEL
  194.       e = PAC::TP::LEVEL_GAIN[self.id] || PAC::TP::LEVEL_GAIN_DEFAULT
  195.       a = eval(e) * (self.level - 1) rescue 0
  196.       b += a
  197.       b += weapon_tp
  198.     end
  199.     b
  200.   end
  201.   #--------------------------------------------------------------------------
  202.   # * Alias for Max TP value
  203.   #--------------------------------------------------------------------------
  204.   def max_tp
  205.     mtp
  206.   end
  207.   #--------------------------------------------------------------------------
  208.   # * Get TP modifiers from equips
  209.   #--------------------------------------------------------------------------
  210.   def weapon_tp
  211.     return 0 if !actor?
  212.     t = 0
  213.     equips.each { |equip|
  214.       next if equip.nil?
  215.       n = 0
  216.       n += equip.tp_gain
  217.       n *= equip.tp_multiply
  218.       n = (n * equip.tp_percent) / 100
  219.       t += n
  220.     }
  221.     return t
  222.   end
  223.   #--------------------------------------------------------------------------
  224.   # * Fix TP rate for adjusted Max TP
  225.   #--------------------------------------------------------------------------
  226.   def tp_rate
  227.     @tp.to_f / max_tp
  228.   end
  229. end

  230. #==============================================================================
  231. # ** Game_Battler
  232. #------------------------------------------------------------------------------
  233. #  A battler class with methods for sprites and actions added. This class
  234. # is used as a super class of the Game_Actor class and Game_Enemy class.
  235. #==============================================================================

  236. class Game_Battler < Game_BattlerBase
  237.   #--------------------------------------------------------------------------
  238.   # * Initialize TP
  239.   #--------------------------------------------------------------------------
  240.   def init_tp
  241.     if actor?
  242.       e = PAC::TP::AIF[self.id] || PAC::TP::ACTOR_INIT_FORMULA
  243.     else
  244.       e = PAC::TP::EIF[self.id] || PAC::TP::ENEMY_INIT_FORMULA
  245.     end
  246.     self.tp = eval(e) rescue (rand * 25)
  247.   end
  248. end

  249. #==============================================================================
  250. # ** Window_Base
  251. #------------------------------------------------------------------------------
  252. #  This is a super class of all windows within the game.
  253. #==============================================================================

  254. class Window_Base < Window
  255.   #--------------------------------------------------------------------------
  256.   # * Draw TP
  257.   #--------------------------------------------------------------------------
  258.   def draw_actor_tp(actor, x, y, width = 124)
  259.     draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
  260.     change_color(system_color)
  261.     draw_text(x, y, 30, line_height, Vocab::tp_a)
  262.     draw_current_and_max_values(x, y, width, actor.tp.to_i, actor.mtp,
  263.       tp_color(actor), normal_color)
  264.   end
  265. end

  266. #==============================================================================
  267. # ** Game_Interpreter
  268. #------------------------------------------------------------------------------
  269. #  An interpreter for executing event commands. This class is used within the
  270. # Game_Map, Game_Troop, and Game_Event classes.
  271. #==============================================================================

  272. class Game_Interpreter
  273.   #--------------------------------------------------------------------------
  274.   # * Alter TP limit for enemy or actor
  275.   #--------------------------------------------------------------------------
  276.   def change_tp_limit(id, limit, type = :actor)
  277.     if type == :actor || type == :a
  278.       $game_system.actor_tp[id] = [limit, 0].max
  279.     elsif type == :enemy || type == :e
  280.       $game_system.enemy_tp[id] = [limit, 0].max
  281.     end
  282.   end
  283. end

  284. #===============================================================================
  285. #
  286. # END OF SCRIPT
  287. #
  288. #===============================================================================
复制代码
原地址找不到了,,呜呜,,

点评

无语了,脚本中直接改个数字就可以了,这么麻烦干嘛  发表于 2012-8-12 00:12
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
758
在线时间
2065 小时
注册时间
2011-10-3
帖子
1686
6
发表于 2012-8-11 23:39:14 | 只看该作者
l616631804 发表于 2012-8-10 21:06
数据库中不能修改了,只用用其他的TP管理的脚本!  这里有一个原地址找不到了,,呜呜,,
...

非常感谢

但我是英文白痴,能问下怎么用吗?如果仅仅改变技能使用的特技值上限的话
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2112
在线时间
436 小时
注册时间
2010-11-22
帖子
413
7
发表于 2012-8-15 06:09:01 | 只看该作者
如何样个人TP上限啊?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1019 小时
注册时间
2012-4-25
帖子
799
8
发表于 2012-8-15 11:24:33 | 只看该作者
大概是这个意思吧,在备注栏打下以下内容

\mtp[x],可以为角色设置最大TP值 X
\tp_gain[x] 可以在装备中增加TP值 X
\tp_per[x]  TP值乘以X%,如X=150,原TP值为200就会变为300
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1019 小时
注册时间
2012-4-25
帖子
799
9
发表于 2012-8-15 15:28:50 | 只看该作者
暂时不曾成功……
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-2-23 06:28

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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