Party/Troop-Based TP

cardcafe

Villager
Member
Joined
Dec 1, 2013
Messages
7
Reaction score
1
First Language
english
Primarily Uses
RMVXA
Hello, I have a request regarding how TP is handled.
By default, it is tied to individual actors and enemies. However, I would like for these to be based on parties/troops instead.

In other words, any TP accumulated by either performing actions/receiving damage or used with skills would be shared by an entire group. Alternatively, I'd just like some simple way to have TP be synchronized between battle participants (if it's gained or lost by one participant then the same would apply for the rest of the group, etc., etc.).

Hime's Synchronization Effects came *close* to my needs, but it's rather complicated to get the hang of.

If any other information is needed, I'll gladly elaborate.
 
Last edited by a moderator:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,278
Reaction score
6,026
First Language
Indonesian
Primarily Uses
RMVXA
How do you want to display this? By default, it's all tied in the individual actor status window. But by making it general, isn't it better to remake the battle UI?
 

cardcafe

Villager
Member
Joined
Dec 1, 2013
Messages
7
Reaction score
1
First Language
english
Primarily Uses
RMVXA
I'd like to be part of its own window, completely detached from the actor status. Enemy/Party TP would be displayed in a similar manner to Galv's Battle Favor script (Bars excluded). It would be easier to move around that way.

1585816299365.png
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,278
Reaction score
6,026
First Language
Indonesian
Primarily Uses
RMVXA
I'm too lazy to create a new UI, but here's that mechanically should work.
Code:
#=============================================================
# Universal TP
# By: TheoAllen
#-------------------------------------------------------------
class Game_Unit
  def max_tp
    return 100 # <-- change maximum here
  end
 
  def init_tp
    self.tp = rand * 25 # <-- change initial TP here
  end
 
  def tp
    @tp ||= 0
  end
 
  def tp=(value)
    @tp = [[value, max_tp].min, 0].max
  end
 
  alias universal_tp_onbattle_start on_battle_start
  def on_battle_start
    universal_tp_onbattle_start
    init_tp
  end
 
end

class Game_Battler
 
  def tp
    friends_unit.tp
  end
 
  def tp=(value)
    friends_unit.tp = value
  end
 
  def max_tp
    friends_unit.max_tp
  end
 
  def tp_rate
    self.tp.to_f / max_tp
  end
 
  def init_tp
  end
 
end
See if this is what you want. Perhaps someone would make the UI.
 

cardcafe

Villager
Member
Joined
Dec 1, 2013
Messages
7
Reaction score
1
First Language
english
Primarily Uses
RMVXA
It was missing an "end" somewhere apparently, but other than that, works like a charm! Thanks a ton.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Haven’t gotten over a mentor’s promotion. He deserves it, but he was the first person to be nice to me at work. It’s been hard for me to let him go.
So its confirmed MZ will have tile size locked at 48x48. So thats extremely lame. Still probably going to get it for the assets but Im gonna pout the whole time.
A friend used to ask why I don't colorize most of my drawings? The answer: I'm colorblind.
Thought something big was going down when I saw a riot van and two cop cars outside my home. Nope. Just multiple calls about one man kicking off in the street. xD
RPG Maker MZ does confirm in its RPG Maker website blog about new features. Graphics of course look gorgeous, but how about what keeps the engine together?

Forum statistics

Threads
99,341
Messages
964,299
Members
130,945
Latest member
studiojap
Top