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,068
Reaction score
5,691
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,068
Reaction score
5,691
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 Posts

Latest Profile Posts

I based this on the armor of Actor 1_7 of the RTP. Hair is from Derex and Sythian Bard.
Stream will be live shortly! Going to do another art stream tonight so that I can finish my Fauna Focus piece~ Feel free to drop by!
Humans are fallible creatures, we all know that. It's when we're forced to look at ourselves that we start to disagree. :p
Expectation: Working on boss battle.
Reality: "Look at how awful are these code and database organization. Let me clean this mess", *yet, casually adding more modules that I have no idea if I would use it later*
Trying to learn to read Japanese so I read my manga. I like to buy them without all the edits made during translation.

Forum statistics

Threads
97,865
Messages
947,456
Members
129,089
Latest member
candutekno
Top