can't get monitoring a non-party actor's states to work right

Hello! I'm making my own on-map battleyish system, and using non-party actors for enemyish templates (I call ECs), I'm trying to make a parallel process event on the map that checks if that non party actor has a state and if not, use an action that gives it that state.

I have a script line in a condtional branch: v172 is the Actor ID, v173 is State ID I'm checking for
$game_actors[$game_variables[172]].state?($game_variables[173])

I tried isolating the problem I'm having, this is a simplified version of the parallel process event still with the problem:
RPGVXAce_bLJ6OEZSev.png

oops it's look like cow

It works normal if that actor I'm checking is in the party (which I don't want, it's an enemyish! 😛) but if it's not in the party the first time it will work right once (add the state and no more after that) but if I use the "change state" command to remove the state, after that it will just repeatedly try to add the state with the action I made and that conditional branch check will always come back as not having the state.

I also tried using these parts just with a "action button" event and used "show choices" to add/remove the state, and used that same conditional branch to check if that non party actor has that state and it always works right, Is the way I have it tripping over itself as a parallel process?

If you could help, that'd be great thank you!
for the engine, actors that are not in the party do not exist and are not stored or handled anywhere.

There is a reason why any form of ABS or tactical battle system almost always requires scripts.
To make an ABS by eventing alone, you would have to store every enemy value in its own variable, you cannot shortcut that by using actor data.

If you want to keep using eventing for most of your battle system, I suggest you search for a set of scripts called the "self data suite". That would allow you to create self-variables for events to store their additional data without having to reserve hundreds of regular variables.

There are a few topic on this forum that contain dead links to the self data suite, because everytime a website with it was lost someone else put it up on a new website. I just don't know which is the latest working link, you'll have to test them all.
If ECs in your party is working, why not just set it so that the player can only have a fixed amount of actors in their active party and then disable the formation menu. (would work well if player controls the same actors throughout the whole game, but would be a hassle if player controls a variable amount)
Note: there is apparently no limit to how many actors you can place into the player's party.

Alternatively, you said it "works right once". Im not sure where or how you're storing this, but assuming you're using multiple Variables, why not turn the one thats working into an Array to store multiple variables in one.
Here's my notes on how to use Array Script Event Commands
Code:
$game_variables[ID] = []
   (Convert Variable > Array)

$game_variables[ID].push(Value)    vs    $game_variables[ID].pop
$game_variables[ID].unshift(Value)    vs    $game_variables[ID].shift
   (Add/Remove, value to, End/Start)

$game_variables[ID].delete_at(index)    vs    $game_variables[ID].clear
   (Remove1/RemoveAll, values)

$game_variables[ID][index]
$game_variables[ID][index] = Value
   (Get/Set index values)

$game_variables[ID].index(Value)
   (Check if index has specified value)

Note: Index order is: 0,1,2,... not 1,2,3,...
Note2: ID = the variable id, eg. 172
@Zahawk
while that is theoretically possible, it has the problem that the other actors are still accessable through the regular menues for skills, items and so on. Blocking the formation screen only blocks their use in battle due to reordering, it does not block their use in menu.
Thanks for responding! First I thought I could give a better test example (I didn't explain it well) I made it in a new game project to make sure nothing else was messing with it, there's no other variables or anything else to it but this:

RPGVXAce_z65sfNNJGQ.png


It seems the conditional branch script line:
$game_actors[5].state?(6)
only works once for some reason, it will add the state to the non-party actor (actor 5 in this example) but if you remove the state after that the conditional branch will always come back as not having the state, furthermore if after this you add that character into your party you can't add that state to them anymore (If you add the state and then add the non party member, they'll have the state after you add them to your party, only the first time though). even the other ways I thought I had it working failed after doin this 🙁

I'm confused at why the conditional branch can check NO state and YES state once each and then permanently screw up... or is it the add/remove state on non party members that’s working once and then screwing up…

Oh well, I know how make the kind of states I want with eventing, I just hoping for a shortcut haha.

@Andar that "self data suite" sounds interesting, I tried looking a bit for it just dead links so far, I'll keep looking for it

Thanks for your help @Andar and @Zahawk
So i've set up your test example and played around, it seems that if you use the 'Recover All... > Actor 5' event command rather than the 'Change State... > remove' it fixes your weird bug. (need to re-add other states though...)
Both are doing essentially the same thing, so i've no idea why one bricks the actors states and the other doesn't.

Therefore "the add/remove state on non party members that’s working once and then screwing up" seems to be the problem.
That does work!, I didn’t even think of that, It must refresh whatever checks out the states normally, I’ll look into it more after work, I wonder if I could make a work around with just the recover all?
So while I was working on this I stumbled on using skills in place of states to see if it has the same problem, but it actually seems to work with adding/removing skills to non-party actors so far! I tried different mixes of add/remove skill and add/remove party member and it always checked has/doesn’t have skill correctly.

Since most of my states are just empty signs and it’s my events that apply the state’s effects instead, I think it might be easier to try to make skill versions of my states for the non-party actors and use regular states for my actually party, the only thing I’m missing is a conditional branch script line like the:
$game_actors[5].state?(6)
That checks for skills instead…

I hate to be greedy and ask for more help… but would you know the equivalent conditional branch script line for checking if actor X has skill X?
I found a link to that SelfDataSuite if you still wanted it.
Sweet Thanks @Zahawk!

Original thread: https://forums.rpgmakerweb.com/threads/cant-get-monitoring-a-non-party-actors-states-to-work-right.169625/