Relics

Would anybody help with or explain what method should be used to determine if a squad / entity is holding a relic and pass the T/F into a variable?

To elaborate, would this be done in the attribute editor, and if so which extension would this happen in? (ability, attachment, sim_entity_ext, etc) The general idea is to manipulate things like carry capacity, gold generation amount when held by a religious building, conversion radius/time, travel speed while carrying, and anything else one could think of in regards to entities within entities.
Thanks,
Codfish