Bumping this thread as i was about to make one like it. What i've learned so far, you need to set the ship class to :
class = shipclass_science_ship
to be able to assign scientists in the first place, any other combinations you won't be able to survey. You can equip military ships with research labs and they will attack, but in the end they can't survey.
is_civilian = yes
Without it, the survey animation will play, but it will never progress, also you can't investigate anomalies. But you can research debris.
Without is_civilian = yes, or with is_civilian = no , ships can attack regardless of ship class. With it they can't attack.
I tried editing 00_utilities.txt removing the part where it says :
component_set = "science_labs"
Science labs didn't lose their function, i tried adding :
ship_behavior = "aggressive"
component_set = "combat_computers"
Didn't change a thing, the ships were still docile.
It seems that the ship combat behavior is rooted in the is_civilian = yes, as is survey progress. I couldn't find a workaround, trying combinations of ship classes and civilian yes/no.
Sorry if it is incomprehensible what i wrote, late night and I've kept working over the post as i experimented. Hopefully someone with a bigger modding experience can find a workaround, or paradox can give us that workaround.