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,085
Reaction score
5,698
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,085
Reaction score
5,698
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

Jumping and gravitation 0.1 build - RPG Maker MV
Currently playing final fantasy 3 on DS. It's an old one but its a classic.
BCj
Gotta love some gossip :D
Please do not buy games from g2a.com. The sellers have total power over you. The website has many scam sellers. It looks cheap, but the key code didn't work.

Forum statistics

Threads
97,946
Messages
948,078
Members
129,200
Latest member
jakeofblades
Top