Need help to modify TP mechanism

So, in battle you can get TP points attacking or being attacked. What I want to do is to only get TP when a character attacks, and get nothing when being attacked. Anyone can help me with that? I was looking for some TP function in base code but I didn't find anything.
you should never modify the base code as that would cause problems if you have to update the project core.

either use a plugin or find some other way.

in this case, no code is needed at all - you just want to set the tp charge rate to zero for all your actors, and that can be done by traits alone.
OK I found the yanfly plugin 'enhanced TP' for that and much more TP settings

Original thread: https://forums.rpgmakerweb.com/threads/need-help-to-modify-tp-mechanism.117836/