Optional CGs are locked by attributes, relationship progress are locked by relationship stats. You can check out the spoiler sections in Discord for the different endings.