Hi, I am new to modding but quickly got the hang of it. I did run into a small snag though looking for some advice if anyone might know?

I am trying to add a trait called scavenging where randomly after a winning a battle (they don't run) you have a random chance of acquiring one of their destroyed ships (set to orbit the closest planet if I can)

I can not seem to get it to work though, so I then tried to have the trait call the events of spawning a scout but that isn't working either.

any advice out there?