This script introduces the concept of “Member Cost”, which is the cost to have a member in your unit. The cost to have actors in the party is referred to as ”Party Cost”.
A party has a “Max Party Cost” property that is used to determine whether you can afford to have an actor in the party or not.
The “Total Party Cost” is the sum of all costs for each actor. If the total party cost exceeds the max party cost, then actors cannot be added to the party.
For example, if the total party cost is 10, the max party cost is 15, and you try to add an actor with a cost of 6 to the party, the actor will not be allowed to join the party because the total cost would then become 16.