Unremovable character

Sooo,

I'm not sure how to do this:

I want the main character to not be able to be removed from the party, I do use Yanfly Party System, but the character gets locked
in the slot, regardless if I use lock or require system.

I want the character to not be removed from the party, but able to switch slots with other members (Because some features
changes based on Party actor #1 ID's)
For that you need to make them required instead of locked. Then you won't be able to take them out, but will be able to move them to a different slot. I think?
It is suppose to work like that, but it doesn't by default.
In Yanfly's Party System script,
I added in a few pieces and got it working with just one side effect.
On line 710
return false if actor.required && actor.locked
On line 929
return false if replace.required && replace.locked

Then it works, but to move the required actor, he must be removed then added into the new spot. Might play with it some more and see if it works as it should normally.

*EDIT
Line 925
return true if actor.required && in_party?(actor)

Works as it should

Second EDIT*

Line 925 change is all that is needed. Change from false to true.
Prevents actor from being removed from the party but can be swapped with other characters.

I've moved this thread to Script Support. Thank you.

The script edit worked 10/10, thank you so much

Original thread: https://forums.rpgmakerweb.com/threads/unremovable-character.103197/