Having broken down the buildings text file, the differences between castle and town in the build queues is simple. There is a 'flag' that says castle or town, and which castle converts to which town in terms of build queue.

It would be simple enough to remove the castle/town references, or to make it so that both buildings build identical things. You then set the castle and towns to be built by different factions.

I will look at this a bit more closely now I have them broekn down into an excel file