As a guy who tinkers with how RPG Maker works, I have come up with a lot of ideas I find to be cool, and I typically like creating them without the help of plugins to see how far I can get. To be honest, I'm kind of proud and surprised I managed to do this one!
UPDATE: Thanks to
@Arthran, a bug was spotted that somehow made the system work as intended, but just have some extraneous data that wasn't needed. The issue is fixed, and now said extraneous data
is needed.
Synchronizing TP means that for every party member, the TP is the same, both earned and used. If member #1 has 10 TP, then so does everyone else.
Grand.
How I did this was a bit complicated and required using scripts to prevent things from getting too bloated in the variables department and less roundabout in general.
Before I get to code anything, to keep things simpler, I disabled TP Charging from skills and attacks by just giving all Actors the Sp-Parameter:
First up was a common event to start our battle commands to prevent enemy event tabs from getting big:
To prevent the random TP charges at the beginning, I drained the TP of all the actors in battle (though I do have the variables so that it can be every party member instead of specific actors) to 0, then activate a CE before doing a pre-battle sync, then turning on a switch that turns on constant TP Sync every turn.
A big boy. The script is pretty simple, it's just a very primitive version of level scaling for TP charging, where the actor's levels determine how much TP they contribute to the TP charge, and it's repeated for every party position. Because I didn't actually feel like learning how to and making a curve calculation, this is just what I did.
This is what is activated by the switch. In battle, it adds up the party's TP gain determined by the CE above before adding it to the party leader's, then it uses script to set the party members' TP to the party leader's every turn, thus syncing their TP.
EDIT: Adding "Turn End" as a condition in your battle page fixes the issue where TP Gain only happens after you choose your actions in battle instead of before. If you like that for some reason, don't put Turn End in.
While syncing TP every turn works fine if you aren't using any TP using skills, if you do, the TP bars get desynced, so to fix this I put this CE in in order to "reset" the leader's TP to the party member with the lowest TP, setting the other members to 0 TP, then resyncing their TP bars. This allows the usage of TP as a shared bar without having to use a plugin!
ADDENDUM: As for the "bug," I simply failed to give the Party Leader variable, an actual value. This caused it to spread TP love to the whole party instead of just the leader, which acts as a "TP Core" in this post. If you don't wish to keep the Sync TP CE, then just make it so that everyone receives TP from the TP Charge (although the Resync TP CE is still needed to prevent Skills from desyncing TP).
Now, of course there are issues/differences from standard TP. First of all, TP gain is completely static (whether that's a boon or a curse is your call). If you can figure out how to keep TP charges while keeping the bar from desyncing, then be my guest. Second, TP doesn't increase until after you've made your turn. This means that to use TP skills, you have to use wait an extra turn before you can actually use it if you're lacking in TP (FIXED. The edit explains how). Third, TP doesn't sync after skills until the skill effect is finished. It's a minor visual "bug," but it might annoy some people.
But other than that? It's a perfectly usable way of using TP to act as a shared gauge for the party, leading to better management of TP skills, if you so want. Is application cumbersome? A bit, yeah. Is it clunky? Sure. Can plugins do what I just did much better? Definitely. But this was a fun test to see the limits of RPG Maker and my own skills, and to be honest, I kind of like the result.
本贴来自国际rpgmaker官方论坛作者:zXManyRegretsXz处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/making-synchronized-tp-without-plugins.143835/