So one of these has been discussed a lot, some timer for trade cities, so general suggestion of combat timer: Basically if you attack a player, or use a turret/ship weapon at all, you get set 5 min timer, every time you do this, timer resets to 5. This would one, be how long until your NPC would go away, and two be how long until you get protection. Maybe if you are shot at and damaged by enemies, you get 2 minutes, 30 seconds.
Now new idea I thought of, Trade city protection area:
So area of your trade city cost x amount per block per either founding, or hourly, and basically it makes it so outside there isn’t protected. Basically makes it so that if you have all of your settlement protected, it cost more. Basically making it harder to be completely invulnerable.