Creating a counter tied to a character

My apologies if the title is a little vague but I'm not exactly sure how to concisely request what I'm looking to do.

In my current project, one of the early party members starts the game as an undead character. In order for him to continue living he has to collect souls, which he does by defeating enemies in battle.

These are the functions I want to implement:
-upon recruitment, starts with X "soul"
-entering into a battle causes -1 soul
-walking X amount of steps outside of battle causes -1 soul
-every X seconds in battle causes -1 soul (may cut this idea)
-upon defeating a non-undead, non-machine enemy, he is granted +1 soul
-Soul may be used as a resource for this characters skills, in lieu of MP.
-When soul reaches 0, HP is set to critical (possibly cut stats as well, but currently not necessary) and cannot be healed above that threshold while Soul is at 0
-there will be an accessory and a weapon that, when equipped, increases Soul accrual by +1 and +2 respectively.
-a gauge or something to visually represent the current amount of soul, preferably visible in menu and in battle

I've messed around with things like increasing/decreasing variables, but I can't seem to figure out a way to tie it all together and make it work.

It seems to me this might require a custom plugin to accomplish, but if there is anything I can do with the default tools, that would be preferred.

Any help/advice at all would be greatly appreciated.

Thanks in advance!
Hi, here are ideas without plugins:

you could use variable 'souls' and upon recruitment set it to X using event.
  • Entering into battle -> -1 soul:
    • If battle is triggered by event you can decrease variable in the event.
    • Else you could decrease souls in Troop's battle event.
  • walking X amount of steps outside of battle:
    • Common Event that is parallel and controlled by a switch that you could set on and off to control the mechanism. You can get steps into a variable and check if X is walked. Maybe some js would be needed
  • every x seconds in battle causes -1 soul - maybe change to every x turns?
    • Anyway there is timer mechanism that you could use
  • upon defeating a non-undead, non-machine enemy, he is granted +1 soul:
    • You would do this in battle event. You can set condition to Enemy HP <=0 as a trigger and then for non-machine non-undead enemies you would increase souls variable. Con of this solution is you need to do this in every troop in your game
  • Soul may be used as a resource for this characters skills, in lieu of MP.
    • you could add an effect to a skill to call common event where you would decrease souls variable
  • When soul reaches 0, HP is set to critical (possibly cut stats as well, but currently not necessary) and cannot be healed above that threshold while Soul is at 0
    • common event that checks for souls and sets hp to 1
  • there will be an accessory and a weapon that, when equipped, increases Soul accrual by +1 and +2 respectively.
    • your events would need to check if you have this equipped
  • a gauge or something to visually represent the current amount of soul, preferably visible in menu and in battle
    • Other than using mana for souls instead of variable you probably can't do it without plugins.

That said it adds so much complication to your game for just this one character that writing a plugin for it is probably preferable.

Original thread: https://forums.rpgmakerweb.com/threads/creating-a-counter-tied-to-a-character.176149/