Consider looking at script_update_volunteer_troops_in_village - it determines how many troops and what troops you can recruit. It checks the player's relation and imposes (assign, ":upper_limit", ":player_relation"), and do not allow any recruiting if the relationship is negative. Create a similar structure using store_faction_of_party and store_relation to determine this.