MZ Checking for Actor death in Battle and making a param for (VisuStella)Status Menu - LP System like Romancing Saga

Hello everyone,


What Im trying to do:

In Romancing Saga every character has a certain amount of LifePoints. Everytime they die that amount gets subtracted by one.
If the amount of LP is depleted, they are dead and cant be brought back to life.


What I've tried:
Using the VisuStella plugins i tried to have LP show up in the status menu as a parameter. Found where in the core where to do that but I dont know how to set a value for that parameter for every actor.
I copied the JS:Value but of course on its own it doesnt do anything.

// Declare Constants

const user = this;

// Calculations

return (user.lp);

As lp is not defined/has no value to it. so i was stuck here on how or where to do that.

Tried using the Traits system and to add a new trait so i can give the actors a note tage like <LP: x> and be "done". Also didnt functioned as I'd like it too. Still not knowing how i would go on about checking the death status thing.

Edit: I forgot to install the ItemEquipCore. LifePoints stat now shows up and displays NaN as figured.

Thought I would do that via Troop conditions instead. I, somewhat, got what i had in mind working.

I stored the LP value in a variable and as an example set it to 3. (#10 Act 1 LP)

Conditions: Actor HP (1) <= 0%
Span: Battle

Control Variables: #10 Act 1 LP -=1
If: Act 1 LP = 0
-> Change Party Member: Remove Actor1

The Problem is now - depending of the span setting it either:
1. Subtracts 1 from the Var - as it should - but only once the entire battle. even if actor is revived and dies again.
2. does it automaticly every round (or on moment till it removes the actor)

I am fine if it only does it once per battle. i can live with that. The Issue is that Troops can only hold 20 event Pages.
If i wanna have more "random party members" id probably need more pages.


What I'd like to do:
- Check if any actor is dead as the condition only lets me select a specific actor on the troop register.
- subtract the var for LP once per applied death status


Does someone have a smarter idea to handle it or might have an idea to make it as an parameter that you can change up and down ?

Greetings.

Original thread: https://forums.rpgmakerweb.com/threads/checking-for-actor-death-in-battle-and-making-a-param-for-visustella-status-menu-lp-system-like-romancing-saga.177104/