Secondary money (skill points)

Hi so in my game I have this dojo where there are 3 dummies. I want you to be able to get 1 skill point (name of the secondary money) every time you critically hit one of the dummies. There will be a guy that you can buy skills from with skill points.  All I need to know is how to have a variable change each time a critical hit happens on a certain troop/enemy. Also how would I display skill points on the menu and when you talk to the guy (like how you can do \$ to show the gold window). Thanks
Sounds like something that can be achieved with variables, but I don't know how you would go about adding a point every time you got the crit.
If you can think of a way to use a variable, then you can display a variable though by doing \V[*whatever the number is for that variable*]
\V[0] for example is the first variable on the list. If it was set to 444 then if you typed:
"your current skill point total is \V[0]" it would show as "your current skill point total is 444" in game.
Is the dummies have same id ?
Is the dummies have same id ?

yes all 3 dummies use the same enemy 
put this in formula damage before the damage


if (b.result().critical&&b._enemyId==X){ v[Y] =+ Z};


X = Dummy ID


Y = Variable ID


Z = How much you want skill point
put this in formula damage before the damage


if (b.result().critical&&b._enemyId==X){ v[Y] += Z};


X = Dummy ID


Y = Variable ID


Z = How much you want skill point

I have this for the attack formula "if (b.result().critical&&b._enemyId==13){ v[11] += 1}; a.atk * 4 - b.def * 2" The variable is not going up by one when I do a critical hit for some reason.
Sorry my mistake change += to =+
Sorry my mistake swap += to =+

Still is not working 🙁
Are you sure about enemy I'd?  Variable I'd? Did you get critical hit or 0 damage? Did you put "" quote?
Are you sure about enemy I'd?  Variable I'd? Did you get critical hit or 0 damage? Did you put "" quote?

The dummy is the 13th enemy and troop I have. The variable for skill points is 11, and the event i'm using to check how many skill points you have is also set to show variable 11. I got the critical hit but I messed around with it a little and I did get 0 damage but its back to normal now. No i did not put the quote in the formula.
Try this 


if (b.result().critical&&b._enemyId==13){v[11]=+1;$gameMessage.add(v[1])};a.atk * 4 - b.def * 2
Try this 


if (b.result().critical&&b._enemyId==13){v[11]=+1;$gameMessage.add(v[1])};a.atk * 4 - b.def * 2


Screenshot7.jpg
Try this 


if (b.result().critical&&b._enemyId==13){v[11]=+1;$gameMessage.add(v[1])};a.atk * 4 - b.def * 2

Would it be any easier to make any critical hit increase the variable instead of only critical hits on the dummy?
I hope this work


if (b.result().critical&&b._enemyId==13){$gameVariables.setValue(13,$gameVariables.value(13)+1);$gameMessage.add(v[13])};a.atk * 4 - b.def * 2


if not try just put this


$gameMessage.add(b._enemyId);a.atk * 4 - b.def * 2


and see what number you get
I hope this work


if (b.result().critical&&b._enemyId==13){$gameVariables.setValue(13,$gameVariables.value(13)+1);$gameMessage.add(v[13])};a.atk * 4 - b.def * 2


if not try just put this


$gameMessage.add(b._enemyId);a.atk * 4 - b.def * 2


and see what number you get

I tried both and they both gave me an error message.
$gameMessage.add(b._enemyId);a.atk * 4 - b.def * 2


You will get error if the dummy attack first


try attack first
$gameMessage.add(b._enemyId);a.atk * 4 - b.def * 2


You will get error if the dummy attack first


try attack first

The dummy is not able to attack and has 1 agility.
strange, it works for me without any problem


maybe you used plugins or modified original scripts?!


try new project without any plugin


also you can give me data folder so i can figure what the problem
strange, it works for me without any problem


maybe you used plugins or modified original scripts?!


try new project without any plugin


also you can give me data folder so i can figure what the problem

I am using 4 plugins, i have also put some dlc images and music into my project. I'm not sure if that is the problem. My plugins are YEP_CoreEngine, from Yanfly, AltSaveScreen, BattleResultsPopup, and OuterSelfSwitch (the last 3 are from Yoji Ojima). How do I give you my data folder?
before give me data folder try new project without any plugin and see what happen

Original thread: https://forums.rpgmakerweb.com/threads/secondary-money-skill-points.59887/