MerlinCross

Veteran
Veteran
Joined
Jun 8, 2015
Messages
226
Reaction score
95
First Language
English
Primarily Uses
I'm back and trying to refigure things out. Like TP.

So I'm tinkering around with a system that makes TP a risk reward thing based on managing it. Thus far I have it set up to start at 0 by default. What I'm trying to do is make it so that each attack generates or lowers TP by a set amount(Usually as part of the battle formula, so Fireball gives 10 TP to the target).

But each hit generates TP additionally anyway. How would I stop this from happening? I believe it's somewhere in one of the game java scripts but the little changes I've tried doing haven't really shown any result outside of making it so they don't generate TP when hit. So what I'd like to do is the following;
1) Stop getting TP per Swing
2) Stop generating about 10 TP per turn

Honestly the second one isn't too bad and is probably a plug in(VisuMZ BattleCore probably has something in it) but I'd like to ask here before really trying to dig into the scripts and break something, and feel confident it's more something in the base engine than plug in. At least for the first issue.
 

Lostboy

Veteran
Veteran
Joined
Aug 25, 2018
Messages
31
Reaction score
23
First Language
English
Primarily Uses
RMMZ
Are you basically wanting to control your TP system in a sort of manual transmission mode and have no automated TP gains at all?

Code:
Game_Battler.prototype.gainSilentTp = function(value) {
    //this.setTp(this.tp + value);
};

This disables 1 & 2 and gains no TP on damage but it also disables TP gain from "Invocation" tab.
1.png
It will still require the set amount of TP to use a skill and it will subtract the amount used as normal.

P.S. If you're ever worried about breaking something in the rmmz scripts, just make a seperate plugin with the code in question and you can easily revert/edit your changes without worrying about the base engine.

Edit: Looking at the code it does that with enemy TP too so Andar's method would be more effective in this case.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,279
Reaction score
8,361
First Language
German
Primarily Uses
RMMV
By default, there are exactly two ways to gain TP: By damage and by special skill use.

Special skill use is determined by the field "TP Gain" of the skill in the database. If you set that to 0 then you will not gain any TP when using that skill. It has to be set for each skill individually.

TP by damage is automatic - whenever an actor or enemy is damaged, a small amount of TP is gained - the higher the damage, the higher the amount of TP. You can compare this to adrenaline.
This part is controlled by the TP Charge rate - which is an SP-Parameter that defaults to 100%.

If you do not want TP by damage, then all you have to do is to give all actors and enemies a TP Charge Rate of 0%, absolutely no need for any plugins.

In my opinion too many user call for plugins too much and too early - the engine itself is rather powerfull and can do a lot of things, if you just take the time and learn it.
 

Drakkonis

Veteran
Veteran
Joined
Mar 5, 2021
Messages
199
Reaction score
154
First Language
English
Primarily Uses
RMMZ
In my opinion too many user call for plugins too much and too early - the engine itself is rather powerfull and can do a lot of things, if you just take the time and learn it.
As a plugin developer, I feel like I should be offended. :p

Actually, I mostly started and continue developing plugins because I personally find it easier to code what I want rather than messing with the eventing interface. It's good for those who can't or don't want to code, but since I can and LIKE to code, I find the interface to be annoyingly clunky. Especially when trying to look at nested conditional branches when a simple switch statement would do the job and look MUCH nicer.

That being said.... OP, I recommend the KISS method. And it doesn't get much easier than letting the engine do the work. The TP Charge Rate method provided in the engine will do the job. You'll have to make sure it's properly set on every battler (not sure offhand if it's automatically set up on new entries or not. Been awhile since I've looked at that).

There IS a function in the code that automatically charges TP via damage, you can also overwrite/modify that for a one-stop solution. Not recommended if you don't know what you're doing and/or aren't sure you won't change your mind later.
 

MerlinCross

Veteran
Veteran
Joined
Jun 8, 2015
Messages
226
Reaction score
95
First Language
English
Primarily Uses
In my opinion too many user call for plugins too much and too early - the engine itself is rather powerfull and can do a lot of things, if you just take the time and learn it.

One reason I asked rather than going digging for plug ins. I just recall that when I asked a simliar question for MV last year(and would have to find the topic again) I was told to pop open the script of the game and change some numbers around to do it.

Thanks for the help, things are working just fine and I have identified the plugin that is providing 10 TP per turn. That's not too much of an issue for the idea I have but it's good to know what to pop open to try and fix.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,279
Reaction score
8,361
First Language
German
Primarily Uses
RMMV
I was told to pop open the script of the game and change some numbers around to do it.
that is actually one of the worst solutions in my opinion, but that is something that would go to far for discussion.

What you need to keep in mind is that not everyone trying to help here knows the engine to the same amount. You should always check who answers a question, and if they are relatively new to the engine then you should check other possible options - there are usually several ways to solve any problem.

And sometimes the answers given by new users are simply wrong, but still repeated endlessly by others who don't know what they are writing. There was for example once an especially idiotic user who convinced several others that the condition "don't run" means "the player doesn't try to escape" and that a troop event with that setting would be executed at the end of a battle if the player didn't escape from it. In reality it comes from "to run a program" and means that that troop event will never be executed.
But since several users believed that idiocy it took a year or two before that "advice" vanished.

In your case, all of the tips given would have worked (even the one editing the core files) - but they would have had different side-effects that may or may not have caused other problems later.

In my opinion, if the engine provides a method then that method should be used even if it is sligthly more work. A plugin should be used only if there is no way to handle the thing with the engine alone, or if the engine method would require extremely more work.
So there are only a few cases where I suggest a plugin as a solution - especially since large number of plugins mean larger probabilities of bugs introduced into the game.
But in the end a lot of it depends on what the game already has as plugins, and you didn't give that information so you'll have to decide which way to go.

Editing core files however should only be done after an engine has stopped being updated - because you would have to either repeat the editing after each core update, or block your game from receiving core updates.
 

Drakkonis

Veteran
Veteran
Joined
Mar 5, 2021
Messages
199
Reaction score
154
First Language
English
Primarily Uses
RMMZ
There was for example once an especially idiotic user who convinced several others that the condition "don't run" means "the player doesn't try to escape" and that a troop event with that setting would be executed at the end of a battle if the player didn't escape from it. In reality it comes from "to run a program" and means that that troop event will never be executed.
But since several users believed that idiocy it took a year or two before that "advice" vanished.
I had wondered about that. If it's never going to execute, what's the point of it being an option?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,279
Reaction score
8,361
First Language
German
Primarily Uses
RMMV
If it's never going to execute, what's the point of it being an option?
everyone can only guess, but valid reasons would be to easily disable a troop event during bughunting without deleting it, to make the programming of the editor easier or as placeholder when the developer is not yet sure which conditions to use.
It also allows you to already test the rest of the battle while a larger but still incomplete troop event is in the process of being worked on.
 

Drakkonis

Veteran
Veteran
Joined
Mar 5, 2021
Messages
199
Reaction score
154
First Language
English
Primarily Uses
RMMZ
everyone can only guess, but valid reasons would be to easily disable a troop event during bughunting without deleting it, to make the programming of the editor easier or as placeholder when the developer is not yet sure which conditions to use.
It also allows you to already test the rest of the battle while a larger but still incomplete troop event is in the process of being worked on.
Equivalent of commenting out a line in script when testing. Got it. The name is non-intuitive, I assumed it was as you said, don't try to run at the start of a battle. Especially since the pop-up in that section doesn't say anything about it.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,279
Reaction score
8,361
First Language
German
Primarily Uses
RMMV
The name is non-intuitive
most likely due to a less than experienced japanese-english translator years ago, and then carried through every version...
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,699
Reaction score
2,800
First Language
English
Primarily Uses
RMMZ
God, that reminds me of the cornucopia of confusion over what "appear halfway" meant. So many people thought it was about transparency.
 

Latest Threads

Latest Posts

Latest Profile Posts

Feel free to check out our "Touch the Stars" gamejam submission, "Starlight, Starbright!"
just finished playing one shot. im kinda disappointed with return the sun ending ngl. i was hoping there would be some after credits scene that would play with my emotions
So apparently the surprise Google Search page browser game saves your progress when you close the browser.

This really makes me miss the golden age of Flash gaming.
ohh man im ending oneshot now (im doing the last stepping puzzle rn) and the music is so...sad...like...ive been thinking recently about how fast moments pass and...my anxious thoughts combined with that music and nostalgia...like...im comfortably sad...and want to cry internally
We're playing one of the Touch the Stars game jam entries, come join us!

Forum statistics

Threads
113,552
Messages
1,075,790
Members
147,551
Latest member
ananansy
Top