The Mod Independence of Chile, deals with the war of emancipation of the southern cone of South America of the Spanish Empire in the century XIX. They participate in this crossing, several Factions that fight for their Independence and others to maintain the territories for the Spanish Crown. The Mapuche' people are also part of this event, but they only want their land.
Will the main gate open or does the attackers can only move through the ladders?
Only through the stairs, the drawbridge remains open when you walk through the courtyard on a normal day, but in siege, it remains closed.
It would not be necessary, because even if there is a code for that effect, when you manage to scale the walls, the battle will already be won