Finally started playing TR. I'm a Hamburger (project balance) patrician with a county and a city in Essex. Got 9 trade posts and control three sea zones. No idea what the merchant port building line does because +10 to trade value isn't mentioned anywhere. How does the game determine if I can war or plot to take away a trade post (other than if it belongs to the doge or not)? Do further away trade posts get an income bonus to counteract the distance penalty for construction? PB makes it and the base cost bigger, so this is a fairly large issue.
I have a city and castle in my demesne but I'm not getting a penalty to income. Regardless, the city more money than the castle and I'd like to have it too. How do I steal it from my mayor?
Do retinues stay with the family if I become doge and then lose the next election?
All trade posts are part of a trade network of connected posts you control. The more posts in that network, the bigger the boost to each post in that network's income, but it has pretty sharp diminishing returns (increases quickly for your first half-dozen trade posts, but levels off and asymptotically approaches +100%). The trading port improvements act like having a larger network, boosting the income of every trade post in that network a little... but it's a pretty small boost, and really not worth it unless you have literally nothing else to spend your money on.
To plot to take away a trade post, you must own a bordering trade post.
Further trade posts just cost more. Conquer a city/county somewhere nearby to bring costs down.
Cities within your realm are... very hard to get. You need a valid cause to revoke as Republic, you can't generally get a claim or marry to inherit. If you can somehow get the current ruler to be a different religion from you (heretic or heathen), you can revoke. Alternatively, if you really want that city you need to either get lucky or deliberately provoke a revolt from the mayor then crush it.
I'm not sure now; I know there was a bug when TR was first released where retinues would keep counting towards
your retinue cap, but be owned by the new Doge even if it wasn't in your dynasty. I'm going to be honest, if playing single-player you should really expect and plan to always be Doge. It's relatively cheap to keep the title, and you'll lose far more in lost taxes if someone else takes the position than you would save in lower election bribes.