Name of target in attacks?

Just a simple request.


I currently have a Variable set to show a targets name in attacks but it's not exactly working how I intended. The Variable is currently labelled under 500 as "b.name" where in a Skill, it would apply the Variable to a skills formula (eg = v[500] = b.name ; a.atk * 4 - b.def * 2) and in the "Using Message" it would state such as "(User Name) attacks \v[500]!"

The problem however is that it does not initiate the name of the target correctly. It only applies the Variable "after" the damage calculation has been done, not "when" the attack is initiated.


A example of what is going wrong.

Rustin attacks 0! <- Rustin called the attack but the Variable is still set to a default value (in this it's 0).


Rustin hits Bear for 200. <- Variable only activated "after" damage calculation was applied.


Damian attacks Bear!


Damian hits Bear for 250.


Bear raises up and slams both paws on to Bear! <- Variable is clearly not working as intended here. We want to see "who" the Bear is attacking.


Bear hits Damian for 150.



ouR5V4o.png



Does anyone know how to "resolve" the issue? I just need some way, even a script, to say which character/enemy is attacking which "target".
Can you please give a more detailed explanation, for example why you can't use the default vocabs (which automatically include the enemy name in the skill message)?


Anything could be changed with a script, but in those cases the scripter needs more details like where to get the name and so on.
Essentially it's what the screenshot is showing that's going wrong that needs to be fixed. Where "0" should be, it should display the designated targets name of the attack (in this case it should be "Rustin attacks Bat!" instead of "Rustin attacks 0!" as the Variable is only applying "after" any damage is done which causes a delayed effect for each successful attack).

I've also tried applying the standard three message tags (egs = \N and \N[n]) but they will always come up as a blank space in the message. I've even went and removed Yanfly's Ace Message System and KilloZapit's Word Wrapper scripts to test if they were causing the blank spaces using \N and such but it still happens. Coding isn't my forte so I'm not sure what needs to be fixed.

dRWOvwI.png



x3o1kx1.png
I've moved this thread to RGSS3 Script Request. Please be sure to post your threads in the correct forum next time. Thank you.



You'll need a script for this, and it needs to be one that changes part of the battlesystem. Message scripts won't help because the problem is in the battlesequence.


The damage formula is always executed after a hit - it will not even be executed if the attack misses, and it will always be after the skill message is displayed in battlelog.


So nothing short of a modification of the battlescripts will give you what you want.
I sadly don't know how to code (I'm far better at art and music then I am with programming) and every script I read over has so many different ways of calling thing like "target.name" and such.


I'm just going to have to be patient till someone has a solution.

Original thread: https://forums.rpgmakerweb.com/threads/name-of-target-in-attacks.61343/